/* Escritório Bitt+ · protótipo
   Uma família: Geist. Uma cor de destaque: --accent (troca aqui quando a identidade oficial chegar). */

:root {
  --accent: #0E7A62;

  --accent-ink: color-mix(in oklab, var(--accent) 78%, #000);
  --accent-text: var(--accent);
  --accent-soft: color-mix(in oklab, var(--accent) 9%, #fff);
  --accent-soft-2: color-mix(in oklab, var(--accent) 16%, #fff);
  --accent-line: color-mix(in oklab, var(--accent) 30%, #fff);

  --bg: #F5F5F2;
  --surface: #FFFFFF;
  --surface-2: #FAFAF8;
  --sunken: #EEEEE9;
  --ink: #141716;
  --ink-2: #444A47;
  --muted: #6B716E;
  --faint: #A3A8A5;
  --line: #E2E2DC;
  --line-2: #ECECE7;

  --hot: #C2410C;
  --hot-soft: #FCEDE5;
  --warm: #D9A23A;
  --warm-soft: #FBF3E2;
  --bad: #B42318;
  --bad-soft: #FBEAE8;

  --dark-chip: #1B201E;

  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;

  --font: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --side-w: 216px;
  --top-h: 60px;

  color-scheme: light;
}

body.dark {
  --bg: #090B0A;
  --surface: #101312;
  --surface-2: #0C0F0E;
  --sunken: #161A19;
  --ink: #ECEFED;
  --ink-2: #B8C0BC;
  --muted: #7F8985;
  --faint: #59625E;
  --line: #212725;
  --line-2: #1A1F1D;
  --accent-text: #6FD3B2;
  --accent-soft: color-mix(in oklab, var(--accent) 22%, #090B0A);
  --accent-soft-2: color-mix(in oklab, var(--accent) 32%, #090B0A);
  --accent-line: color-mix(in oklab, var(--accent) 55%, #090B0A);
  --dark-chip: #1E2422;
  color-scheme: dark;
}
@supports (color: oklch(from red l c h)) {
  body.dark { --accent-text: oklch(from var(--accent) 0.82 calc(c * 1.25) h); }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01" off;
}
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
button { font: inherit; color: inherit; }
.num, .tn, table { font-variant-numeric: tabular-nums; }

/* ---------- Shell ---------- */
.app {
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr);
  grid-template-rows: var(--top-h) minmax(0, 1fr);
  min-height: 100vh;
}
.topbar {
  grid-column: 1 / -1;
  position: sticky; top: 0; z-index: 30;
  height: var(--top-h);
  display: flex; align-items: center; gap: 20px;
  padding: 0 24px 0 22px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: baseline; gap: 12px; text-decoration: none; color: var(--ink); min-width: calc(var(--side-w) - 22px); }
.brand .wm { font-size: 22px; font-weight: 700; letter-spacing: -0.04em; }
.brand .wm b { color: var(--accent-text); font-weight: 700; }
.brand .sub { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.demo-badge {
  display: inline-flex; align-items: center; gap: 7px;
  height: 26px; padding: 0 10px;
  border: 1px dashed var(--faint);
  border-radius: 999px;
  font-size: 11.5px; color: var(--ink-2); font-weight: 500;
  white-space: nowrap;
}
.demo-badge i { width: 6px; height: 6px; border-radius: 50%; background: var(--warm); display: block; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.sync { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.sync i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-text); display: block; }
.hello { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.hello b { color: var(--ink); font-weight: 600; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--sunken); color: var(--ink); font-weight: 600; font-size: 13px;
  flex: none;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 34px; padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, transform .1s ease;
}
.btn:hover { border-color: var(--faint); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.btn.primary:hover { background: color-mix(in oklab, var(--ink) 86%, var(--surface)); }
.btn.accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.accent:hover { background: var(--accent-ink); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn svg { width: 15px; height: 15px; }
a.btn, a.hint { text-decoration: none; }
a.hint:hover { color: var(--ink); text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.side {
  position: sticky; top: var(--top-h);
  height: calc(100vh - var(--top-h));
  border-right: 1px solid var(--line);
  background: var(--surface);
  padding: 22px 14px 18px;
  display: flex; flex-direction: column; gap: 2px;
  overflow-y: auto;
}
.nav a {
  display: flex; align-items: center; gap: 12px;
  height: 38px; padding: 0 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink-2);
  font-size: 12px; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase;
  position: relative;
}
.nav a .n { color: var(--faint); font-size: 11px; width: 18px; letter-spacing: .04em; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a.on { color: var(--ink); background: var(--sunken); }
.nav a.on .n { color: var(--accent-text); }
.nav a.on::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav a .live { margin-left: auto; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-text); }
.nav hr { border: 0; border-top: 1px solid var(--line-2); margin: 8px 6px; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 16px; }
.bianca-card {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 12px;
  display: grid; grid-template-columns: 34px 1fr; gap: 4px 10px; align-items: center;
  background: var(--surface-2);
}
.bianca-card .who { font-weight: 600; font-size: 13px; }
.bianca-card .who span { color: var(--muted); font-weight: 400; }
.bianca-card .st { grid-column: 1 / -1; font-size: 12px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.bianca-card .st i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-text); display: block; }
.b-av {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
  font-weight: 600; font-size: 14px;
  flex: none;
}
.b-av.sm { width: 24px; height: 24px; font-size: 11px; }
.b-av.xs { width: 18px; height: 18px; font-size: 9.5px; }

.view { padding: 26px 32px 64px; min-width: 0; }

/* ---------- Page header ---------- */
.ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 20px; flex-wrap: wrap; }
.eyebrow { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.ph h1 { font-size: 30px; line-height: 1.1; font-weight: 600; letter-spacing: -0.03em; margin-top: 6px; }
.ph .lead { color: var(--ink-2); margin-top: 8px; max-width: 760px; font-size: 14px; }
.ph-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- Generic ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 0; }
.card-h h3 { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.card-h .hint { font-size: 12px; color: var(--muted); }
.card-b { padding: 16px 18px 18px; }
.label { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.muted { color: var(--muted); }
.ink2 { color: var(--ink-2); }
.good { color: var(--accent-text); }
.grid { display: grid; gap: 16px; }

.tag {
  display: inline-flex; align-items: center; gap: 5px;
  height: 21px; padding: 0 7px;
  border-radius: 5px;
  font-size: 11px; font-weight: 500; line-height: 1;
  background: var(--sunken); color: var(--ink-2);
  white-space: nowrap;
}
.tag.ess { background: var(--accent-soft-2); color: var(--accent-ink); }
.tag.con { background: var(--dark-chip); color: #F1F3F2; }
body.dark .tag.ess { color: var(--accent-text); }
.tag.mql { background: var(--accent); color: #fff; letter-spacing: .06em; }
.tag.line { background: transparent; border: 1px solid var(--line); }
.tag.hot { background: var(--hot-soft); color: var(--hot); }
.tag.warn { background: var(--warm-soft); color: #8A5A07; }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.tag.up { text-transform: uppercase; letter-spacing: .08em; font-size: 10px; }

.seg { display: inline-flex; background: var(--sunken); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button {
  border: 0; background: transparent; cursor: pointer;
  height: 28px; padding: 0 12px; border-radius: 7px;
  font-size: 12.5px; font-weight: 500; color: var(--ink-2);
  white-space: nowrap;
}
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 0 0 1px var(--line); }
body.dark .seg button.on { background: #222826; box-shadow: none; }

.delta { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; padding: 3px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); white-space: nowrap; }
.delta.neg { background: var(--bad-soft); color: var(--bad); }
body.dark .delta.neg { background: #2A1716; color: #F0A59D; }
.delta.flat { background: var(--sunken); color: var(--ink-2); }

.dots { display: inline-flex; gap: 3px; align-items: center; }
.dots i { width: 6px; height: 6px; border-radius: 2px; background: var(--line); display: block; }
.dots i.on { background: var(--accent); }
.dots i.now { background: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft-2); }

/* ---------- Typographic thumbnails ---------- */
.thumb {
  container-type: inline-size;
  aspect-ratio: 4 / 5;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  border: 1px solid transparent;
  width: 100%;
}
.thumb .ti {
  position: absolute; inset: 0;
  padding: 9cqw 9cqw 8cqw;
  display: flex; flex-direction: column; justify-content: space-between;
}
.thumb .k { font-size: 6.6cqw; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.thumb .bg { font-size: 13.4cqw; line-height: 1.02; font-weight: 700; letter-spacing: -0.035em; text-wrap: balance; }
.thumb .sm { font-size: 6.2cqw; line-height: 1.3; margin-top: 4cqw; opacity: .78; text-wrap: pretty; }
.thumb .f { display: flex; justify-content: space-between; align-items: baseline; font-size: 7.4cqw; font-weight: 700; letter-spacing: -0.03em; }
.thumb .f span { font-size: 5.4cqw; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; opacity: .7; }
.thumb.ink { background: #121514; color: #F2F4F3; }
.thumb.ink .k { color: #7FD6B9; }
.thumb.ink2 { background: #1C2321; color: #F2F4F3; }
.thumb.ink2 .k { color: #7FD6B9; }
.thumb.paper { background: #F1EFE8; color: #151716; border-color: #E2DFD5; }
.thumb.paper .k { color: var(--accent); }
.thumb.accent { background: var(--accent); color: #fff; }
.thumb.accent .k { color: color-mix(in oklab, var(--accent) 25%, #fff); }
.thumb.mint { background: color-mix(in oklab, var(--accent) 14%, #fff); color: color-mix(in oklab, var(--accent) 70%, #000); border-color: color-mix(in oklab, var(--accent) 22%, #fff); }
.thumb.mint .k { color: var(--accent); }
.thumb.tiny { border-radius: 5px; }
.thumb .bg { overflow-wrap: break-word; }
@container (max-width: 170px) { .thumb .sm { display: none; } }
.thumb.tiny .ti { padding: 8cqw; }
.thumb.tiny .sm { display: none; }

/* ---------- Entrada ---------- */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px 15px; }
.kpi .v { font-size: 30px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; margin-top: 8px; }
.kpi .s { font-size: 12px; color: var(--muted); margin-top: 4px; }
.cols-2-1 { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }

.night-top { display: grid; grid-template-columns: 1.3fr repeat(3, minmax(0, 1fr)); gap: 0; border-bottom: 1px solid var(--line-2); }
.night-top > div { padding: 18px 18px 18px; }
.night-top > div + div { border-left: 1px solid var(--line-2); }
.night-top h2 { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; margin-top: 8px; }
.night-top .big { font-size: 40px; font-weight: 600; letter-spacing: -0.04em; line-height: 1; margin-top: 10px; }
.night-top .cap { font-size: 12px; color: var(--muted); margin-top: 6px; }
.night-list { list-style: none; margin: 0; padding: 4px 0; }
.night-list li { display: grid; grid-template-columns: 52px minmax(0, 1.1fr) minmax(0, 1.25fr) 190px; gap: 14px; align-items: center; padding: 9px 18px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.night-list li:last-child { border-bottom: 0; }
.night-list li:hover { background: var(--surface-2); }
.night-list .h { font-size: 12.5px; color: var(--muted); }
.night-list .nm { font-weight: 600; font-size: 13.5px; }
.night-list .em { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.night-list .rs { font-size: 12.5px; color: var(--ink-2); }
.night-list .og { font-size: 11.5px; color: var(--muted); text-align: right; white-space: nowrap; }

.today-list { list-style: none; margin: 0; padding: 6px 0 4px; }
.today-list li { display: grid; grid-template-columns: 50px minmax(0,1fr); gap: 12px; padding: 10px 18px; position: relative; }
.today-list li + li { border-top: 1px solid var(--line-2); }
.today-list .h { font-weight: 600; font-size: 14px; letter-spacing: -0.01em; }
.today-list .nm { font-weight: 600; font-size: 13.5px; }
.today-list .em { font-size: 12px; color: var(--muted); }
.today-list .row { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.today-list li.past { opacity: .62; }
.now-line { display: flex; align-items: center; gap: 8px; padding: 0 18px; font-size: 11px; color: var(--accent-text); font-weight: 600; letter-spacing: .06em; }
.now-line::after { content: ""; flex: 1; height: 1px; background: var(--accent); }

.hot-table { width: 100%; border-collapse: collapse; }
.hot-table td, .hot-table th { padding: 10px 18px; text-align: left; border-bottom: 1px solid var(--line-2); font-size: 13px; vertical-align: middle; }
.hot-table th { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 500; padding-top: 12px; }
.hot-table tr:last-child td { border-bottom: 0; }
.hot-table .em { font-weight: 600; }
.hot-table .why { font-size: 12px; color: var(--muted); margin-top: 2px; }
.score { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 7px; border-radius: 5px; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; white-space: nowrap; }
.score b { font-size: 12.5px; letter-spacing: 0; font-weight: 700; }
.score.hot { background: var(--hot); color: #fff; }
.score.warm { background: var(--warm); color: #2B1D02; }

.alerts { list-style: none; margin: 0; padding: 6px 0; }
.alerts li { display: grid; grid-template-columns: 8px 1fr; gap: 12px; padding: 11px 18px; font-size: 13px; color: var(--ink-2); }
.alerts li + li { border-top: 1px solid var(--line-2); }
.alerts li i { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; background: var(--warm); display: block; }
.alerts li i.ok { background: var(--accent); }
.alerts li i.bad { background: var(--hot); }
.alerts li b { color: var(--ink); font-weight: 600; }

/* ---------- Painel ao vivo (escuro) ---------- */
.live-bar {
  position: sticky; top: var(--top-h); z-index: 10;
  margin: -26px -32px 22px;
  height: 52px;
  display: flex; align-items: center; justify-content: center; gap: 36px;
  background: color-mix(in oklab, var(--bg) 88%, var(--accent) 12%);
  border-bottom: 1px solid var(--line);
  font-size: 13.5px; color: var(--ink-2);
}
.live-bar b { color: var(--ink); font-weight: 600; margin-left: 8px; }
.live-pill { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: .14em; font-size: 12px; color: var(--ink); }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--accent-text); position: relative; }
.pulse::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 1px solid var(--accent-text); opacity: .5; animation: ring 2s ease-out infinite; }
@keyframes ring { from { transform: scale(.6); opacity: .7; } to { transform: scale(1.4); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pulse::after, .modal, .modal-back, .toast { animation: none !important; } .btn, .lc { transition: none; } }

.sec { margin-top: 30px; }
.sec:first-of-type { margin-top: 0; }
.sec-h { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.sec-n { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; font-weight: 600; font-size: 14px; }
.sec-h h2 { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
.sec-h .r { margin-left: auto; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 12px; }

.res-wrap { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); padding: 12px; position: relative; }
.res-wrap .pill { position: absolute; left: 26px; top: 22px; z-index: 1; }
.pill-p { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--accent-line); color: var(--accent-text); font-size: 10.5px; letter-spacing: .12em; font-weight: 600; background: var(--accent-soft); }
.res-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.res-box { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 38px 24px 24px; text-align: center; }
.res-box .label { letter-spacing: .14em; }
.res-box .big { font-size: 74px; font-weight: 700; letter-spacing: -0.05em; line-height: 1; margin: 12px 0 8px; }
.res-box .big small { font-size: 46px; letter-spacing: -0.04em; margin-right: 6px; font-weight: 700; }
.res-box .cap { font-size: 14px; color: var(--ink-2); margin-bottom: 14px; }
.inv-strip { margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 14px 20px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.inv-strip .t { color: var(--ink-2); font-size: 14px; }
.inv-strip .t b { color: var(--ink); font-size: 18px; font-weight: 600; margin-left: 8px; letter-spacing: -0.02em; }
.inv-strip .camps { margin-left: auto; display: flex; gap: 18px; font-size: 12.5px; color: var(--ink-2); flex-wrap: wrap; }
.inv-strip .camps span { display: inline-flex; align-items: center; gap: 7px; }
.inv-strip .camps i { width: 8px; height: 8px; border-radius: 2px; display: block; }

.det-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.det { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px 12px; display: flex; flex-direction: column; min-height: 150px; }
.det .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.det .v { font-size: 32px; font-weight: 700; letter-spacing: -0.04em; line-height: 1.05; margin-top: 8px; }
.det .s { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.det .spark { margin-top: auto; padding-top: 12px; }
.spark svg { display: block; width: 100%; height: 38px; overflow: visible; }

.tbl-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.tbl-card .tbl-h { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.tbl-scroll { overflow-x: auto; }
.perf { width: 100%; border-collapse: collapse; min-width: 720px; }
.perf th { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 500; text-align: right; padding: 12px 20px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.perf th:first-child, .perf td:first-child { text-align: left; }
.perf td { text-align: right; padding: 11px 20px; border-bottom: 1px solid var(--line-2); font-size: 13.5px; color: var(--ink); }
.perf tr:hover td { background: var(--surface-2); }
.perf td.g { color: var(--accent-text); font-weight: 600; }
.perf td.dim { color: var(--faint); }
.perf tr.today td:first-child::after { content: "hoje até 11:30"; margin-left: 10px; font-size: 10.5px; letter-spacing: .06em; color: var(--accent-text); }
.perf tfoot td { font-weight: 600; border-top: 1px solid var(--line); border-bottom: 0; background: var(--surface-2); }
.perf .wk { color: var(--muted); width: 38px; display: inline-block; }

.dist { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.dist-row { display: grid; grid-template-columns: minmax(0, 1fr) repeat(4, 104px); gap: 16px; align-items: end; padding: 18px 22px; }
.dist-row + .dist-row { border-top: 1px solid var(--line-2); }
.dist-row .nm { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.dist-row .sb { font-size: 12px; color: var(--muted); margin-top: 2px; }
.bar { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.bar .track { flex: 1; height: 8px; border-radius: 99px; background: var(--sunken); overflow: hidden; }
.bar .fill { height: 100%; border-radius: 99px; background: var(--accent-text); }
.bar .p { font-size: 12px; color: var(--muted); width: 34px; text-align: right; }
.metric { text-align: right; }
.metric .label { font-size: 10px; }
.metric .v { font-size: 16px; font-weight: 600; margin-top: 3px; letter-spacing: -0.01em; }

.rank-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.rank { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.rk-top { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; }
.rk-th { position: relative; }
.rank .ms { display: flex; flex-direction: column; justify-content: space-between; padding: 2px 0; }
.rank .ms .v { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; }
.rank .ms .label { font-size: 9.5px; }
.rank .nm { font-weight: 600; font-size: 13.5px; letter-spacing: -0.01em; line-height: 1.3; display: flex; gap: 8px; align-items: baseline; }
.rank .nm .pos { flex: none; font-size: 11.5px; font-weight: 600; color: var(--accent-text); background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 6px; padding: 1px 6px; }
.rank .best { align-self: flex-start; }
.foot-note { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); text-align: center; color: var(--muted); font-size: 12.5px; line-height: 1.7; }

/* ---------- CRM ---------- */
.toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .grp { display: flex; align-items: center; gap: 8px; }
.toolbar .grp > .label { margin-right: 2px; }
.toolbar .right { margin-left: auto; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.board { display: grid; grid-template-columns: repeat(7, minmax(172px, 1fr)); gap: 10px; height: calc(100vh - var(--top-h) - 168px); min-height: 520px; overflow-x: auto; }
.col { background: var(--sunken); border-radius: 12px; display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.col.won { background: var(--accent-soft); }
.col-h { padding: 12px 12px 10px; display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.col-h .t { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.col-h .c { font-size: 20px; font-weight: 600; letter-spacing: -0.03em; }
.col-b { padding: 0 8px 8px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; min-height: 0; flex: 1; }
.col-b::-webkit-scrollbar { width: 6px; }
.col-b::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; }
.lc {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 11px 10px; cursor: pointer; text-align: left; width: 100%;
  display: flex; flex-direction: column; gap: 3px;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.lc:hover { border-color: var(--faint); box-shadow: 0 4px 14px rgba(20,23,22,.06); }
.lc .tp { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-bottom: 4px; }
.lc .nm { font-weight: 600; font-size: 13.5px; letter-spacing: -0.01em; line-height: 1.25; }
.lc .cg { font-size: 12px; color: var(--ink-2); line-height: 1.3; }
.lc .ct { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc .og { font-size: 12px; color: var(--ink-2); display: flex; flex-direction: column; gap: 1px; margin-top: 5px; line-height: 1.3; }
.lc .og .lb { color: var(--muted); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; font-weight: 500; }
.lc .og .tx { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lc .ft { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: 7px; padding-top: 7px; border-top: 1px solid var(--line-2); font-size: 11px; color: var(--muted); }
.lc .ft .when { color: var(--ink-2); font-weight: 500; }
.lc .ft .when.acc { color: var(--accent-text); }
.lc .ft .when.bad { color: var(--hot); }
.col-empty { font-size: 12px; color: var(--muted); text-align: center; padding: 18px 8px; }

/* ---------- Modal ---------- */
.modal-back {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(14, 17, 16, .5);
  display: grid; place-items: center;
  padding: 28px;
  animation: fade .16s ease-out;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
.modal {
  width: min(1280px, 100%);
  height: min(860px, calc(100vh - 56px));
  background: var(--surface);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0,0,0,.28);
  display: flex; flex-direction: column; overflow: hidden;
  animation: rise .2s cubic-bezier(.2,.8,.2,1);
}
.m-head { display: flex; align-items: flex-start; gap: 16px; padding: 20px 24px 18px; border-bottom: 1px solid var(--line); }
.m-head .who { min-width: 0; }
.m-head h2 { font-size: 24px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; }
.m-head .cg { color: var(--ink-2); margin-top: 3px; font-size: 14px; }
.m-head .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.m-head .acts { margin-left: auto; display: flex; gap: 8px; align-items: center; flex: none; }
.x-btn { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; }
.x-btn:hover { border-color: var(--faint); }
.x-btn svg { width: 16px; height: 16px; }
.m-body { display: grid; grid-template-columns: 330px minmax(0, 1fr) 330px; flex: 1; min-height: 0; }
.m-col { overflow-y: auto; padding: 18px 20px 24px; min-height: 0; }
.m-col + .m-col { border-left: 1px solid var(--line); }
.m-col.chat-col { padding: 0; display: flex; flex-direction: column; background: var(--chat-bg, #F0EEE8); }
.m-sec + .m-sec { margin-top: 22px; }
.m-sec > .label { display: block; margin-bottom: 10px; }
.kv { display: grid; grid-template-columns: 96px minmax(0,1fr); gap: 7px 12px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.qa { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.qa-row { padding: 10px 12px; display: grid; grid-template-columns: 22px 1fr; gap: 8px; }
.qa-row + .qa-row { border-top: 1px solid var(--line-2); }
.qa-row .n { width: 22px; height: 22px; border-radius: 6px; background: var(--sunken); display: grid; place-items: center; font-size: 11px; font-weight: 600; color: var(--ink-2); }
.qa-row .q { font-size: 12px; color: var(--muted); }
.qa-row .a { font-size: 13.5px; font-weight: 500; margin-top: 1px; }
.qa-row .a.pend { color: var(--faint); font-weight: 400; font-style: italic; }
.qa-foot { padding: 10px 12px; background: var(--accent-soft); display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--accent-ink); }
.qa-foot.no { background: var(--sunken); color: var(--ink-2); }
.ad-card { display: grid; grid-template-columns: 104px 1fr; gap: 12px; align-items: start; border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.ad-card .t { font-weight: 600; font-size: 13px; }
.ad-card .g { font-size: 12.5px; color: var(--ink-2); margin-top: 6px; line-height: 1.4; }
.ad-card .m { font-size: 11.5px; color: var(--muted); margin-top: 8px; }

.chat-strip { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.chat-strip .who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.chat-strip .who b { font-size: 14px; }
.chat-strip .who span { font-size: 12px; color: var(--muted); }
.chat-strip .r { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.chat-scroll { flex: 1; overflow-y: auto; padding: 16px 18px 22px; display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.msg { max-width: 64%; padding: 6px 9px 7px 10px; border-radius: 10px; font-size: 13.5px; line-height: 1.42; position: relative; box-shadow: 0 1px 0 rgba(0,0,0,.05); }
.msg .tx { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg .mt { float: right; display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; line-height: 1; color: var(--muted); margin: 8px -1px -3px 14px; white-space: nowrap; }
.msg.blk .mt { float: none; display: flex; justify-content: flex-end; margin: 5px 0 0; }
.msg .mt svg { width: 14px; height: 14px; color: #3D8FD1; }
.msg.cont { margin-top: -3px; }
.ad-card.in-chat { border: 0; padding: 0; grid-template-columns: 72px 1fr; background: transparent; min-width: 280px; }
.msg.l { align-self: flex-start; background: #fff; border-top-left-radius: 3px; }
.msg.b { align-self: flex-end; background: #DDF1E8; border-top-right-radius: 3px; background: color-mix(in oklab, var(--accent) 13%, #fff); }
.msg.h { align-self: flex-end; background: #E7EEF8; border-top-right-radius: 3px; }
.msg .from { font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 2px; display: flex; align-items: center; gap: 6px; }
.msg.h .from { color: #2F5C8F; }
.msg .itag { display: inline-block; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.msg.cont { margin-top: -2px; }
.sys { align-self: center; max-width: 86%; text-align: center; font-size: 11.5px; color: var(--ink-2); background: rgba(255,255,255,.72); border: 1px solid rgba(0,0,0,.05); padding: 4px 10px; border-radius: 8px; margin: 6px 0; }
.sys b { font-weight: 600; color: var(--ink); }
.sys.acc { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-ink); }
.day-chip { align-self: center; font-size: 11px; color: var(--ink-2); background: #fff; padding: 3px 10px; border-radius: 7px; margin: 8px 0 4px; box-shadow: 0 1px 0 rgba(0,0,0,.05); }
.att { display: flex; align-items: center; gap: 10px; min-width: 240px; }
.att .ic { width: 36px; height: 42px; border-radius: 5px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; font-size: 9.5px; font-weight: 700; color: var(--hot); letter-spacing: .04em; flex: none; }
.att .fn { font-weight: 600; font-size: 13px; }
.att .fm { font-size: 11.5px; color: var(--muted); }
.audio { display: flex; align-items: center; gap: 10px; min-width: 230px; }
.audio .pl { width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; flex: none; }
.audio .pl svg { width: 12px; height: 12px; }
.audio .wave { display: flex; align-items: center; gap: 2px; height: 26px; flex: 1; }
.audio .wave i { width: 3px; border-radius: 2px; background: color-mix(in oklab, var(--ink) 45%, transparent); display: block; }
.audio .dur { font-size: 11.5px; color: var(--muted); }
.composer { display: flex; gap: 10px; align-items: center; padding: 12px 14px; background: var(--surface); border-top: 1px solid var(--line); }
.composer input { flex: 1; height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 0 14px; font: inherit; font-size: 13.5px; background: var(--surface-2); color: var(--ink); min-width: 0; }
.composer input:focus { outline: none; border-color: var(--accent); background: var(--surface); }

.tl { list-style: none; margin: 0; padding: 0; position: relative; }
.tl li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; padding-bottom: 14px; position: relative; }
.tl li::before { content: ""; position: absolute; left: 12px; top: 26px; bottom: 0; width: 2px; background: var(--line-2); }
.tl li:last-child::before { display: none; }
.tl .dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--sunken); color: var(--muted); font-size: 11px; font-weight: 600; position: relative; z-index: 1; }
.tl .dot svg { width: 13px; height: 13px; }
.tl li.done .dot { background: var(--accent); color: #fff; }
.tl li.done::before { background: var(--accent-line); }
.tl li.now .dot { background: var(--surface); color: var(--accent-text); box-shadow: inset 0 0 0 2px var(--accent); }
.tl li.skip { opacity: .45; }
.tl li.skip .tt { font-weight: 500; }
.tl .tt { font-size: 13px; font-weight: 600; line-height: 1.3; }
.tl .tm { font-size: 11.5px; color: var(--muted); margin-top: 2px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tl .tm .tag { height: 18px; font-size: 10px; }
.tl-note { font-size: 12px; color: var(--accent-ink); background: var(--accent-soft); border-radius: 8px; padding: 8px 10px; margin: 0 0 14px 36px; }
.tl-sum { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.tl-sum b { font-size: 22px; font-weight: 600; letter-spacing: -0.03em; }

/* ---------- Conversas ---------- */
.conv { display: grid; grid-template-columns: 384px minmax(0, 1fr); height: calc(100vh - var(--top-h) - 118px); min-height: 560px; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.conv-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.conv-search { padding: 12px; border-bottom: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 10px; }
.search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); }
.search svg { width: 15px; height: 15px; color: var(--muted); flex: none; }
.search input { border: 0; outline: 0; background: transparent; font: inherit; font-size: 13.5px; flex: 1; color: var(--ink); min-width: 0; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 28px; padding: 0 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 12px; font-weight: 500; color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.chip .c { color: var(--muted); font-weight: 500; }
.chip.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.chip.on .c { color: color-mix(in oklab, var(--surface) 70%, transparent); }
.conv-items { overflow-y: auto; flex: 1; min-height: 0; }
.ci { display: grid; grid-template-columns: 38px minmax(0,1fr); gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line-2); cursor: pointer; position: relative; }
.ci:hover { background: var(--surface-2); }
.ci.on { background: var(--accent-soft); }
.ci.on::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.ci .av { width: 38px; height: 38px; border-radius: 50%; background: var(--sunken); display: grid; place-items: center; font-weight: 600; font-size: 13px; color: var(--ink-2); }
.ci .r1 { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.ci .nm { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci .tm { font-size: 11px; color: var(--muted); flex: none; }
.ci .em { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci .pv { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.ci .tg { display: flex; gap: 5px; margin-top: 7px; flex-wrap: wrap; }
.conv-chat { display: flex; flex-direction: column; min-height: 0; background: #F0EEE8; }
.conv-head { background: var(--surface); border-bottom: 1px solid var(--line); padding: 12px 18px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.conv-head .who b { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.conv-head .who div { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.conv-head .r { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.conv-meta { background: var(--surface-2); border-bottom: 1px solid var(--line); padding: 8px 18px; display: flex; gap: 20px; font-size: 12.5px; color: var(--ink-2); flex-wrap: wrap; align-items: center; }
.conv-meta > span { white-space: nowrap; }
.conv-meta .b-av, .chat-strip .who .b-av { display: grid; color: #fff; font-size: 9.5px; }
.chat-strip .who .b-av.sm { font-size: 11px; }
.conv-meta span { display: inline-flex; gap: 6px; align-items: center; }
.conv-meta .label { font-size: 10px; }
.empty-list { padding: 30px 18px; text-align: center; color: var(--muted); font-size: 13px; }

/* ---------- Agenda ---------- */
.ag-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; }
.week { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.week-h { display: grid; grid-template-columns: 56px repeat(5, minmax(0, 1fr)); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.week-h div { padding: 10px 12px; font-size: 12px; color: var(--muted); border-left: 1px solid var(--line-2); }
.week-h div:first-child { border-left: 0; }
.week-h b { display: block; font-size: 20px; color: var(--ink); font-weight: 600; letter-spacing: -0.03em; margin-top: 2px; }
.week-h .today { background: var(--accent-soft); }
.week-h .today b { color: var(--accent-text); }
.week-b { display: grid; grid-template-columns: 56px repeat(5, minmax(0, 1fr)); position: relative; }
.hours div { height: var(--hh); font-size: 11px; color: var(--muted); text-align: right; padding: 0 8px 0 0; transform: translateY(-7px); }
.day { position: relative; border-left: 1px solid var(--line-2); background-image: linear-gradient(var(--line-2) 1px, transparent 1px); background-size: 100% var(--hh); }
.day.today { background-color: color-mix(in oklab, var(--accent) 3%, #fff); }
.ev { position: absolute; left: 6px; right: 6px; border-radius: 8px; padding: 6px 8px; font-size: 11.5px; line-height: 1.3; overflow: hidden; cursor: pointer; border: 1px solid var(--line); background: var(--surface); border-left-width: 3px; }
.ev .h { font-weight: 600; font-size: 11px; color: var(--ink-2); display: flex; justify-content: space-between; gap: 4px; align-items: center; }
.ev .nm { font-weight: 600; font-size: 12.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.ev .em { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev.bianca { background: var(--accent-soft); border-color: var(--accent-line); border-left-color: var(--accent); }
.ev.confirmada { border-left-color: var(--ink); }
.ev.feita { background: var(--sunken); border-color: var(--line-2); border-left-color: var(--faint); }
.ev.feita .nm { color: var(--ink-2); }
.ev.faltou { background: var(--hot-soft); border-color: color-mix(in oklab, var(--hot) 25%, #fff); border-left-color: var(--hot); }
.ev.faltou .nm { text-decoration: line-through; text-decoration-color: color-mix(in oklab, var(--hot) 60%, transparent); }
.ev.interna { background: repeating-linear-gradient(135deg, var(--surface-2) 0 6px, var(--sunken) 6px 7px); border-left-color: var(--muted); }
.ev .st { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
.ev.bianca .st { color: var(--accent-ink); }
.ev.faltou .st { color: var(--hot); }
.ev.feita .st { color: var(--muted); }
.ev.confirmada .st { color: var(--ink-2); }
.now-bar { position: absolute; left: -1px; right: 0; height: 2px; background: var(--accent); z-index: 3; }
.now-bar::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.legend { display: grid; gap: 10px; }
.legend div { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); }
.legend i { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--line); border-left-width: 3px; display: block; flex: none; }
.legend .c { margin-left: auto; font-weight: 600; color: var(--ink); }
.rem { list-style: none; margin: 0; padding: 0; }
.rem li { padding: 10px 0; border-top: 1px solid var(--line-2); display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; font-size: 12.5px; }
.rem li:first-child { border-top: 0; padding-top: 0; }
.rem .q { font-weight: 600; color: var(--ink); }
.rem .h { color: var(--muted); text-align: right; white-space: nowrap; }
.rem .o { color: var(--muted); }
.rem .r { text-align: right; white-space: nowrap; }
.rem .r.ok { color: var(--accent-text); font-weight: 500; }
.rem .r.no { color: var(--hot); font-weight: 500; }
.rem .r.wait { color: var(--muted); }
.wk-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line-2); border-radius: 10px; overflow: hidden; border: 1px solid var(--line-2); }
.wk-stats div { background: var(--surface); padding: 12px; }
.wk-stats b { display: block; font-size: 24px; font-weight: 600; letter-spacing: -0.03em; margin-top: 4px; }

/* ---------- Prospecção ---------- */
.pr-wrap { display: grid; grid-template-columns: 268px minmax(0, 1fr); gap: 16px; align-items: start; }
.filters { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: calc(var(--top-h) + 16px); }
.f-grp > .label { display: flex; justify-content: space-between; margin-bottom: 8px; }
.opt { display: flex; align-items: center; gap: 10px; padding: 8px 10px; white-space: nowrap; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; font-size: 13px; background: var(--surface); width: 100%; text-align: left; }
.opt + .opt { margin-top: 6px; }
.opt .bx { width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid var(--faint); display: grid; place-items: center; flex: none; }
.opt.on .bx { background: var(--ink); border-color: var(--ink); color: #fff; }
.opt .bx svg { width: 11px; height: 11px; }
.opt .c { margin-left: auto; color: var(--muted); font-size: 12px; }
.sel { display: flex; align-items: center; justify-content: space-between; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; font-size: 13px; background: var(--surface); }
.sel svg { width: 14px; height: 14px; color: var(--muted); }
.bars-uf { display: grid; gap: 7px; }
.bars-uf .r { display: grid; grid-template-columns: 26px 1fr 30px; gap: 8px; align-items: center; font-size: 12px; }
.bars-uf .r b { font-weight: 600; color: var(--ink-2); }
.bars-uf .tr { height: 8px; background: var(--sunken); border-radius: 99px; overflow: hidden; }
.bars-uf .fl { height: 100%; background: var(--ink); border-radius: 99px; }
.bars-uf .n { text-align: right; color: var(--muted); }
.counters { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: 14px; }
.counters div { padding: 14px 16px; }
.counters div + div { border-left: 1px solid var(--line-2); }
.counters b { display: block; font-size: 26px; font-weight: 600; letter-spacing: -0.03em; margin-top: 4px; }
.counters .s { font-size: 11.5px; color: var(--muted); }
.pt { width: 100%; border-collapse: collapse; min-width: 960px; }
.pt th { text-align: left; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 500; padding: 11px 10px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.pt td { padding: 10px 10px; border-bottom: 1px solid var(--line-2); font-size: 13px; vertical-align: middle; }
.pt tr:hover td { background: var(--surface-2); }
.pt .em { font-weight: 600; white-space: nowrap; }
.pt .sb { font-size: 11.5px; color: var(--muted); margin-top: 1px; white-space: nowrap; }
.pt .ws { white-space: nowrap; }
.st-dot { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-size: 12.5px; }
.st-dot i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); display: block; }
.st-dot.ab i { background: var(--accent); }
.st-dot.rs i { background: var(--hot); }
.st-dot.rs { color: var(--ink); font-weight: 500; }

/* ---------- Publicações ---------- */
.eds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.ed { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; }
.ed .d { display: flex; justify-content: space-between; align-items: center; }
.ed .d b { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-text); font-weight: 600; }
.ed h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; margin-top: 8px; }
.ed p { font-size: 12.5px; color: var(--ink-2); margin-top: 4px; }
.ed .cn { font-size: 11.5px; color: var(--muted); margin-top: 10px; }
.cal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; margin-bottom: 16px; }
.cal-g { display: grid; grid-template-columns: 150px repeat(7, minmax(0, 1fr)); }
.cal-g > div { border-left: 1px solid var(--line-2); border-top: 1px solid var(--line-2); padding: 10px; min-height: 0; }
.cal-g > div.hd { background: var(--surface-2); font-size: 12px; color: var(--muted); border-top: 0; }
.cal-g > div.hd b { display: block; color: var(--ink); font-size: 15px; font-weight: 600; letter-spacing: -0.02em; }
.cal-g > div.hd.today { background: var(--accent-soft); }
.cal-g > div.hd.today b { color: var(--accent-text); }
.cal-g > div.ch { border-left: 0; font-size: 13px; font-weight: 600; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.cal-g > div.ch span { font-size: 11.5px; color: var(--muted); font-weight: 400; }
.cal-g > div.c0 { border-left: 0; }
.cal-g > div.td { background: color-mix(in oklab, var(--accent) 3%, #fff); }
.slot { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 8px; align-items: start; }
.slot .mt { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; padding-top: 2px; }
.slot .mt b { font-weight: 600; font-size: 14px; letter-spacing: -0.01em; }
.slot .stt { font-size: 11.5px; font-weight: 600; }
.stt.publicado { color: var(--muted); }
.stt.agendado { color: var(--ink-2); }
.stt.aprovado { color: var(--accent-text); }
.stt.aguardando { color: #A16207; }
.stt.enviado { color: #2F5C8F; }
.lib { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.lib-i { display: flex; flex-direction: column; gap: 8px; }
.lib-i .r { display: flex; justify-content: space-between; align-items: center; font-size: 12px; gap: 6px; }
.lib-i .s { font-size: 11.5px; color: var(--muted); }
.lib-i .ed-n { font-size: 11.5px; color: var(--ink-2); font-weight: 500; }
.rot { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-2); }
.switch { width: 34px; height: 20px; border-radius: 99px; background: var(--accent); position: relative; flex: none; }
.switch::after { content: ""; position: absolute; right: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; }
.switch.off { background: var(--line); }
.switch.off::after { right: auto; left: 2px; }

/* ---------- Relatórios ---------- */
.rel-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.fun { padding: 6px 20px 18px; }
.fun-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 70px; gap: 16px; align-items: center; padding: 7px 0; }
.fun-row .nm { font-size: 13.5px; font-weight: 500; }
.fun-row .tr { height: 34px; background: var(--sunken); border-radius: 7px; overflow: hidden; }
.fun-row .fl { height: 100%; border-radius: 7px; background: var(--ink); display: flex; align-items: center; padding: 0 12px; color: #fff; font-weight: 600; font-size: 14px; min-width: 44px; }
.fun-row:last-child .fl { background: var(--accent); }
.fun-row .v { text-align: right; font-size: 20px; font-weight: 600; letter-spacing: -0.03em; }
.fun-rate { display: grid; grid-template-columns: 150px 1fr; gap: 16px; font-size: 12px; color: var(--muted); padding: 0 0 0; }
.fun-rate span { display: inline-flex; align-items: center; gap: 6px; padding-left: 12px; }
.fun-rate b { color: var(--ink-2); font-weight: 600; }
.fun-rate.low b { color: var(--hot); }
.insight { margin: 4px 20px 20px; padding: 12px 14px; border-radius: 10px; background: var(--warm-soft); font-size: 13px; color: #6A4705; display: grid; grid-template-columns: 8px 1fr; gap: 10px; }
.insight i { width: 8px; height: 8px; border-radius: 50%; background: var(--warm); margin-top: 6px; display: block; }
.auto { list-style: none; margin: 0; padding: 0; }
.auto li { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 13px 20px; border-top: 1px solid var(--line-2); }
.auto .nm { font-weight: 600; font-size: 13.5px; }
.auto .ds { font-size: 12px; color: var(--muted); margin-top: 2px; }
.auto .q { font-size: 13px; }
.auto .q span { display: block; font-size: 11.5px; color: var(--muted); }
.phone { width: 360px; margin: 0 auto; border-radius: 40px; background: #111; padding: 12px; box-shadow: 0 20px 50px rgba(0,0,0,.18); }
.screen { border-radius: 30px; overflow: hidden; background: #EFEAE2; display: flex; flex-direction: column; }
.wa-top { background: #F6F5F3; padding: 30px 14px 10px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid rgba(0,0,0,.06); }
.wa-top .gav { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12px; letter-spacing: -0.03em; }
.wa-top b { font-size: 14px; display: block; color: #111; }
.wa-top span { font-size: 11px; color: #6b6b6b; }
.wa-body { flex: 1; padding: 10px 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.wa-input { display: flex; align-items: center; gap: 8px; padding: 8px 10px 16px; background: #F6F5F3; }
.wa-input span { flex: 1; height: 34px; border-radius: 18px; background: #fff; font-size: 12px; color: #8a8a8a; display: flex; align-items: center; padding: 0 14px; }
.wa-input i { width: 34px; height: 34px; border-radius: 50%; background: #1F7A5A; color: #fff; display: grid; place-items: center; flex: none; }
.wa-input i svg { width: 15px; height: 15px; }
.wa-msg { max-width: 86%; padding: 6px 8px 5px; border-radius: 8px; font-size: 12.5px; line-height: 1.38; color: #111; box-shadow: 0 1px 0 rgba(0,0,0,.06); }
.wa-msg.in { background: #fff; align-self: flex-start; border-top-left-radius: 2px; }
.wa-msg.out { background: #D9FDD3; align-self: flex-end; border-top-right-radius: 2px; }
.wa-msg .snd { font-size: 11.5px; font-weight: 600; margin-bottom: 2px; color: #1F7A5A; }
.wa-msg .snd.r { color: #B4532A; }
.wa-msg .tm { font-size: 10px; color: #777; text-align: right; margin-top: 2px; }
.wa-msg .tr { font-size: 11px; color: #555; font-style: italic; margin-top: 4px; border-top: 1px solid rgba(0,0,0,.06); padding-top: 4px; }
.wa-msg .pdf { display: flex; gap: 8px; align-items: center; background: rgba(0,0,0,.04); border-radius: 6px; padding: 8px; margin-bottom: 2px; }
.wa-msg .pdf .ic { width: 28px; height: 34px; border-radius: 3px; background: #E5483B; color: #fff; font-size: 8.5px; font-weight: 700; display: grid; place-items: center; flex: none; }
.wa-msg .pdf b { font-size: 12px; display: block; }
.wa-msg .pdf span { font-size: 10.5px; color: #666; }
.wa-day { align-self: center; font-size: 10.5px; background: #fff; color: #555; padding: 3px 9px; border-radius: 6px; margin: 4px 0; }
.wa-msg .audio { min-width: 0; }
.wa-msg .audio .pl { width: 26px; height: 26px; background: #444; }
.wa-msg .audio .wave { height: 22px; }

/* ---------- Toast ---------- */
#toast-root { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: #141716; color: #fff; padding: 11px 16px; border-radius: 10px; font-size: 13px; box-shadow: 0 10px 30px rgba(0,0,0,.25); display: flex; align-items: center; gap: 10px; animation: rise .2s ease-out; max-width: min(560px, calc(100vw - 32px)); }
.toast i { width: 8px; height: 8px; border-radius: 50%; background: #6FD3B2; display: block; flex: none; }

/* ---------- Responsivo ---------- */
@media (max-width: 1280px) {
  .rank-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lib { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .m-body { grid-template-columns: 290px minmax(0,1fr); }
  .m-body .m-col:last-child { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); }
  .modal { height: auto; max-height: calc(100vh - 56px); overflow-y: auto; }
  .m-body { min-height: auto; }
  .m-col.chat-col { max-height: 560px; }
}
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cols-2-1, .ag-wrap, .rel-wrap, .pr-wrap { grid-template-columns: minmax(0, 1fr); }
  .filters { position: static; }
  .eds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .counters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .counters div:nth-child(4) { border-left: 0; }
  .counters div:nth-child(n+4) { border-top: 1px solid var(--line-2); }
}
@media (max-width: 820px) {
  :root { --top-h: 56px; }
  .app { grid-template-columns: 1fr; grid-template-rows: var(--top-h) auto 1fr; }
  .topbar { padding: 0 16px; gap: 10px; }
  .brand { min-width: 0; }
  .brand .sub, .sync, .hello, .top-right .btn { display: none; }
  .demo-badge { font-size: 10.5px; height: 24px; padding: 0 8px; }
  .side { position: sticky; top: var(--top-h); z-index: 25; height: auto; flex-direction: row; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .nav { display: flex; gap: 4px; }
  .nav a { height: 34px; flex: none; font-size: 11px; }
  .nav a.on::before { display: none; }
  .nav hr, .side-foot { display: none; }
  .view { padding: 18px 16px 48px; }
  .live-bar { margin: -18px -16px 18px; gap: 14px; font-size: 12px; top: calc(var(--top-h) + 51px); flex-wrap: wrap; height: auto; padding: 10px 12px; }
  .ph h1 { font-size: 24px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .night-top { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .night-top > div:first-child { grid-column: 1 / -1; border-bottom: 1px solid var(--line-2); }
  .night-top > div:nth-child(2) { border-left: 0; }
  .night-list li { grid-template-columns: 44px minmax(0, 1fr); }
  .night-list li .rs, .night-list li .tg { grid-column: 2; }
  .res-grid, .det-grid { grid-template-columns: 1fr; }
  .res-box .big { font-size: 56px; }
  .dist-row { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .dist-row > div:first-child { grid-column: 1 / -1; }
  .metric { text-align: left; }
  .rank-grid { grid-template-columns: minmax(0, 1fr); }
  .lib { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board { grid-template-columns: repeat(7, 240px); height: 70vh; }
  .toolbar .grp { max-width: 100%; overflow-x: auto; }
  .toolbar .right { margin-left: 0; }
  .conv { grid-template-columns: 1fr; height: auto; }
  .conv-list { border-right: 0; border-bottom: 1px solid var(--line); max-height: 320px; }
  .conv-chat { height: 70vh; }
  .week-scroll { overflow-x: auto; }
  .week { min-width: 720px; }
  .counters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .counters div { border-left: 0 !important; border-top: 1px solid var(--line-2); }
  .eds { grid-template-columns: 1fr; }
  .cal-scroll { overflow-x: auto; }
  .cal-g { min-width: 900px; }
  .auto li { grid-template-columns: 1fr; gap: 6px; }
  .phone { width: 100%; max-width: 360px; }
  .fun-row { grid-template-columns: 96px minmax(0,1fr) 48px; gap: 10px; }
  .fun-rate { grid-template-columns: 96px 1fr; gap: 10px; }
  .modal-back { padding: 0; }
  .modal { border-radius: 0; height: 100vh; max-height: none; }
  .m-head { flex-wrap: wrap; padding: 16px; }
  .m-head .acts { margin-left: 0; width: 100%; }
  .m-body { grid-template-columns: 1fr; }
  .m-col + .m-col { border-left: 0; border-top: 1px solid var(--line); }
  .m-col.chat-col { max-height: 520px; }
  .msg { max-width: 88%; }
}
body.dark .thumb.ink, body.dark .thumb.ink2 { border-color: var(--line); }
