/* ============================================================
   Casca visual Nortia — header, footer, container, abas, cards,
   campos e botões no padrão das ferramentas.
   Carregado DEPOIS dos CSS legados, para sobrepor o que sobrou
   do tema claro original (gradiente azul/roxo, cards brancos).
   Ver: Ferramentas/_meta/PADRAO-FERRAMENTAS.md (seções 3, 4, 7)
   ============================================================ */

/* ===== BASE ===== */
body {
  font-family: var(--font);
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Brilhos de fundo da marca (mesmo efeito da calculadora) */
.bg-effects { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.bg-effects::before,
.bg-effects::after { content: ''; position: absolute; border-radius: 50%; }
.bg-effects::before {
  width: 600px; height: 600px; top: -200px; right: -200px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
}
.bg-effects::after {
  width: 500px; height: 500px; bottom: -150px; left: -150px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.06) 0%, transparent 70%);
}

.container {
  position: relative; z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ===== HEADER ===== */
.header {
  text-align: center;
  padding: 40px 0 10px;
  margin-bottom: 24px;
  color: var(--text-primary);
}
.header-logo-link { display: inline-block; margin-bottom: 24px; transition: opacity 0.2s ease; }
.header-logo-link:hover { opacity: 0.85; }
.header-logo { height: 44px; width: auto; display: none; }
.logo-dark { display: inline-block; }
.logo-light { display: none; }

.header-content h1 {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 10px;
  text-shadow: none;
  background: linear-gradient(135deg, var(--text-primary), var(--primary-light), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.header-content p {
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  color: var(--text-secondary);
  opacity: 1;
  font-weight: 400;
  max-width: 600px;
  margin: 0 auto;
}

/* ===== ABAS ===== */
.tabs { display: flex; justify-content: center; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
.tab-btn {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 13px 22px;
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: none;
}
.tab-btn:hover { border-color: var(--primary); background: rgba(139, 92, 246, 0.06); color: var(--text-primary); }
.tab-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.25);
}
.tab-btn.active .tab-subtitle,
.tab-btn.active .tab-title { color: #fff; }
.tab-title { color: inherit; }
.tab-subtitle { color: var(--text-muted); }
.tab-icon svg { display: block; }

/* ===== CARDS ===== */
.calculator-container,
.tab-explanation,
.results-container,
.result-card,
.dani-tips,
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
}
.calculator-container {
  padding: 30px 28px;
  position: relative;
  overflow: hidden;
}
/* Faixa de 3px com o gradiente da marca no topo do card principal */
.calculator-container::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
  opacity: 0.5;
}

.tab-explanation {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px;
  margin-bottom: 22px;
  background: rgba(139, 92, 246, 0.06);
  border-color: rgba(139, 92, 246, 0.18);
  border-radius: var(--radius-sm);
}
.explanation-icon {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
}
.explanation-icon svg { display: block; }
.explanation-text h3 { font-size: 1.05rem; font-weight: 700; color: var(--text-primary); }
.explanation-text p { font-size: 0.85rem; color: var(--text-secondary); margin: 2px 0 0; }

/* ===== CAMPOS ===== */
.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex; align-items: center; gap: 6px;
}
.form-group label svg { flex-shrink: 0; }
.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.95rem;
  padding: 11px 14px;
  width: 100%;
  transition: var(--transition);
  outline: none;
}
.form-group input:hover,
.form-group select:hover { border-color: rgba(139, 92, 246, 0.3); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.form-group input::placeholder { color: var(--text-muted); }
.form-group input[type="number"] { -moz-appearance: textfield; }
.form-group input[type="number"]::-webkit-outer-spin-button,
.form-group input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.form-group small,
.form-group .helper { font-size: 0.74rem; color: var(--text-muted); }

/* ===== BOTÕES ===== */
.btn,
.calculate-btn,
button[type="submit"] {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 13px 28px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}
.calculate-btn,
.btn-primary,
button[type="submit"] {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.25);
}
.calculate-btn:hover,
.btn-primary:hover,
button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.35);
}
.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border);
}
.btn-secondary:hover { border-color: var(--primary); background: rgba(139, 92, 246, 0.05); }

/* ===== RESULTADOS ===== */
.result-card { padding: 20px; text-align: center; transition: var(--transition); }
.result-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.result-value,
.price-final { color: var(--success); font-weight: 800; }
.result-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); font-weight: 600; }

/* ===== FOOTER (obrigatório, idêntico em todas as ferramentas) ===== */
.site-footer {
  text-align: center;
  padding: 40px 20px 24px;
  margin-top: 32px;
  border-top: 1px solid var(--border);
}
.footer-logo-link { display: inline-block; margin-bottom: 14px; transition: opacity 0.2s ease; }
.footer-logo-link:hover { opacity: 0.85; }
.footer-logo { height: 34px; width: auto; display: none; }
.footer-text { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 6px; }
.footer-text a,
.footer-copy a { color: var(--primary-light); text-decoration: none; }
.footer-text a:hover,
.footer-copy a:hover { text-decoration: underline; }
.footer-copy { font-size: 0.75rem; color: var(--text-muted); }

/* ===== ACESSIBILIDADE ===== */
.skip-link {
  position: fixed; top: -100%; left: 16px; z-index: 99999;
  background: var(--primary); color: #fff;
  padding: 10px 16px; border-radius: var(--radius-xs);
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 16px; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--primary-glow); }

/* ===== ÍCONES (substituem o Font Awesome, ver assets/js/nortia-icons.js) ===== */
.nortia-icon-wrap { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nortia-icon { display: block; }
h1 .nortia-icon, h2 .nortia-icon, h3 .nortia-icon { width: 1em; height: 1em; }
.tab-icon .nortia-icon, .explanation-icon .nortia-icon { width: 20px; height: 20px; }

/* Botões específicos desta ferramenta seguindo o padrão */
.btn-calculate {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.25);
}
.btn-calculate:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(139, 92, 246, 0.35); }
.btn-clear {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border);
}
.btn-clear:hover { border-color: var(--danger); background: rgba(239, 68, 68, 0.06); }
.btn-calculate, .btn-clear {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font); font-weight: 700; font-size: 0.95rem;
  padding: 13px 28px; border-radius: var(--radius-sm); cursor: pointer;
  transition: var(--transition);
}
.btn-calculate { border: none; }
.action-buttons { display: flex; gap: 12px; margin-top: 22px; }

/* ===== SEMÂNTICA DE COR (correção do legado) =====
   No padrão Nortia, verde = valor saudável/sugerido, não ação. Estes eram
   botões de ação secundária pintados de verde no tema antigo — viram outline.
   Ver PADRAO-FERRAMENTAS.md, seção 2 (semântica das cores). */
.btn-maquininha,
.calc-btn,
#imposto-regime-btn,
.btn-regime,
.btn-imposto {
  background: transparent !important;
  background-image: none !important;
  color: var(--primary-light) !important;
  border: 1.5px solid var(--primary) !important;
  box-shadow: none !important;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: var(--font); font-weight: 700; font-size: 0.85rem;
  padding: 10px 16px; border-radius: var(--radius-sm);
  cursor: pointer; transition: var(--transition); white-space: nowrap;
}
.btn-maquininha:hover,
.calc-btn:hover,
.btn-regime:hover,
.btn-imposto:hover {
  background: rgba(139, 92, 246, 0.1) !important;
  color: var(--text-primary) !important;
}

/* Botão de informação (ⓘ): discreto, não é ação principal */
.info-btn {
  background: rgba(139, 92, 246, 0.15) !important;
  background-image: none !important;
  color: var(--primary-light) !important;
  border: none !important;
  border-radius: 50% !important;
  width: 34px; height: 34px; min-width: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: none !important;
  cursor: pointer;
}
.info-btn:hover { background: rgba(139, 92, 246, 0.3) !important; }

/* Cabeçalho "Dicas da Dani": era um bloco âmbar sólido; passa a usar o
   gradiente da marca, como todo cabeçalho de destaque das ferramentas. */
.dani-tips-header,
.dani-tips-title,
.tips-header {
  background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
  color: #fff !important;
}

/* Aviso informativo leve (showInfo em script.js) — não é erro, não é vermelho */
.nortia-info-note {
  display: flex; align-items: flex-start; gap: 10px;
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 0 0 18px;
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.55;
}
.nortia-info-note .nortia-icon-wrap { color: var(--accent); margin-top: 2px; }
.nortia-info-note span { flex: 1; }
.nortia-info-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 1.2rem; line-height: 1;
  padding: 0 2px; flex-shrink: 0;
}
.nortia-info-close:hover { color: var(--text-primary); }

/* Badges de benefício: eram bloco âmbar sólido com texto branco (contraste ruim
   e cor sem semântica). Passam a ser tinta translúcida + texto colorido. */
.benefit-badge {
  background: rgba(245, 158, 11, 0.12) !important;
  background-image: none !important;
  color: var(--warning) !important;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 50px;
  padding: 4px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex; align-items: center; gap: 5px;
  white-space: nowrap;
}

/* ===== EMOJI EM `content:` DO CSS =====
   Pseudo-elemento não aceita SVG inline, então aqui o padrão é: remover o emoji
   e resolver com forma/cor do design system. Nenhum emoji sobra na interface.
   Ver PADRAO-FERRAMENTAS.md, seção 5 (emoji é proibido em interface). */

/* Selo "quente/popular": era 🔥 — vira um ponto pulsante da marca */
.maquininha-card .popular-badge::before,
.popular-badge::before,
.badge-popular::before { content: '' !important; }
.popular-badge {
  background: rgba(139, 92, 246, 0.15) !important;
  color: var(--primary-light) !important;
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 50px;
  padding: 3px 10px;
  font-size: 0.68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em;
  display: inline-flex; align-items: center; gap: 5px;
}
.popular-badge::after {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--success); flex-shrink: 0;
}

/* Ícones de categoria do autocomplete: eram emoji por classe.
   Viram um disco com a inicial da categoria, na cor da marca. */
.categoria-icon::before { content: '' !important; }
.categoria-icon {
  width: 26px; height: 26px; border-radius: 8px;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.25);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  position: relative;
}
.categoria-icon::after {
  font-size: 0.72rem; font-weight: 800; color: var(--primary-light);
  line-height: 1;
}
.categoria-icon.cabelo::after    { content: 'CB'; }
.categoria-icon.unhas::after     { content: 'UN'; }
.categoria-icon.depilacao::after { content: 'DP'; }
.categoria-icon.design::after    { content: 'DS'; }
.categoria-icon.maquiagem::after { content: 'MQ'; }
.categoria-icon.estetica::after  { content: 'ET'; }

/* Demais emoji decorativos em content: simplesmente saem */
.autocomplete-empty::before,
.no-results::before { content: '' !important; }

/* Emoji decorativo em títulos de blocos de lucro e no loading do autocomplete */
.lucro-atual-info h3::before,
.lucro-desejado-info h3::before { content: '' !important; }
.autocomplete-loading::before {
  content: '' !important;
  display: inline-block; width: 12px; height: 12px; margin-right: 8px;
  border: 2px solid rgba(139, 92, 246, 0.25);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Selo "popular" do cartão de maquininha: era 🔥 no canto — vira um ponto
   pulsante da marca, mesma linguagem do resto das ferramentas. */
.maquininha-card.popular::before {
  content: '' !important;
  position: absolute; top: 12px; right: 12px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary-light);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.18);
  font-size: 0 !important;
}

/* Realce do termo buscado no autocomplete: era amarelo padrão de navegador
   (fundo #ff0 com texto escuro), ilegível no tema escuro. Vira tinta da marca. */
.autocomplete-item .highlight,
.highlight {
  background: rgba(139, 92, 246, 0.25) !important;
  color: var(--primary-light) !important;
  font-weight: 700;
  border-radius: 3px;
  padding: 0 2px;
}
