/* Kalku — design system. Base monocromática quente Connecta (#f4f3f0 claro / #0b0b0c escuro)
   com destaque executivo em azul-petróleo contábil (#0f5257 claro / #4ea8b0 escuro). Zero fontes externas. */
:root {
  --bg: #f4f3f0;
  --surface: #ffffff;
  --surface-2: #f8f7f4;
  --surface-3: #ebeae6;
  --ink: #0b0b0c;
  --ink-2: #35353a;
  --muted: #67676e;
  --line: #e4e2dc;
  --line-2: #d2cfc7;
  --acc: #0f5257;
  --acc-strong: #0a3c40;
  --acc-ink: #ffffff;
  --acc-soft: #e6f3f4;
  --acc-text: #0b4145;
  --dark: #0b0b0c;
  --dark-hover: #242428;
  --dark-ink: #ffffff;
  --ok: #1f8a4c;
  --ok-soft: #e2f5ea;
  --warn: #a8640a;
  --warn-soft: #fdf1dc;
  --bad: #cc3434;
  --bad-soft: #fde6e6;
  --info: #2a63c7;
  --info-soft: #e4edfb;
  --veu: rgba(11, 11, 12, .38);
  /* situação das obrigações */
  --o-pendente: #8a8880; --o-em_andamento: #2a63c7; --o-pronta: #0f5257; --o-enviada: #11878a; --o-visualizada: #1f8a4c;
  --o-concluida: #146b3a; --o-dispensada: #b3b1aa; --o-atrasada: #cc3434;
  /* tarefas e pedidos */
  --t-a_fazer: #8a8880; --t-fazendo: #2a63c7; --t-aguardando: #c27b0a; --t-concluida: #1f8a4c;
  --p-baixa: #8a8880; --p-normal: #2a63c7; --p-alta: #d9730d; --p-urgente: #cc3434;
  --c-email: #0f5257; --c-whatsapp: #1fa855;
  --f: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --r: 14px;
  --r-sm: 10px;
  --sombra: 0 1px 2px rgba(11, 11, 12, .04), 0 4px 16px rgba(11, 11, 12, .04);
  --sombra-forte: 0 18px 50px rgba(11, 11, 12, .18);
  --z-topo: 10; --z-gaveta: 30; --z-modal: 40; --z-toast: 50;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0b0c; --surface: #131315; --surface-2: #1b1b1e; --surface-3: #242428; --ink: #f0efec; --ink-2: #c8c6c0; --muted: #8f8e88;
    --line: #27272c; --line-2: #36363c; --acc: #4ea8b0; --acc-strong: #67bcc4; --acc-ink: #07191b; --acc-soft: rgba(78, 168, 176, .16); --acc-text: #8cd0d6;
    --dark: #f0efec; --dark-hover: #d8d6d0; --dark-ink: #0b0b0c; --ok: #4cc283; --ok-soft: #17301f; --warn: #e3a23c; --warn-soft: #33270f;
    --bad: #f06a6a; --bad-soft: #3a1a1a; --info: #6d9cf0; --info-soft: #182540; --veu: rgba(0, 0, 0, .58);
    --o-pendente: #8f8e88; --o-pronta: #4ea8b0; --o-dispensada: #5a5a60; --t-a_fazer: #8f8e88; --c-email: #4ea8b0;
    --sombra: 0 1px 2px rgba(0, 0, 0, .35); --sombra-forte: 0 18px 50px rgba(0, 0, 0, .58);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0b0c; --surface: #131315; --surface-2: #1b1b1e; --surface-3: #242428; --ink: #f0efec; --ink-2: #c8c6c0; --muted: #8f8e88;
  --line: #27272c; --line-2: #36363c; --acc: #4ea8b0; --acc-strong: #67bcc4; --acc-ink: #07191b; --acc-soft: rgba(78, 168, 176, .16); --acc-text: #8cd0d6;
  --dark: #f0efec; --dark-hover: #d8d6d0; --dark-ink: #0b0b0c; --ok: #4cc283; --ok-soft: #17301f; --warn: #e3a23c; --warn-soft: #33270f;
  --bad: #f06a6a; --bad-soft: #3a1a1a; --info: #6d9cf0; --info-soft: #182540; --veu: rgba(0, 0, 0, .58);
  --o-pendente: #8f8e88; --o-pronta: #4ea8b0; --o-dispensada: #5a5a60; --t-a_fazer: #8f8e88; --c-email: #4ea8b0;
  --sombra: 0 1px 2px rgba(0, 0, 0, .35); --sombra-forte: 0 18px 50px rgba(0, 0, 0, .58);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; }
.mono, .num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.pequeno { font-size: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 15px; height: 15px; }
svg.i.lg { width: 24px; height: 24px; }
.link { background: none; border: 0; padding: 0; color: var(--acc-text); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; text-decoration-color: color-mix(in srgb, var(--acc) 35%, transparent); }

/* ---------- estrutura ---------- */
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100%; }
.lateral { background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 18px 12px; gap: 2px; overflow-y: auto; }
.marca { display: flex; align-items: center; gap: 10px; padding: 4px 10px 16px; font-weight: 600; font-size: 18px; letter-spacing: -0.03em; }
.marca .logo { width: 30px; height: 30px; border-radius: 9px; background: var(--acc); display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 17px; letter-spacing: -0.04em; }
.marca small { display: block; font-weight: 400; font-size: 11px; color: var(--muted); letter-spacing: 0; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.login-form .marca small { max-width: none; }
.nav-grupo { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 14px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: var(--ink-2); font-weight: 450; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--acc-soft); color: var(--acc-text); font-weight: 550; }
.nav a .cont { margin-left: auto; font-size: 11px; font-family: var(--f-mono); background: var(--dark); color: var(--dark-ink); border-radius: 999px; padding: 1px 7px; }
.nav a .cont.alerta { background: var(--bad); color: #fff; }
.lateral .rodape { margin-top: auto; border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 6px; }
.eu-card { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; min-width: 0; }
.eu-card > div { min-width: 0; }
.eu-card b { display: block; font-weight: 550; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eu-card span { font-size: 12px; color: var(--muted); }

.principal { min-width: 0; display: flex; flex-direction: column; }
.topo { position: sticky; top: 0; z-index: var(--z-topo); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); display: flex; align-items: center; gap: 10px; padding: 14px 28px; flex-wrap: wrap; }
.busca-global { flex: 1 1 280px; max-width: 480px; position: relative; }
.busca-global input[type=search] { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 10px 14px 10px 38px; }
.busca-global > svg { position: absolute; left: 13px; top: 20px; transform: translateY(-50%); color: var(--muted); }
.busca-res { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sombra-forte); max-height: 440px; overflow-y: auto; z-index: 25; padding: 6px; }
.busca-res h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: 8px 10px 4px; font-weight: 500; }
.busca-res a { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 8px; text-decoration: none; }
.busca-res a:hover, .busca-res a.ativo { background: var(--surface-2); }
.busca-res a span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.topo .espaco { flex: 1; }
.conteudo { padding: 8px 28px 60px; display: grid; gap: 20px; align-content: start; min-width: 0; }
.conteudo > * { min-width: 0; }
#conteudo:focus { outline: none; }
.cabecalho { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 6px; }
.cabecalho h1 { font-size: 32px; line-height: 1.1; font-weight: 450; }
.cabecalho p { color: var(--muted); margin-top: 6px; max-width: 70ch; }
.cabecalho p b { color: var(--ink); font-weight: 550; }
.acoes { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- componentes ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); background: var(--surface); padding: 8px 14px; border-radius: 999px; cursor: pointer; font-weight: 500; text-decoration: none; white-space: nowrap; min-height: 36px; transition: background .12s, border-color .12s; color: var(--ink); }
.btn:hover { border-color: var(--line-2); background: var(--surface-2); }
.btn.acc { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); }
.btn.acc:hover { background: var(--acc-strong); border-color: var(--acc-strong); }
.btn.dark { background: var(--dark); border-color: var(--dark); color: var(--dark-ink); }
.btn.dark:hover { background: var(--dark-hover); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-3); }
.btn.perigo { color: var(--bad); }
.btn.dark.perigo { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.sm { min-height: 30px; padding: 4px 11px; font-size: 13px; }
.btn.icone { padding: 0; width: 36px; }
.btn.icone.sm { width: 30px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn .carregando, .carregando { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: gira .7s linear infinite; display: inline-block; flex: none; }
@keyframes gira { to { transform: rotate(360deg); } }
.btn-wa { color: var(--c-whatsapp); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sombra); min-width: 0; }
.card-pad { padding: 18px; }
.card-tit { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 500; margin-bottom: 14px; }
.card-tit .e { display: flex; align-items: center; gap: 8px; }
.card-tit a, .card-tit button.link { text-transform: none; letter-spacing: 0; font-size: 13px; }
.card.destaque { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); }
.card.destaque .muted, .card.destaque .card-tit { color: color-mix(in srgb, var(--acc-ink) 78%, transparent); }

.campo { display: grid; gap: 5px; font-size: 12px; color: var(--muted); font-weight: 500; min-width: 0; align-content: start; }
.campo > input, .campo > select, .campo > textarea, .campo > .linha > input { color: var(--ink); font-size: 14px; font-weight: 400; }
.campo small { font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=date], input[type=month], input[type=tel], input[type=number], input[type=url], input[type=time], input[type=datetime-local], select, textarea {
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 8px 11px; min-height: 38px; width: 100%; min-width: 0; color: var(--ink);
}
textarea { resize: vertical; min-height: 84px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
input.compacto, select.compacto { min-height: 32px; padding: 4px 9px; font-size: 13px; width: auto; }
.chk { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--ink); font-weight: 400; }
.chk input { width: 16px; height: 16px; accent-color: var(--acc); flex: none; }
.grade { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.form-grade { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grade .inteiro { grid-column: 1 / -1; }
.form-grade.tres { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .form-grade, .form-grade.tres { grid-template-columns: 1fr; } }
.linha { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.linha.entre { justify-content: space-between; }
.linha.fim { justify-content: flex-end; }
.pilha { display: grid; gap: 10px; align-content: start; }
.erro-campo { color: var(--bad); font-size: 12px; }
.dica { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 13px; color: var(--ink-2); display: flex; gap: 10px; align-items: flex-start; }
.dica.acc { background: var(--acc-soft); border-color: transparent; color: var(--acc-text); }
.dica.warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.dica.bad { background: var(--bad-soft); border-color: transparent; color: var(--bad); }
.dica.ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.dica svg { margin-top: 1px; }
.sep { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 3px 10px 3px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); white-space: nowrap; color: var(--ink-2); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--muted)); flex: none; }
.pill.sem-ponto { padding-left: 10px; }
.pill.sem-ponto::before { display: none; }
.pill.acc { background: var(--acc-soft); border-color: transparent; color: var(--acc-text); }
.pill.warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.pill.bad { background: var(--bad-soft); border-color: transparent; color: var(--bad); }
.pill.info { background: var(--info-soft); border-color: transparent; color: var(--info); }
.pill.ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.tag { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 999px; background: var(--surface-3); color: var(--ink-2); white-space: nowrap; }
.av { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11px; font-weight: 600; color: #fff; background: var(--c, #6d6d7c); flex: none; text-transform: uppercase; }
.av.lg { width: 34px; height: 34px; font-size: 13px; }
.av.sm { width: 22px; height: 22px; font-size: 10px; }
.canal { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-2); }
.canal i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }

/* chips e segmentado */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 500; white-space: nowrap; color: var(--ink); }
.chip:hover { border-color: var(--line-2); }
.chip[aria-pressed="true"] { background: var(--dark); border-color: var(--dark); color: var(--dark-ink); }
.chip .n { font-family: var(--f-mono); font-size: 12px; opacity: .7; }
.chip .ponto { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.seg { display: inline-flex; background: var(--surface-3); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 6px 13px; border-radius: 999px; cursor: pointer; font-weight: 500; color: var(--ink-2); display: inline-flex; gap: 6px; align-items: center; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--sombra); }
.barra-filtros { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; }

/* ---------- KPIs ---------- */
.kpis { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.kpi { padding: 16px 18px 14px; display: grid; gap: 6px; align-content: start; }
.kpi .rot { display: flex; align-items: center; gap: 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.kpi .val { font-size: 30px; font-weight: 450; letter-spacing: -0.03em; display: flex; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; }
.kpi .val small { font-size: 13px; color: var(--muted); letter-spacing: 0; font-weight: 400; }
.kpi .sub { font-size: 12px; color: var(--muted); }
.kpi.alerta .val { color: var(--bad); }
.kpi.destaque { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); }
.kpi.destaque .rot, .kpi.destaque .sub, .kpi.destaque .val small { color: color-mix(in srgb, var(--acc-ink) 78%, transparent); }
a.kpi { text-decoration: none; transition: border-color .12s; }
a.kpi:hover { border-color: var(--line-2); }
.progresso { position: relative; height: 5px; background: var(--surface-3); border-radius: 4px; margin-top: 6px; overflow: hidden; }
.progresso > i { position: absolute; inset: 0 auto 0 0; background: var(--acc); border-radius: 4px; }
.progresso.ok > i { background: var(--ok); }
.kpi.destaque .progresso { background: rgba(255, 255, 255, .25); }
.kpi.destaque .progresso > i { background: #fff; }

.paineis { display: grid; gap: 14px; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; } .span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; }
@media (max-width: 1180px) { .span-3, .span-4, .span-5, .span-7, .span-8 { grid-column: span 12; } .span-6 { grid-column: span 12; } }

/* gráfico de barras */
.grafico { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 6px; height: 190px; padding-top: 6px; }
.eixo-y { display: flex; flex-direction: column; justify-content: space-between; font-size: 11px; line-height: 12px; color: var(--muted); font-family: var(--f-mono); text-align: right; margin: -6px 0; }
.barras-v { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; align-items: end; border-bottom: 1px solid var(--line); }
.barras-v::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(to top, transparent 0, transparent calc(25% - 1px), var(--surface-3) calc(25% - 1px), var(--surface-3) 25%); pointer-events: none; }
.coluna { position: relative; display: flex; flex-direction: column-reverse; height: 100%; justify-content: flex-start; }
.coluna .seg-b { width: 100%; max-width: 24px; margin: 0 auto; }
.coluna .seg-b:last-child { border-radius: 4px 4px 0 0; }
.coluna .dia { position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--muted); font-family: var(--f-mono); white-space: nowrap; }
.coluna:hover .seg-b { filter: brightness(.92); }
.legenda { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); margin-top: 26px; }
.legenda span { display: inline-flex; align-items: center; gap: 6px; }
.legenda i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }

.lista-barras { display: grid; gap: 11px; }
.lb { display: grid; grid-template-columns: minmax(90px, 170px) minmax(0, 1fr) 70px; gap: 10px; align-items: center; font-size: 13px; }
.lb .t { height: 8px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.lb .t i { display: block; height: 100%; background: var(--c, var(--acc)); border-radius: 4px; }
.lb .n { text-align: right; font-family: var(--f-mono); font-size: 12px; }

.relogio-grande { display: flex; align-items: baseline; gap: 10px; }
.relogio-grande b { font-size: 46px; font-weight: 450; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }

/* listas simples */
.lista { display: grid; }
.lista > .it { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.lista > .it:last-child { border-bottom: 0; }
.lista > .it.clic { cursor: pointer; padding-left: 8px; padding-right: 8px; border-radius: 8px; }
.lista > .it.clic:hover { background: var(--surface-2); }
.lista .tt { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lista .st { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- tabelas ---------- */
.tabela-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); position: sticky; top: 0; z-index: 1; }
td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr.clic { cursor: pointer; }
tbody tr.clic:hover td { background: var(--surface-2); }
tbody tr.sel td { background: var(--acc-soft); }
tbody tr:last-child td { border-bottom: 0; }
td.nome b { display: block; font-weight: 550; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td.nome span { font-size: 12px; color: var(--muted); }
td.n, th.n { text-align: right; font-family: var(--f-mono); white-space: nowrap; }
td.chk-col, th.chk-col { width: 36px; padding-right: 0; }
td.acoes-col { text-align: right; white-space: nowrap; }
.paginacao { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); }
.barra-lote { position: sticky; bottom: 16px; z-index: 5; background: var(--dark); color: var(--dark-ink); border-radius: 999px; padding: 8px 8px 8px 18px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; box-shadow: var(--sombra-forte); }
.barra-lote .btn { background: transparent; border-color: color-mix(in srgb, var(--dark-ink) 25%, transparent); color: var(--dark-ink); }
.barra-lote .btn:hover { background: color-mix(in srgb, var(--dark-ink) 12%, transparent); }
.barra-lote .btn.acc { background: var(--acc); border-color: var(--acc); color: #fff; }
.barra-lote select { background: transparent; border-color: color-mix(in srgb, var(--dark-ink) 25%, transparent); color: var(--dark-ink); min-height: 32px; padding: 4px 10px; width: auto; border-radius: 999px; }
.barra-lote select option { color: var(--ink); background: var(--surface); }

.filtros-av { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); padding: 14px 18px; border-bottom: 1px solid var(--line); }

/* ---------- gaveta ---------- */
.veu { position: fixed; inset: 0; background: var(--veu); z-index: var(--z-gaveta); }
.gaveta { position: fixed; top: 0; right: 0; bottom: 0; width: min(780px, 100%); background: var(--bg); z-index: calc(var(--z-gaveta) + 1); display: flex; flex-direction: column; box-shadow: var(--sombra-forte); }
@media (prefers-reduced-motion: no-preference) { .gaveta { animation: entra .2s ease-out; } @keyframes entra { from { transform: translateX(30px); opacity: .5; } } }
.g-cab { background: var(--surface); border-bottom: 1px solid var(--line); padding: 18px 22px 0; display: grid; gap: 10px; position: relative; }
.g-cab h2 { font-size: 23px; line-height: 1.15; padding-right: 44px; overflow-wrap: anywhere; }
.g-cab .sub { color: var(--muted); font-size: 13px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.g-fechar { position: absolute; top: 14px; right: 16px; }
.g-corpo { overflow-y: auto; padding: 18px 22px 48px; display: grid; gap: 14px; align-content: start; flex: 1; }
.abas { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.abas button { border: 0; background: none; padding: 10px 12px; cursor: pointer; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.abas button .n { font-family: var(--f-mono); font-size: 11px; background: var(--surface-3); border-radius: 999px; padding: 0 6px; color: var(--ink-2); }
.abas button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--acc); }
.abas.caixa { border-bottom: 1px solid var(--line); }
.dados { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 8px 14px; font-size: 13px; margin: 0; }
.dados dt { color: var(--muted); }
.dados dd { margin: 0; overflow-wrap: anywhere; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.linha-tempo { list-style: none; margin: 0; padding: 0; display: grid; }
.linha-tempo li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.linha-tempo li:last-child { border-bottom: 0; }
.linha-tempo .ic { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); }
.linha-tempo .ic.acc { background: var(--acc-soft); color: var(--acc-text); }
.linha-tempo .ic.ok { background: var(--ok-soft); color: var(--ok); }
.linha-tempo .ic.bad { background: var(--bad-soft); color: var(--bad); }
.linha-tempo .meta { font-size: 12px; color: var(--muted); }
.linha-tempo .txt { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 3px; }

/* conversa (pedidos dos clientes, comentários) */
.conversa { display: grid; gap: 10px; }
.msg { max-width: 85%; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; justify-self: start; }
.msg.minha { justify-self: end; background: var(--acc-soft); border-color: transparent; }
.msg .meta { font-size: 11px; color: var(--muted); margin-bottom: 3px; white-space: normal; }

/* ---------- área de soltar arquivos ---------- */
.soltar { border: 2px dashed var(--line-2); border-radius: var(--r); padding: 32px 20px; text-align: center; display: grid; gap: 8px; justify-items: center; background: var(--surface); cursor: pointer; transition: border-color .12s, background .12s; }
.soltar:hover, .soltar.sobre { border-color: var(--acc); background: var(--acc-soft); }
.soltar b { font-size: 16px; font-weight: 550; }
.soltar .ic-grande { width: 48px; height: 48px; border-radius: 14px; background: var(--acc-soft); color: var(--acc-text); display: grid; place-items: center; }
.soltar.compacta { padding: 16px; }

/* confiança da leitura */
.conf { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; }
.conf i { width: 8px; height: 8px; border-radius: 50%; }
.conf.alta i { background: var(--ok); } .conf.media i { background: var(--warn); } .conf.baixa i { background: var(--bad); }

/* ---------- kanban ---------- */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 10px; align-items: start; }
.kcol { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); display: grid; align-content: start; min-height: 220px; }
.kcol.alvo { outline: 2px dashed var(--acc); outline-offset: -4px; }
.kcol-cab { padding: 12px 14px 10px; border-top: 4px solid var(--c); border-radius: var(--r) var(--r) 0 0; display: flex; justify-content: space-between; align-items: center; }
.kcol-cab b { font-weight: 550; }
.kcol-cab span { font-size: 12px; color: var(--muted); font-family: var(--f-mono); }
.kcards { display: grid; gap: 8px; padding: 4px 10px 12px; }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: grab; display: grid; gap: 6px; box-shadow: var(--sombra); }
.kcard:active { cursor: grabbing; }
.kcard.arrastando { opacity: .5; }
.kcard b { font-weight: 550; overflow-wrap: anywhere; }
.kcard .cli { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kcard .rod { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.kcard .rod .e { display: flex; gap: 8px; align-items: center; }
.prazo.atras { color: var(--bad); font-weight: 550; }
.prazo.hoje { color: var(--warn); font-weight: 550; }
.prio { width: 8px; height: 8px; border-radius: 50%; background: var(--c); display: inline-block; }

/* ---------- agenda (mês) ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal .sem { padding: 8px 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.cal .dia { min-height: 118px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px 7px; display: flex; flex-direction: column; gap: 3px; cursor: pointer; min-width: 0; }
.cal .dia:hover { background: var(--surface-2); }
.cal .dia.fora { background: var(--surface-2); color: var(--muted); }
.cal .dia.fim-semana { background: color-mix(in srgb, var(--surface-2) 60%, var(--surface)); }
.cal .dia.hoje .d { background: var(--acc); color: #fff; }
.cal .dia.sel { box-shadow: inset 0 0 0 2px var(--acc); }
.cal .d { font-family: var(--f-mono); font-size: 12px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.cal .ev { font-size: 11px; padding: 2px 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-left: 3px solid var(--c, var(--muted)); }
.cal .ev.feito { opacity: .55; text-decoration: line-through; }
.cal .ev.feriado { background: var(--warn-soft); color: var(--warn); border-left-color: var(--warn); }
.cal .mais { font-size: 11px; color: var(--muted); }
@media (max-width: 800px) { .cal .dia { min-height: 64px; } .cal .ev { display: none; } .cal .dia.tem::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--acc); } }

/* ---------- modal, toast, avisos ---------- */
.modal { position: fixed; inset: 0; z-index: var(--z-modal); background: var(--veu); display: grid; place-items: center; padding: 16px; }
.modal-caixa { background: var(--surface); border-radius: 18px; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 22px; display: grid; gap: 14px; box-shadow: var(--sombra-forte); }
.modal-caixa.largo { width: min(860px, 100%); }
.modal-caixa.enorme { width: min(1180px, 100%); }
.modal-caixa h2 { font-size: 21px; }
.modal-rod { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: var(--z-toast); display: grid; gap: 8px; max-width: min(420px, calc(100vw - 40px)); }
.toast { background: var(--dark); color: var(--dark-ink); border-radius: 12px; padding: 11px 14px; display: flex; gap: 12px; align-items: center; box-shadow: var(--sombra-forte); font-size: 13px; }
.toast.erro { background: var(--bad); color: #fff; }
.toast button { background: var(--acc); color: #fff; border: 0; border-radius: 999px; padding: 4px 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.sino { position: relative; }
.sino .bolinha { position: absolute; top: 3px; right: 3px; min-width: 16px; height: 16px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 10px; display: grid; place-items: center; padding: 0 4px; font-weight: 600; }
.pop-avisos { position: absolute; right: 0; top: calc(100% + 8px); width: min(380px, 90vw); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sombra-forte); max-height: 440px; overflow-y: auto; z-index: 25; }
.pop-avisos .it { padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 13px; cursor: pointer; display: grid; gap: 3px; }
.pop-avisos .it:hover { background: var(--surface-2); }
.pop-avisos .it.novo { background: var(--acc-soft); }
.pop-avisos .it time { font-size: 11px; color: var(--muted); }
.vazio { text-align: center; padding: 36px 18px; color: var(--muted); display: grid; gap: 8px; justify-items: center; }
.vazio b { color: var(--ink); font-weight: 550; font-size: 15px; }
.vazio.pequeno { padding: 18px; }
.esqueleto { background: linear-gradient(90deg, var(--surface-3), var(--surface-2), var(--surface-3)); background-size: 200% 100%; border-radius: 8px; height: 14px; animation: brilho 1.2s infinite; }
@keyframes brilho { to { background-position: -200% 0; } }

.banner-avisos { margin: 0 28px 6px; background: var(--acc-soft); color: var(--acc-text); border: 1px solid color-mix(in srgb, var(--acc) 22%, transparent); border-radius: 12px; padding: 9px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; flex-wrap: wrap; }
.banner-avisos .e { display: flex; align-items: center; gap: 8px; }
.qr-box { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; padding: 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.qr-box img { width: 220px; height: 220px; padding: 10px; background: #ffffff; border-radius: 12px; border: 1px solid var(--line); object-fit: contain; }
@media (max-width: 900px) { .banner-avisos { margin: 0 16px 6px; } }
/* ---------- login ---------- */
.login { min-height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.login-form { display: grid; place-items: center; padding: 32px 20px; background: var(--surface); }
.login-form form { width: min(380px, 100%); display: grid; gap: 14px; }
.login-form h1 { font-size: 32px; font-weight: 450; }
.login-arte { background: #0b0b0c; color: #f0efec; padding: 48px; display: grid; align-content: space-between; position: relative; overflow: hidden; }
.login-arte h2 { font-size: 40px; font-weight: 400; line-height: 1.1; max-width: 16ch; position: relative; }
.login-arte h2 em { font-style: normal; color: #67bcc4; }
.login-arte ul { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; color: #c8c6c0; position: relative; }
.login-arte li { display: flex; gap: 10px; align-items: center; }
.login-arte li svg { color: #67bcc4; }
.login-arte .grade-pontos { position: absolute; right: -40px; bottom: -40px; width: 420px; height: 420px; background-image: radial-gradient(#2c3537 1.4px, transparent 1.4px); background-size: 18px 18px; opacity: .85; }
.login-arte .brilho { position: absolute; width: 520px; height: 520px; right: -160px; top: -160px; background: radial-gradient(closest-side, rgba(15, 82, 87, .55), transparent); }
@media (max-width: 860px) { .login { grid-template-columns: 1fr; } .login-arte { display: none; } }

/* páginas públicas (link expirado) */
.aviso-publico { display: grid; place-items: center; padding: 20px; }
.cartao-aviso { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 32px; max-width: 440px; display: grid; gap: 10px; text-align: center; justify-items: center; box-shadow: var(--sombra); }
.cartao-aviso h1 { font-size: 24px; }
.cartao-aviso p { color: var(--muted); }
.marca-mini { width: 44px; height: 44px; border-radius: 13px; background: var(--acc); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 22px; }

/* ---------- portal do cliente ---------- */
.portal { min-height: 100%; display: grid; grid-template-rows: auto 1fr auto; }
.portal-topo { background: var(--surface); border-bottom: 1px solid var(--line); }
.portal-topo .in { max-width: 1040px; margin: 0 auto; padding: 14px 20px 0; display: grid; gap: 12px; }
.portal-topo .cab { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.portal-topo .esc { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.portal-main { max-width: 1040px; width: 100%; margin: 0 auto; padding: 22px 20px 60px; display: grid; gap: 18px; align-content: start; }
.portal-main h1 { font-size: 28px; font-weight: 450; }
.guia-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 16px 18px; }
.guia-card.foco { box-shadow: 0 0 0 2px var(--acc), var(--sombra); }
.guia-card .valor { font-size: 22px; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.guia-card .acoes { justify-content: flex-end; }
.linha-dig { font-family: var(--f-mono); font-size: 12px; background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: 8px; padding: 6px 10px; overflow-wrap: anywhere; grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.portal-rodape { text-align: center; color: var(--muted); font-size: 12px; padding: 20px; }
@media (max-width: 640px) { .guia-card { grid-template-columns: 1fr; } .guia-card .acoes { justify-content: flex-start; } }

/* ---------- responsivo ---------- */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .lateral { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 35; transform: translateX(-105%); transition: transform .2s; box-shadow: var(--sombra-forte); }
  .app.menu-aberto .lateral { transform: none; }
  .topo, .conteudo { padding-left: 16px; padding-right: 16px; }
  .cabecalho h1 { font-size: 26px; }
  .so-desktop { display: none !important; }
  .dados { grid-template-columns: 1fr; gap: 2px 0; }
  .dados dd { margin-bottom: 8px; }
}
@media (min-width: 901px) { .so-mobile { display: none !important; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print { .lateral, .topo, .acoes, .barra-lote { display: none !important; } .app { display: block; } body { background: #fff; } }
