/* Bridge Log · Financeiro
   Layout: barra lateral fixa no computador, barra de abas inferior no celular;
   conteúdo em coluna única com cartões só onde há objeto próprio (pendência, parcela, anexo). */
:root {
  --bg: #f1f4f2;
  --surface: #ffffff;
  --surface-2: #f6f8f7;
  --ink: #17251d;
  --ink-2: #3a4b41;
  --muted: #66766c;
  --line: #d5dfd8;
  --line-2: #e6ece8;
  --brand: #007845;          /* verde Bridge Log */
  --brand-ink: #ffffff;
  --brand-soft: #e1f1e7;
  --signal: #c0de00;         /* verde-limão da marca */
  --signal-soft: #f2f8cf;
  --signal-ink: #445200;
  --side-bg: #e9efeb;        /* barra lateral: verde bem claro, puxado para o cinza */
  --side-ink: #1f3328;
  --side-muted: #6b7d72;
  --side-hover: #dde6e0;
  --side-active: #ffffff;
  --ok: #1d7a4e;   --ok-soft: #e1f3e9;
  --warn: #b25d00; --warn-soft: #fdeedd;
  --err: #b4232f;  --err-soft: #fbe6e7;
  --flow: #24638f; --flow-soft: #e2eef7;
  --teal: #11756f; --teal-soft: #dff2f0;
  --neutral-soft: #ebefec;
  --shadow: 0 1px 2px rgba(23, 37, 29, .06), 0 4px 14px rgba(23, 37, 29, .06);
  --radius: 10px;
  --radius-sm: 6px;
  --f-display: "Archivo", "Arial Narrow", Arial, sans-serif;
  --f-body: "Public Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --side-w: 240px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1612; --surface: #16201a; --surface-2: #1b2720; --ink: #e5eee8; --ink-2: #c4d2c9;
    --muted: #8fa298; --line: #2a3a31; --line-2: #223128; --brand: #3fbf7f; --brand-ink: #06150d;
    --brand-soft: #173326; --signal: #c0de00; --signal-soft: #2e3510; --signal-ink: #e2f28a;
    --side-bg: #131d17; --side-ink: #dbe7df; --side-muted: #8aa093; --side-hover: #1c2a21; --side-active: #22342a;
    --ok: #4cc28a; --ok-soft: #143326; --warn: #f19a3e; --warn-soft: #3b2611; --err: #f0707a; --err-soft: #3d1a1e;
    --flow: #79b4e6; --flow-soft: #172b3b; --teal: #4fc4bb; --teal-soft: #11322f; --neutral-soft: #222e27;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 18px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1612; --surface: #16201a; --surface-2: #1b2720; --ink: #e5eee8; --ink-2: #c4d2c9;
  --muted: #8fa298; --line: #2a3a31; --line-2: #223128; --brand: #3fbf7f; --brand-ink: #06150d;
  --brand-soft: #173326; --signal: #c0de00; --signal-soft: #2e3510; --signal-ink: #e2f28a;
  --side-bg: #131d17; --side-ink: #dbe7df; --side-muted: #8aa093; --side-hover: #1c2a21; --side-active: #22342a;
  --ok: #4cc28a; --ok-soft: #143326; --warn: #f19a3e; --warn-soft: #3b2611; --err: #f0707a; --err-soft: #3d1a1e;
  --flow: #79b4e6; --flow-soft: #172b3b; --teal: #4fc4bb; --teal-soft: #11322f; --neutral-soft: #222e27;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 18px rgba(0,0,0,.25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.5 var(--f-body); -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--f-display); margin: 0; line-height: 1.2; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; font-weight: 750; }
h2 { font-size: 1.18rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0; }
a { color: var(--brand); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--f-mono); font-size: .88em; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.label {
  font-size: .72rem; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--muted);
}
[hidden] { display: none !important; }
[v-cloak] { display: none; }

/* ---------- Estrutura ---------- */
.shell { min-height: 100%; display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--side-bg); color: var(--side-ink); border-right: 1px solid var(--line);
  padding: 18px 12px; display: flex; flex-direction: column; gap: 14px;
}
.marca { display: flex; flex-direction: column; gap: 4px; padding: 4px 8px 10px; text-decoration: none; }
.logo { display: block; width: 168px; max-width: 100%; height: auto; }
.logo-escuro { display: none; }
.marca-sub { font-size: .72rem; color: var(--side-muted); letter-spacing: .08em; text-transform: uppercase; font-weight: 650; }
.nav-busca { padding: 0 6px 8px; }
.nav-busca input { width: 100%; box-sizing: border-box; padding: 7px 10px; font-size: .88rem; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-grupo { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--side-muted); padding: 12px 10px 4px; font-weight: 650; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px;
  color: var(--side-ink); text-decoration: none; font-weight: 550; font-size: .93rem;
}
.nav a:hover { background: var(--side-hover); }
.nav a.ativo { background: var(--side-active); color: var(--brand); box-shadow: inset 3px 0 0 var(--brand), var(--shadow); font-weight: 650; }
.nav svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav .badge { margin-left: auto; }
.side-rodape { margin-top: auto; display: flex; flex-direction: column; gap: 8px; font-size: .85rem; }
.eu { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 8px; background: var(--side-active); border: 1px solid var(--line); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: var(--brand-ink);
  display: grid; place-items: center; font: 700 .8rem var(--f-display); flex: none; }
.eu-nome { color: var(--side-ink); font-weight: 650; line-height: 1.2; }
.eu-papeis { font-size: .74rem; color: var(--side-muted); }
.link-claro { background: none; border: 0; color: var(--side-muted); cursor: pointer; padding: 4px 10px; text-align: left; font-size: .85rem; }
.link-claro:hover { color: var(--brand); }
.topo-cel { display: none; }
@media (max-width: 860px) {
  .topo-cel { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px;
    background: var(--side-bg); border-bottom: 1px solid var(--line); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 25; }
  .topo-cel .logo { width: 116px; }
}

.main { min-width: 0; display: flex; flex-direction: column; }
.demo-faixa {
  background: var(--signal-soft); color: var(--signal-ink); border-bottom: 1px solid var(--line);
  padding: 8px 24px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: .86rem;
}
.demo-faixa select { padding: 4px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); }
.pagina { width: 100%; max-width: 2200px; margin: 0 auto; padding: 28px 20px 96px; display: flex; flex-direction: column; gap: 20px; }
.cabeca { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cabeca .sub { color: var(--muted); margin-top: 4px; }

.tabbar { display: none; }

@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .pagina { padding: 18px 16px 110px; gap: 16px; }
  .demo-faixa { padding: 8px 16px; }
  h1 { font-size: 1.35rem; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--surface); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
  }
  .tabbar a, .tabbar button {
    display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 2px; text-decoration: none;
    color: var(--muted); font-size: .68rem; font-weight: 600; background: none; border: 0; position: relative;
  }
  .tabbar a.ativo { color: var(--brand); }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar .badge { position: absolute; top: 0; right: calc(50% - 22px); }
  .tabbar .mais-nova { color: var(--brand); }
  .tabbar .mais-nova span.circulo { width: 38px; height: 38px; border-radius: 50%; background: var(--brand); color: var(--brand-ink);
    display: grid; place-items: center; margin-top: -4px; }
}

/* ---------- Componentes ---------- */
.painel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.painel-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.painel-corpo { padding: 16px 18px; }
.painel-corpo.sem-pad { padding: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px;
  padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); font-weight: 600; font-size: .92rem; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn svg { width: 17px; height: 17px; }
.btn-prim { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn-prim:hover { background: color-mix(in srgb, var(--brand) 88%, #000); }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-ok:hover { background: color-mix(in srgb, var(--ok) 88%, #000); }
.btn-perigo { color: var(--err); border-color: color-mix(in srgb, var(--err) 40%, var(--line)); }
.btn-perigo:hover { background: var(--err-soft); }
.btn-alerta { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); }
.btn-alerta:hover { background: var(--warn-soft); }
.btn-txt { border-color: transparent; background: transparent; padding-inline: 8px; color: var(--brand); }
.btn-txt:hover { background: var(--brand-soft); }
.btn.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-sm { min-height: 30px; padding: 4px 10px; font-size: .84rem; }
.btn-grande { min-height: 48px; font-size: 1rem; padding: 10px 18px; }
.acoes { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 8px; border-radius: 999px;
  font-size: .78rem; font-weight: 650; white-space: nowrap; background: var(--neutral-soft); color: var(--ink-2);
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .85; }
.pill.fluxo { background: var(--flow-soft); color: var(--flow); }
.pill.nf { background: var(--signal-soft); color: var(--signal-ink); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.erro { background: var(--err-soft); color: var(--err); }
.pill.alerta { background: var(--warn-soft); color: var(--warn); }
.pill.contrato { background: var(--teal-soft); color: var(--teal); }
.pill.neutro { background: var(--neutral-soft); color: var(--muted); }
.tag { display: inline-block; padding: 1px 7px; border-radius: 5px; font-size: .74rem; font-weight: 650; background: var(--neutral-soft); color: var(--ink-2); }
.tag.urgente { background: var(--err-soft); color: var(--err); }
.tag.frota { background: var(--brand-soft); color: var(--brand); }
.tag.adm { background: var(--neutral-soft); color: var(--ink-2); }
.tag.sem-classif { background: var(--warn-soft, #fff4dc); color: var(--warn, #8a5a00); }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--signal); color: #1f2a00;
  font-size: .72rem; font-weight: 750; display: inline-grid; place-items: center; }

/* Formulários */
.form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px 16px; }
.campo { display: flex; flex-direction: column; gap: 5px; grid-column: span 6; min-width: 0; }
.campo.c2 { grid-column: span 2; } .campo.c3 { grid-column: span 3; } .campo.c4 { grid-column: span 4; } .campo.c8 { grid-column: span 8; }
.campo.c12 { grid-column: span 12; }
.campo > span:first-child { font-size: .84rem; font-weight: 600; color: var(--ink-2); }
.campo .ajuda { font-size: .8rem; color: var(--muted); }
.campo .ajuda.erro { color: var(--err); }
.inp, select.inp, textarea.inp {
  width: 100%; min-height: 40px; padding: 8px 11px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink);
}
textarea.inp { min-height: 76px; resize: vertical; }
.inp:focus { outline: 2px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 0; border-color: var(--brand); }
.inp.valor { text-align: right; font-variant-numeric: tabular-nums; }
.check { display: flex; gap: 8px; align-items: center; font-size: .92rem; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--brand); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; padding: 3px; background: var(--surface-2); gap: 3px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 7px; font-weight: 600; cursor: pointer; color: var(--ink-2); }
.seg button.on { background: var(--surface); color: var(--brand); box-shadow: var(--shadow); }
@media (max-width: 640px) {
  .campo, .campo.c2, .campo.c3, .campo.c4, .campo.c8 { grid-column: span 12; }
  .campo.c2.meio, .campo.c3.meio, .campo.c4.meio { grid-column: span 6; }
}

/* Tabelas */
.tabela-wrap { overflow-x: auto; }
.tabela-rolar { max-height: calc(100vh - 150px); overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.tabela-rolar thead th, .tabela-wrap thead th { position: sticky; top: 0; z-index: 2; }
table.tab, table.tabela { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tab th, .tabela th { text-align: left; font-size: .72rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted);
  font-weight: 650; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
.tab td, .tabela td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tab tr:last-child td, .tabela tr:last-child td { border-bottom: 0; }
.tab tr.clic { cursor: pointer; }
.tab tr.clic:hover td { background: var(--surface-2); }
.tab .dir, .tabela .dir { text-align: right; }
.tab td.dir, .tabela td.dir { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tab .sub, .tabela .sub { font-size: .8rem; color: var(--muted); }
.tab tfoot td { font-weight: 700; background: var(--surface-2); }

/* Lista em cartões (celular) */
.lista-cartoes { display: none; flex-direction: column; gap: 10px; }
@media (max-width: 760px) {
  .so-desk { display: none !important; }
  .lista-cartoes { display: flex; }
}
@media (min-width: 761px) { .so-cel { display: none !important; } }
.cartao {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: inherit; cursor: pointer;
}
.cartao:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.cartao-linha { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; min-width: 0; }
.cartao-titulo { font-weight: 650; min-width: 0; overflow-wrap: anywhere; }
.cartao-valor { font: 750 1.08rem var(--f-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cartao-meta { display: flex; gap: 6px 12px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); align-items: center; }

/* Pendências (aprovação) */
.pend { border-left: 4px solid var(--signal); }
.pend .cartao-valor { font-size: 1.3rem; }
.pend-acoes { display: flex; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.pend-acoes .btn { flex: 1 1 120px; }

/* Indicadores */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: inherit; }
.kpi .v { font: 750 1.45rem var(--f-display); font-variant-numeric: tabular-nums; }
.kpi .d { font-size: .82rem; color: var(--muted); }
.kpi.destaque { background: var(--signal-soft); border-color: color-mix(in srgb, var(--signal) 45%, var(--line)); }
.kpi.destaque .v { color: var(--signal-ink); }
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Detalhe */
.det-topo { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.det-num { font-family: var(--f-mono); color: var(--muted); font-size: .9rem; }
.det-valor { font: 800 1.9rem var(--f-display); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.det-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
@media (max-width: 1020px) { .det-grid { grid-template-columns: minmax(0, 1fr); } }
.coluna { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 18px; }
.dl div { min-width: 0; }
.dl dt { font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 650; }
.dl dd { margin: 2px 0 0; overflow-wrap: anywhere; }
@media (max-width: 640px) { .dl { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Etapas do fluxo */
.etapas { display: grid; grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr)); gap: 0; counter-reset: e; }
.etapa { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; position: relative; padding: 0 4px; }
.etapa::before { content: ""; position: absolute; top: 13px; left: -50%; right: 50%; height: 2px; background: var(--line); z-index: 0; }
.etapa:first-child::before { display: none; }
.etapa .bola { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface);
  display: grid; place-items: center; font: 700 .78rem var(--f-display); color: var(--muted); z-index: 1; position: relative; }
.etapa .bola svg { width: 15px; height: 15px; }
.etapa .nome { font-size: .78rem; font-weight: 600; color: var(--muted); line-height: 1.25; }
.etapa .quem { font-size: .72rem; color: var(--muted); }
.etapa.feita .bola { background: var(--ok); border-color: var(--ok); color: #fff; }
.etapa.feita::before, .etapa.atual::before { background: var(--ok); }
.etapa.feita .nome { color: var(--ink-2); }
.etapa.atual .bola { border-color: var(--signal); background: var(--signal-soft); color: var(--signal-ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--signal) 22%, transparent); }
.etapa.atual .nome { color: var(--ink); }
.etapa.pulada .bola { border-style: dashed; }
.etapa.erro .bola { background: var(--err); border-color: var(--err); color: #fff; }
@media (max-width: 640px) {
  .etapas { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .etapa { flex-direction: row; text-align: left; gap: 10px; padding: 0; }
  .etapa::before { left: 13px; right: auto; width: 2px; height: 10px; top: -10px; }
}

/* Histórico */
.linha-tempo { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.linha-tempo li { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 12px; padding-bottom: 14px; position: relative; }
.linha-tempo li::before { content: ""; position: absolute; left: 6px; top: 16px; bottom: 0; width: 2px; background: var(--line-2); }
.linha-tempo li:last-child::before { display: none; }
.linha-tempo .ponto { width: 14px; height: 14px; border-radius: 50%; margin-top: 4px; background: var(--line); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
.linha-tempo .ponto.ok { background: var(--ok); } .linha-tempo .ponto.erro { background: var(--err); }
.linha-tempo .ponto.alerta { background: var(--warn); } .linha-tempo .ponto.fluxo { background: var(--flow); }
.linha-tempo .ponto.nf { background: var(--signal); }
.linha-tempo .t { font-weight: 600; font-size: .9rem; }
.linha-tempo .q { font-size: .8rem; color: var(--muted); }
.linha-tempo .c { font-size: .88rem; margin-top: 3px; color: var(--ink-2); overflow-wrap: anywhere; }

/* Saldo de contrato */
.saldo-barra { height: 12px; border-radius: 6px; background: var(--neutral-soft); overflow: hidden; display: flex; }
.saldo-barra span { display: block; height: 100%; }
.saldo-barra .usado { background: var(--brand); }
.saldo-barra .bloq { background: var(--warn); }
.saldo-legenda { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.saldo-legenda .v { font: 700 1.05rem var(--f-display); font-variant-numeric: tabular-nums; }

/* Avisos */
.aviso { border-radius: 9px; padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; border: 1px solid transparent; }
.aviso svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.aviso.info { background: var(--flow-soft); color: var(--ink); border-color: color-mix(in srgb, var(--flow) 25%, transparent); }
.aviso.alerta { background: var(--warn-soft); color: var(--ink); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.aviso.erro { background: var(--err-soft); color: var(--ink); border-color: color-mix(in srgb, var(--err) 30%, transparent); }
.aviso.ok { background: var(--ok-soft); color: var(--ink); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.nowrap { white-space: nowrap; }
.filtros-cartao { align-items: flex-end; }
.filtros-cartao .campo { flex: 1 1 150px; min-width: 0; }
.filtros-cartao .campo > span { font-size: .78rem; }
@media (max-width: 760px) { .filtros-cartao .campo { flex: 1 1 calc(50% - 10px); } }
/* Lupa de contratos */
.lupa-campo { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; cursor: pointer; text-align: left; font: inherit; color: inherit; min-width: 0; }
.lupa-campo > span:not(.btn) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lupa-campo svg { width: 20px; height: 20px; flex: none; color: var(--brand); }
.lupa-campo:hover { border-color: var(--brand); }
.lupa-lista { display: flex; flex-direction: column; gap: 6px; max-height: min(60vh, 460px); overflow-y: auto; margin-top: 10px; }
.lupa-item { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); cursor: pointer; font: inherit; color: inherit; }
.lupa-item:hover, .lupa-item:focus-visible { border-color: var(--brand); background: var(--brand-soft); outline: none; }
.lupa-l2 { font-size: .88rem; color: var(--ink-2); }
.lupa-l3 { font-size: .78rem; color: var(--muted); }
.aviso.ok { background: var(--ok-soft); color: var(--ink); }

.vazio { text-align: center; padding: 36px 20px; color: var(--muted); display: flex; flex-direction: column; gap: 10px; align-items: center; }
.vazio svg { width: 34px; height: 34px; opacity: .6; }
.vazio strong { color: var(--ink-2); font-size: 1rem; }

/* Filtros */
.filtros { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filtros .inp { width: auto; min-width: 0; }
.filtros .busca { flex: 1 1 220px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 12px; font-size: .84rem; font-weight: 600; cursor: pointer; color: var(--ink-2); }
.chip.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.chip .n { opacity: .7; margin-left: 4px; font-variant-numeric: tabular-nums; }

/* Parcelas editáveis */
.parcelas { display: flex; flex-direction: column; gap: 6px; }
.parcela-lin { display: grid; grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: center; }
.parcela-lin .n { font: 700 .85rem var(--f-display); color: var(--muted); }
.parcelas-tot { display: flex; justify-content: space-between; font-size: .86rem; padding-top: 6px; border-top: 1px dashed var(--line); }

/* Anexos */
.anexos { display: flex; flex-direction: column; gap: 8px; }
.anexo { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface-2); min-width: 0; }
.anexo svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.anexo .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.upload { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.upload input[type=file] { font-size: .85rem; max-width: 100%; }

/* Modal */
.modal-fundo { position: fixed; inset: 0; background: rgba(10, 20, 30, .45); z-index: 50; display: grid; place-items: center; padding: 16px; }
.modal { background: var(--surface); border-radius: 14px; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal-cab { padding: 18px 20px 6px; }
.modal-corpo { padding: 12px 20px; display: flex; flex-direction: column; gap: 14px; }
.modal-pe { padding: 12px 20px 18px; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 640px) {
  .modal-fundo { place-items: end center; padding: 0; }
  .modal { border-radius: 16px 16px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .modal-pe .btn { flex: 1; }
}

/* Barra de decisão fixa (celular) */
.decisao-fixa { position: sticky; bottom: 76px; z-index: 20; }
@media (min-width: 861px) { .decisao-fixa { bottom: 12px; } }

/* Toasts */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
@media (max-width: 860px) { .toasts { bottom: 86px; left: 16px; right: 16px; max-width: none; } }
.toast { background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 10px; box-shadow: var(--shadow); font-size: .9rem; display: flex; gap: 10px; align-items: flex-start; }
.toast.erro { background: var(--err); color: #fff; }
.toast.ok { background: var(--ok); color: #fff; }

/* Login */
.login-fundo { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); background: #f5f8f6; }
.login-arte { display: flex; flex-direction: column; background: #fff; min-height: 100vh; }
.login-fotos { position: relative; flex: 1; min-height: 340px; overflow: hidden; background: #0b4d30; clip-path: polygon(0 0, 100% 0, 100% 82%, 0 100%); }
.login-foto { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity 1.2s ease; }
.login-foto.on { opacity: 1; }
.login-fotos::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4,43,26,0) 55%, rgba(4,43,26,.35) 100%); }
.login-faixa { position: absolute; left: 0; top: 0; bottom: 0; width: 14px; background: #c0de00; z-index: 1; }
.login-pontos { position: absolute; left: 32px; bottom: 26%; display: flex; flex-direction: column; gap: 10px; z-index: 2; }
.login-pontos button { width: 14px; height: 14px; border-radius: 50%; border: 0; background: rgba(255,255,255,.8); cursor: pointer; padding: 0; }
.login-pontos button.on { background: #0b4d30; box-shadow: 0 0 0 2px #fff; }
.login-marca { display: flex; align-items: center; gap: 28px; padding: 28px 8% 44px; }
.login-marca img { width: 210px; height: auto; flex: none; }
.login-marca h1 { font: 800 2.4rem/1.05 var(--f-display); letter-spacing: -.02em; color: #0b4d30; }
.login-marca p { color: #3f5a4b; margin-top: 8px; font-style: italic; }
.login-sobre { display: inline-block; font: 700 .72rem var(--f-display); letter-spacing: .18em; text-transform: uppercase; color: #2c4a3a; margin-bottom: 14px; }
.login-form { display: grid; place-items: center; padding: 40px 24px; background: #f5f8f6; }
.login-caixa { width: min(430px, 100%); display: flex; flex-direction: column; gap: 18px; }
.login-caixa h2 { font: 800 2.1rem/1.1 var(--f-display); color: #12261b; }
.login-sub { color: var(--muted); margin-top: 8px; }
.login-caixa .inp { background: #eaf1ec; border-color: #d4e1d8; height: 48px; }
.login-caixa .inp:focus { background: #fff; }
.login-senha { position: relative; }
.login-senha .inp { padding-right: 44px; }
.login-olho { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: #0b4d30; cursor: pointer; padding: 6px; display: grid; place-items: center; }
.login-botao { background: #0b4d30; border-color: #0b4d30; height: 50px; font-size: 1rem; }
.login-botao:hover { background: #083c25; }
.login-link { font-weight: 700; text-decoration: underline; color: #0b4d30; }
.login-nota { text-align: center; font-size: .8rem; color: var(--muted); }
.login-pedir { text-align: center; font-size: .9rem; margin: -4px 0 0; }
.login-pedir .btn-txt { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: #0b4d30; text-decoration: underline; cursor: pointer; }
@media (max-width: 860px) {
  .login-fundo { grid-template-columns: minmax(0, 1fr); }
  .login-arte { min-height: 0; }
  .login-fotos { flex: none; height: 200px; min-height: 0; }
  .login-pontos { display: none; }
  .login-marca { padding: 16px 20px 8px; gap: 14px; }
  .login-marca img { width: 120px; }
  .login-marca h1 { font-size: 1.5rem; }
  .login-marca p { font-size: .85rem; }
  .login-caixa h2 { font-size: 1.6rem; }
}


.carregando { min-height: 60vh; display: grid; place-items: center; color: var(--muted); }
.spin { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: gira .8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 3s; } }

.sep { height: 1px; background: var(--line-2); margin: 4px 0; }
.dois { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 900px) { .dois { grid-template-columns: minmax(0, 1fr); } }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 14px; font-weight: 650; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--brand); border-bottom-color: var(--signal); }

/* Ajustes finos */
.campo.check { flex-direction: row; align-items: center; }
.tab td.mono, .tab td:first-child.mono { white-space: nowrap; }
@media (max-width: 1020px) {
  .det-grid { display: flex; flex-direction: column; }
  .det-grid > .coluna { display: contents; }
  .det-grid .primeiro { order: -2; }
  .det-grid .segundo { order: -1; }
  .det-grid .ultimo { order: 5; }
  .decisao-fixa { position: static; }
}
@media (max-width: 640px) {
  .tab th, .tab td { padding: 9px 10px; }
  .demo-faixa { gap: 6px 10px; font-size: .8rem; padding-block: 6px; }
  .demo-faixa .demo-texto { display: none; }
  .det-valor { font-size: 1.6rem; }
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo { content: url(../img/logo-claro.png); } }
:root[data-theme="dark"] .logo { content: url(../img/logo-claro.png); }

/* Lista de assinaturas da emergência */
.vagas { display: grid; gap: 6px; }
.vaga { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface-2); font-size: .88rem; }
.vaga .bola { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line); flex: none; }
.vaga.ok .bola { background: var(--ok); border-color: var(--ok); color: #fff; }
.vaga .bola svg { width: 13px; height: 13px; }
.vaga.minha { border-color: var(--signal); background: var(--signal-soft); }

/* Seleção em tabelas */
.tab td.sel, .tab th.sel { width: 1%; padding-right: 0; }
.tab input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--brand); }
.barra-acao { position: sticky; bottom: 12px; z-index: 15; display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 10px; box-shadow: var(--shadow); }
@media (max-width: 860px) { .barra-acao { bottom: 82px; } }

/* Foto do recibo */
.foto-recibo { border: 2px dashed var(--line); border-radius: 12px; padding: 18px; display: grid; place-items: center; gap: 8px; text-align: center; cursor: pointer; background: var(--surface-2); }
.foto-recibo:hover { border-color: var(--brand); }
.foto-recibo img { max-height: 220px; border-radius: 8px; }
.foto-recibo svg { width: 34px; height: 34px; color: var(--brand); }

/* Relatório do dia (tela e impressão) */
.rel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.rel-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; border-bottom: 3px solid var(--brand); padding-bottom: 14px; }
.rel-cab .logo { width: 150px; }
.rel h2 { font-size: 1.05rem; }
.rel-resumo { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.rel-resumo > div { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.rel-resumo .v { font: 750 1.2rem var(--f-display); font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .rel-resumo { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rel { padding: 16px; } }
.rel-atencao { border: 1px solid color-mix(in srgb, var(--warn) 45%, var(--line)); background: var(--warn-soft); border-radius: 8px; padding: 12px 14px; }
.rel-atencao ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 3px; font-size: .88rem; }
.rel table.tab { font-size: .84rem; }
.rel table.tab td, .rel table.tab th { padding: 7px 9px; }
.rel-grupo-cab { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.rel-rodape { font-size: .78rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; }
.aut { display: inline-block; padding: 1px 7px; border-radius: 5px; font-size: .74rem; font-weight: 650; background: var(--neutral-soft); color: var(--ink-2); white-space: nowrap; }
.aut.emergencial, .aut.nao { background: var(--warn-soft); color: var(--warn); }
.aut.direta_diretoria, .aut.diretoria { background: var(--brand-soft); color: var(--brand); }
.aut.alcada { background: var(--flow-soft); color: var(--flow); }
.aut.folha { background: #e8eef9; color: #1c3f7a; }
.aut.folha-alerta { background: #fdebd0; color: #8a4b00; }
.aut.cartao { background: var(--signal-soft); color: var(--signal-ink); }
.aut.recorrente, .aut.contrato { background: var(--teal-soft); color: var(--teal); }

@media print {
  @page { size: A4 landscape; margin: 12mm; }
  :root { color-scheme: light; --bg: #fff; --surface: #fff; --ink: #111; --ink-2: #333; --muted: #555; --line: #bbb; --line-2: #ddd; --surface-2: #f3f3f3; }
  body { background: #fff; }
  .side, .tabbar, .topo-cel, .demo-faixa, .nao-imprimir, .toasts { display: none !important; }
  .shell { display: block; }
  .pagina { padding: 0; max-width: none; }
  .rel { border: 0; padding: 0; }
  .logo { background: none !important; padding: 0 !important; }
  .tab tr { break-inside: avoid; }
  .rel-grupo { break-inside: auto; }
}

/* Totais por banco */
.bancos { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.bancos .label { margin-right: 4px; }
.banco-tot { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 12px; cursor: pointer; color: var(--ink); font-size: .9rem; }
.banco-tot svg { width: 16px; height: 16px; color: var(--brand); }
.banco-tot strong { font-family: var(--f-display); }
.banco-tot.on { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: var(--brand-soft); }
.tab tr.grupo td { background: var(--brand-soft); border-bottom: 1px solid var(--line); padding-top: 9px; padding-bottom: 9px; }
.grupo-linha { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.grupo-linha svg, .grupo-cab svg { width: 16px; height: 16px; vertical-align: -3px; color: var(--brand); }
.grupo-cab { display: flex; justify-content: space-between; align-items: center; padding: 10px 4px 2px; font-weight: 700; border-bottom: 2px solid var(--brand); }
.rel-bancos { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.rel-bancos > div { border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 8px; padding: 8px 12px; }
.rel-bancos .v { font: 750 1.1rem var(--f-display); font-variant-numeric: tabular-nums; }
.cartao.pend.marcado { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: var(--brand-soft); }

/* Documentos fiscais e pagamentos (várias NFs / vários boletos) */
.ed-docs .label { margin: 4px 0 6px; }
.ed-lin { display: grid; grid-template-columns: minmax(120px, 160px) minmax(0, 1fr) 150px 130px 36px; gap: 8px; align-items: center;
  margin-bottom: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 9px; }
.ed-lin.pag { grid-template-columns: 44px minmax(110px, 1fr) 150px 130px 36px; }
.ed-lin > .larga { grid-column: 1 / -2; }
.ed-lin > .fim { grid-column: -2; grid-row: 1; }
@media (max-width: 760px) {
  .ed-lin { grid-template-columns: 1fr 1fr; }
  .ed-lin > .larga { grid-column: 1 / -1; }
  .ed-lin > .fim { grid-column: 2; grid-row: auto; justify-self: end; }
}
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.checklist li label { display: flex; gap: 8px; align-items: flex-start; }
.dl-mini { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0; font-size: .88rem; }
.dl-mini dt { color: var(--muted); }
.dl-mini dd { margin: 0; }

/* Janela lateral "Ver solicitação" */
.lateral-fundo { position: fixed; inset: 0; background: rgba(10, 20, 30, .35); z-index: 70; display: flex; justify-content: flex-end; }
.lateral { background: var(--surface); width: min(560px, 100%); height: 100%; display: flex; flex-direction: column; box-shadow: -12px 0 40px rgba(0,0,0,.25); }
.lateral-cab { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.lateral-corpo { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.lateral-pe { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); padding-bottom: max(12px, env(safe-area-inset-bottom, 0px)); }
.link-sol { color: var(--brand); text-decoration: none; font-family: var(--f-mono, monospace); font-size: .82rem; white-space: nowrap; cursor: pointer; background: none; border: 0; padding: 0; }
.link-sol:hover { text-decoration: underline; }
.pg-status { font-size: .74rem; font-weight: 650; }
.venc-vencido { color: var(--err); font-weight: 650; }
.venc-proximo { color: var(--warn); font-weight: 650; }
@media print { .link-sol { color: #0645ad; text-decoration: underline; } }
.campo-inline { display: inline-flex; align-items: center; gap: 6px; font-size: .86rem; color: var(--muted); }
.campo-inline .inp { width: auto; }

.modal.largo { width: min(880px, 100%); }

/* Títulos de coluna que ordenam (clique alterna crescente/decrescente) */
.tab th.ordenavel { cursor: pointer; user-select: none; white-space: nowrap; }
.tab th.ordenavel:hover { color: var(--ink); }
.tab th.ordenavel .seta { font-size: .8rem; margin-left: 2px; opacity: .55; }
.tab th.ordenavel.on { color: var(--brand); }
.tab th.ordenavel.on .seta { opacity: 1; }

/* KPI clicável (filtro da prévia da planilha) */
button.kpi { cursor: pointer; text-align: left; font: inherit; }
/* Verificação em duas etapas */
.faixa-consulta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 16px; background: var(--warn-soft, #fff4e0); color: var(--ink); border-bottom: 1px solid var(--line); font-size: .9rem; }
.codigo-inp { font: 700 1.6rem var(--f-display); letter-spacing: .35em; text-align: center; }
.secao-form { grid-column: 1 / -1; margin: 8px 0 -4px; font: 700 .8rem var(--f-body, inherit); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }

.nota-qive { grid-column: 1 / -1; }
.nota-pick { margin-top: 8px; border: 1px solid var(--borda, #d9dee7); border-radius: 8px; padding: 8px; background: var(--fundo-2, #f7f8fa); }
.nota-pick .acoes { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.nota-pick .acoes .inp { flex: 1; min-width: 200px; }
.nota-pick table tr.clicavel { cursor: pointer; }
.nota-pick table tr.clicavel:hover { background: rgba(0, 0, 0, .05); }

/* Lista com pesquisa (SelectBusca) */
.sb { position: relative; }
.sb .inp { width: 100%; cursor: text; }
.sb-lista { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 40; max-height: 300px; overflow-y: auto; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 12px 32px rgba(0, 0, 0, .18); padding: 4px; }
.sb-op { padding: 8px 10px; border-radius: 7px; cursor: pointer; font-size: .92rem; }
.sb-op.on { background: var(--surface-2); }
.sb-op.sel { font-weight: 650; }
.sb-op.sem { color: var(--muted); font-style: italic; }
.sb-grupo { padding: 8px 10px 3px; font-size: .7rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); font-weight: 650; }
.sb-vazio, .sb-mais { padding: 10px; font-size: .85rem; color: var(--muted); }
.pill svg { width: 14px; height: 14px; flex: none; }

/* Nota de débito: tela e impressão (modelo "fatura de cobrança de locação" e modelo "encargos") */
.nd-modal { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 70; overflow: auto; display: flex; justify-content: center; padding: 16px; }
.nd-caixa { background: var(--bg); border-radius: 12px; padding: 14px; width: min(1100px, 100%); height: fit-content; }
.nd-folha { background: #fff; color: #000; margin-top: 10px; position: relative; font: 12px/1.25 Arial, Helvetica, sans-serif; border: 1px solid #999; overflow-x: auto; }
.nd-folha table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.nd-folha td, .nd-folha th { border: 1px solid #000; padding: 2px 5px; vertical-align: top; text-align: left; font-weight: 400; }
.nd-folha .mini { font-size: 8px; color: #222; display: block; text-transform: uppercase; }
.nd-folha .val { font-size: 12px; }
.nd-folha .dir { text-align: right; }
.nd-folha .cen { text-align: center; }
.nd-folha .faixa { background: #fff; font-weight: 700; font-size: 11px; text-transform: uppercase; padding: 1px 5px; }
.nd-folha .cab-tab th { background: #d9d9d9; font-weight: 700; font-size: 10px; text-transform: uppercase; }
.nd-folha img.nd-logo { max-width: 100%; max-height: 62px; display: block; margin: 0 auto; }
.nd-folha .grande { font-size: 13px; font-weight: 700; text-align: center; }
.nd-folha .corpo-itens td { border-top: 0; border-bottom: 0; height: 22px; }
.nd-folha .sem-borda td { border: 0; }
.nd-folha .neg { color: #c00000; }
.nd-marca { position: absolute; top: 35%; left: 20%; font-size: 4rem; color: rgba(200,0,0,.3); transform: rotate(-20deg); font-weight: 700; pointer-events: none; }
/* modelo encargos (Liasa) */
.nd-enc { padding: 12px; }
.nd-enc table { margin-bottom: 8px; }
.nd-enc .tit { background: #e7e6e6; font-weight: 700; }
.nd-enc td { height: 20px; }
.nd-enc .caixa { border: 1.5px solid #000; padding: 6px 8px; margin-bottom: 8px; }
.nd-enc .caixa p { margin: 4px 0; }
@page nd-loc { size: A4 landscape; margin: 8mm; }
@page nd-enc { size: A4 portrait; margin: 10mm; }
.nd-folha.loc { page: nd-loc; }
.nd-folha.enc { page: nd-enc; }
@media print {
  body.imprimindo-nd > *:not(#nd-print-root) { display: none !important; }
  body.imprimindo-nd #nd-print-root { display: block; }
  body.imprimindo-nd #nd-print-root .nd-folha { position: static; border: 0; overflow: visible; margin: 0; break-inside: avoid; }
  .nd-nao-imprimir { display: none !important; }
  /* listas com rolagem e cabeçalho fixo saem inteiras no papel */
  .tabela-rolar, .tabela-wrap { max-height: none !important; overflow: visible !important; }
  .topo-fixo { position: static !important; }
}

/* Status da fatura / pagamento */
.chip-st { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; background: #eef0f3; color: #3a4350; white-space: nowrap; }
.chip-st.st-ok, .btn.st-ok { background: #e3f4e6; color: #1d6b2f; }
.chip-st.st-parc, .btn.st-parc { background: #fff1d6; color: #8a5a00; }
.chip-st.st-venc, .btn.st-venc { background: #fde4e4; color: #a12626; }
.chip-st.st-aberto, .btn.st-aberto { background: #e6eefc; color: #234a8f; }
.chip-st.st-nada, .btn.st-nada { background: #eef0f3; color: #5a6270; }

/* Formulários simples em colunas (patrimônio, containers, outros recebimentos) */
.grade2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 16px; margin-bottom: 12px; }
.grade2 .campo { margin: 0; }

/* Abas de páginas (várias telas abertas ao mesmo tempo) */
.abas-paginas { display: flex; gap: 4px; flex-wrap: wrap; align-items: flex-end; margin: 0 0 14px; border-bottom: 1px solid var(--borda, #dfe3e0); padding-bottom: 0; }
.aba-pag { display: inline-flex; align-items: center; gap: 4px; max-width: 220px; padding: 6px 8px 6px 12px; border: 1px solid var(--borda, #dfe3e0); border-bottom: 0; border-radius: 8px 8px 0 0;
  background: #f2f4f3; color: #4b5b52; font-size: 13px; cursor: pointer; user-select: none; margin-bottom: -1px; }
.aba-pag.ativa { background: #fff; color: #10231a; font-weight: 600; box-shadow: 0 -2px 0 #007845 inset; }
.aba-pag:hover { background: #e9eeeb; }
.aba-pag.ativa:hover { background: #fff; }
.aba-pag[draggable="true"] { cursor: grab; }
.aba-pag.arrastando { opacity: .45; }
.aba-pag.alvo { box-shadow: -3px 0 0 #007845 inset; }
.aba-tit { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aba-x { border: 0; background: transparent; cursor: pointer; font-size: 15px; line-height: 1; padding: 0 3px; color: #6b7a72; border-radius: 4px; }
.aba-x:hover { background: #dfe6e2; color: #10231a; }
.aba-limpar { font-size: 12px; padding: 6px 10px; background: transparent; border-style: dashed; }
@media (max-width: 760px) { .abas-paginas { display: none; } }
.tabela.doc th, .tabela.doc td { padding: 8px 8px; font-size: 13px; }
.tabela.doc td:nth-child(3) { min-width: 160px; }

/* Fluxo de caixa: cores suaves (verde = entra / saldo positivo, vermelho = sai / saldo negativo) */
.fx-ent { color: color-mix(in srgb, var(--ok) 80%, var(--ink)); }
.fx-sai { color: color-mix(in srgb, var(--err) 75%, var(--ink)); }
.fx-pos { background: color-mix(in srgb, var(--ok-soft) 70%, transparent); color: color-mix(in srgb, var(--ok) 85%, var(--ink)); }
.fx-neg { background: color-mix(in srgb, var(--err-soft) 80%, transparent); color: color-mix(in srgb, var(--err) 85%, var(--ink)); }

/* faixa de demonstração + abas de páginas ficam congeladas ao rolar */
.topo-fixo { position: sticky; top: 0; z-index: 30; background: var(--bg, #f1f3f2); }
.topo-fixo .abas-paginas { margin: 0; padding-top: 6px; }

/* formulário de medição: campos com a mesma altura e rótulos alinhados */
.med-form .campo { display: flex; flex-direction: column; gap: 4px; }
.med-form .inp { height: 40px; box-sizing: border-box; }
.med-form strong { padding-bottom: 10px; }

/* Alertas e notificações */
.lista-alertas { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.lista-alertas li { border: 1px solid var(--line); border-left: 4px solid var(--muted); border-radius: 8px; padding: 8px 12px; }
.lista-alertas li a { color: var(--ink); text-decoration: none; }
.lista-alertas li.al-erro { border-left-color: var(--err); }
.lista-alertas li.al-alerta { border-left-color: var(--warn, #c98a00); }
.lista-alertas li.al-info { border-left-color: var(--brand); }

/* ===== Padrão de tamanho dos campos e botões em todas as telas ===== */
.inp, input.inp, select.inp { height: 40px; min-height: 40px; font-size: 15px; line-height: 1.2; box-sizing: border-box; }
textarea.inp { height: auto; min-height: 76px; }
input.inp[type="date"], input.inp[type="month"], input.inp[type="number"] { padding-top: 0; padding-bottom: 0; }
.sb .inp { height: 40px; }
/* barras de filtro: mesma largura de data, lista e pesquisa em qualquer aba */
.acoes input.inp[type="date"], .acoes .campo input.inp[type="date"] { width: 160px !important; min-width: 160px; }
.acoes select.inp, .acoes .campo select.inp { min-width: 200px; }
.acoes .inp[style*="min-width:240px"], .acoes .inp[style*="min-width:260px"], .acoes .inp[style*="min-width:300px"] { min-width: 280px !important; }
.acoes .sb { min-width: 220px; }
/* botões: grande 40, pequeno 32 (em linhas de tabela), todos com a mesma fonte */
.btn { min-height: 40px; font-size: .92rem; }
.btn-sm { min-height: 32px; font-size: .86rem; }

/* Baixa: uma coluna por tipo (ND, NF, fatura/CT-e, outros), soma e botão "Concluído" sempre à vista */
.bx-colunas { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; padding: 0 16px 12px; align-items: start; }
.bx-col { min-width: 0; }
.bx-col .tabela-rolar { background: var(--surface); }
.bx-col td { vertical-align: top; }
.bx-col tr.sel td { background: var(--signal-soft, #eef7d9); }
.bx-l1 { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.bx-campos { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; margin-top: 8px; }
.bx-campos label { display: flex; flex-direction: column; gap: 2px; }
.bx-campos .inp { width: 100%; height: 34px; }
.bx-barra { position: sticky; bottom: 0; z-index: 15; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
  padding: 12px 16px; background: var(--surface); border-top: 2px solid var(--brand, #0b7a43); box-shadow: 0 -6px 16px rgba(0,0,0,.08); }
@media (max-width: 860px) { .bx-barra { bottom: 70px; } }
.bx-modal { display: flex; flex-direction: column; overflow: hidden; max-height: calc(100vh - 32px); }
.bx-modal-lista { overflow-y: auto; flex: 1; min-height: 120px; gap: 0; padding-top: 4px; padding-bottom: 4px; }
.bx-soma-cte { margin-top: 8px; padding: 8px 12px; background: var(--surface-2); border-radius: 8px; }
.bx-cte { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 9px 4px; border-bottom: 1px solid var(--line-2); cursor: pointer; font-size: .9rem; }
.bx-modal .modal-pe { border-top: 1px solid var(--line); }
/* Baixa em janela (pop-up): escolher o que é o dinheiro e onde baixar */
.modal.largo.bx-pop { width: min(1180px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; display: block; }
.bx-pop-cab { position: sticky; top: 0; z-index: 20; background: var(--surface); display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 16px 20px 10px; border-bottom: 1px solid var(--line); }
.bx-pop-cab h2 { margin: 0; font-size: 1.1rem; }
.bx-modos { gap: 8px; flex-wrap: wrap; padding: 10px 20px; border-bottom: 1px solid var(--line-2); align-items: center; }
.bx-modos .btn.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.bx-pop .bx-colunas { padding: 0 20px 12px; }
.bx-pop .tabela-rolar { max-height: 44vh; }
.bx-pop .painel-corpo { padding-left: 20px; padding-right: 20px; }
.bx-pop .bx-barra { bottom: 0; }
/* Várias frotas num mesmo recebimento */
.la-l { display: grid; grid-template-columns: minmax(220px, 1fr) 170px auto; gap: 8px; margin-bottom: 8px; align-items: center; }
@media (max-width: 640px) { .la-l { grid-template-columns: 1fr; } }

/* Contratos a receber: coluna do cliente com largura boa e botões um sobre o outro (não estoura a tela) */
#ct-lista td:first-child { min-width: 230px; }
#ct-lista td:last-child { white-space: normal !important; }
#ct-lista td:last-child .btn { display: block; width: 100%; margin: 0 0 6px; }

#nd-print-root { display: none; }
@media print { body.imprimindo-nd #nd-print-root { display: block; } }
.modal .pagina { padding: 0; max-width: none; }

.rel-fora { opacity: .45; }
.rel-fora td { text-decoration: line-through; text-decoration-color: rgba(0,0,0,.25); }

.link-acao { color: var(--brand); font-size: .8rem; text-decoration: underline; }

/* Colunas ajustáveis (arrastar a borda do título) */
.col-res { position: absolute; top: 0; right: -3px; width: 8px; height: 100%; cursor: col-resize; z-index: 3; user-select: none; }
.col-res:hover, body.col-arrastando .col-res { background: linear-gradient(to right, transparent 3px, var(--brand, #007845) 3px, var(--brand, #007845) 5px, transparent 5px); }
body.col-arrastando { cursor: col-resize; user-select: none; }
.tabela-rolar table[data-col-aj] td, .tabela-wrap table[data-col-aj] td, .tabela-rolar table[data-col-aj] th, .tabela-wrap table[data-col-aj] th { overflow-wrap: anywhere; }
@media print { .col-res { display: none !important; } }

/* setinha de colunas e menu */
.col-seta { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--muted, #6b7a72); font-size: 11px; line-height: 1; padding: 2px 3px; cursor: pointer; border-radius: 4px; opacity: .55; }
.col-seta:hover { opacity: 1; background: rgba(0,0,0,.07); }
.tabela-rolar th, .tabela-wrap th { padding-right: 22px; }
.col-oculta { display: none !important; }
.col-menu { position: fixed; z-index: 400; width: 250px; overflow: auto; background: var(--surface, #fff); color: var(--ink, #111); border: 1px solid var(--line, #ccc); border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,.2); padding: 6px 0; font-size: 13px; text-transform: none; font-weight: 400; letter-spacing: 0; }
.col-menu-tit { padding: 6px 12px; font-weight: 700; border-bottom: 1px solid var(--line, #ddd); margin-bottom: 4px; }
.col-menu label { display: flex; gap: 6px; align-items: center; padding: 4px 12px; cursor: pointer; }
.col-menu label:hover { background: rgba(0,0,0,.05); }
.col-menu-pe { padding: 8px 12px 4px; border-top: 1px solid var(--line, #ddd); margin-top: 4px; }
@media print { .col-seta, .col-menu { display: none !important; } }

.col-menu-item { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 6px 12px; cursor: pointer; color: inherit; font: inherit; }
.col-menu-item:hover { background: rgba(0,0,0,.06); }
.col-menu-item.on { font-weight: 700; color: var(--brand, #007845); }
th[data-ord="asc"]::after { content: ' ▲' attr(data-ordn); font-size: 9px; }
th[data-ord="desc"]::after { content: ' ▼' attr(data-ordn); font-size: 9px; }

.tabela-rolar th.sel, .tabela-wrap th.sel { padding-right: 8px; }

/* Patrimônio · bens de escritório */
.pat-sep { width: 1px; align-self: stretch; background: var(--line); margin: 0 4px; }
#pg-bens .kpi { text-align: left; cursor: pointer; font: inherit; }
#pg-bens .kpi:hover { border-color: var(--brand); }
#pg-bens .kpi .label { font-size: .82rem; color: var(--muted); font-weight: 600; }
#pg-bens tr.sel td { background: var(--brand-soft); }
#pg-bens .bens-grade { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 16px; }
#pg-bens .bens-grade .campo { grid-column: auto; margin: 0; }
/* Relatório do dia · conferência com o banco */
.rel-conf { border: 1px solid var(--line); border-left: 4px solid var(--ok, #1f8a55); border-radius: var(--radius); padding: 10px 14px; margin: 10px 0; display: grid; gap: 6px; background: var(--surface); }
.rel-conf.alerta { border-left-color: var(--warn); }
.rel-conf-cab { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.rel-conf-num { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.rel-conf-num .label { display: block; font-size: .76rem; color: var(--muted); }
.rel-conf ul { margin: 4px 0 0; padding-left: 18px; }
.rel-conf .neg, #rel-banco-previa .neg { color: var(--err); }
.selo-banco { display: inline-block; font-size: .72rem; font-weight: 700; padding: 1px 6px; border-radius: 5px; white-space: nowrap; }
.selo-banco.ok { background: var(--ok-soft, #e3f4ea); color: var(--ok, #1f8a55); }
.selo-banco.valor { background: var(--ok-soft, #e3f4ea); color: var(--ok, #1f8a55); border: 1px dashed currentColor; }
.selo-banco.fora { background: var(--warn-soft); color: var(--warn); }
@media (max-width: 760px) { .rel-conf-num { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Atualização diária (v104) */
.atu-zona { display: block; border: 2px dashed var(--borda, #c8ccd2); border-radius: 10px; padding: 28px 16px; text-align: center; cursor: pointer; background: rgba(0,0,0,.015); }
.atu-zona.arrastando { border-color: var(--azul, #1f5fae); background: rgba(31,95,174,.06); }
.atu-zona input[type=file] { display: block; margin: 0 auto 10px; max-width: 100%; }
.aviso-txt { color: #8a5a00; }
.atu-numeros { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.atu-numeros > div { border: 1px solid var(--borda, #e1e4e8); border-radius: 8px; padding: 10px; }
.atu-numeros strong { display: block; font-size: 1.4rem; }
.atu-numeros span { font-size: .84rem; color: var(--muted, #667); }

/* faixa "Powered by Netlify" (Netlify Drawer): não deve cobrir os botões do menu */
netlify-drawer, #netlify-drawer, [id^="netlify-drawer"], [class*="netlify-drawer"] { display: none !important; }

.dp-previa { border-top: 1px solid var(--borda, #d8dce2); }
.dp-edit tr.dp-corrigida td { background: #fff7e0; }
.dp-edit .inp { width: 100%; min-width: 120px; }

/* termômetro de alertas e checklist */
.pill.info { background: var(--brand-soft, #e3effa); color: var(--brand, #1f5f99); }
.lista-alertas li.al-ok { border-left-color: var(--ok); opacity: .75; }

/* Na impressão/PDF: nada que não seja do sistema (ex.: selo "Powered by Netlify" colado no rodapé) pode cobrir o total nem o número da página */
@media print {
  body > *:not(#app):not(#nd-print-root):not(script):not(style):not(link) { display: none !important; }
  #netlify-badge, [id*="netlify" i], [class*="netlify" i] { display: none !important; }
}

/* Previsões e fluxo previsto */
.pv-leg { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: middle; margin-right: 4px; border: 1px solid var(--line); }
.pv-cel { cursor: pointer; white-space: nowrap; }
.pv-cel:hover { outline: 2px solid var(--brand, #1d4ed8); outline-offset: -2px; }
.pv-previsto { background: #eef2ff; }
.pv-lancado { background: #dcfce7; }
.pv-real { background: #e0f2fe; }
.pv-passado { background: #f1f5f9; }
.pv-pago { background: #e5e7eb; color: #6b7280; }
.pv-ajustado { background: #fef3c7; font-weight: 600; }
.pv-fora { color: #9ca3af; }
.pv-saldo td { background: var(--surface-2, #f8fafc); }
.pv-bloco td { background: var(--surface-2, #f1f5f9); font-weight: 600; cursor: pointer; }

/* Orçamento */
.or-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 0 0 14px; }
.or-kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.or-kpi strong { font-size: 1.35rem; display: block; }
.or-tab .or-grupo td { background: var(--surface-2, #f1f5f9); font-weight: 700; }
.or-tab .or-total td { font-weight: 700; border-top: 2px solid var(--line); }
.or-barra { height: 8px; background: #e5e7eb; border-radius: 4px; overflow: hidden; }
.or-barra > div { height: 100%; } .or-ok { background: #15803d; } .or-ruim { background: #b91c1c; }
.or-det td { background: var(--surface-2, #f8fafc); }
.or-det-grade { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.or-item { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed var(--line); padding: 2px 0; }
@media print { .sem-impressao, nav, .sidebar, .demo-barra, #demo-usuario { display: none !important; } .or-det-grade { grid-template-columns: 1fr 1fr; } }

/* DRE gerencial */
.dre-tab { font-size: .8rem; border-collapse: separate; border-spacing: 0; }
.dre-tab th, .dre-tab td { white-space: nowrap; padding: 3px 8px; }
.dre-tab thead th { position: sticky; top: 0; background: #1f4e8c; color: #fff; z-index: 3; }
.dre-tab .dre-nome { position: sticky; left: 0; background: var(--surface); min-width: 280px; z-index: 2; }
.dre-tab thead .dre-nome { background: #1f4e8c; z-index: 4; }
.dre-tab .dre-sec td { background: var(--surface-2, #eef2f7); font-weight: 700; font-size: .75rem; letter-spacing: .03em; }
.dre-tab td.neg { color: #b91c1c; }
.dre-tab .dre-av { color: #6b7280; font-size: .72rem; background: #f7f7f8; }
.dre-tab .dre-tri { background: #eef3fa; } .dre-tab .dre-tot { background: #e8eef7; font-weight: 600; }
.dre-tab .dre-click { cursor: pointer; } .dre-tab .dre-click:hover { outline: 1px solid #1f4e8c; }
.dre-tab .dre-s td, .dre-tab .dre-c td { font-weight: 700; }
.dre-tab .dre-c-azul td { background: #dbe7f5; } .dre-tab .dre-c-laranja td { background: #fde3d3; } .dre-tab .dre-c-salmao td { background: #f9cdb8; }
.dre-tab .dre-c-amarelo td { background: #fdf0c8; } .dre-tab .dre-c-verde td { background: #e4efd6; } .dre-tab .dre-c-forte td { background: #f1f1f1; }
.dre-tab .dre-s .dre-nome, .dre-tab .dre-c .dre-nome { background: inherit; }
@media print { .dre-tab { font-size: .6rem; } .dre-tab .dre-nome { min-width: 180px; position: static; } }
.dre-tab thead th.dre-tri, .dre-tab thead th.dre-tot, .dre-tab thead th.dre-av { background: #1f4e8c; color: #fff; }
.dre-tab thead th.dre-tri { background: #2c63a8; } .dre-tab thead th.dre-tot { background: #173b6c; }

/* Login: texto sempre preto sobre fundo claro (também no modo escuro do celular e no preenchimento automático) */
.login-fundo, .login-form, .login-caixa { color-scheme: light; }
.login-caixa .inp, .login-caixa input { background: #fff !important; color: #000 !important; -webkit-text-fill-color: #000 !important; caret-color: #000; border: 1px solid #9db5a6; }
.login-caixa .inp::placeholder { color: #5f6f66 !important; -webkit-text-fill-color: #5f6f66 !important; opacity: 1; }
.login-caixa input:-webkit-autofill, .login-caixa input:-webkit-autofill:focus { -webkit-box-shadow: 0 0 0 1000px #fff inset !important; -webkit-text-fill-color: #000 !important; }
.login-caixa .campo > span { color: #12261b; }

/* Relatório do dia no celular: cada conta vira um cartão (nada apertado) */
@media screen and (max-width: 760px) {
  .rel { padding: 12px !important; }
  .rel-cartoes, .rel-cartoes tbody, .rel-cartoes tr, .rel-cartoes td, .rel-cartoes tfoot { display: block; width: 100%; }
  .rel-cartoes thead { display: none; }
  .tabela-wrap:has(.rel-cartoes) { overflow: visible; border: 0; background: none; }
  .rel-cartoes tbody tr { position: relative; background: var(--surface, #fff); border: 1px solid var(--line, #d6ddd8); border-radius: 12px; padding: 12px 14px 12px 46px; margin: 0 0 12px; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
  .rel-cartoes tbody td { border: 0 !important; padding: 5px 0 !important; text-align: left !important; font-size: .95rem; line-height: 1.35; white-space: normal !important; }
  .rel-cartoes td[data-l]::before { content: attr(data-l); display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted, #667); margin-bottom: 1px; }
  .rel-cartoes td.rc-sel { position: absolute; left: 12px; top: 14px; width: auto; padding: 0 !important; }
  .rel-cartoes td.rc-sel input { width: 22px; height: 22px; }
  .rel-cartoes td.rc-forn { font-size: 1.05rem; padding-right: 0 !important; }
  .rel-cartoes td.rc-val { order: 0; font-size: 1.25rem; border-top: 1px dashed var(--line, #d6ddd8) !important; margin-top: 6px; padding-top: 8px !important; }
  .rel-cartoes td.rc-val strong { font-size: 1.25rem; }
  .rel-cartoes tbody tr { display: flex; flex-direction: column; }
  .rel-cartoes td.rc-val { order: 99; }
  .rel-cartoes td.rc-venc { order: 1; }
  .rel-cartoes td.rc-forn { order: 0; }
  .rel-cartoes tfoot tr { display: flex; justify-content: space-between; padding: 8px 4px; font-weight: 700; }
  .rel-cartoes tfoot td { width: auto; padding: 0 !important; border: 0 !important; }
  .rel-cartoes tfoot td.nao-imprimir { display: none; }
  .rel-grupo-cab { flex-wrap: wrap; gap: 6px; }
  .rel-resumo { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
}

/* Deslocamentos operacionais */
.campo.c5 { grid-column: span 5; } .campo.c7 { grid-column: span 7; }
.dl-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 14px 0; }
.dl-kpis > div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.dl-kpis span { font-size: .8rem; color: var(--muted); } .dl-kpis strong { font-size: 1.3rem; }
.dl-kpis .dl-alerta { border-color: var(--warn); } .dl-kpis .dl-erro { border-color: var(--err); } .dl-kpis .dl-erro strong { color: var(--err); }
.dl-abas { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.dl-abas button { background: none; border: 0; padding: 10px 14px; cursor: pointer; font: inherit; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; }
.dl-abas button.on { color: var(--ink); border-bottom-color: var(--brand, #0b4d30); }
.dl-filtros { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 12px; margin-bottom: 14px; } .dl-filtros .campo { grid-column: auto; }
.dl-card { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.dl-card.dl-dup { border-color: var(--err); }
.dl-card-dir { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; flex: none; }
.dl-selo { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); margin-left: 6px; }
.dl-selo-erro { background: var(--err-bg, #fde8e8); border-color: var(--err); color: var(--err); }
.dl-grupo { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; background: var(--surface); }
.dl-grupo-cab { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; }
.dl-grupo-corpo { border-top: 1px solid var(--line); padding: 6px 14px 10px; } .dl-linha { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: .92rem; border-bottom: 1px dashed var(--line-2); }
.dl-aviso { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--warn); border-radius: 10px; background: var(--warn-bg, #fff6e5); }
@media (max-width: 760px) {
  .dl-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dl-filtros { grid-template-columns: 1fr 1fr; } .dl-filtros .campo:first-child { grid-column: span 2; }
  .dl-card { flex-direction: column; } .dl-card-dir { flex-direction: row; align-items: center; justify-content: space-between; width: 100%; }
  .form-grid .campo.c3, .form-grid .campo.c4, .form-grid .campo.c5, .form-grid .campo.c6 { grid-column: span 12; }
}

/* Termo de responsabilidade e telas públicas de assinatura */
.publico { min-height: 100vh; background: var(--bg, #f5f8f6); }
.publico-cab { display: flex; align-items: center; gap: 14px; padding: 12px 18px; background: var(--surface); border-bottom: 1px solid var(--line); font-weight: 700; }
.publico-cab .logo { height: 40px; width: auto; }
.publico-corpo { max-width: 860px; margin: 0 auto; padding: 18px 16px 80px; display: flex; flex-direction: column; gap: 16px; }
.publico-ajuda { font-size: 1rem; }
.termo-doc { background: #fff; color: #000; border: 1px solid var(--line); border-radius: 10px; padding: 28px 30px; font-family: Georgia, 'Times New Roman', serif; font-size: .95rem; line-height: 1.5; }
.termo-doc h1 { font-size: 1.15rem; text-align: center; margin: 0 0 14px; } .termo-doc h2 { font-size: .98rem; margin: 18px 0 6px; }
.termo-doc p { margin: 6px 0; text-align: justify; } .termo-doc ul { margin: 6px 0 6px 20px; padding: 0; } .termo-doc li { margin: 3px 0; text-align: justify; }
.termo-tab { width: 100%; border-collapse: collapse; margin: 6px 0; } .termo-tab th, .termo-tab td { border: 1px solid #444; padding: 6px 8px; text-align: left; vertical-align: top; font-size: .9rem; }
.termo-data { margin-top: 22px !important; } .termo-assin { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 18px; text-align: center; }
.termo-linha { border-bottom: 1px solid #000; min-height: 74px; display: flex; align-items: flex-end; justify-content: center; margin-bottom: 4px; padding-bottom: 4px; }
.termo-eletro { font-size: .72rem; color: #333; } .termo-sig { max-height: 70px; max-width: 100%; }
.termo-verif { margin-top: 18px; padding: 10px 12px; border: 1px dashed #444; font-family: system-ui, sans-serif; font-size: .78rem; line-height: 1.5; word-break: break-all; }
.termo-hash { font-family: ui-monospace, monospace; font-size: .7rem; }
.termo-form { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.termo-quadro { width: 100%; height: 190px; border: 2px dashed var(--ink-2, #555); border-radius: 10px; background: #fff; touch-action: none; cursor: crosshair; }
.termo-aceite { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; } .termo-aceite input { width: 22px; height: 22px; flex: none; }
.termo-ok { background: #e6f4ea; border: 1px solid #2e7d32; color: #12351a; border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.termo-erro { background: var(--err-bg, #fde8e8); border: 1px solid var(--err); color: #5a1010; border-radius: 10px; padding: 12px 14px; }
.termo-acess { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; align-items: end; } .termo-acess label:not(.campo) { display: flex; gap: 8px; align-items: center; }
@media (max-width: 640px) { .termo-doc { padding: 18px 14px; font-size: .9rem; } .termo-assin { grid-template-columns: 1fr; } }
@media print { .publico-cab, .nao-imprimir, .termo-form { display: none !important; } .publico, .publico-corpo { padding: 0; background: #fff; max-width: none; } .termo-doc { border: 0; padding: 0; } }

/* termos: fotos, selfie, código de acesso, conferência na devolução */
.termo-fotos-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 8px 0; }
.termo-fotos-grade figure { margin: 0; border: 1px solid #cfd6df; border-radius: 6px; padding: 6px; background: #fff; break-inside: avoid; }
.termo-fotos-grade img { width: 100%; height: 130px; object-fit: cover; border-radius: 4px; display: block; }
.termo-fotos-grade figcaption { font-size: 12px; margin-top: 4px; color: #222; display: grid; gap: 4px; }
.termo-selfie { display: block; width: 96px; height: 96px; object-fit: cover; border-radius: 6px; border: 1px solid #999; margin: 6px 0; }
.termo-pin { background: #fff7e0; border: 1px solid #e6c866; border-radius: 6px; padding: 10px 12px; color: #222; }
.termo-pin strong { font-size: 22px; letter-spacing: 3px; }
.termo-resultado { padding: 8px 12px; border-radius: 6px; margin: 10px 0; }
.termo-res-ok { background: #e6f6ea; border: 1px solid #7bc88f; color: #14532d; }
.termo-res-av { background: #fdeaea; border: 1px solid #e08a8a; color: #7f1d1d; }
.termo-avaria td { background: #fff3f3; }
.dev-item { border: 1px solid #d5dbe3; border-radius: 8px; padding: 10px 12px; display: grid; gap: 8px; background: #fff; color: #222; }
.dev-item-av { border-color: #e08a8a; background: #fff8f8; }
.dev-item-cab { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dev-check { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 4px 14px; }
.dev-check .sub { grid-column: 1 / -1; margin: 0; }
.dev-ponto { display: flex; gap: 8px; align-items: flex-start; padding: 5px 8px; border-radius: 6px; font-size: 14px; }
.dev-ponto-av { background: #fde2e2; color: #7f1d1d; font-weight: 600; }
.dev-ponto input { margin-top: 3px; width: 20px; height: 20px; flex: none; }
.termo-fotos-edit { margin-bottom: 10px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
@media print { .nao-imprimir { display: none !important; } .termo-fotos-grade img { height: 110px; } }
.pv-caixa .pv-bloco td { background: var(--brand-soft, #eaf2ed); }
.pv-caixa .pv-grupo td { background: var(--surface, #fff); }
.pv-caixa .pv-secao td { background: var(--signal-soft, #fdf3d6); border-top: 1px solid var(--line, #e6cf8a); }
.pv-caixa .pv-linha td { background: var(--surface-2, #fafbfa); font-size: 13px; }
.pv-caixa .pv-abre { min-width: 26px; padding: 0 6px; margin-right: 4px; }
.pv-caixa td.num, .pv-caixa th.num { white-space: nowrap; }

/* personalizar menu: mover (▲▼), esconder; tudo salvo por usuário */
.nav-mov { display: inline-flex; gap: 4px; margin-left: auto; }
.nav-mov button { border: 1px solid var(--line, #ccc); background: transparent; color: inherit; border-radius: 6px; font-size: .7rem; padding: 2px 7px; cursor: pointer; }
.nav-grupo { display: flex; align-items: center; }
.nav-grupo-m { display: flex; align-items: center; font-weight: 700; font-size: .8rem; text-transform: uppercase; padding: 10px 2px 2px; }
.nav-edita { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; }
.nav-edita .nav-nome { display: flex; gap: 8px; align-items: center; min-width: 0; }
.nav-edita.apagado { opacity: .45; }
.nav-pers { display: flex; flex-direction: column; gap: 6px; padding: 12px 10px 4px; }

/* títulos dos grupos do menu mais destacados */
.nav-grupo { font-size: .76rem; font-weight: 800; letter-spacing: .09em; color: var(--brand); padding: 16px 10px 6px; margin-top: 8px; border-top: 1px solid var(--line, rgba(0,0,0,.1)); }
.nav .nav-grupo:first-child { border-top: 0; margin-top: 0; }
.nav-grupo-m { color: var(--brand); font-weight: 800; border-top: 1px solid var(--line, rgba(0,0,0,.1)); margin-top: 6px; }
/* tela de abertura: foto da frota (a mesma do login) e a logo logo abaixo, um pouco transparente */
.splash { min-height: 100vh; display: flex; flex-direction: column; background: #fff; }
.splash-foto { flex: 1; min-height: 55vh; background: #0b4d30 url(../img/login/frota1.jpg) 28% 60% / cover no-repeat; clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%); position: relative; }
.splash-foto::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4,43,26,0) 55%, rgba(4,43,26,.45) 100%); }
.splash-base { flex: none; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 18px 24px 34px; background: #fff; }
.splash-logo { width: min(260px, 70vw); height: auto; }
.splash-spin { width: 22px; height: 22px; border-color: rgba(11,77,48,.2); border-top-color: #0b7a3e; }

/* Viagem: passos do formulário (adiantamento / despesas / km) */
.vg-sec { border: 1px solid var(--line); border-left: 4px solid var(--verde, #2e7d32); border-radius: 10px; padding: 12px 14px; margin: 16px 0 6px; }
.vg-tit { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 1rem; flex-wrap: wrap; }
.vg-num { display: inline-flex; width: 24px; height: 24px; border-radius: 50%; background: var(--verde, #2e7d32); color: #fff; align-items: center; justify-content: center; font-size: .8rem; flex: none; }
