<%# app/views/configuracoes/edit.html.erb %>

<%= @configuracao.icone %> Editar: <%= @configuracao.tipo_label %>

Atualize o valor do pilar de preço

<%= render 'shared/flash' %> <%= form_with(model: @configuracao, url: configuracao_path(@configuracao), method: :patch, class: 'bg-[#1a1a1a] rounded-2xl border border-white/5 p-8 space-y-6') do |f| %> <% if @configuracao.errors.any? %>
<% end %>
<%= f.label :valor, 'Valor (R$)', class: 'block text-sm font-medium text-gray-300 mb-1.5' %>
R$ <%= f.number_field :valor, step: 0.01, min: 0, class: 'w-full pl-10 pr-4 py-3 bg-[#0a0a0a] border border-white/10 rounded-xl text-white text-xl font-bold focus:outline-none focus:border-[#f97316] focus:ring-1 focus:ring-[#f97316] transition-colors', placeholder: '0.00' %>

Valor atual: <%= moeda(@configuracao.valor) %>

<%= f.label :descricao, 'Descrição (opcional)', class: 'block text-sm font-medium text-gray-300 mb-1.5' %> <%= f.text_area :descricao, rows: 2, class: 'w-full px-4 py-3 bg-[#0a0a0a] border border-white/10 rounded-xl text-white placeholder-gray-600 focus:outline-none focus:border-[#f97316] focus:ring-1 focus:ring-[#f97316] transition-colors resize-none', placeholder: 'Ex: Entrega padrão para UBS e EMAD' %>
<%= link_to 'Cancelar', configuracoes_path, class: 'px-6 py-3 text-gray-400 hover:text-white border border-white/10 hover:border-white/20 rounded-xl transition-colors' %> <%= f.submit 'Salvar Preço', class: 'px-8 py-3 bg-[#f97316] hover:bg-orange-500 text-white font-semibold rounded-xl transition-colors cursor-pointer min-h-[48px]' %>
<% end %>