/* =========================================================
   NOSSO PROJETO 3D — V1 BÁSICA
   Token system:
   - Paleta vibrante e "brilhosa": gradiente violeta -> ciano,
     usada de forma consistente em toda a interface, incluindo
     o preço final
   - Tipografia: Space Grotesk (display) / Inter (corpo) / JetBrains Mono (leitura numérica)
   - Elemento de assinatura: painel "readout" no estilo tela LCD de impressora
   ========================================================= */

:root{
  --bg: #101014;
  --surface: #17171E;
  --surface-2: #1F1F28;
  --border: #30303C;
  --text: #F1F1F6;
  --text-muted: #8D8DA0;

  /* acento vibrante (gradiente violeta -> ciano) usado em toda a interface,
     inclusive no preço final */
  --accent-1: #8B5CF6;
  --accent-2: #22D3EE;
  --accent-grad: linear-gradient(135deg, var(--accent-1) 0%, var(--accent-2) 100%);
  --accent-soft: rgba(139, 92, 246, 0.16);
  --accent-glow: rgba(34, 211, 238, 0.45);
  /* tom intermediário do gradiente violeta -> ciano, usado no gráfico de
     pizza (fatia "Lucro") sem sair da paleta já estabelecida */
  --accent-mid: color-mix(in srgb, var(--accent-1) 50%, var(--accent-2) 50%);

  /* aviso (nota de arredondamento) */
  --amber: #FBBF24;

  /* erro de validação */
  --error: #F0596B;
  --error-soft: rgba(240, 89, 107, 0.12);

  /* Cores fixas do gráfico de pizza pra cada custo profissional — uma por
     tipo, sempre a mesma, diferentes das cores de Filamento/Energia/Lucro
     acima. Escolhidas e validadas (contraste + daltonismo) pra se manterem
     distinguíveis entre si mesmo com muitas fatias ativas ao mesmo tempo. */
  --pro-wear: #e66767;
  --pro-labor: #17a317;
  --pro-failure: #BB6BB5;
  --pro-packaging: #c98500;
  --pro-materials: #d55181;
  --pro-shopee: #7E9128;
  --pro-meli: #A82D5C;
  --pro-shipping: #d95926;
  --pro-taxes: #8B4E1A;

  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  --radius: 14px;
  --shadow: 0 10px 30px rgba(0,0,0,0.4);
}

[data-theme="light"]{
  --bg: #F3F2F8;
  --surface: #FFFFFF;
  --surface-2: #F7F6FB;
  --border: #E1DEEE;
  --text: #14141B;
  --text-muted: #67677A;

  --accent-1: #7C3AED;
  --accent-2: #0EA5C4;
  --accent-grad: linear-gradient(135deg, var(--accent-1) 0%, var(--accent-2) 100%);
  --accent-soft: rgba(124, 58, 237, 0.10);
  --accent-glow: rgba(14, 165, 196, 0.30);

  --pro-wear: #e34948;
  --pro-labor: #008300;
  --pro-failure: #9C3D8E;
  --pro-packaging: #eda100;
  --pro-materials: #e87ba4;
  --pro-shopee: #6B7A1E;
  --pro-meli: #C2185B;
  --pro-shipping: #eb6834;
  --pro-taxes: #8B4513;

  --shadow: 0 10px 24px rgba(30, 20, 50, 0.10);
}

*{ box-sizing: border-box; }

/* Garante que o atributo [hidden] sempre vença, independentemente
   de outras regras de display definidas nos componentes (.field, etc.) */
[hidden]{ display: none !important; }

html, body{
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

/* Remove as setinhas nativas de incremento/decremento dos campos numéricos */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button{
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"]{
  -moz-appearance: textfield;
  appearance: textfield;
}

/* ===================== CABEÇALHO ===================== */
.topbar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  z-index: 10;
}

.brand{ display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }

.brand-mark{
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.brand-mark img{
  width: 100%; height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px var(--accent-glow));
}

.brand-text{ display: flex; flex-direction: column; justify-content: center; line-height: 1.25; min-width: 0; }
.brand-text strong{ font-family: var(--font-display); font-size: 15px; letter-spacing: 0.2px; }
.brand-tag{
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.2px;
  line-height: 1.35;
}

.header-actions{ display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.icon-btn{
  width: 38px; height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: border-color .15s ease, transform .15s ease;
}
.icon-btn:hover{ border-color: var(--accent-2); transform: translateY(-1px); }

/* Botão de instalar o app: recebe um leve destaque no gradiente da marca */
#installBtn{
  border-color: var(--accent-1);
  color: var(--accent-2);
}

/* ===================== BANNER: INSTALAR APP ===================== */
.install-banner{
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  width: calc(100% - 32px);
  max-width: 720px;
  margin: 16px auto 0;
  padding: 14px 42px 14px 14px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-1);
  border-radius: 12px;
  box-shadow: 0 6px 20px -10px var(--accent-glow);
  box-sizing: border-box;
}

.install-banner-main{
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 220px;
}

.install-banner-icon{
  width: 36px; height: 36px;
  border-radius: 9px;
  flex-shrink: 0;
}

.install-banner-text{
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.install-banner-text strong{ font-family: var(--font-display); font-size: 13.5px; }
.install-banner-text span{ font-size: 12px; color: var(--text-muted); }

.btn-install{
  flex-shrink: 0;
  padding: 9px 16px;
  border: none;
  border-radius: 9px;
  background: var(--accent-grad);
  color: #0D0D12;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn-install:hover{ transform: translateY(-1px); box-shadow: 0 8px 18px var(--accent-glow); }

@media (max-width: 520px){
  .install-banner{ padding: 14px 42px 14px 14px; }
  .btn-install{ width: 100%; }
}

/* Botão "x" de fechar — reutilizado nos banners (instalar app / projeto gratuito).
   Sempre fixo no canto superior direito do card, independente de como o
   resto do conteúdo quebra a linha em telas menores. */
.banner-close{
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px; height: 26px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  border-radius: 6px;
  transition: color .15s ease, background .15s ease;
}
.banner-close:hover{ color: var(--text); background: rgba(0,0,0,0.15); }

/* ===================== BANNER: PROJETO GRATUITO + INSTAGRAM ===================== */
.free-banner{
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 620px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--accent-1);
  border-radius: 14px;
  padding: 16px 42px 16px 16px;
  box-shadow: var(--shadow), 0 0 32px -14px var(--accent-glow);
  box-sizing: border-box;
  animation: freeBannerIn .35s ease;
}

@keyframes freeBannerIn{
  from{ opacity: 0; transform: translateX(-50%) translateY(16px); }
  to{ opacity: 1; transform: translateX(-50%) translateY(0); }
}

.free-banner-main{
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.free-banner-icon{ font-size: 17px; line-height: 1.3; flex-shrink: 0; }
.free-banner-text{
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.btn-follow{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  align-self: flex-start;
  padding: 10px 18px;
  border-radius: 9px;
  background: var(--accent-grad);
  color: #0D0D12;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn-follow:hover{ transform: translateY(-1px); box-shadow: 0 8px 18px var(--accent-glow); }

@media (max-width: 520px){
  .free-banner{ bottom: 10px; }
  .btn-follow{ align-self: stretch; }
}

/* ===================== TOAST RÁPIDO ===================== */
/* Feedback temporário e discreto (ex.: "Taxa X desativada..."). Aparece
   sozinho por alguns segundos e some sem precisar de clique — ver
   showQuickToast em script.js. */
.quick-toast{
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 90;
  max-width: calc(100% - 32px);
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--accent-1);
  border-radius: 10px;
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 13px;
  text-align: center;
  animation: quickToastIn .25s ease;
}

@keyframes quickToastIn{
  from{ opacity: 0; transform: translateX(-50%) translateY(8px); }
  to{ opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Margem superior do conteúdo principal quando o banner aparece,
   pra não colar direto na barra de topo */
.modal-overlay{
  position: fixed;
  inset: 0;
  background: rgba(6, 6, 9, 0.62);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}

.modal-card{
  width: 100%;
  max-width: 360px;
  background: var(--surface);
  border: 1px solid var(--accent-1);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow), 0 0 40px -18px var(--accent-glow);
}

.modal-card h3{
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 16px;
}

.modal-card ol{
  margin: 0 0 18px;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.4;
}
.modal-card ol strong{ color: var(--text); }

.modal-card .btn-secondary{ margin-top: 0; }

/* Variante maior do modal, usada nas Configurações da loja — tem bem
   mais campos que o modal de instruções de instalação, então precisa
   de mais largura e de rolagem própria em telas baixas. */
.modal-card-lg{
  max-width: 480px;
  max-height: 86vh;
  overflow-y: auto;
}
.modal-card-lg h3{ margin-bottom: 6px; }
.modal-card-lg > .hint{ margin-bottom: 16px; }

/* Título de subseção dentro do modal de Configurações da loja (ex.: "Taxa
   Shopee") — separa visualmente um grupo de campos relacionados, no mesmo
   tom de acento usado no cabeçalho do painel de resultado (.readout-head). */
.settings-subheading{
  margin: 4px 0 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--accent-2);
}

.modal-actions{
  display: flex;
  gap: 10px;
  margin-top: 4px;
}
.modal-actions .btn-primary,
.modal-actions .btn-secondary{
  margin-top: 0;
  width: auto;
  flex: 1;
}

/* ===================== LAYOUT ===================== */
.page{
  max-width: 720px;
  margin: 0 auto;
  padding: 22px 16px 60px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ===================== SEGMENTED CONTROL: BÁSICO / PROFISSIONAL ===================== */
.mode-switch{
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.mode-switch-btn{
  flex: 1;
  padding: 9px 14px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.mode-switch-btn:hover{ color: var(--text); }
.mode-switch-btn.active{
  background: var(--accent-grad);
  color: #0D0D12;
  box-shadow: 0 6px 16px var(--accent-soft);
}

/* ===================== ANIMAÇÃO DE EXPANSÃO =====================
   Usada tanto pela seção "Custos profissionais" (modo Profissional)
   quanto pelo campo de valor de cada custo profissional (switch on/off).
   Truque do grid-template-rows: 0fr -> 1fr anima a altura de "auto"
   sem precisar calcular pixels em JS. */
.reveal{
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .28s ease;
}
.reveal.open{ grid-template-rows: 1fr; }
.reveal-inner{ overflow: hidden; min-height: 0; }

.panel{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.panel-title{
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.step-dot{
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent-grad);
  color: #0D0D12;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* Badge "PRO" no título do card de custos profissionais — mesmo papel
   visual do .step-dot numerado, mas sem número (a seção não faz parte
   da sequência fixa 1/2/3 do fluxo Básico). */
.step-badge{
  padding: 0 8px;
  height: 22px;
  border-radius: 999px;
  background: var(--accent-grad);
  color: #0D0D12;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* ===================== ITENS DE CUSTO PROFISSIONAL ===================== */
.pro-item-grid{
  display: grid;
  gap: 12px;
}

.pro-item{
  padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
}

/* Botões de atalho (ex.: 5% / 10% / 15% na Margem de falha) — preenchem
   o campo ao lado com um toque, sem travar a digitação manual. */
.chip-row{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.chip-btn{
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.chip-btn:hover{ border-color: var(--accent-2); color: var(--text); }
.chip-btn.active{
  background: var(--accent-grad);
  border-color: transparent;
  color: #0D0D12;
}

.pro-item-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pro-item-label{
  font-size: 13.5px;
  color: var(--text);
  font-weight: 500;
}

/* Aviso fixo acima do campo (ex.: ressalva da Taxa Mercado Livre sobre
   categoria/frete grátis) — mesma classe .hint, só troca a cor pra chamar
   mais atenção que uma dica comum. */
.pro-item-warning{
  color: var(--amber);
  margin-bottom: 4px;
}

/* Seletor de faixa de taxa de marketplace (Taxa Shopee e Taxa Mercado
   Livre) — cartões estilo rádio (faixas + Personalizado), mesmo espírito
   visual dos atalhos (.chip-btn) da Margem de falha, só maiores e em
   coluna pra caber a descrição completa. */
.tier-options{
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tier-option{
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.tier-option:hover{ border-color: var(--accent-2); color: var(--text); }
.tier-option.active{
  background: var(--accent-soft);
  border-color: var(--accent-1);
  color: var(--text);
  font-weight: 600;
}

/* Linha com o campo numérico + um seletor ao lado (ex.: tipo de anúncio
   Clássico/Premium da Taxa Mercado Livre). */
.pro-input-row{
  display: flex;
  gap: 8px;
}
.pro-input-row input{ flex: 2; min-width: 0; }
.pro-input-row select{ flex: 1; min-width: 0; }

.field-grid{ display: grid; gap: 14px; margin-bottom: 14px; }
.field-grid:last-child{ margin-bottom: 0; }
.field-grid.two-cols{ grid-template-columns: 1fr 1fr; }
@media (max-width: 520px){
  .field-grid.two-cols{ grid-template-columns: 1fr; }
}

.field{ display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field:last-child{ margin-bottom: 0; }

/* Dentro de um field-grid o espaçamento já vem do "gap" do grid —
   zera a margem própria do .field para não somar os dois e criar
   um vão maior do que o resto do layout (bug visto no mobile,
   ex.: entre os campos de horas e minutos). */
.field-grid .field{ margin-bottom: 0; }

.field label, .pseudo-label{
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
}

.field select,
.field input[type="text"],
.field input[type="number"]{
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 10px 12px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14.5px;
  width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.field select:focus,
.field input:focus{
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Campo bloqueado por conta da seleção mutuamente exclusiva (% x valor fixo) */
.field input.disabled-field{
  opacity: 0.4;
  cursor: not-allowed;
  background: var(--surface);
}

/* Estado de campo obrigatório não preenchido */
.field select.invalid,
.field input.invalid{
  border-color: var(--error);
  background: var(--error-soft);
}
.field select.invalid:focus,
.field input.invalid:focus{
  box-shadow: 0 0 0 3px var(--error-soft);
}

.field-error-text{
  margin: 0;
  font-size: 12px;
  color: var(--error);
}

.hint{
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

/* Switch (toggle) */
.switch{
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  margin-top: 2px;
}
.switch input{ position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track{
  width: 40px; height: 22px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  position: relative;
  transition: background .15s ease;
  flex-shrink: 0;
}
.switch-thumb{
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: transform .18s ease, background .18s ease;
}
.switch input:checked + .switch-track{ background: var(--accent-grad); border-color: transparent; }
.switch input:checked + .switch-track .switch-thumb{ transform: translateX(18px); background: #0D0D12; }
.switch-text{ font-size: 13.5px; color: var(--text); }

/* Botão principal (Calcular preço) */
.btn-primary{
  width: 100%;
  margin-top: 4px;
  padding: 13px 16px;
  border: none;
  border-radius: 10px;
  background: var(--accent-grad);
  color: #0D0D12;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
  box-shadow: 0 6px 20px var(--accent-soft);
}
.btn-primary:hover{ transform: translateY(-1px); box-shadow: 0 10px 26px var(--accent-glow); }
.btn-primary:active{ transform: translateY(0); }

/* Botão secundário (Limpar tudo) */
.btn-secondary{
  width: 100%;
  margin-top: 10px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}
.btn-secondary:hover{ border-color: var(--accent-2); color: var(--text); }

/* ===================== PAINEL DE RESULTADO (assinatura visual) ===================== */
.readout{
  position: relative;
  overflow: hidden;
  background: radial-gradient(120% 140% at 15% 0%, #241E36 0%, var(--surface) 55%);
  border: 1px solid var(--accent-1);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow), 0 0 0 1px rgba(139,92,246,0.08), 0 0 40px -18px var(--accent-glow);
}

[data-theme="light"] .readout{
  background: radial-gradient(120% 140% at 15% 0%, #EFE8FC 0%, var(--surface) 60%);
}

.readout-scanline{
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(139,92,246,0.04) 0px,
    rgba(139,92,246,0.04) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
}

.readout-head{
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--accent-2);
  text-transform: uppercase;
  margin-bottom: 14px;
}

.readout-led{
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent-grad);
  box-shadow: 0 0 10px var(--accent-glow);
  animation: blink 2.4s ease-in-out infinite;
}
@keyframes blink{ 0%,100%{ opacity: 1; } 50%{ opacity: 0.35; } }

.readout-main{
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 18px;
}
.readout-label{ font-size: 12.5px; color: var(--text-muted); }
.readout-value{
  font-family: var(--font-mono);
  font-size: clamp(32px, 8vw, 44px);
  font-weight: 700;
  letter-spacing: 0.5px;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px var(--accent-glow));
  transition: opacity .15s ease;
}
.readout-value.pulse{ animation: pulseIn .4s ease; }
@keyframes pulseIn{ from{ opacity: 0.2; transform: translateY(2px); } to{ opacity: 1; transform: translateY(0); } }

.readout-sub{ font-size: 12px; color: var(--amber); min-height: 16px; }

.readout-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.readout-cell{
  background: rgba(0,0,0,0.22);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
[data-theme="light"] .readout-cell{ background: rgba(0,0,0,0.03); }

.readout-cell-label{ font-size: 10.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; }
.readout-cell-value{ font-family: var(--font-mono); font-size: 15px; font-weight: 600; color: var(--accent-2); }
.readout-cell-sub{ font-size: 11px; color: var(--text-muted); }

/* ===================== GRÁFICO DE PIZZA (breakdown de custos) ===================== */
.readout-pie{
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.pie-chart{ flex-shrink: 0; line-height: 0; }

.pie-legend{
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.pie-legend-item{
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.pie-legend-swatch{
  width: 9px; height: 9px;
  border-radius: 3px;
  flex-shrink: 0;
}

.pie-legend-label{
  color: var(--text-muted);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pie-legend-value{
  font-family: var(--font-mono);
  color: var(--text);
  font-weight: 600;
  flex-shrink: 0;
}

@media (max-width: 420px){
  .readout-pie{ flex-direction: column; align-items: stretch; }
  .pie-chart{ align-self: center; }
}

/* Botão de copiar orçamento para WhatsApp */
.btn-copy{
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--accent-1);
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: background .15s ease, opacity .15s ease, box-shadow .15s ease;
}
.btn-copy:hover{ box-shadow: 0 6px 18px var(--accent-soft); }
.btn-copy:disabled{ opacity: 0.4; cursor: not-allowed; box-shadow: none; }
.btn-copy.copied{ border-color: var(--accent-2); color: var(--accent-2); background: var(--accent-soft); }

/* Botão de exportação (PDF) — secundário e discreto de propósito,
   abaixo do botão principal de copiar pro WhatsApp (sem o destaque do gradiente). */
.export-actions{
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.btn-ghost{
  flex: 1;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}
.btn-ghost:hover{ border-color: var(--accent-2); color: var(--text); }
.btn-ghost:disabled{ opacity: 0.4; cursor: not-allowed; border-color: var(--border); color: var(--text-muted); }

.export-error{ margin-top: 8px; text-align: center; }

@media (max-width: 420px){
  .export-actions{ flex-direction: column; }
}

/* ===================== RODAPÉ ===================== */
.site-footer{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.footer-verse{
  margin: 0;
  max-width: 380px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-muted);
}
.footer-verse span{
  display: block;
  margin-top: 4px;
  font-style: normal;
  font-size: 10.5px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--accent-2);
}

.footer-social{
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--accent-1);
  background: var(--accent-soft);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: box-shadow .15s ease, transform .15s ease;
}
.footer-social svg{ color: var(--accent-2); }
.footer-social:hover{ box-shadow: 0 6px 18px var(--accent-soft); transform: translateY(-1px); }

.footer-copy{
  font-size: 11px;
  color: var(--text-muted);
}
