@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/inter-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/inter-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  color-scheme: light;
  --bg: #f5f6f8; --surface: #ffffff; --surface2: #f2f4f7; --surface3: #e9ecf1;
  --ink: #101828; --ink2: #475467; --ink3: #8a94a6; --line: #e6e9ef; --line2: #d5dae2;
  --accent: #4f46e5; --accent-ink: #ffffff; --accent-soft: #eef0ff; --accent-line: #c7cbfb;
  --quente: #e8590c; --morno: #d4a106; --frio: #2f80ed; --fora: #98a2b3; --novo: #7c5cdb;
  --nossa: #e5484d; --cliente: #8e4ec6; --combinado: #12a594; --nenhuma: #8a94a6; --encerrada: #c1c7d0;
  --ok: #16a34a; --ok-soft: #e7f6ec; --alerta: #e5484d; --alerta-soft: #fdecec; --aviso: #d97706; --aviso-soft: #fff4e5;
  --sombra: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --sombra-alta: 0 12px 32px rgba(16, 24, 40, .14);
  --bolha-lead: #ffffff; --bolha-nos: #dcf7e3; --chat-bg: #efeae2;
  --raio: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0e1015; --surface: #161922; --surface2: #1d212c; --surface3: #262b38;
    --ink: #eef0f4; --ink2: #b4bccb; --ink3: #7c8598; --line: #252a36; --line2: #323848;
    --accent: #7c74ff; --accent-ink: #0e1015; --accent-soft: #1f2040; --accent-line: #3b3a7a;
    --quente: #ff7a3d; --morno: #f2c230; --frio: #4c9bff; --fora: #7c8598; --novo: #a58bff;
    --nossa: #ff6369; --cliente: #b57ef0; --combinado: #2fc4b1; --nenhuma: #7c8598; --encerrada: #4a5162;
    --ok: #3ccf74; --ok-soft: #12291c; --alerta: #ff6369; --alerta-soft: #2c1517; --aviso: #f5a524; --aviso-soft: #2c2110;
    --sombra: 0 1px 2px rgba(0, 0, 0, .3); --sombra-alta: 0 12px 32px rgba(0, 0, 0, .5);
    --bolha-lead: #1f2430; --bolha-nos: #17352a; --chat-bg: #11141b;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1015; --surface: #161922; --surface2: #1d212c; --surface3: #262b38;
  --ink: #eef0f4; --ink2: #b4bccb; --ink3: #7c8598; --line: #252a36; --line2: #323848;
  --accent: #7c74ff; --accent-ink: #0e1015; --accent-soft: #1f2040; --accent-line: #3b3a7a;
  --quente: #ff7a3d; --morno: #f2c230; --frio: #4c9bff; --fora: #7c8598; --novo: #a58bff;
  --nossa: #ff6369; --cliente: #b57ef0; --combinado: #2fc4b1; --nenhuma: #7c8598; --encerrada: #4a5162;
  --ok: #3ccf74; --ok-soft: #12291c; --alerta: #ff6369; --alerta-soft: #2c1517; --aviso: #f5a524; --aviso-soft: #2c2110;
  --sombra: 0 1px 2px rgba(0, 0, 0, .3); --sombra-alta: 0 12px 32px rgba(0, 0, 0, .5);
  --bolha-lead: #1f2430; --bolha-nos: #17352a; --chat-bg: #11141b;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 "Inter", "Segoe UI", system-ui, -apple-system, sans-serif; font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
svg.ic { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- estrutura ---------- */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.lateral { position: sticky; top: 0; height: 100vh; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 14px; gap: 6px; }
.marca { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.marca-logo { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--accent), #8b5cf6); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 15px; }
.marca b { display: block; font-size: 14.5px; letter-spacing: -.01em; }
.marca small { color: var(--ink3); font-size: 12px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--ink2); font-weight: 500; }
.nav a:hover { background: var(--surface2); color: var(--ink); }
.nav a.ativo { background: var(--accent-soft); color: var(--accent); }
.lateral-pe { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.conexao { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 10px; background: var(--surface2); font-size: 12.5px; color: var(--ink2); }
.conexao .ponto { width: 8px; height: 8px; border-radius: 50%; background: var(--ink3); flex: none; }
.conexao.ok .ponto { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.conexao.ruim .ponto { background: var(--alerta); box-shadow: 0 0 0 4px var(--alerta-soft); }
.conexao.aviso .ponto { background: var(--aviso); box-shadow: 0 0 0 4px var(--aviso-soft); }
.lateral-acoes { display: flex; gap: 6px; }
.lateral-acoes .btn { flex: 1; justify-content: center; }

.principal { min-width: 0; }
.alerta-global { background: var(--alerta); color: #fff; font-weight: 500; }
.alerta-global.aviso { background: var(--aviso); }
.alerta-global .in { padding: 9px 28px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.alerta-global a { color: #fff; text-decoration: underline; }
main { padding: 28px 28px 80px; max-width: 1320px; }
.cabeca { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.cabeca h1 { font-size: 26px; line-height: 1.15; margin: 0; letter-spacing: -.02em; font-weight: 700; }
.cabeca p { margin: 4px 0 0; color: var(--ink2); }

@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .nav { min-width: 0; }
  .lateral-acoes #tema, .lateral .conexao { display: none; }
  .historia { font-size: 15px; }
  .pir-total .num { font-size: 38px; }
  .ramos::before { display: none; }
  .lateral { position: sticky; top: 0; z-index: 20; height: auto; flex-direction: row; align-items: center; padding: 8px 12px; gap: 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  .marca { padding: 0; } .marca div { display: none; }
  .nav { flex-direction: row; overflow-x: auto; scrollbar-width: none; flex: 1; }
  .nav a { padding: 8px 10px; white-space: nowrap; }
  .nav a span { display: none; } .nav a.ativo span { display: inline; }
  .lateral-pe { margin: 0; flex-direction: row; }
  .conexao span { display: none; } .conexao { padding: 9px; }
  .lateral-acoes .btn span { display: none; }
  main { padding: 18px 14px 60px; }
  .alerta-global .in { padding: 8px 14px; }
}

/* ---------- componentes básicos ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--raio); padding: 18px; box-shadow: var(--sombra); min-width: 0; }
.card + .card { margin-top: 16px; }
.card-titulo { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 14px; }
.card-titulo h2 { font-size: 15px; margin: 0; font-weight: 650; letter-spacing: -.01em; }
.muted { color: var(--ink3); font-size: 12.5px; }
.grade { display: grid; gap: 16px; }
.g2 { grid-template-columns: 1.4fr 1fr; align-items: start; }
@media (max-width: 1000px) { .g2 { grid-template-columns: 1fr; } }
.secao { margin-top: 28px; }
.secao > h2 { font-size: 17px; margin: 0 0 4px; letter-spacing: -.01em; }
.secao > p { margin: 0 0 14px; color: var(--ink2); }

.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line2); background: var(--surface); padding: 7px 12px; border-radius: 10px; cursor: pointer; font-weight: 500; font-size: 13px; line-height: 1.2; white-space: nowrap; }
.btn:hover { background: var(--surface2); }
.btn.prim { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.prim:hover { filter: brightness(1.08); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.fantasma { border-color: transparent; background: transparent; }
.btn.fantasma:hover { background: var(--surface2); }
.btn.perigo { color: var(--alerta); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.peq { padding: 5px 10px; font-size: 12.5px; border-radius: 8px; }
input[type="date"], input[type="text"], input[type="search"], input:not([type]), select, textarea { border: 1px solid var(--line2); background: var(--surface); border-radius: 10px; padding: 7px 10px; font-size: 13px; min-width: 0; }
input:focus, select:focus, textarea:focus, .btn:focus-visible { outline: 2px solid var(--accent-line); outline-offset: 1px; border-color: var(--accent); }

.seg { display: inline-flex; background: var(--surface3); padding: 3px; border-radius: 11px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 6px 13px; border-radius: 8px; cursor: pointer; font-weight: 500; font-size: 13px; color: var(--ink2); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--sombra); }
.periodo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.periodo-datas { display: flex; gap: 6px; align-items: center; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface2); color: var(--ink2); }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.selo { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 650; padding: 1px 8px; border-radius: 999px; background: var(--alerta-soft); color: var(--alerta); white-space: nowrap; }
.selo.ok { background: var(--ok-soft); color: var(--ok); } .selo.aviso { background: var(--aviso-soft); color: var(--aviso); } .selo.info { background: var(--accent-soft); color: var(--accent); }
.delta { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; padding: 1px 7px; border-radius: 999px; }
.delta.bom { color: var(--ok); background: var(--ok-soft); } .delta.ruim { color: var(--alerta); background: var(--alerta-soft); } .delta.neutro { color: var(--ink3); background: var(--surface2); }

/* ---------- pirâmide de KPIs ---------- */
.historia { font-size: 16px; line-height: 1.6; color: var(--ink2); margin: 0 0 20px; max-width: 900px; }
.historia b { color: var(--ink); font-weight: 650; }
.historia .q { color: var(--quente); } .historia .m { color: var(--morno); } .historia .f { color: var(--frio); } .historia .n { color: var(--nossa); }
.pir-topo { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.pir-total { display: flex; align-items: baseline; gap: 12px; }
.pir-total .num { font-size: 46px; font-weight: 750; letter-spacing: -.03em; line-height: 1; }
.pir-total span { color: var(--ink2); font-size: 15px; }
.pir-extra { display: flex; flex-wrap: wrap; gap: 8px; color: var(--ink3); font-size: 12.5px; align-items: center; }
.pir-barra { display: flex; height: 14px; border-radius: 999px; overflow: hidden; gap: 2px; margin: 18px 0 6px; background: var(--surface2); }
.pir-barra div { height: 100%; min-width: 3px; cursor: pointer; transition: filter .15s; }
.pir-barra div:hover { filter: brightness(1.1); }
.pir-legenda { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--ink2); margin-bottom: 6px; }
.pir-legenda i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; }
.ramos { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 26px; }
.ramos::before { content: ""; position: absolute; left: 12%; right: 12%; top: -14px; height: 14px; border: 2px solid var(--line2); border-bottom: 0; border-radius: 12px 12px 0 0; }
.ramo { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--raio); padding: 16px; box-shadow: var(--sombra); border-top: 4px solid var(--cor); }
.ramo-cab { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.ramo-nome { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink2); }
.ramo-nome i { width: 10px; height: 10px; border-radius: 50%; background: var(--cor); }
.ramo-num { display: flex; align-items: baseline; gap: 8px; margin: 6px 0 2px; }
.ramo-num b { font-size: 32px; font-weight: 750; letter-spacing: -.02em; line-height: 1; }
.ramo-num span { color: var(--ink3); font-size: 13px; }
.ramo-desses { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink3); font-weight: 600; margin: 14px 0 6px; }
.galho { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; width: 100%; padding: 6px 8px; margin: 0 -8px; border: 0; background: transparent; border-radius: 9px; cursor: pointer; text-align: left; }
.galho:hover { background: var(--surface2); }
.galho .gn { font-weight: 700; font-size: 15px; text-align: right; }
.galho .gt { font-size: 13px; color: var(--ink2); line-height: 1.3; }
.galho .gt small { display: block; height: 4px; border-radius: 4px; background: var(--surface3); margin-top: 5px; overflow: hidden; }
.galho .gt small u { display: block; height: 100%; background: var(--g); border-radius: 4px; }
.galho .gp { font-size: 12px; color: var(--ink3); font-weight: 600; }
.galho.destaque .gn, .galho.destaque .gt { color: var(--nossa); }
.ramo-pe { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.ramo.vazio { opacity: .55; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--raio); padding: 14px 16px; box-shadow: var(--sombra); }
.stat .rot { display: flex; align-items: center; gap: 8px; color: var(--ink2); font-size: 13px; font-weight: 500; }
.stat .rot svg { color: var(--ink3); }
.stat .val { font-size: 24px; font-weight: 700; letter-spacing: -.02em; margin: 6px 0 4px; }
.stat .sub { font-size: 12.5px; color: var(--ink3); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* barras horizontais simples */
.barra { display: grid; grid-template-columns: minmax(110px, 38%) 1fr 70px; gap: 12px; align-items: center; margin: 9px 0; font-size: 13px; }
.barra .lbl { color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barra .trilho { height: 10px; background: var(--surface2); border-radius: 999px; overflow: hidden; }
.barra .preench { height: 100%; border-radius: 999px; background: var(--accent); min-width: 3px; }
.barra .val { text-align: right; font-weight: 650; }
.barra .val small { color: var(--ink3); font-weight: 500; margin-left: 4px; }

/* colunas por dia (custos) */
.colunas { display: flex; align-items: flex-end; gap: 4px; height: 160px; padding-top: 8px; border-bottom: 1px solid var(--line); }
.colunas div { flex: 1; background: var(--accent); border-radius: 5px 5px 0 0; min-height: 2px; position: relative; opacity: .85; }
.colunas div:hover { opacity: 1; }
.colunas-eixo { display: flex; justify-content: space-between; color: var(--ink3); font-size: 11.5px; margin-top: 6px; }

/* ---------- lembretes ---------- */
.lemb-kpis { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.lemb-kpi { flex: 1; min-width: 110px; display: flex; flex-direction: column; padding: 10px 12px; border-radius: 12px; background: var(--surface2); color: var(--ink2); font-size: 12.5px; font-weight: 500; }
.lemb-kpi b { font-size: 24px; color: var(--ink); font-weight: 750; line-height: 1.15; }
.lemb-kpi.atrasado { background: var(--alerta-soft); } .lemb-kpi.atrasado b { color: var(--alerta); }
.lemb-kpi.hoje { background: var(--aviso-soft); } .lemb-kpi.hoje b { color: var(--aviso); }
.lemb-lista { display: flex; flex-direction: column; }
.lemb-item { display: grid; grid-template-columns: 70px 1fr; gap: 12px; align-items: start; text-align: left; width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 10px 6px; cursor: pointer; border-radius: 0; }
.lemb-item:last-child { border-bottom: 0; }
.lemb-item:hover { background: var(--surface2); }
.lemb-data { display: flex; flex-direction: column; font-weight: 700; font-size: 15px; }
.lemb-data small { font-weight: 500; font-size: 11.5px; color: var(--ink3); }
.lemb-item.atrasado .lemb-data { color: var(--alerta); } .lemb-item.hoje .lemb-data { color: var(--aviso); }
.lemb-quem { min-width: 0; }
.lemb-quem b { font-weight: 600; }
.lemb-nota { font-size: 12.5px; color: var(--ink2); margin: 2px 0 0; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- filtros ---------- */
.filtros { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.filtros-linha { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.busca { position: relative; flex: 1 1 280px; max-width: 420px; }
.busca svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink3); width: 16px; height: 16px; }
.busca input { width: 100%; padding: 9px 12px 9px 34px; border-radius: 12px; font-size: 13.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chips-rot { font-size: 11.5px; color: var(--ink3); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin-right: 2px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line2); background: var(--surface); border-radius: 999px; padding: 5px 12px; font-size: 12.5px; font-weight: 500; cursor: pointer; color: var(--ink2); }
.chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--ink3)); }
.chip:hover { border-color: var(--accent-line); color: var(--ink); }
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.sel-pill { appearance: none; -webkit-appearance: none; border-radius: 999px; padding: 6px 30px 6px 12px; font-size: 12.5px; font-weight: 500; color: var(--ink2); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a94a6' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; cursor: pointer; max-width: 100%; }
.sel-pill.on { border-color: var(--accent); color: var(--accent); background-color: var(--accent-soft); }
.resumo-filtros { display: flex; align-items: center; gap: 10px; color: var(--ink2); font-size: 13px; }
.resumo-filtros b { color: var(--ink); }

/* ---------- lista de clientes ---------- */
.tabela-cli { background: var(--surface); border: 1px solid var(--line); border-radius: var(--raio); box-shadow: var(--sombra); overflow: hidden; }
.tc-cab, .tc-linha { display: grid; grid-template-columns: minmax(200px, 1.3fr) 120px minmax(180px, 1.1fr) minmax(220px, 2fr) 96px; gap: 14px; align-items: center; padding: 12px 16px; }
.tc-cab { background: var(--surface2); color: var(--ink3); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; padding-top: 9px; padding-bottom: 9px; }
.tc-linha { width: 100%; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; align-items: start; }
.tc-linha:hover { background: var(--surface2); }
.quem { display: flex; gap: 10px; align-items: center; min-width: 0; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; flex: none; background: var(--av, var(--accent)); }
.quem-txt { min-width: 0; }
.quem-txt b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quem-txt span { font-size: 12.5px; color: var(--ink3); }
.selos { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.vez { display: flex; flex-direction: column; gap: 3px; }
.vez small { color: var(--ink3); font-size: 12px; }
.resumo-txt { font-size: 13px; color: var(--ink2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sugestao-txt { font-size: 12.5px; color: var(--ink); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.sugestao-txt em { color: var(--accent); font-style: normal; font-weight: 600; }
.tempo { text-align: right; }
.tempo b { display: block; font-size: 15px; }
.tempo small { color: var(--ink3); font-size: 11.5px; }
.vazio { color: var(--ink3); text-align: center; padding: 36px 16px; }
.paginacao { display: flex; gap: 10px; align-items: center; justify-content: center; margin-top: 14px; color: var(--ink2); font-size: 13px; }
@media (max-width: 1000px) {
  .tc-cab { display: none; }
  .tc-linha { grid-template-columns: 1fr auto; gap: 8px 12px; }
  .tc-linha .col-resumo { grid-column: 1 / -1; }
  .tc-linha .col-vez { grid-column: 1 / -1; }
  .tc-linha .col-status { justify-self: end; }
  .tempo { display: none; }
}

/* ---------- formulário / config ---------- */
.form { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--ink2); font-weight: 500; }
.form input { font-size: 14px; padding: 8px 11px; }
.qr { width: 260px; max-width: 100%; background: #fff; padding: 12px; border-radius: 14px; border: 1px solid var(--line); }
.qr svg { width: 100%; height: auto; display: block; }
.estado-wa { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; font-size: 15px; }
.estado-wa i { width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.estado-wa.ok { color: var(--ok); } .estado-wa.ruim { color: var(--alerta); } .estado-wa.aviso { color: var(--aviso); }
dl.info { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 12px 0 0; font-size: 13px; }
dl.info dt { color: var(--ink3); } dl.info dd { margin: 0; }
.tabela { width: 100%; border-collapse: collapse; font-size: 13px; }
.tabela th { text-align: left; color: var(--ink3); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tabela td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tabela td.n, .tabela th.n { text-align: right; font-variant-numeric: tabular-nums; }
.tabela input { width: 100%; }
.rolagem { overflow-x: auto; }

/* ---------- gaveta do cliente ---------- */
.fundo { position: fixed; inset: 0; background: rgba(16, 24, 40, .45); backdrop-filter: blur(2px); z-index: 50; display: flex; justify-content: flex-end; }
.gaveta { background: var(--bg); width: min(1180px, 100%); height: 100%; display: flex; flex-direction: column; box-shadow: var(--sombra-alta); animation: entra .18s ease-out; }
@keyframes entra { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.gaveta-topo { background: var(--surface); border-bottom: 1px solid var(--line); padding: 14px 20px; display: flex; gap: 14px; align-items: center; }
.gaveta-topo .avatar { width: 46px; height: 46px; font-size: 16px; }
.gaveta-topo h2 { margin: 0; font-size: 19px; letter-spacing: -.01em; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.gaveta-topo .muted { font-size: 13px; }
.gaveta-corpo { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 420px; }
.gaveta-info { overflow-y: auto; padding: 18px 20px 40px; display: flex; flex-direction: column; gap: 14px; }
.gaveta-info .card + .card { margin-top: 0; }
.gaveta-chat { border-left: 1px solid var(--line); background: var(--chat-bg); display: flex; flex-direction: column; min-height: 0; }
.chat-cab { padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--line); font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
.conversa { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.msg { max-width: 84%; padding: 7px 10px 5px; border-radius: 10px; font-size: 13.5px; white-space: pre-wrap; word-wrap: break-word; box-shadow: 0 1px 1px rgba(0, 0, 0, .06); }
.msg.lead { align-self: flex-start; background: var(--bolha-lead); border-top-left-radius: 3px; }
.msg.empresa { align-self: flex-end; background: var(--bolha-nos); border-top-right-radius: 3px; }
.msg .meta { display: block; font-size: 10.5px; color: var(--ink3); margin-top: 3px; text-align: right; }
.msg .meta .resp { color: var(--accent); font-weight: 600; }
.msg .midia { font-style: italic; color: var(--ink2); }
.msg.robo { opacity: .7; }
.dia-sep { align-self: center; font-size: 11.5px; background: var(--surface); color: var(--ink2); padding: 3px 10px; border-radius: 8px; margin: 8px 0 4px; box-shadow: 0 1px 1px rgba(0, 0, 0, .06); }
@media (max-width: 1000px) {
  .gaveta-corpo { grid-template-columns: 1fr; overflow-y: auto; }
  .gaveta-info { overflow: visible; }
  .gaveta-chat { border-left: 0; border-top: 1px solid var(--line); min-height: 70vh; }
}
.acao-topo { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 700px) { .acao-topo { grid-template-columns: 1fr; } }
.vez-card { border-left: 4px solid var(--cor); }
.vez-card .grande { font-size: 18px; font-weight: 700; color: var(--cor); margin: 2px 0 6px; }
.rec-box { white-space: pre-wrap; background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 1.55; }
.risco { background: var(--alerta-soft); border-color: transparent; color: var(--ink); }
.linha-tempo { list-style: none; padding: 0; margin: 0; position: relative; }
.linha-tempo li { display: flex; gap: 12px; align-items: center; padding: 6px 0 6px 18px; position: relative; font-size: 13px; }
.linha-tempo li::before { content: ""; position: absolute; left: 4px; top: 0; bottom: 0; width: 2px; background: var(--line2); }
.linha-tempo li::after { content: ""; position: absolute; left: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--cor, var(--ink3)); }
.linha-tempo time { color: var(--ink3); font-size: 12px; min-width: 96px; }
.lemb-destaque { border: 2px solid var(--aviso); background: linear-gradient(0deg, var(--aviso-soft), var(--aviso-soft)), var(--surface); }
.lemb-destaque.atrasado { border-color: var(--alerta); background: linear-gradient(0deg, var(--alerta-soft), var(--alerta-soft)), var(--surface); }
.lemb-destaque.vazio-lemb { border: 1px solid var(--line); background: var(--surface); }
.lemb-modal { padding: 4px 0 12px; }
.lemb-modal + .lemb-modal { border-top: 1px dashed var(--line2); padding-top: 12px; }
.lemb-topo { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lemb-grande { font-size: 17px; font-weight: 700; }
.lemb-modal.atrasado .lemb-grande { color: var(--alerta); } .lemb-modal.hoje .lemb-grande { color: var(--aviso); }
.acoes { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
details summary { cursor: pointer; font-size: 13px; color: var(--ink2); margin: 8px 0 4px; font-weight: 500; }

/* ---------- login ---------- */
.login-pagina { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: radial-gradient(1200px 600px at 10% -10%, var(--accent-soft), transparent), var(--bg); }
.login { width: 100%; max-width: 380px; }
.login .marca { padding: 0 0 18px; }
.login h1 { font-size: 22px; margin: 0 0 4px; letter-spacing: -.02em; }
.login form { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.login label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--ink2); }
.login input { padding: 10px 12px; font-size: 15px; border-radius: 11px; }
.login .btn { justify-content: center; padding: 10px; font-size: 14px; }
.login .erro { color: var(--alerta); min-height: 1.4em; font-size: 13px; }
.carregando { color: var(--ink3); padding: 30px 0; }

/* ---------- menu: contador de follow-ups ---------- */
.nav-cont { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 700; background: var(--alerta); color: #fff; border-radius: 999px; padding: 0 7px; line-height: 18px; }
.nav-cont:empty { display: none; }

/* ---------- sub-abas de Clientes ---------- */
.subabas { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: -6px 0 22px; overflow-x: auto; scrollbar-width: none; }
.subabas a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; color: var(--ink2); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.subabas a i { width: 8px; height: 8px; border-radius: 50%; background: var(--cor); }
.subabas a b { font-size: 12px; background: var(--surface2); color: var(--ink2); padding: 1px 8px; border-radius: 999px; }
.subabas a:hover { color: var(--ink); }
.subabas a.on { color: var(--ink); border-bottom-color: var(--cor); }
.subabas a.on b { background: var(--cor); color: #fff; }

/* ---------- destaques nos números ---------- */
.stat.destaque-alerta { border-color: transparent; background: var(--alerta-soft); } .stat.destaque-alerta .val { color: var(--alerta); }
.stat.destaque-aviso { border-color: transparent; background: var(--aviso-soft); } .stat.destaque-aviso .val { color: var(--aviso); }
.stat.destaque-ok { border-color: transparent; background: var(--ok-soft); } .stat.destaque-ok .val { color: var(--ok); }
.barra-acoes { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 14px; }

/* ---------- cartão de ação ---------- */
.ac-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.ac-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--raio); padding: 14px; box-shadow: var(--sombra); display: flex; flex-direction: column; gap: 10px; transition: opacity .25s, transform .25s; min-width: 0; }
.ac-card.saindo { opacity: 0; transform: scale(.97); }
.ac-cab { display: flex; align-items: center; gap: 10px; }
.ac-cab .quem-txt { flex: 1; }
.ac-quando { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink2); }
.ac-quando svg { width: 15px; height: 15px; color: var(--ink3); }
.ac-quando b { font-size: 14px; }
.ac-quando.atrasado, .ac-quando.atrasado svg { color: var(--alerta); }
.ac-quando.hoje, .ac-quando.hoje svg { color: var(--aviso); }
.ac-motivo { margin: 0; font-size: 13px; color: var(--ink2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ac-sugestao { background: var(--accent-soft); border-radius: 10px; padding: 9px 11px; font-size: 13px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.ac-sugestao span { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); margin-bottom: 2px; }
.ac-acoes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.ac-card.compacto { gap: 6px; padding: 10px 12px; }
.ac-card.compacto .ac-motivo { -webkit-line-clamp: 1; }

/* ---------- quentes: funil em colunas ---------- */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.kb-col { background: var(--surface2); border-radius: var(--raio); padding: 12px; border-top: 4px solid var(--cor); min-width: 0; }
.kb-col > header { display: flex; justify-content: space-between; align-items: center; font-weight: 650; }
.kb-col > header span { display: flex; align-items: center; gap: 8px; }
.kb-col > header i { width: 9px; height: 9px; border-radius: 50%; background: var(--cor); }
.kb-col > header b { background: var(--surface); padding: 1px 9px; border-radius: 999px; font-size: 12.5px; }
.kb-dica { font-size: 12px; color: var(--ink3); margin: 4px 0 10px; }
.kb-cards { display: flex; flex-direction: column; gap: 10px; }
.kb-cards .ac-card { box-shadow: var(--sombra); }
.kb-cards .ac-sugestao { -webkit-line-clamp: 3; }
.kb-vazio { color: var(--ink3); font-size: 12.5px; text-align: center; padding: 14px 0; margin: 0; }

/* ---------- mornos: grupos por motivo ---------- */
.grupos { display: flex; flex-direction: column; gap: 26px; margin-top: 8px; }
.grupo-cab h3 { display: flex; align-items: center; gap: 9px; font-size: 16px; margin: 0; letter-spacing: -.01em; }
.grupo-cab h3 i { width: 10px; height: 10px; border-radius: 50%; background: var(--cor); }
.grupo-cab h3 b { font-size: 12.5px; background: var(--surface3); padding: 1px 9px; border-radius: 999px; }
.grupo-cab p { margin: 4px 0 12px; color: var(--ink2); font-size: 13px; }
.ver-mais { margin-top: 10px; }

/* ---------- frios: triagem ---------- */
.triagem { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.triagem-card { text-align: left; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--cor); border-radius: var(--raio); padding: 14px 16px; cursor: pointer; box-shadow: var(--sombra); display: flex; flex-direction: column; gap: 2px; }
.triagem-card b { font-size: 28px; font-weight: 750; letter-spacing: -.02em; }
.triagem-card span { font-weight: 600; }
.triagem-card small { color: var(--ink3); font-size: 12.5px; line-height: 1.4; }
.triagem-card.on { outline: 2px solid var(--cor); outline-offset: -1px; }
.modelo textarea { width: 100%; font-size: 14px; line-height: 1.5; resize: vertical; }
@media (max-width: 900px) { .nav-cont { display: none; } .ac-grade { grid-template-columns: 1fr; } }
.ac-cab .avatar { width: 34px; height: 34px; font-size: 12px; }
.ac-cab .quem-txt span { white-space: nowrap; }
@media (max-width: 600px) { .stats { grid-template-columns: 1fr 1fr; gap: 10px; } .stat { padding: 12px; } .stat .val { font-size: 20px; } .stat .sub { font-size: 11.5px; } }

/* ---------- submenu de Clientes no menu lateral ---------- */
.nav-sub { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 6px 21px; padding-left: 10px; border-left: 2px solid var(--line); }
.nav-sub a { padding: 7px 10px; font-size: 13.5px; gap: 9px; }
.nav-sub a i { width: 8px; height: 8px; border-radius: 50%; background: var(--cor); flex: none; }
.nav-sub a b { margin-left: auto; font-size: 11.5px; font-weight: 600; color: var(--ink3); }
.nav-sub a.ativo { background: var(--surface2); color: var(--ink); }
.nav-sub a.ativo b { color: var(--ink); }
.nav a.pai { color: var(--accent); }
@media (max-width: 900px) {
  /* no celular o menu vira barra no topo: o submenu só aparece dentro de Clientes */
  .nav-sub { display: none; flex-direction: row; margin: 0; padding: 0 0 0 4px; border-left: 1px solid var(--line); gap: 2px; }
  .nav-sub.aberto { display: flex; }
  .nav-sub a { padding: 8px 9px; }
  .nav-sub a span { display: inline; }
  .nav-sub a b { display: none; }
}

/* ---------- cartão clicável e processamento sob demanda ---------- */
.ac-card { cursor: pointer; }
.ac-card:hover { border-color: var(--accent-line); }
.processar { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.proc-linha { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; justify-content: space-between; }
.proc-linha b { font-size: 18px; }
.proc-andamento { display: flex; flex-direction: column; gap: 6px; }
.proc-andamento .trilho { height: 8px; background: var(--surface2); border-radius: 999px; overflow: hidden; }
.proc-andamento .preench { height: 100%; background: var(--accent); border-radius: 999px; transition: width .4s; }
.grade > .card + .card { margin-top: 0; }
