/* ==========================================================
   EXATO — tema "livro-caixa"
   Papel, tinta e o verde da marca. Bordas finas, sem brilhos.
   Carregado por último: redefine tokens e substitui os efeitos.
   ========================================================== */
:root {
  --font-ui: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
  --font-display: 'IBM Plex Serif', Georgia, 'Times New Roman', serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;

  --paper: #F4F6F5;
  --ink-950: #102019;
  --ink-900: #16261F;
  --ink-800: #1F3129;
  --ink-700: #2B3F36;

  --bg: #F4F6F5;
  --bg-2: #EAEEEC;
  --surface: #FFFFFF;
  --surface-2: #F8FAF9;
  --line: #DCE2DF;
  --line-2: #C8D0CC;
  --text: #1C2622;
  --text-2: #46524D;
  --muted: #6C7873;

  --brand: #0A6B4E;
  --brand-600: #064A36;
  --brand-50: #E8F2ED;
  --brand-100: #D2E6DC;
  --teal: #0A6B4E;
  --gold: #8A6A1F;
  --gold-50: #F6F1E4;

  --pos: #0A6B4E;
  --pos-50: #E8F2ED;
  --neg: #A8322A;
  --neg-50: #F8EAE8;
  --warn: #946312;
  --warn-50: #F7F0E2;
  --info: #2C5A73;
  --info-50: #EAF1F4;

  --r-sm: 4px;
  --r: 5px;
  --r-lg: 6px;
  --r-xl: 8px;
  --sh-1: none;
  --sh-2: 0 1px 3px rgba(16, 32, 25, .08);
  --sh-3: 0 12px 32px -12px rgba(16, 32, 25, .28);
  --ring: 0 0 0 3px rgba(10, 107, 78, .22);
}
:root[data-theme="dark"] {
  --paper: #121915;
  --bg: #121915;
  --bg-2: #18211C;
  --surface: #1A231F;
  --surface-2: #1F2924;
  --line: #2A3631;
  --line-2: #36443D;
  --text: #E7ECE9;
  --text-2: #BFC9C4;
  --muted: #8C9993;
  --brand: #4FBF94;
  --brand-600: #7AD3B0;
  --brand-50: #17342A;
  --brand-100: #1E4436;
  --pos: #4FBF94;
  --pos-50: #17342A;
  --neg: #E58A80;
  --neg-50: #3A1F1C;
  --warn: #D9A548;
  --warn-50: #33291A;
  --info: #8DB8CC;
  --info-50: #1C2C33;
  --ring: 0 0 0 3px rgba(79, 191, 148, .25);
}

body { font-size: 14px; font-feature-settings: normal; letter-spacing: 0; }
h1, h2, h3, h4 { letter-spacing: -.005em; }
::selection { background: var(--brand-100); }
:focus-visible { border-radius: 3px; }

/* ---------- Botões: chapados, sem degradê e sem "pulo" ---------- */
.btn { border-radius: var(--r); font-weight: 600; letter-spacing: 0; transition: background .15s, border-color .15s, color .15s; }
.btn:hover { transform: none; box-shadow: none; border-color: var(--text-2); }
.btn:active { transform: none; }
.btn-primary { --b-bg: var(--brand); background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: none; }
.btn-primary:hover { background: var(--brand-600); border-color: var(--brand-600); box-shadow: none; }
.btn-gold { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: none; }
.btn-gold:hover { background: var(--brand-600); }
.btn-ghost:hover { border-color: transparent; background: var(--bg-2); }
.btn-sm, .btn-lg { border-radius: var(--r); }
.ripple { display: none !important; }

/* ---------- Campos: estilo formulário ---------- */
.input, .select, textarea.input { border-radius: var(--r-sm); font-weight: 400; }
.field > label, .lbl { font-weight: 500; color: var(--text-2); }
.input:hover, .select:hover { border-color: var(--line-2); }
.seg { border-radius: var(--r); padding: 2px; }
.seg button { border-radius: 3px; font-weight: 500; }
.seg button.on { box-shadow: 0 0 0 1px var(--line-2); color: var(--brand-600); font-weight: 600; }
.switch .track { border-radius: 3px; }
.switch .track::after { border-radius: 2px; box-shadow: none; }

/* ---------- Cartões e etiquetas ---------- */
.card { border-radius: var(--r-lg); box-shadow: none; }
.card-head h3 { font-weight: 600; }
.card-head .ico, .acc-h .ico, .qa .ico { background: transparent; color: var(--brand); border: 1px solid var(--line); border-radius: var(--r-sm); }
.tag { border-radius: 3px; font-weight: 500; height: 22px; }
.dot { box-shadow: none; width: 6px; height: 6px; }
.dot.live { animation: none; }
.alert { border-radius: var(--r); border-left: 3px solid currentColor; }
.table th { text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 600; color: var(--text-2); }
.toast { border-radius: var(--r); background: var(--ink-900); }
.toast.ok { background: var(--brand-600); }
.toast.erro { background: var(--neg); }
.modal { border-radius: var(--r-xl); }
.fade-in { animation: none; }

/* ---------- Abertura ---------- */
.boot { background: var(--paper); }
.boot img { animation: none; }
.boot-bar { background: var(--line); }
.boot-bar i { background: var(--brand); }
.boot p { color: var(--muted); }

/* ---------- Menu lateral: folha branca ---------- */
.side { background: var(--surface); color: var(--text-2); border-right: 1px solid var(--line); }
.side::before { display: none; }
.side-brand strong { color: var(--text); font-family: var(--font-ui); font-weight: 700; letter-spacing: .02em; }
.side-brand span { color: var(--brand); letter-spacing: .04em; font-weight: 500; font-size: 11px; text-transform: lowercase; }
.side-brand span::first-letter { text-transform: uppercase; }
.nav { scrollbar-color: var(--line-2) transparent; }
.nav-g { text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 500; color: var(--muted); padding: 14px 10px 4px; }
.nav a { color: var(--text-2); border-radius: var(--r-sm); height: 36px; font-size: 13.5px; transition: background .12s, color .12s; }
.nav a svg { opacity: .7; }
.nav a:hover { background: var(--bg-2); color: var(--text); }
.nav a.on { background: var(--brand-50); color: var(--brand-600); font-weight: 600; }
.nav a.on::before { background: var(--brand); border-radius: 0; width: 2px; top: 6px; bottom: 6px; }
.nav a.on svg { color: var(--brand); opacity: 1; }
.nav a .new { background: none; color: var(--brand); font-size: 11px; letter-spacing: 0; font-weight: 600; text-transform: lowercase; padding: 0; }
.side-foot { border-top: 1px solid var(--line); }
.avatar { background: var(--brand-50); color: var(--brand-600); border-radius: var(--r-sm); font-family: var(--font-ui); font-weight: 600; }
.me-txt strong { color: var(--text); }
.me-txt span { color: var(--brand); }
.side-out { color: var(--muted) !important; }
.side-out:hover { background: var(--bg-2) !important; color: var(--text) !important; }
.side-toggle { border-radius: var(--r-sm); box-shadow: none; }
.side-toggle:hover { background: var(--brand); border-color: var(--brand); }
.shell.side-off .nav-g { background: var(--line); }

/* ---------- Topo ---------- */
.top { background: var(--surface); backdrop-filter: none; }
.crumb { letter-spacing: 0; font-weight: 500; }
.top h1 { font-family: var(--font-display); font-weight: 600; font-size: 21px; }
.tab-status { background: transparent !important; border: 0 !important; color: var(--text-2) !important; font-weight: 500; }
.tab-status .dot { background: var(--brand); }
.trial-tag { border-radius: var(--r-sm) !important; background: var(--surface) !important; border: 1px solid var(--line-2) !important; box-shadow: none !important; }

/* ---------- Painel: cabeçalho de livro ---------- */
.hero { background: var(--surface); color: var(--text-2); border: 1px solid var(--line); border-top: 3px solid var(--brand); border-radius: var(--r-lg); }
.hero::before { display: none; }
.hero h2 { color: var(--text); font-family: var(--font-display); font-weight: 600; font-size: 27px; letter-spacing: -.01em; }
.hero p { color: var(--text-2); }
.hero .tag { background: transparent !important; color: var(--brand) !important; padding: 0; height: auto; font-weight: 500; }
.hero .btn-ghost { color: var(--text); border-color: var(--line-2); }
.hero .btn-ghost:hover { background: var(--bg-2); }
.hero-kpis { gap: 0; border: 1px solid var(--line-2); border-radius: var(--r-sm); overflow: hidden; }
.hk { background: var(--surface); border: 0; border-radius: 0; padding: 10px 14px 12px; }
.hk:nth-child(odd) { border-right: 1px solid var(--line); }
.hk:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.hk span { text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 500; color: var(--muted); }
.hk strong { color: var(--text); font-family: var(--font-display); font-weight: 600; font-size: 20px; }
.qa { border-radius: var(--r-lg); transition: border-color .15s; }
.qa:hover { transform: none; box-shadow: none; border-color: var(--brand); }
.qa strong { font-family: var(--font-ui); font-weight: 600; }
.qa:hover .arr { transform: none; }
.idx { border-radius: var(--r-sm); background: var(--surface); }
.idx span, .mini span, .tb-card span, .pv-total span, .liq-card .lbl-sm, .sub-h { text-transform: none !important; letter-spacing: 0 !important; }
.idx span { font-size: 12px; font-weight: 500; }
.idx strong, .mini strong, .big, .tb-card b, .ix-val, .pulse-h h2, .h-sec { font-family: var(--font-display); font-weight: 600; }

/* ---------- Calculadoras ---------- */
.acc { border-radius: var(--r-lg); box-shadow: none; }
.acc-h h3 { font-weight: 600; }
.acc.open .acc-b { animation: none; }
.sub-h { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.chip { border-radius: 3px; }
.trail { border-radius: var(--r-lg); background: var(--surface); backdrop-filter: none; box-shadow: none; }
.tr-step { border-radius: 3px; font-weight: 500; }
.tr-step i { border-radius: 2px; }
.tr-step.done i { background: var(--brand); box-shadow: none; }
.mini .card { border-radius: var(--r-lg); }
.mini span { font-size: 12px; font-weight: 500; }
.kv { border-bottom: 1px solid var(--line); }
.kv.total b { color: var(--brand); }
.demo-grid h4 { text-transform: none; letter-spacing: 0; font-size: 13px; }

/* ---------- Resultado: fita de calculadora impressa ---------- */
.liq-card {
  background: #FFFFFF; color: var(--text); border: 1px solid var(--line-2); border-top: 0; border-radius: 0 0 var(--r-sm) var(--r-sm);
  box-shadow: 0 1px 0 var(--line); padding: 22px 20px 18px; position: relative; overflow: visible;
}
.liq-card::before {
  content: ''; position: absolute; left: -1px; right: -1px; top: -7px; height: 8px; z-index: 0;
  background: linear-gradient(-45deg, #FFFFFF 5px, transparent 0) 0 0 / 10px 8px repeat-x, linear-gradient(45deg, #FFFFFF 5px, transparent 0) 0 0 / 10px 8px repeat-x;
  filter: drop-shadow(0 -1px 0 var(--line-2));
}
.liq-card .mod { color: var(--text-2); font-size: 12.5px; }
.liq-card .mod .tag { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.liq-card .lbl-sm { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.liq-val {
  font-family: var(--font-mono); font-weight: 600; color: var(--text); font-size: 30px; letter-spacing: -.02em;
  padding-bottom: 6px; margin-bottom: 8px; border-bottom: 3px double var(--text);
}
.liq-sub { color: var(--text-2); font-family: var(--font-mono); font-size: 12.5px; }
.liq-sub b { color: var(--text); }
.stack { background: var(--bg-2); border-radius: 2px; height: 6px; }
.legend { color: var(--text-2); font-family: var(--font-mono); font-size: 11.5px; }
.legend b { color: var(--text); }
.legend i { border-radius: 1px; }
.liq-card .btn-ghost { color: var(--text-2); }
:root[data-theme="dark"] .liq-card { background: #F5F7F6; color: #1C2622; }
:root[data-theme="dark"] .liq-card::before { background: linear-gradient(-45deg, #F5F7F6 5px, transparent 0) 0 0 / 10px 8px repeat-x, linear-gradient(45deg, #F5F7F6 5px, transparent 0) 0 0 / 10px 8px repeat-x; }
:root[data-theme="dark"] .liq-val, :root[data-theme="dark"] .liq-sub b, :root[data-theme="dark"] .legend b { color: #1C2622; border-color: #1C2622; }
.mbar { background: var(--surface); color: var(--text); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--sh-3); }
.mbar span { text-transform: none; letter-spacing: 0; color: var(--muted); }
.mbar b { font-family: var(--font-mono); }

/* ---------- Índices e novidades ---------- */
.pulse { background: var(--surface); }
.ix-card { border-radius: var(--r-sm); animation: none; transition: border-color .15s; }
.ix-card:hover { transform: none; box-shadow: none; border-color: var(--brand); }
.ix-card.skel { animation: none; background: var(--bg-2); }
.ix-tr.up { color: var(--warn); }
.ix-tr.down { color: var(--brand); }
.ix-spark .l { stroke: var(--brand); }
.ix-spark .a { fill: var(--brand-50); }
.ix-spark .p { fill: var(--brand); }
.tb-card { border-radius: var(--r-sm); background: var(--surface); }
.tb-card span { font-size: 12px; font-weight: 500; }
.jc-grid > div { border-left-color: var(--brand); }
.news .card { border-radius: var(--r-lg); }
.news time { color: var(--brand); font-weight: 600; }
.news h4 { font-family: var(--font-ui); font-weight: 600; }

/* ---------- Balões de ajuda e bloqueio ---------- */
.help { border-radius: 50%; }
.balloon { border-radius: var(--r); background: var(--ink-900); }
.lock { background: rgba(244, 246, 245, .9) !important; backdrop-filter: blur(2px) !important; }
.lock-card { border-radius: var(--r-xl) !important; box-shadow: var(--sh-3) !important; border: 1px solid var(--line) !important; }

/* ---------- Entrada (login): verde da marca com pauta de livro-caixa ---------- */
body.auth { background: var(--paper); }
/* Degradê no mesmo espírito do ícone: luz menta no alto à esquerda, verde profundo no centro, faixa diagonal suave embaixo */
.auth-brand {
  color: #E4EFE9;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(69, 217, 158, .30) 0%, rgba(20, 160, 109, .12) 32%, transparent 62%),
    radial-gradient(90% 70% at 100% 100%, rgba(17, 185, 124, .22) 0%, transparent 58%),
    linear-gradient(160deg, #0E6A4C 0%, #0A5840 38%, #08473A 70%, #063A2E 100%);
}
.auth-brand .mesh { display: none; }
.auth-brand::after {
  background-image: linear-gradient(162deg, transparent 58%, rgba(255, 255, 255, .045) 58.2%, rgba(255, 255, 255, .02) 72%, transparent 72.2%);
  background-size: 100% 100%; mask-image: none; -webkit-mask-image: none;
}
.auth-brand .logo strong { font-family: var(--font-ui); font-weight: 700; letter-spacing: .02em; }
.auth-brand .logo span { color: #A9DCC6 !important; letter-spacing: .04em !important; font-weight: 500 !important; text-transform: lowercase; }
.brand-mid .tag { background: rgba(255, 255, 255, .06) !important; color: #BFE8D6 !important; padding: 5px 12px !important; height: auto; font-weight: 500; border: 1px solid rgba(169, 220, 198, .35) !important; border-radius: 999px !important; }
.brand-mid h1 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.015em; line-height: 1.12; }
.brand-mid h1 em { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: #fff; font-style: italic; font-weight: 500; }
.brand-mid p { color: #C3D9CF; }
.feats li { color: #E4EFE9; }
.feats li span { background: transparent; color: #A9DCC6; border: 1px solid rgba(169, 220, 198, .45); border-radius: 2px; }
/* a simulação vira uma fita de calculadora sobre a mesa verde */
.preview { background: #FBFCFB; color: #1C2622; border: 0; border-radius: 0 0 3px 3px; backdrop-filter: none; box-shadow: 0 18px 30px -18px rgba(0, 0, 0, .55); position: relative; margin-top: 8px; }
.preview::before { content: ''; position: absolute; left: 0; right: 0; top: -7px; height: 8px; background: linear-gradient(-45deg, #FBFCFB 5px, transparent 0) 0 0 / 10px 8px repeat-x, linear-gradient(45deg, #FBFCFB 5px, transparent 0) 0 0 / 10px 8px repeat-x; }
.preview .muted { color: #6C7873; }
.preview .b { font-weight: 500; }
.preview .tag { background: transparent; color: #0A6B4E; border: 1px solid #C8D0CC; }
.pv-row { color: #46524D; font-family: var(--font-mono); font-size: 12.5px; animation: none; }
.pv-row b { color: #1C2622; font-weight: 500; }
.pv-row .muted { color: #8A9590; }
.pv-total { border-top: 0; padding-top: 6px; }
.pv-total span { color: #46524D; font-size: 12.5px; font-weight: 500; }
.pv-total strong { font-family: var(--font-mono); color: #1C2622; font-weight: 600; border-bottom: 3px double #1C2622; padding-bottom: 2px; }
.form-card { border-radius: var(--r-xl); box-shadow: none; border-color: var(--line-2); }
.pane h2 { font-family: var(--font-display); font-weight: 600; }

/* ---------- Ajustes finos ---------- */
.hero .tag { border: 0 !important; }
.trial-tag { height: 32px; padding: 0 3px 0 10px; background: var(--surface) !important; color: var(--text-2) !important; font-weight: 500; }
.trial-tag:hover { transform: none; box-shadow: none !important; border-color: var(--brand) !important; }
.trial-tag em { background: var(--brand) !important; color: #fff !important; border-radius: 3px !important; font-weight: 600; padding: 5px 10px !important; }
.trial-tag .dot { display: none; }
.legend { grid-template-columns: 1fr; gap: 3px; }
.legend span { justify-content: space-between; }
.tag.gold { background: transparent; color: var(--gold); border: 1px solid currentColor; }
.alert.prazo { background: var(--surface-2); color: var(--text); border-color: var(--line-2); border-left: 3px solid var(--gold); }
.pulse-h .tag.pos { background: transparent; padding: 0; height: auto; color: var(--brand); }
.pulse-h .tag.pos .dot { display: none; }
@media (max-width: 560px) { .tab-status { display: none !important; } }

/* ---------- Folha de pagamento: chave Básica ⇄ Completa (estilo iOS) e verbas por clique ---------- */
.modo-folha { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; margin: 0 0 6px; border: 1px solid var(--line); border-radius: var(--r-lg, 12px); background: var(--surface-2, #F6F8F7); }
.switch-lg { gap: 14px; }
.switch-lg .track { width: 51px; height: 31px; background: #D5DAD8; }
.switch-lg .track::after { top: 2px; left: 2px; width: 27px; height: 27px; box-shadow: 0 3px 8px rgba(0,0,0,.18), 0 1px 1px rgba(0,0,0,.12); }
.switch-lg input:checked + .track { background: #34C759; }
.switch-lg input:checked + .track::after { transform: translateX(20px); }
.mf-txt { display: flex; flex-direction: column; line-height: 1.25; }
.mf-txt b { font-size: 14px; color: var(--text); font-weight: 600; }
.mf-txt small { font-size: 12px; color: var(--text-3, #6C7873); font-weight: 400; }
.chips-folha { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.chip-folha { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px 0 10px; border-radius: 999px; border: 1px solid var(--line-2, #C8D0CC); background: #fff; color: var(--text-2, #46524D); font: 500 12.5px var(--font-ui, inherit); cursor: pointer; transition: all .15s ease; }
.chip-folha i { font-style: normal; font-weight: 700; color: var(--brand, #0A6B4E); width: 14px; text-align: center; }
.chip-folha:hover { border-color: var(--brand, #0A6B4E); color: var(--text, #1C2622); }
.chip-folha.on { background: var(--brand, #0A6B4E); border-color: var(--brand, #0A6B4E); color: #fff; }
.chip-folha.on i { color: #fff; }
.bloco-folha { padding: 10px 12px 4px; margin: 0 0 10px; border-left: 3px solid var(--brand, #0A6B4E); background: var(--surface-2, #F6F8F7); border-radius: 0 8px 8px 0; }
/* número com unidade (h, %, dias): o valor não fica por baixo da unidade */
.input-group:has(.suffix) .input { padding-right: 46px; }
