:root {
  color-scheme: light;
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --border: #e2e4e9;
  --text: #16181d;
  --text-2: #555a64;
  --muted: #8a8f99;
  --accent: #1f5fa8;
  --accent-soft: #e6eef8;
  --danger: #c4312f;
  --danger-soft: #fbe9e8;
  --warn-soft: #fff4d6;
  --warn: #8a5a00;
  --ok: #1d7a46;
  --s1: #2a78d6;
  --s2: #eb6834;
  --s3: #1baf7a;
  --s4: #eda100;
  --grid: #eceef2;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #111214;
    --surface: #1a1b1e;
    --surface-2: #202125;
    --border: #2e3035;
    --text: #f2f3f5;
    --text-2: #c3c5cb;
    --muted: #8d9199;
    --accent: #5b9be6;
    --accent-soft: #1d2a3b;
    --danger: #ef6b69;
    --danger-soft: #3a1f1f;
    --warn-soft: #3a3016;
    --warn: #f0c060;
    --ok: #4cc585;
    --s1: #3987e5;
    --s2: #d95926;
    --s3: #199e70;
    --s4: #c98500;
    --grid: #26282c;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111214; --surface: #1a1b1e; --surface-2: #202125; --border: #2e3035;
  --text: #f2f3f5; --text-2: #c3c5cb; --muted: #8d9199; --accent: #5b9be6; --accent-soft: #1d2a3b;
  --danger: #ef6b69; --danger-soft: #3a1f1f; --warn-soft: #3a3016; --warn: #f0c060; --ok: #4cc585;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --grid: #26282c; --shadow: none;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: 20px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; color: var(--text-2); font-weight: 600; }
a { color: var(--accent); }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

/* ---------- topo / navegação ---------- */
.topo {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 24px;
  padding: 0 20px; height: 56px;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.marca { display: flex; align-items: center; gap: 10px; font-weight: 700; white-space: nowrap; }
#nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
#nav::-webkit-scrollbar { display: none; }
#nav a {
  padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--text-2);
  white-space: nowrap; font-weight: 500;
}
#nav a:hover { background: var(--surface-2); color: var(--text); }
#nav a.ativo { background: var(--accent-soft); color: var(--accent); }

main { max-width: 1240px; margin: 0 auto; padding: 20px; }
.cab { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.cab p { margin: 4px 0 0; color: var(--text-2); }

/* ---------- blocos ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow); margin-bottom: 16px; min-width: 0;
}
.card > h2 { margin-bottom: 12px; }
.card-cab { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid > .card { margin-bottom: 0; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.mb { margin-bottom: 16px; }

.kpi { padding: 14px 16px; }
.kpi .rot { color: var(--text-2); font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.kpi .val { font-size: 22px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .sub { color: var(--muted); font-size: 12px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi.destaque { background: var(--accent-soft); border-color: transparent; }
.kpi.destaque .val { color: var(--accent); }
.dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }

/* ---------- formulários ---------- */
label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--text-2); }
input, select, button, textarea { font: inherit; }
input, select, textarea {
  height: 36px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text); min-width: 0;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
input[type=number] { text-align: right; }
input[type=checkbox] { height: 16px; width: 16px; }
.linha { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.linha > label { flex: 1 1 150px; }
.linha > label.estreito { flex: 0 1 120px; }
.filtros { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.filtros label { flex: 0 1 170px; }

.btn {
  height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.perigo { color: var(--danger); }
.btn.perigo:hover { background: var(--danger-soft); }
.btn.sm { height: 28px; padding: 0 8px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: default; }
.icone { background: none; border: 0; cursor: pointer; padding: 4px 6px; border-radius: 6px; color: var(--text-2); font-size: 15px; }
.icone:hover { background: var(--surface-2); color: var(--text); }
.icone.perigo:hover { color: var(--danger); background: var(--danger-soft); }
.acoes { display: flex; flex-wrap: wrap; gap: 8px; }

.segmentado { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.segmentado button { border: 0; background: var(--surface); padding: 6px 12px; cursor: pointer; color: var(--text-2); font-weight: 600; }
.segmentado button.ativo { background: var(--accent-soft); color: var(--accent); }

/* ---------- lançamento rápido ---------- */
.qtds { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-top: 12px; }
.qtd-box { border: 1px solid var(--border); border-radius: 8px; padding: 10px; background: var(--surface-2); }
.qtd-box label { flex-direction: row; align-items: center; justify-content: space-between; }
.qtd-box input { width: 90px; font-size: 16px; font-weight: 600; }
.qtd-box .calc { font-size: 12px; color: var(--muted); margin-top: 6px; min-height: 18px; font-variant-numeric: tabular-nums; }
.previa { margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); color: var(--text-2); font-size: 13px; display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.previa b { color: var(--text); }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.tag.feriado { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.tag.alerta { background: var(--danger-soft); color: var(--danger); border-color: transparent; }

/* ---------- tabelas ---------- */
.tabela-wrap { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
th { font-size: 12px; font-weight: 600; color: var(--text-2); background: var(--surface-2); position: sticky; top: 0; white-space: nowrap; }
tbody tr:hover td { background: var(--surface-2); }
tfoot td { font-weight: 700; border-top: 2px solid var(--border); border-bottom: 0; }
tr.sem-preco td { background: var(--danger-soft); }
td.acoes-td { white-space: nowrap; text-align: right; width: 1%; }
.tabela-precos input { width: 76px; height: 30px; }
.tabela-precos th.grupo { text-align: center; border-left: 1px solid var(--border); }
.tabela-precos td.ini, .tabela-precos th.ini { border-left: 1px solid var(--border); }
.rolagem { max-height: 520px; overflow: auto; }

.paginacao { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; color: var(--text-2); font-size: 12px; }

/* ---------- gráficos ---------- */
.grafico { position: relative; height: 260px; }
.grafico.alto { height: 340px; }
.g-alvo { position: relative; height: 100%; display: flex; flex-direction: column; }
.tip {
  position: absolute; z-index: 5; pointer-events: none; min-width: 150px; max-width: 260px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12); font-size: 12px; line-height: 1.5; font-variant-numeric: tabular-nums;
}
.tip b:first-child { display: block; margin-bottom: 2px; }
.tip .dot { margin-right: 6px; width: 8px; height: 8px; }
.legenda { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--text-2); margin-bottom: 8px; }
.legenda span { display: inline-flex; align-items: center; gap: 6px; }
.vazio { color: var(--muted); padding: 40px 0; text-align: center; }

/* ---------- abas de cadastro ---------- */
.abas { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.abas button { background: none; border: 0; padding: 10px 14px; cursor: pointer; font-weight: 600; color: var(--text-2); border-bottom: 2px solid transparent; white-space: nowrap; }
.abas button.ativo { color: var(--accent); border-bottom-color: var(--accent); }

.aviso { padding: 10px 12px; border-radius: 8px; background: var(--warn-soft); color: var(--warn); margin-bottom: 12px; font-size: 13px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }

/* ---------- login / diálogo / toast ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: 100%; max-width: 340px; display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
.login-card img { align-self: center; }
.login-card h1 { text-align: center; }
.erro { color: var(--danger); min-height: 18px; margin: 0; font-size: 13px; }

dialog { border: 1px solid var(--border); border-radius: 12px; padding: 0; background: var(--surface); color: var(--text); width: min(520px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(0, 0, 0, .4); }
#dlg-form { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
#dlg-form .acoes { justify-content: flex-end; margin-top: 4px; }

#toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%) translateY(20px);
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 8px;
  opacity: 0; pointer-events: none; transition: .2s; z-index: 100; max-width: calc(100vw - 32px); font-weight: 500;
}
#toast.show { opacity: 1; transform: translateX(-50%); }
#toast.erro { background: var(--danger); color: #fff; }

/* ---------- impressão (substitui a exportação em PDF do VBA) ---------- */
.so-impressao { display: none; }
@media print {
  @page { size: A4 portrait; margin: 12mm; }
  body { background: #fff; color: #000; font-size: 11px; }
  .topo, .nao-imprimir, #toast { display: none !important; }
  .so-impressao { display: block; }
  main { padding: 0; max-width: none; }
  .card { box-shadow: none; border-color: #ccc; break-inside: avoid; padding: 10px; margin-bottom: 10px; }
  .grid.kpis { grid-template-columns: repeat(4, 1fr); }
  .grid.g2 { grid-template-columns: repeat(2, 1fr); }
  .grafico { height: auto !important; }
  .g-alvo svg { max-height: none !important; }
  th { background: #f1f1f1; }
  .tabela-wrap { overflow: visible; margin: 0; padding: 0; }
  table { font-size: 9.5px; }
  th, td { padding: 4px 5px; }
  th { font-size: 9px; }
  .kpi .val { font-size: 16px; }
  .kpi { padding: 8px 10px; }
}

/* ---------- responsivo ---------- */
@media (max-width: 900px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .topo { flex-direction: column; align-items: stretch; height: auto; gap: 6px; padding: 10px 16px 6px; }
  main { padding: 16px; }
  .g2 { grid-template-columns: 1fr; }
  .kpi .val { font-size: 19px; }
  .filtros label { flex: 1 1 140px; }
  .col-opcional { display: none; }
}

/* ---------- contas ---------- */
.login-card form { display: flex; flex-direction: column; gap: 12px; }
.login-card { max-width: 400px; }
.abas-login { margin-bottom: 0; }
.abas-login button { flex: 1; }
.aviso-ok { background: var(--accent-soft); border-radius: 8px; padding: 14px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.aviso-ok p { margin: 0; color: var(--text-2); }
.usuario { margin-left: auto; display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text-2); font-weight: 600; padding: 6px 8px; border-radius: 8px; white-space: nowrap; }
.usuario:hover, .usuario.ativo { background: var(--surface-2); color: var(--text); }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; margin-left: 4px; }
.tag.ok { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.tag.pend { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.senha-temp { font: 700 20px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 1px; background: var(--surface-2); border: 1px dashed var(--border); border-radius: 8px; padding: 12px; text-align: center; user-select: all; }
.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; color: var(--text); font-size: 13px; }
@media (max-width: 720px) {
  .usuario { position: absolute; top: 8px; right: 12px; }
  .usuario #nome-usuario { display: none; }
}
.termos h2 { margin: 20px 0 6px; }
.termos p, .termos li { color: var(--text-2); line-height: 1.6; }
.check a { color: var(--accent); }

.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; }
.checklist .ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; flex: none; }
.checklist li.ok .ic { background: var(--accent-soft); color: var(--ok); }
.checklist li.pend .ic { background: var(--warn-soft); color: var(--warn); }

/* menu com mais itens: em telas médias esconde o nome do app e aperta o espaçamento */
@media (max-width: 1260px) and (min-width: 721px) { .marca > span { display: none; } }
@media (max-width: 1400px) and (min-width: 721px) {
  .topo { gap: 16px; }
  #nav a { padding: 8px 10px; }
}

/* ---------- tutorial ---------- */
.tut { max-width: 860px; margin: 0 auto; }
.tut-card { padding: 28px; }
.tut-topo { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.tut-barra { display: flex; gap: 6px; margin: 14px 0 22px; }
.tut-barra span { flex: 1; height: 6px; border-radius: 3px; background: var(--border); }
.tut-barra span.feito { background: var(--accent); }
.tut-corpo h2 { font-size: 22px; margin-bottom: 12px; }
.tut-corpo p { line-height: 1.6; color: var(--text-2); }
.tut-corpo p b { color: var(--text); }
.tut-lista { line-height: 1.9; color: var(--text-2); padding-left: 22px; }
.tut-itens { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 8px; }
.tut-itens li { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); font-weight: 600; }
.tut-itens li.muted { font-weight: 400; }
.tut-precos { display: grid; gap: 16px; margin: 14px 0; }
.tut-un { border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; }
.tut-un h3 { color: var(--text); font-size: 15px; margin-bottom: 8px; }
.tut-nav { display: flex; justify-content: space-between; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); }
.tut .aviso { margin: 12px 0; }
.tut-precos > * { min-width: 0; }
.tut-un { overflow: hidden; }
.tut-un .tabela-wrap { margin: 0; padding: 0; }
@media (max-width: 720px) { .tut-card { padding: 18px; } }
.tut-ex { padding: 10px 0; border-top: 1px solid var(--border); }
.tut-ex:first-of-type { border-top: 0; }
.tut-ex-nome { font-weight: 700; color: var(--text) !important; margin: 0 0 8px; }
.tut-campos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.tut-campos input { width: 100%; }

/* ---------- planos ---------- */
.pro-card { max-width: 640px; }
.pro-card h2 { margin: 10px 0 8px; }
.pro-card ul { margin: 8px 0 12px; padding-left: 20px; line-height: 1.8; color: var(--text-2); }
.pro-preco { font-size: 22px; font-weight: 700; color: var(--accent); margin: 8px 0; }
#nav a .pro { font-size: 10px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 1px 5px; margin-left: 4px; vertical-align: 1px; }

/* ---------- contador (somente leitura) ---------- */
.vendo { flex-direction: row; align-items: center; gap: 6px; margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.vendo select { max-width: 220px; padding: 5px 8px; }
.vendo + .usuario { margin-left: 0; }
.faixa-leitura { background: var(--accent-soft); color: var(--text-2); text-align: center; padding: 7px 16px; font-size: 13px; }
.faixa-leitura b { color: var(--text); }
@media (max-width: 720px) { .vendo { margin-left: 0; } .vendo select { max-width: none; flex: 1; } }

/* ---------- tipo de atividade ---------- */
.ativ-opcoes { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 12px 0 16px; }
.ativ { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); cursor: pointer; font: inherit; }
.ativ span { color: var(--muted); font-size: 12px; }
.ativ:hover { border-color: var(--accent); }
.ativ.ativo { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }

/* ---------- conferência ---------- */
.dif-neg { color: var(--danger); font-weight: 600; }
.dif-pos { color: var(--warn); font-weight: 600; }
.dif-ok { color: var(--ok); font-weight: 600; }
.conf-in { width: 120px; text-align: right; }
.conf-data { width: 150px; }
.dem-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 12px 0; }
.dem-mapa { display: grid; gap: 6px; margin: 8px 0 12px; }
.dem-mapa .item { display: grid; grid-template-columns: minmax(0, 1fr) auto 220px; gap: 10px; align-items: center; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }
.dem-mapa .item .d { font-weight: 600; overflow-wrap: anywhere; }
.dem-mapa .item select { width: 100%; }
@media (max-width: 720px) { .dem-mapa .item { grid-template-columns: 1fr; } }
.passo-n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; margin-right: 6px; }
.dem-bloco { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 14px; }
.dem-bloco h3 { color: var(--text); font-size: 14px; margin-bottom: 6px; display: flex; align-items: center; }
.resumo-conf { font-size: 15px; margin: 0 0 12px; }
tr.sel td { background: var(--accent-soft); }

/* ---------- lembrete do dia 20 ---------- */
.lembrete { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; max-width: 1240px; margin: 16px auto -4px; padding: 10px 14px; border-radius: 10px; background: var(--warn-soft); color: var(--text); font-size: 13px; width: calc(100% - 40px); }
.lembrete b { color: var(--text); }
@media (max-width: 720px) { .lembrete { width: calc(100% - 32px); } }

/* ---------- faixa de volume e rentabilidade ---------- */
.faixa-card { border-left: 4px solid var(--accent); }
.faixa-card.ok { border-left-color: var(--ok); }
.faixa-card .rot { color: var(--text-2); font-size: 12px; font-weight: 600; }
.barra-faixa { height: 10px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.barra-faixa span { display: block; height: 100%; background: var(--accent); border-radius: 5px; }
.barra-rel { display: inline-block; width: 90px; height: 8px; border-radius: 4px; background: var(--surface-2); vertical-align: middle; margin-right: 8px; overflow: hidden; }
.barra-rel span { display: block; height: 100%; background: var(--accent); }
.tabela-anual th, .tabela-anual td { padding-left: 6px; padding-right: 6px; } @media print { .tabela-anual { font-size: 8.5px; } }
textarea.contestacao { width: 100%; min-height: 340px; font: 13px/1.5 system-ui, sans-serif; resize: vertical; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); }
#dlg:has(textarea.contestacao) { width: min(720px, calc(100vw - 32px)); }
.tabela-anual { font-size: 12px; }
.tabela-anual td:first-child { min-width: 120px; }

/* ---------- lançar por texto ---------- */
.tx-linha { display: flex; gap: 8px; }
.tx-linha input { flex: 1; min-width: 0; font-size: 16px; }
#tx-mic.gravando { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.tx-resp, .tx-conf { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.tx-resp p { margin: 0 0 8px; }
.tx-resp ul { margin: 0; padding-left: 18px; line-height: 1.8; color: var(--text-2); }
.tx-conf { background: var(--accent-soft); border-color: transparent; }
.tx-conf ul { margin: 8px 0; padding-left: 18px; line-height: 1.8; }
.tx-titulo { margin: 0; font-size: 15px; }

/* ---------- indique e ganhe ---------- */
.indicar-link { margin-left: auto; white-space: nowrap; text-decoration: none; font-weight: 600; font-size: 13px; color: var(--accent); background: var(--accent-soft); padding: 6px 12px; border-radius: 999px; }
.indicar-link.ativo, .indicar-link:hover { background: var(--accent); color: #fff; }
.indicar-link:not([hidden]) ~ .vendo, .indicar-link:not([hidden]) ~ .usuario { margin-left: 8px; }
@media (max-width: 720px) { .indicar-link { position: absolute; top: 12px; right: 56px; } }

/* ---------- tour das telas ---------- */
#tour { position: fixed; inset: 0; z-index: 50; }
.tour-luz { position: fixed; border-radius: 10px; box-shadow: 0 0 0 9999px rgba(15, 25, 40, 0.55); transition: all .2s ease; pointer-events: none; }
.tour-balao { position: fixed; background: var(--surface); color: var(--text); border-radius: 12px; padding: 14px 16px; box-shadow: 0 12px 40px rgba(0,0,0,.25); transition: top .2s ease, left .2s ease; }
.tour-balao h3 { color: var(--text); font-size: 16px; margin: 4px 0 6px; }
.tour-balao p { margin: 0 0 12px; color: var(--text-2); line-height: 1.5; }
.tour-balao .acoes { display: flex; gap: 6px; align-items: center; }
@media (max-width: 1400px) { .indicar-link span { display: none; } .indicar-link { padding: 6px 10px; } }

/* ---------- projeção e férias ---------- */
.proj-num { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.proj-num .rot { color: var(--text-2); font-size: 12px; font-weight: 600; }
.proj-num b { font-size: 22px; font-variant-numeric: tabular-nums; }
.proj-num .proj-dest { color: var(--accent); }
.ferias-res { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.ferias-res ul { margin: 8px 0 0; padding-left: 18px; line-height: 1.8; color: var(--text-2); }
.fila { background: var(--accent-soft); }
.tut-qr { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; margin: 12px 0; }
.tut-qr > div:first-child { background: #fff; padding: 10px; border-radius: 12px; border: 1px solid var(--border); line-height: 0; }
.tut-qr > div:last-child { flex: 1; min-width: 220px; }

/* ---------- painéis com menu lateral (Configurações e Administração) ---------- */
.painel { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 24px; align-items: start; }
.painel-menu { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; box-shadow: var(--shadow); }
.painel-grupo { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); padding: 12px 10px 4px; }
.painel-grupo:first-child { padding-top: 4px; }
.painel-menu a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; text-decoration: none; color: var(--text); font-weight: 500; font-size: 14px; }
.painel-menu a:hover { background: var(--surface-2); }
.painel-menu a.ativo { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.painel-menu .pm-ic { width: 22px; text-align: center; font-size: 16px; flex: none; }
.painel-menu .pm-txt { flex: 1; }
.painel-menu .badge { margin-left: 0; }
.painel-corpo { min-width: 0; }
.painel-corpo .card > h3 { margin: 0 0 12px; font-size: 16px; }
.secao-cab { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.secao-cab h2 { margin: 0; font-size: 20px; }
.secao-cab p { margin: 4px 0 0; color: var(--text-2); }
.zona-perigo { border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }
.kpi-link { text-decoration: none; color: inherit; display: block; }
a.kpi-link[href]:hover { border-color: var(--accent); }
.situacao { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.situacao li { display: grid; grid-template-columns: 1fr auto 60px; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.situacao li:last-child { border-bottom: 0; }
.situacao a { color: var(--accent); font-weight: 600; text-align: right; font-size: 13px; }
.dica { background: var(--accent-soft); border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; font-size: 14px; line-height: 1.5; }
.rev { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.rev:last-child { border-bottom: 0; padding-bottom: 0; }
.rev:first-of-type { padding-top: 4px; }
.rev-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rev-crm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 2px; }
.rev-acoes { display: flex; flex-wrap: wrap; gap: 6px; }
.aviso-mini { font-size: 13px; color: var(--warn); }
.filtros-adm { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.filtros-adm input[type=search] { flex: 1 1 220px; }
.menu-acoes { position: relative; display: inline-block; }
.menu-acoes summary { list-style: none; cursor: pointer; }
.menu-acoes summary::-webkit-details-marker { display: none; }
.menu-acoes > div { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.16); padding: 6px; min-width: 220px; display: flex; flex-direction: column; }
.menu-acoes > div button { background: none; border: 0; text-align: left; padding: 9px 10px; border-radius: 6px; cursor: pointer; font: inherit; font-size: 14px; color: var(--text); }
.menu-acoes > div button:hover { background: var(--surface-2); }
.menu-acoes > div button.perigo { color: var(--danger); }
.opcao-radio { flex-direction: row; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; color: var(--text); font-weight: 400; }
.opcao-radio:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.opcao-radio input { margin-top: 3px; }
.opcao-radio > span { display: flex; flex-direction: column; gap: 3px; }
@media (max-width: 900px) {
  .painel { grid-template-columns: 1fr; gap: 12px; }
  .painel-menu { position: static; flex-direction: row; overflow-x: auto; padding: 6px; gap: 4px; scrollbar-width: none; }
  .painel-menu::-webkit-scrollbar { display: none; }
  .painel-grupo { display: none; }
  .painel-menu a { white-space: nowrap; flex: none; padding: 8px 12px; }
  .painel-menu .pm-ic { width: auto; }
  .situacao li { grid-template-columns: 1fr auto; }
  .situacao li a { grid-column: 1 / -1; text-align: left; }
}
.filtros-adm .segmentado { max-width: 100%; overflow-x: auto; }
.filtros-adm .segmentado button { white-space: nowrap; }

/* ---------- marca Vigília Med ---------- */
.nome-app { font-weight: 800; letter-spacing: -.01em; }
.nome-app span { font-weight: 400; color: #C98114; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nome-app span { color: #F2B53A; } }
.login-card .login-logo { width: 64px; height: 64px; border-radius: 15px; box-shadow: 0 8px 24px rgba(15, 39, 71, .25); }
.login-card h1.nome-app { font-size: 26px; margin: 4px 0 0; }
.login-card .slogan { margin: 0 0 4px; color: var(--text-2); font-size: 14px; text-align: center; }
.marca img { border-radius: 7px; }

/* ---------- assinatura (admin) ---------- */
.assinatura { border-width: 2px; }
.assinatura.ligada { border-color: var(--accent); }
.ass-topo { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.ass-estado { font-size: 20px; font-weight: 800; }
.assinatura.ligada .ass-estado { color: var(--accent); }
.btn-grande { height: 46px; padding: 0 22px; font-size: 15px; }
.lema { margin: 0 0 4px; text-align: center; font-size: 12px; font-weight: 700; letter-spacing: .32em; color: #C98114; text-transform: uppercase; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lema { color: #F2B53A; } }
.guia { background: var(--surface-2); border-radius: 10px; padding: 10px 14px; }
.guia summary { cursor: pointer; font-weight: 700; color: var(--accent); }
.passos { list-style: none; padding: 0; margin: 12px 0 4px; display: grid; gap: 14px; }
.passos li { display: flex; gap: 12px; align-items: flex-start; }
.passos .num-passo { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--accent); color: #fff; }
.passos li.feito .num-passo { background: var(--accent-soft); color: var(--ok); }
.passos code { background: var(--surface); padding: 1px 5px; border-radius: 4px; }
.formas { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 720px) { .formas { grid-template-columns: 1fr; } }
.plano-atual .pro-preco { font-size: 20px; }
.login-card .login-brasao { width: 150px; height: 150px; align-self: center; border-radius: 26px; box-shadow: 0 10px 30px rgba(15, 39, 71, .3); }

/* ===== módulo Cirurgias ===== */
dialog.largo { width: min(820px, calc(100vw - 24px)); }
dialog.largo #dlg-form { max-height: calc(100vh - 40px); overflow: auto; }
.cir-form { display: flex; flex-direction: column; gap: 12px; }
.cir-form details summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.cir-item { display: grid; grid-template-columns: minmax(0, 1fr) auto 150px auto; gap: 8px; align-items: end; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.cir-item .cir-dica { grid-column: 1 / -1; margin: 0; }
.cir-item .cir-dica:empty { display: none; }
.cir-item .icone { margin-bottom: 6px; }
.cir-total { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; font-size: 16px; }
.cir-pag { padding: 10px; border-radius: var(--radius); background: var(--accent-soft); }
.cir-anexos { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--border); padding-top: 10px; }
.cir-anexos .tut-itens li { gap: 10px; }
tr.clicavel { cursor: pointer; }
tr.clicavel:hover td { background: var(--surface-2); }
.tabela-cir td { vertical-align: top; }
.chip { display: inline-flex; gap: 4px; align-items: baseline; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); margin: 2px 0; font-size: 13px; }
.chip.melhor { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, var(--surface)); }
.borda-alerta { border-left: 4px solid var(--danger); }
.kpi.alerta .val { color: var(--danger); }
.rec-conv { margin-top: 14px; }
.rec-conv h3 { margin: 0; }
.rec-conv .card-cab span { display: inline-flex; gap: 10px; align-items: center; }
@media (max-width: 640px) {
  .cir-item { grid-template-columns: 1fr 1fr; }
  .cir-item .cir-proc { grid-column: 1 / -1; }
}
label.btn { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.linha > label.btn { flex: 0 0 auto; align-self: flex-end; }
.pro-mini { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; border: 1px dashed var(--accent); background: var(--accent-soft); }
.pro-mini > div { flex: 1; min-width: 200px; }

/* admin: explicação dos módulos */
.mod-card{margin-bottom:14px}
.mod-cab{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.mod-cab>div{flex:1;min-width:180px}.mod-cab h3{margin:0}
.mod-ic{width:44px;height:44px;border-radius:12px;background:var(--accent-soft);display:grid;place-items:center;font-size:22px;flex:none}
.mod-resumo{margin:12px 0;color:var(--text-2);line-height:1.55}
.mod-cols{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.mod-cols ul{margin:6px 0 0;padding-left:18px;line-height:1.6;color:var(--text-2)}
.mod-ex{margin-top:12px;background:var(--surface-2);border-radius:10px;padding:10px 12px;font-size:14px}
.mod-titulo{font-size:16px;margin:22px 0 10px}
@media (max-width:640px){.mod-cols{grid-template-columns:1fr}}

/* Descobertas da semana */
.desc-card{margin-bottom:16px;border-left:4px solid var(--accent)}
.desc-cab{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}.desc-cab h2{margin:0}
.desc-lista{list-style:none;margin:10px 0 0;padding:0}
.desc-lista li{display:flex;align-items:center;gap:10px;padding:9px 0;border-top:1px solid var(--border)}
.desc-lista li:first-child{border-top:0}.desc-lista li>span:nth-child(2){flex:1}
/* Pergunte ao Vigília */
#ia-fab{position:fixed;right:18px;bottom:18px;z-index:40;display:flex;align-items:center;gap:8px;padding:6px 16px 6px 6px;border-radius:30px;border:0;background:#0f2a44;color:#fff;font-weight:600;font-size:14px;box-shadow:0 10px 24px -8px rgba(15,42,68,.55);cursor:pointer}
#ia-fab img{width:38px;height:38px;border-radius:50%}
#ia-fab:hover{background:#163b5e}
#ia-painel{position:fixed;right:18px;bottom:18px;z-index:45;width:min(400px,calc(100vw - 24px));height:min(600px,calc(100vh - 36px));background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:18px;box-shadow:0 24px 60px -20px rgba(0,0,0,.45);display:flex;flex-direction:column;overflow:hidden}
.ia-cab{display:flex;align-items:center;gap:10px;padding:12px 14px;background:linear-gradient(135deg,#0f2a44,#1f5fa8);color:#fff}
.ia-cab img{width:40px;height:40px;border-radius:11px}.ia-cab>div{flex:1}.ia-cab .muted{color:#c5d2e2}
.ia-cab .icone{color:#fff;background:transparent;border:0;font-size:16px;cursor:pointer}
.ia-msgs{flex:1;overflow:auto;padding:14px;display:flex;flex-direction:column;gap:8px;background:var(--bg)}
.ia-b{max-width:85%;padding:9px 12px;border-radius:14px;line-height:1.45;font-size:14px;white-space:pre-wrap}
.ia-ia{background:var(--surface);border:1px solid var(--border);align-self:flex-start;border-bottom-left-radius:4px}
.ia-eu{background:var(--accent);color:#fff;align-self:flex-end;border-bottom-right-radius:4px}
.ia-erro{background:var(--danger-soft);color:var(--danger);align-self:flex-start}
.ia-pensando{color:var(--muted);font-style:italic}
.ia-sug{display:flex;flex-wrap:wrap;gap:6px;padding:8px 12px;border-top:1px solid var(--border)}
.ia-sug .chip{cursor:pointer;border:1px solid var(--border);background:var(--surface);border-radius:14px;padding:5px 10px;font-size:12.5px}
.ia-form{display:flex;gap:6px;padding:10px 12px;border-top:1px solid var(--border)}.ia-form input{flex:1;min-width:0}
.ia-form .icone{border:1px solid var(--border);background:var(--surface);border-radius:10px;width:40px;cursor:pointer}
.ia-form .icone.gravando{background:var(--danger-soft)}
.ia-rod{padding:0 12px 10px}
@media (max-width:640px){#ia-fab span{display:none}#ia-fab{padding:6px}#ia-painel{right:6px;bottom:6px;width:calc(100vw - 12px);height:calc(100vh - 12px)}}
@media print{#ia-fab,#ia-painel{display:none}}

/* corujas do Scenario */
.ia-oi{display:flex;gap:10px;align-items:flex-end;align-self:flex-start;max-width:92%}
.ia-oi img{width:76px;height:76px;flex:none;animation:ia-acena 2.4s ease-in-out 1}
.ia-oi div{background:var(--surface);border:1px solid var(--border);border-radius:14px;border-bottom-left-radius:4px;padding:9px 12px;font-size:14px;line-height:1.45}
.ia-pensando{display:flex;align-items:center;gap:8px}.ia-pensando img{width:40px;height:40px;animation:ia-balanca 1.2s ease-in-out infinite}
.ia-erro{display:flex;align-items:center;gap:8px}.ia-erro img{width:36px;height:36px;flex:none}
.desc-cab .desc-ave{width:48px;height:48px;margin:-6px 0 -6px -4px}.desc-cab h2{flex:1}
@keyframes ia-balanca{0%,100%{transform:rotate(-6deg)}50%{transform:rotate(6deg)}}
@keyframes ia-acena{0%{transform:translateY(8px);opacity:0}30%{transform:translateY(0);opacity:1}45%{transform:rotate(-5deg)}60%{transform:rotate(5deg)}75%,100%{transform:rotate(0)}}
@media (prefers-reduced-motion:reduce){.ia-oi img,.ia-pensando img{animation:none}}

/* =====================================================================
   Minhas finanças (módulos opcionais) — visual próprio, mesmo tema claro/escuro
   ===================================================================== */
:root { --fx-navy: #0f2a44; --fx-azul: #1f5fa8; --fx-ouro: #c9a23a; --fx-verde: #15925f; --fx-verde-s: #e3f5ec; --fx-ama: #a86b00; --fx-ama-s: #fff3d9; --fx-verm: #cf3b36; --fx-verm-s: #fdeceb; --fx-raio: 18px; --fx-sombra: 0 1px 2px rgba(20,32,46,.05), 0 6px 20px -8px rgba(20,32,46,.12); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --fx-verde: #4cc585; --fx-verde-s: #173326; --fx-ama: #f0c060; --fx-ama-s: #3a3016; --fx-verm: #ef6b69; --fx-verm-s: #3a1f1f; --fx-sombra: none; } }
:root[data-theme="dark"] { --fx-verde: #4cc585; --fx-verde-s: #173326; --fx-ama: #f0c060; --fx-ama-s: #3a3016; --fx-verm: #ef6b69; --fx-verm-s: #3a1f1f; --fx-sombra: none; }
.fx { --gap: 16px; }
.fx .num, .fx-num { font-variant-numeric: tabular-nums; }
svg.fx-i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.fx-cab { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.fx-cab h1 { font-size: 24px; letter-spacing: -.01em; }
.fx-cab p { margin: 4px 0 0; color: var(--text-2); }
.fx-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 0 18px; padding: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); }
.fx-tabs::-webkit-scrollbar { display: none; }
.fx-tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 10px; text-decoration: none; color: var(--text-2); font-weight: 600; white-space: nowrap; font-size: 13.5px; }
.fx-tabs a svg.fx-i { width: 17px; height: 17px; }
.fx-tabs a:hover { background: var(--surface-2); color: var(--text); }
.fx-tabs a.ativo { background: var(--fx-navy); color: #fff; }
.fx-tabs .fx-tab-cfg { margin-left: auto; }
.fx-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--fx-raio); padding: 18px; box-shadow: var(--fx-sombra); min-width: 0; }
.fx-card + .fx-card, .fx-bloco + .fx-bloco { margin-top: var(--gap); }
.fx-grid > .fx-card, .fx-sonhos > .fx-card, .fx-mods > .fx-card, .fx-grid > a.fx-card { margin-top: 0; }
.fx-card h2 { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.fx-card h2 .fx-sub, .fx-sub { font-weight: 500; font-size: 12.5px; color: var(--muted); }
.fx-card-cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.fx-grid { display: grid; gap: var(--gap); }
.fx-g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fx-g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fx-g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fx-mb { margin-bottom: var(--gap); }
@media (max-width: 980px) { .fx-g3, .fx-g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .fx-g2, .fx-g3 { grid-template-columns: 1fr; } .fx-cab h1 { font-size: 21px; } .fx-card { padding: 15px; } }

/* herói (cartão escuro com o número principal) */
.fx-heroi { position: relative; overflow: hidden; border-radius: 22px; padding: 22px 24px; color: #fff; background: radial-gradient(120% 140% at 100% 0%, #2a78d6 0%, #1f5fa8 32%, #0f2a44 78%); box-shadow: 0 18px 40px -22px rgba(15,42,68,.8); }
.fx-heroi::after { content: ""; position: absolute; right: -60px; bottom: -80px; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle, rgba(201,162,58,.28), transparent 70%); pointer-events: none; }
.fx-heroi .fx-rot { color: #c5d6ec; font-size: 13px; font-weight: 500; }
.fx-heroi .fx-grande { font-size: 38px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin: 4px 0 6px; font-variant-numeric: tabular-nums; }
.fx-heroi .fx-linha { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fx-heroi .fx-pilula { background: rgba(255,255,255,.12); color: #e7eef8; border-radius: 99px; padding: 4px 11px; font-size: 12.5px; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.fx-heroi .fx-pilula.ok { background: rgba(76,197,133,.2); color: #9df0c3; }
.fx-heroi .fx-pilula.ruim { background: rgba(239,107,105,.22); color: #ffc2c0; }
.fx-heroi .btn { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.2); color: #fff; }
.fx-heroi .btn:hover { background: rgba(255,255,255,.2); }
.fx-heroi .btn.primary { background: #fff; color: var(--fx-navy); border-color: #fff; }
.fx-heroi-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 24px; align-items: center; position: relative; z-index: 1; }
@media (max-width: 820px) { .fx-heroi-grid { grid-template-columns: 1fr; } .fx-heroi .fx-grande { font-size: 32px; } .fx-heroi { padding: 20px; } }

/* escada: ganhei → imposto → gastei → sobrou */
.fx-escada { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; align-items: end; height: 190px; }
.fx-escada > div { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 6px; min-width: 0; }
.fx-escada .v { font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fx-escada .b { width: 100%; max-width: 74px; border-radius: 10px 10px 6px 6px; position: relative; transition: height .5s cubic-bezier(.2,.8,.2,1); min-height: 4px; }
.fx-escada .r { font-size: 12px; color: #c5d6ec; }
.fx-escada .b.ganho { background: linear-gradient(#f4f7fb, #d9e3ef); }
.fx-escada .b.imp { background: linear-gradient(#e3c26a, #c9a23a); }
.fx-escada .b.gasto { background: linear-gradient(#ff9a7a, #ef6b50); }
.fx-escada .b.sobra { background: linear-gradient(#5fe0a4, #1fb877); }
.fx-escada .b.falta { background: linear-gradient(#ff8c89, #d9423d); }

/* fluxo de 4 passos */
.fx-fluxo { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.fx-passo { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px; box-shadow: var(--fx-sombra); }
.fx-passo .fx-rot { font-size: 12px; font-weight: 700; color: var(--text-2); display: flex; gap: 8px; align-items: center; text-transform: uppercase; letter-spacing: .05em; }
.fx-passo .fx-val { font-size: 22px; font-weight: 800; margin-top: 6px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.fx-passo .fx-det { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.fx-passo:not(:last-child)::after { content: ""; position: absolute; right: -11px; top: 50%; width: 10px; height: 10px; border-top: 2px solid var(--border); border-right: 2px solid var(--border); transform: translateY(-50%) rotate(45deg); background: transparent; z-index: 1; }
@media (max-width: 820px) { .fx-fluxo { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fx-passo::after { display: none; } .fx-passo .fx-val { font-size: 19px; } }

/* ícone quadrado colorido da categoria */
.fx-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; color: var(--c, var(--accent)); background: color-mix(in srgb, var(--c, var(--accent)) 14%, var(--surface)); }
.fx-ic.sm { width: 32px; height: 32px; border-radius: 10px; } .fx-ic.sm svg.fx-i { width: 17px; height: 17px; }
.fx-ic.lg { width: 52px; height: 52px; border-radius: 16px; } .fx-ic.lg svg.fx-i { width: 26px; height: 26px; }
.fx-ic.cheio { background: var(--c); color: #fff; }

/* barras */
.fx-barra { height: 10px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; position: relative; }
.fx-barra > span { display: block; height: 100%; border-radius: 99px; background: var(--c, var(--accent)); transition: width .6s cubic-bezier(.2,.8,.2,1); }
.fx-barra.grossa { height: 14px; }
.fx-barra .marca { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text); border-radius: 2px; opacity: .7; }
.fx-cats { display: grid; gap: 12px; }
.fx-cat { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.fx-cat .n { font-weight: 600; display: flex; justify-content: space-between; gap: 8px; margin-bottom: 5px; font-size: 14px; }
.fx-cat .n small { color: var(--muted); font-weight: 500; }
.fx-cat .v { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; min-width: 88px; }
.fx-cat .d { font-size: 12px; color: var(--muted); margin-top: 3px; }
.fx-cat .d.acima { color: var(--fx-verm); font-weight: 600; }

/* anéis */
.fx-anel { position: relative; display: inline-grid; place-items: center; flex: none; }
.fx-anel svg { transform: rotate(-90deg); }
.fx-anel .t { position: absolute; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.fx-anel circle { transition: stroke-dashoffset .8s cubic-bezier(.2,.8,.2,1); }

/* etiquetas de situação */
.fx-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; border-radius: 99px; padding: 3px 10px; white-space: nowrap; background: var(--surface-2); color: var(--text-2); }
.fx-tag.ok { background: var(--fx-verde-s); color: var(--fx-verde); }
.fx-tag.atencao { background: var(--fx-ama-s); color: var(--fx-ama); }
.fx-tag.ruim { background: var(--fx-verm-s); color: var(--fx-verm); }
.fx-tag.azul { background: var(--accent-soft); color: var(--accent); }

/* KPIs pequenos */
.fx-kpi { display: flex; gap: 12px; align-items: center; }
.fx-kpi .fx-rot { font-size: 12px; font-weight: 600; color: var(--text-2); }
.fx-kpi .fx-val { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.fx-kpi .fx-det { font-size: 12px; color: var(--muted); }

/* listas */
.fx-lista { list-style: none; margin: 0; padding: 0; }
.fx-lista > li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--border); }
.fx-lista > li:first-child { border-top: 0; }
.fx-lista .meio { flex: 1; min-width: 0; }
.fx-lista .meio b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-lista .meio span { font-size: 12.5px; color: var(--muted); }
.fx-lista .val { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fx-lista li.clic { cursor: pointer; border-radius: 10px; }
.fx-lista li.clic:hover { background: var(--surface-2); }
.fx-dia { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 14px 0 2px; display: flex; justify-content: space-between; }
.fx-dia:first-child { margin-top: 0; }

/* confirmar contas fixas */
.fx-confirma { border: 1px solid color-mix(in srgb, var(--fx-ama) 35%, var(--border)); background: color-mix(in srgb, var(--fx-ama-s) 55%, var(--surface)); }
.fx-confirma li { gap: 10px; }
.fx-confirma input { width: 110px; text-align: right; }

/* explicação "como funciona" */
.fx-explica { border-radius: var(--fx-raio); background: linear-gradient(135deg, var(--accent-soft), color-mix(in srgb, var(--accent-soft) 40%, var(--surface))); border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--border)); padding: 0; margin-bottom: var(--gap); }
.fx-explica > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 12px 16px; font-weight: 700; }
.fx-explica > summary::-webkit-details-marker { display: none; }
.fx-explica > summary img { width: 44px; height: 44px; margin: -6px 0; }
.fx-explica > summary .seta { margin-left: auto; transition: transform .2s; color: var(--accent); }
.fx-explica[open] > summary .seta { transform: rotate(180deg); }
.fx-explica .corpo { padding: 0 18px 16px 72px; color: var(--text-2); line-height: 1.6; }
.fx-explica ol { margin: 4px 0 8px; padding-left: 20px; }
.fx-explica li { margin: 3px 0; }
.fx-explica b { color: var(--text); }
@media (max-width: 680px) { .fx-explica .corpo { padding: 0 16px 14px; } }
.fx-ajuda { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 0; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 800; cursor: pointer; vertical-align: 1px; padding: 0; }
.fx-dica { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 14px; background: var(--surface-2); border: 1px dashed var(--border); font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
.fx-dica b { color: var(--text); }
.fx-dica svg.fx-i { color: var(--fx-ouro); margin-top: 1px; }
.fx-hint { font-size: 12px; font-weight: 400; color: var(--muted); line-height: 1.4; }

/* formulários do módulo */
.fx-form { display: flex; flex-direction: column; gap: 14px; }
.fx-valor { display: flex; align-items: baseline; justify-content: center; gap: 6px; padding: 8px 0 2px; }
.fx-valor span { font-size: 22px; font-weight: 700; color: var(--muted); }
.fx-valor input { font-size: 40px; font-weight: 800; height: 58px; width: 100%; max-width: 280px; text-align: center; border: 0; border-bottom: 2px solid var(--border); border-radius: 0; background: transparent; letter-spacing: -.02em; }
.fx-valor input:focus { outline: 0; border-bottom-color: var(--accent); }
.fx-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fx-chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px 7px 8px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.fx-chip .fx-ic { width: 26px; height: 26px; border-radius: 8px; } .fx-chip .fx-ic svg.fx-i { width: 15px; height: 15px; }
.fx-chip:hover { border-color: var(--c, var(--accent)); }
.fx-chip.ativo { border-color: var(--c, var(--accent)); background: color-mix(in srgb, var(--c, var(--accent)) 12%, var(--surface)); box-shadow: inset 0 0 0 1px var(--c, var(--accent)); }
.fx-chip.simples { padding: 7px 12px; }
.fx-seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.fx-seg button { border: 0; background: transparent; padding: 7px 12px; border-radius: 9px; font: inherit; font-weight: 600; color: var(--text-2); cursor: pointer; font-size: 13px; }
.fx-seg button.ativo { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.fx-icones { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 6px; }
.fx-icones button { height: 42px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer; display: grid; place-items: center; }
.fx-icones button.ativo { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.fx-cores { display: flex; gap: 8px; flex-wrap: wrap; }
.fx-cores button { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border); cursor: pointer; }
.fx-cores button.ativo { box-shadow: 0 0 0 2px var(--text); }
.fx-previa { border-radius: 14px; padding: 12px 14px; background: var(--accent-soft); color: var(--text); font-size: 14px; line-height: 1.5; }
.fx-previa b { color: var(--accent); }
.fx-texto { display: flex; gap: 8px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 6px 6px 6px 14px; box-shadow: var(--fx-sombra); }
.fx-texto svg.fx-i { color: var(--muted); }
.fx-texto input { flex: 1; border: 0; background: transparent; font-size: 15px; height: 38px; padding: 0; }
.fx-texto input:focus { outline: 0; }
.fx-texto .icone.gravando { background: var(--danger-soft); color: var(--danger); }
.fx-mes { display: inline-flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 3px; }
.fx-mes button { border: 0; background: transparent; width: 32px; height: 32px; border-radius: 9px; cursor: pointer; color: var(--text-2); display: grid; place-items: center; }
.fx-mes button:hover { background: var(--surface-2); }
.fx-mes b { min-width: 118px; text-align: center; font-size: 14px; }
.fx-mes b::first-letter { text-transform: uppercase; }
.fx-heroi .fx-mes { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.18); }
.fx-heroi .fx-mes button { color: #fff; } .fx-heroi .fx-mes button:hover { background: rgba(255,255,255,.14); }

/* sonhos */
.fx-sonhos { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: var(--gap); }
.fx-sonho { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 12px; }
.fx-sonho::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 86px; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 22%, transparent), transparent 75%); pointer-events: none; }
.fx-sonho > * { position: relative; }
.fx-sonho .fx-topo { display: flex; gap: 12px; align-items: center; }
.fx-sonho .fx-topo h3 { color: var(--text); font-size: 16px; margin: 0; }
.fx-sonho .valores { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.fx-sonho .valores b { font-size: 20px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.fx-sonho .valores span { color: var(--muted); font-size: 13px; }
.fx-sonho .equiv { display: flex; flex-wrap: wrap; gap: 6px; }
.fx-sonho .acoes { margin-top: auto; }
.fx-sonho.feito { background: linear-gradient(160deg, color-mix(in srgb, var(--fx-verde) 12%, var(--surface)), var(--surface)); }
.fx-marcos { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 4px; }
.fx-marcos span.ok { color: var(--fx-verde); font-weight: 700; }
.fx-novo { border: 2px dashed var(--border); background: transparent; box-shadow: none; display: grid; place-items: center; text-align: center; min-height: 220px; cursor: pointer; color: var(--text-2); font: inherit; border-radius: var(--fx-raio); }
.fx-novo:hover { border-color: var(--accent); color: var(--accent); }
.fx-novo .fx-ic { margin: 0 auto 10px; }

/* proteção / patrimônio */
.fx-reserva-meses { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.fx-ano { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; margin: 10px 0 4px; }
.fx-ano > div { text-align: center; font-size: 11px; color: var(--muted); padding: 6px 0 4px; border-radius: 8px; background: var(--surface-2); position: relative; min-height: 46px; }
.fx-ano > div.agora { box-shadow: inset 0 0 0 2px var(--accent); color: var(--accent); font-weight: 700; }
.fx-ano .pts { display: flex; justify-content: center; gap: 2px; flex-wrap: wrap; margin-top: 4px; }
.fx-ano .pts i { width: 7px; height: 7px; border-radius: 50%; background: var(--fx-ama); display: inline-block; }
.fx-ano .pts i.pago { background: var(--fx-verde); }
.fx-legenda { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--text-2); }
.fx-legenda span { display: inline-flex; align-items: center; gap: 6px; }
.fx-legenda i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; background: var(--c); }
.fx-empilhada { display: flex; height: 14px; border-radius: 99px; overflow: hidden; background: var(--surface-2); }
.fx-empilhada span { height: 100%; background: var(--c); }
.fx-empilhada span + span { border-left: 2px solid var(--surface); }

/* gráficos do módulo */
.fx-graf { width: 100%; height: auto; display: block; overflow: visible; }
.fx-graf text { font: 11px system-ui, sans-serif; fill: var(--muted); }
.fx-graf .grade { stroke: var(--grid); }
.fx-graf-tip { position: fixed; z-index: 60; pointer-events: none; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; font-size: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.18); line-height: 1.5; font-variant-numeric: tabular-nums; }

/* nota do mês */
.fx-nota { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.fx-nota .fx-anel .t { font-size: 40px; }
.fx-nota .rotulo { font-size: 22px; font-weight: 800; }
.fx-comp { display: grid; gap: 12px; }
.fx-comp > div { display: grid; grid-template-columns: minmax(0, 1fr) 70px; gap: 6px 14px; align-items: center; }
.fx-comp .n { font-weight: 600; font-size: 14px; }
.fx-comp .p { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.fx-comp .dica-c { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); margin-top: -2px; }

/* retrospectiva (histórias) */
#fx-hist { position: fixed; inset: 0; z-index: 70; background: #05101d; display: grid; place-items: center; }
#fx-hist .tela { position: relative; width: min(430px, 100vw); height: min(860px, 100vh); border-radius: 26px; overflow: hidden; color: #fff; display: flex; flex-direction: column; }
@media (max-width: 500px) { #fx-hist .tela { border-radius: 0; } }
#fx-hist .barras { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; gap: 4px; z-index: 3; }
#fx-hist .barras span { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.3); overflow: hidden; }
#fx-hist .barras span i { display: block; height: 100%; width: 0; background: #fff; }
#fx-hist .barras span.visto i { width: 100%; }
#fx-hist .barras span.agora i { animation: fx-barra 6s linear forwards; }
@keyframes fx-barra { to { width: 100%; } }
#fx-hist .fechar { position: absolute; top: 26px; right: 14px; z-index: 4; background: rgba(255,255,255,.14); border: 0; color: #fff; width: 36px; height: 36px; border-radius: 50%; font-size: 18px; cursor: pointer; }
#fx-hist .slide { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 70px 30px 40px; gap: 14px; text-align: left; animation: fx-entra .45s ease both; }
#fx-hist .slide .eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.7); }
#fx-hist .slide h2 { font-size: 30px; line-height: 1.15; letter-spacing: -.02em; }
#fx-hist .slide .enorme { font-size: 58px; font-weight: 900; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
#fx-hist .slide p { font-size: 17px; line-height: 1.5; color: rgba(255,255,255,.85); margin: 0; }
#fx-hist .slide img.ave { width: 150px; height: 150px; align-self: center; margin-bottom: 6px; }
#fx-hist .slide .lista-h { display: grid; gap: 10px; }
#fx-hist .slide .lista-h div { display: flex; justify-content: space-between; gap: 10px; background: rgba(255,255,255,.1); border-radius: 14px; padding: 12px 14px; font-weight: 600; }
#fx-hist .lados { position: absolute; inset: 60px 0 0 0; display: grid; grid-template-columns: 1fr 2fr; z-index: 2; }
#fx-hist .lados button { background: transparent; border: 0; cursor: pointer; }
#fx-hist .rodape { position: absolute; bottom: 18px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; z-index: 3; }
#fx-hist .rodape .btn { background: #fff; color: #0f2a44; border: 0; }
@keyframes fx-entra { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* módulos (escolha) */
.fx-mods { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--gap); }
.fx-mod { display: flex; flex-direction: column; gap: 10px; position: relative; transition: border-color .2s, box-shadow .2s; }
.fx-mod.ligado { border-color: color-mix(in srgb, var(--c) 55%, var(--border)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 40%, transparent), var(--fx-sombra); }
.fx-mod .fx-topo { display: flex; gap: 12px; align-items: center; }
.fx-mod .fx-topo h3 { color: var(--text); font-size: 16px; margin: 0; }
.fx-mod p { margin: 0; color: var(--text-2); line-height: 1.5; font-size: 14px; }
.fx-mod ul { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 13.5px; line-height: 1.65; }
.fx-chave { position: relative; width: 48px; height: 28px; flex: none; margin-left: auto; }
.fx-chave input { opacity: 0; width: 100%; height: 100%; margin: 0; position: absolute; cursor: pointer; z-index: 1; }
.fx-chave span { position: absolute; inset: 0; border-radius: 99px; background: var(--border); transition: .2s; }
.fx-chave span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: .2s; }
.fx-chave input:checked + span { background: var(--fx-verde); }
.fx-chave input:checked + span::after { transform: translateX(20px); }
.fx-chave input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* vazio com a coruja */
.fx-vazio { text-align: center; padding: 34px 18px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.fx-vazio img { width: 110px; height: 110px; }
.fx-vazio h2 { font-size: 19px; justify-content: center; }
.fx-vazio p { margin: 0; color: var(--text-2); max-width: 520px; line-height: 1.55; }

/* comemoração */
.fx-festa { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(5,16,29,.6); animation: fx-entra .3s ease both; }
.fx-festa .caixa { background: var(--surface); border-radius: 24px; padding: 26px 24px 20px; width: min(380px, calc(100vw - 32px)); text-align: center; position: relative; overflow: hidden; }
.fx-festa img { width: 140px; height: 140px; }
.fx-festa h2 { font-size: 22px; margin: 6px 0; }
.fx-festa p { color: var(--text-2); margin: 0 0 16px; line-height: 1.5; }
.fx-confete { position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px; animation: fx-cai 2.6s ease-in forwards; }
@keyframes fx-cai { to { transform: translateY(520px) rotate(540deg); opacity: .2; } }
@media (prefers-reduced-motion: reduce) { .fx-confete, #fx-hist .slide, .fx-festa { animation: none !important; } }

/* imóvel na planta */
.fx-fase { display: flex; gap: 0; border-radius: 14px; overflow: hidden; font-size: 12.5px; font-weight: 700; }
.fx-fase div { padding: 10px 12px; color: #fff; flex: var(--f, 1); min-width: 0; }
.fx-fase div small { display: block; font-weight: 500; opacity: .85; }
.fx-tabela { width: 100%; border-collapse: collapse; font-size: 13px; }
.fx-tabela th, .fx-tabela td { padding: 9px 10px; border-bottom: 1px solid var(--border); text-align: right; font-variant-numeric: tabular-nums; }
.fx-tabela th:first-child, .fx-tabela td:first-child { text-align: left; }
.fx-tabela th { font-size: 12px; color: var(--text-2); background: var(--surface-2); }
.fx-passos-form { display: flex; gap: 6px; margin-bottom: 4px; }
.fx-passos-form span { flex: 1; height: 5px; border-radius: 3px; background: var(--border); }
.fx-passos-form span.ok { background: var(--accent); }
.fx-baloes { display: grid; gap: 8px; }
.fx-baloes .linha { align-items: end; }

/* botão "+" fixo no celular */
.fx-mais { display: none; }
@media (max-width: 720px) {
  .fx-mais { display: grid; place-items: center; position: fixed; left: 16px; bottom: 18px; z-index: 39; width: 56px; height: 56px; border-radius: 18px; border: 0; color: #fff; background: linear-gradient(135deg, #2a78d6, #1f5fa8); box-shadow: 0 12px 24px -8px rgba(31,95,168,.7); cursor: pointer; }
  .fx-mais svg.fx-i { width: 28px; height: 28px; }
}
@media print { .fx-tabs, .fx-mais, .fx-explica { display: none !important; } .fx-heroi { color: #000; background: #fff; border: 1px solid #ccc; box-shadow: none; } }
.fx-dica .btn { white-space: normal; height: auto; min-height: 28px; padding: 5px 10px; text-align: left; }
.fx .acoes .fx-mes { flex: none; }
#fx-hist .slide .enorme { font-size: clamp(38px, 11vw, 58px); white-space: nowrap; }
#fx-d-cats { gap: 6px; }
#fx-d-cats .fx-chip { font-size: 13px; padding: 5px 10px 5px 6px; }
@media (max-width: 500px) { #fx-d-cats .fx-chip .fx-ic { width: 22px; height: 22px; } }
.fx-kpi .fx-val { white-space: nowrap; }
@media (max-width: 680px) {
  .fx-g4 .fx-kpi, .fx-g3 .fx-kpi { flex-direction: column; align-items: flex-start; gap: 8px; }
  .fx-g4 .fx-kpi .fx-val { font-size: 18px; }
  .fx-confirma li { flex-wrap: wrap; }
  .fx-confirma li .meio { flex: 1 1 calc(100% - 60px); }
  .fx-confirma li input { flex: 1; }
}

/* ---------- várias atividades ---------- */
.ativ { position: relative; padding-right: 38px; }
.ativ .ativ-check { position: absolute; top: 12px; right: 12px; width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--border); background: var(--surface); }
.ativ.ativo .ativ-check { background: var(--accent); border-color: var(--accent); }
.ativ.ativo .ativ-check::after { content: ''; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.ativ-dica { margin-top: -6px; }
.ativ-previa p { margin: 8px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 14px; }
.ativ-previa:empty { display: none; }
.lados { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 24px; border-bottom: 1px solid var(--border); background: var(--surface); }
.lados[hidden] { display: none; }
.lados-sw { display: inline-flex; padding: 3px; gap: 3px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.lados-sw button { border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 600; font-size: 14px; padding: 8px 14px; border-radius: 9px; cursor: pointer; }
.lados-sw button.ativo { background: var(--surface); color: var(--accent); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.dois-lados .dl-cab { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.dois-lados .dl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.dois-lados .dl-mes { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); }
.dois-lados .rot { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.dois-lados .val { font-size: 24px; font-weight: 700; margin: 2px 0 6px; }
.dl-partes { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--muted); }
.dl-cor { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.dl-cor.cir { background: #8b5cf6; } .dl-cor.dia { background: var(--accent); }
@media (max-width: 640px) { .lados { padding: 8px 12px; } .lados-sw { width: 100%; } .lados-sw button { flex: 1; padding: 8px 6px; font-size: 13px; } .lados-dica { display: none; } }
/* paginação */
.paginas { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; margin: 14px 0 4px; }
.paginas button { min-width: 36px; }
.paginas button.ativo { background: var(--accent); color: #fff; border-color: var(--accent); }
.paginas .pg-info { color: var(--muted); font-size: 13px; margin: 0 6px; }
.paginas label.pg-pp { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; font-weight: 400; font-size: 13px; margin: 0; }
.paginas select { width: auto; min-width: 0; padding: 4px 8px; height: 32px; }
/* instalar o app */
.btn-instalar { font-size: 17px; padding: 14px 22px; border-radius: 14px; display: inline-flex; align-items: center; gap: 10px; }
.btn-instalar small { font-weight: 500; opacity: .85; font-size: 12px; background: rgba(255,255,255,.18); padding: 2px 8px; border-radius: 99px; }
.passos-instalar li { margin: 8px 0; }
#convite-app { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 60; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 10px 30px rgba(0,0,0,.18); animation: convite .35s ease-out; }
#convite-app img { border-radius: 10px; flex: none; }
#convite-app div { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 14px; }
#convite-app span { color: var(--muted); font-size: 12px; }
@keyframes convite { from { transform: translateY(30px); opacity: 0; } }
@media print { #convite-app { display: none; } }
body:has(#convite-app) main { padding-bottom: 110px; }
