/* ─────────────────────────────────────────────────────────────────────────
   LOLA Intelligence — Editorial Monochrome System
   Off-white paper · graphite · ink · black
   ───────────────────────────────────────────────────────────────────────── */

/* Fontes oficiais da marca (lola_id/FONTES) — auto-hospedadas em assets/fonts.
   Instrument Serif = serifada de exibição; Instrument Sans Condensed = sans. */
@font-face {
  font-family: "Instrument Serif";
  src: url("../assets/fonts/InstrumentSerif-Regular.ttf") format("truetype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../assets/fonts/InstrumentSerif-Italic.ttf") format("truetype");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Instrument Sans Condensed";
  src: url("../assets/fonts/InstrumentSansCondensed-SemiBold.ttf") format("truetype");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Instrument Sans Condensed";
  src: url("../assets/fonts/InstrumentSansCondensed-Bold.ttf") format("truetype");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  /* Fontes de marca (lola_id) */
  --font-brand-serif: "Instrument Serif", "DM Serif Display", Georgia, serif;
  --font-brand-sans:  "Instrument Sans Condensed", "Geist", sans-serif;

  /* Tones — LOLA Brasil brand: sage off-white paper + true black ink */
  --paper: #eeede2;        /* sage off-white, brand */
  --paper-2: #f5f4ea;
  --hairline: rgba(0, 0, 0, 0.10);
  --hairline-strong: rgba(0, 0, 0, 0.24);
  --ink: #000000;          /* true black, brand */
  --ink-mute: rgba(0, 0, 0, 0.62);
  --ink-soft: rgba(0, 0, 0, 0.42);
  --graphite: #5a5a55;
  --graphite-2: #8d8b84;
  --signal: #c5331a;       /* single accent — desaturated brick red, used very sparingly */
  --signal-soft: rgba(197, 51, 26, 0.10);
  --good: #1d6b3e;
  --good-soft: rgba(29, 107, 62, 0.08);
  --warn: #997a00;
  --warn-soft: rgba(153, 122, 0, 0.12);

  /* Type — wordmark uses DM Serif Display (closest free match to LOLA brand wordmark) */
  --font-wordmark: "DM Serif Display", "Newsreader", Georgia, serif;
  --font-display: "Newsreader", "Source Serif 4", Georgia, serif;
  --font-ui: "Geist", "Söhne", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Density */
  --row-h: 38px;
  --pad-x: 18px;
  --pad-y: 14px;
  --gap: 14px;
}

[data-tone="cool"] {
  --paper: #ebecea;
  --paper-2: #f3f3f0;
}
[data-tone="neutral"] {
  --paper: #ecebe2;
  --paper-2: #f4f3ea;
}
[data-tone="warm"] {
  --paper: #eeede2;
  --paper-2: #f5f4ea;
}

[data-density="compact"] { --row-h: 30px; --pad-x: 14px; --pad-y: 10px; --gap: 10px; }
[data-density="comfortable"] { --row-h: 38px; --pad-x: 18px; --pad-y: 14px; --gap: 14px; }
[data-density="spacious"] { --row-h: 48px; --pad-x: 24px; --pad-y: 20px; --gap: 20px; }

/* Módulo Board (Análise/Insights/Alocação/Capacity/Rentabilidade): texto
   secundário mais escuro que o resto do app — o board pediu mais contraste
   pra leitura executiva/impressão. Escopado só nessas views (.board-module
   no elemento raiz de cada uma) pra não afetar o resto do produto. */
.board-module {
  --ink-mute: rgba(0, 0, 0, 0.86);
  --ink-soft: rgba(0, 0, 0, 0.72);
}
[data-dark="true"] .board-module {
  --ink-mute: rgba(238, 237, 226, 0.90);
  --ink-soft: rgba(238, 237, 226, 0.74);
}

[data-dark="true"] {
  --paper: #16161a;        /* dark grey — not pure black, per brand */
  --paper-2: #1f1f24;
  --hairline: rgba(238, 237, 226, 0.10);
  --hairline-strong: rgba(238, 237, 226, 0.22);
  --ink: #eeede2;
  --ink-mute: rgba(238, 237, 226, 0.62);
  --ink-soft: rgba(238, 237, 226, 0.40);
  --graphite: #9c9b95;
  --graphite-2: #6f6e69;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-ui);
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.005em;
  font-feature-settings: "ss01", "cv11";
}

/* Type style variants ─────────────────────────────────────── */
[data-type="editorial"] {
  --font-display: "DM Serif Display", "Newsreader", Georgia, serif;
  --font-ui: "Geist", "Söhne", -apple-system, sans-serif;
}
[data-type="modern"] {
  --font-display: "Geist", "Söhne", -apple-system, sans-serif;
  --font-ui: "Geist", "Söhne", -apple-system, sans-serif;
}
[data-type="monumental"] {
  --font-display: "DM Serif Display", "Newsreader", serif;
  --font-ui: "Geist", "Söhne", -apple-system, sans-serif;
}
[data-type="modern"] .h-display { font-style: normal; }

/* Reset/utility ─────────────────────────────────────── */
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

.mono { font-family: var(--font-mono); font-feature-settings: "tnum", "zero"; letter-spacing: -0.02em; }
.tnum { font-variant-numeric: tabular-nums; }
.eyebrow {
  font-family: var(--font-ui);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.eyebrow .dot {
  display: inline-block; width: 5px; height: 5px;
  background: currentColor; border-radius: 50%;
  vertical-align: 2px; margin-right: 8px; opacity: 0.5;
}
.h-display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 0.95;
}
.h-display em { font-style: italic; font-weight: 400; }

/* ── App shell ─────────────────────────────────────── */
.app {
  display: grid;
  grid-template-columns: var(--nav-w, 264px) 1fr;
  min-height: 100vh;
  transition: grid-template-columns 0.22s cubic-bezier(.3,.7,.4,1);
}
.app[data-nav="collapsed"] { --nav-w: 68px; }
.app[data-view="tv"] { grid-template-columns: 1fr; }

/* ── Sidebar ─────────────────────────────────────── */
.side {
  position: sticky; top: 0;
  height: 100vh;
  border-right: 0.5px solid var(--hairline);
  background: var(--paper);
  display: flex; flex-direction: column;
  padding: 18px 0 12px;
  overflow: hidden;
}
.side-brand {
  padding: 14px 18px 18px;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 0.5px solid var(--hairline);
  margin-bottom: 14px;
  position: relative;
  justify-content: space-between;
}
.side-mark {
  flex: 1;
  min-width: 0;
  max-height: 56px;
  display: flex; align-items: center;
}
.side-mark img {
  max-width: 100%;
  max-height: 56px;
  height: auto;
  width: auto;
  object-fit: contain;
  display: block;
}
.side-toggle-top {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: transparent;
  border: 0;
  color: var(--ink-soft);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.side-toggle-top:hover { background: rgba(0, 0, 0, 0.06); color: var(--ink); }
[data-dark="true"] .side-toggle-top:hover { background: rgba(255, 255, 255, 0.06); }

.side-section {
  padding: 8px 14px 4px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.app[data-nav="collapsed"] .side-section,
.app[data-nav="collapsed"] .side-name { opacity: 0; pointer-events: none; }

.side-nav {
  display: flex; flex-direction: column;
  gap: 1px;
  padding: 0 10px;
}
.side-link {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--ink-mute);
  font-size: 13px;
  font-weight: 450;
  white-space: nowrap;
  position: relative;
  transition: background 0.12s, color 0.12s;
  border: 0;
  background: transparent;
  text-align: left;
  width: 100%;
}
.side-link:hover { background: rgba(20, 18, 14, 0.04); color: var(--ink); }
.side-link[data-active="true"] {
  background: var(--ink);
  color: var(--paper);
}
[data-dark="true"] .side-link[data-active="true"] {
  background: var(--ink); color: var(--paper);
}
.side-link svg { flex-shrink: 0; width: 17px; height: 17px; }
.side-link .badge {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-soft);
  letter-spacing: -0.02em;
}
.side-link[data-active="true"] .badge { color: rgba(238, 237, 226, 0.6); }

.app[data-nav="collapsed"] .side-link span,
.app[data-nav="collapsed"] .side-link .badge { display: none; }
.app[data-nav="collapsed"] .side-link { justify-content: center; padding: 9px; }

.side-foot {
  margin-top: auto;
  padding: 14px;
  border-top: 0.5px solid var(--hairline);
  display: flex; align-items: center; gap: 10px;
}
.avatar {
  width: 30px; height: 30px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 11px;
  font-weight: 500;
  flex-shrink: 0;
  font-family: var(--font-ui);
}
/* Foto de perfil (lib/avatar.jsx): a <img> preenche o círculo do .avatar.
   Sem foto, o mesmo .avatar segue mostrando as iniciais — por isso o padding
   e o fundo continuam definidos acima e só são cobertos quando há imagem. */
.avatar-photo { background: var(--hairline); overflow: hidden; }
.avatar-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

.side-foot .who { display: flex; flex-direction: column; line-height: 1.1; overflow: hidden; }
.side-foot .who b { font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.side-foot .who span { font-size: 10.5px; color: var(--ink-soft); white-space: nowrap; }
.app[data-nav="collapsed"] .side-foot .who { display: none; }

.app[data-nav="collapsed"] .side-brand {
  flex-direction: column;
  gap: 8px;
  padding: 4px 8px 14px;
}
.app[data-nav="collapsed"] .side-mark {
  flex: none;
  width: 40px; height: 32px;
  margin: 0 auto;
  display: grid; place-items: center;
}
.app[data-nav="collapsed"] .side-mark img {
  max-height: 32px;
}

/* Theme toggle */
.side-theme {
  padding: 0 14px 14px;
  display: flex; flex-direction: column; gap: 6px;
}
.side-theme .lab {
  font-size: 9.5px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-soft);
  padding-left: 4px;
}
.side-theme-seg {
  display: flex;
  padding: 2px;
  background: rgba(0,0,0,.06);
  border-radius: 7px;
}
[data-dark="true"] .side-theme-seg { background: rgba(255,255,255,.06); }
.side-theme-seg button {
  flex: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 26px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--ink-mute);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  border-radius: 5px;
  transition: background 0.12s, color 0.12s;
}
.side-theme-seg button[data-on="true"] {
  background: var(--paper-2);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
[data-dark="true"] .side-theme-seg button[data-on="true"] {
  background: rgba(255,255,255,.12);
  box-shadow: none;
}
.app[data-nav="collapsed"] .side-theme .lab { display: none; }
.app[data-nav="collapsed"] .side-theme-seg {
  flex-direction: column;
}
.app[data-nav="collapsed"] .side-theme-seg button span { display: none; }

/* ── Main content area ─────────────────────────────────────── */
.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}

.topbar {
  display: flex; align-items: center;
  gap: 14px;
  padding: 14px 32px;
  border-bottom: 0.5px solid var(--hairline);
  background: var(--paper);
  position: sticky; top: 0; z-index: 20;
}
.crumbs {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 12.5px;
  color: var(--ink-soft);
}
.crumbs b { color: var(--ink); font-weight: 500; }
.crumbs .sep { opacity: 0.5; }
.topbar .grow { flex: 1; }
.kbd {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-soft);
  padding: 3px 7px;
  border: 0.5px solid var(--hairline-strong);
  border-radius: 4px;
  background: var(--paper-2);
}
.searchbar {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px;
  border: 0.5px solid var(--hairline-strong);
  border-radius: 7px;
  background: var(--paper-2);
  min-width: 280px;
  color: var(--ink-soft);
  font-size: 12.5px;
}
.topbtn {
  height: 32px;
  padding: 0 12px;
  border-radius: 7px;
  border: 0.5px solid var(--hairline-strong);
  background: var(--paper-2);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 500;
  display: inline-flex; align-items: center; gap: 8px;
}
.topbtn.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.topbtn:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.topbtn.primary:hover { background: #000; }

/* ── Pages ─────────────────────────────────────── */
.page { padding: 32px 40px 80px; max-width: 1480px; margin: 0 auto; width: 100%; }
[data-density="compact"] .page { padding: 22px 28px 60px; }
[data-density="spacious"] .page { padding: 44px 56px 100px; }

.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 32px;
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 0.5px solid var(--hairline);
}
.page-head .title {
  font-size: clamp(40px, 5.6vw, 80px);
  margin: 14px 0 0;
}
.page-head .lede {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 17px;
  font-weight: 400;
  color: var(--ink-mute);
  max-width: 38ch;
  line-height: 1.35;
}
.page-head .meta {
  text-align: right;
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
  line-height: 1.8;
  letter-spacing: -0.01em;
}
.page-head .meta b { color: var(--ink); font-weight: 500; }

/* ── KPI strip ─────────────────────────────────────── */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 0.5px solid var(--hairline);
  border-bottom: 0.5px solid var(--hairline);
  margin-bottom: 36px;
}
.kpi-row.cols-3 { grid-template-columns: repeat(3, 1fr); }
.kpi-row.cols-5 { grid-template-columns: repeat(5, 1fr); }
.kpi-row.cols-6 { grid-template-columns: repeat(6, 1fr); }
.kpi {
  padding: 22px 24px;
  border-right: 0.5px solid var(--hairline);
  display: flex; flex-direction: column;
  gap: 6px;
  position: relative;
}
.kpi:last-child { border-right: 0; }
.kpi .eyebrow {
  color: var(--ink-soft);
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Títulos dos cards de Rentabilidade (BV/Net Revenue/Compensation/...) —
   maiores que o padrão .kpi .eyebrow pra melhorar legibilidade, pedido do
   usuário em 2026-07-23. */
.profit-kpis .eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink);
}
/* Linha "total" (3ª linha) dos cards de Rentabilidade — linha GROSSA no
   topo, alinhada como régua de grid entre os cards (não mais uma caixa
   fechada), pra marcar a linha do total de forma consistente em toda a
   fileira. Pedido do usuário em 2026-07-23 à noite. */
.kpi-total {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 2.5px solid var(--ink);
}
/* Card em destaque dentro da régua de KPIs (Investimento de Mídia, pedido do
   board em 2026-08-27). A fileira é uma régua contínua, sem caixa por card, e
   o destaque precisa de preenchimento e respiro pra não encostar nos fios.
   O fundo é PINTADO, não é caixa: margem e padding mudariam a altura útil do
   card e a régua do total (que é empurrada pro rodapé com margin-top:auto)
   sairia do lugar só neste card — foi exatamente o que aconteceu na primeira
   tentativa. Um ::before absoluto preenche sem tocar no layout, o que também
   mantém o card alinhado com os vizinhos: a linha de base do eyebrow e do
   valor continua sendo a mesma da régua inteira. */
.kpi.kpi-destaque::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 10px;
  background: var(--destaque-fundo);
}
/* Superfície cheia, sem moldura — o mesmo tratamento das telas do módulo
   Dashboards (fundo #0a0a0a, texto #eeede2). O preenchimento sozinho já separa
   o card da régua; a moldura de 3px que existia aqui competia com os fios
   finos das outras colunas.

   Os tokens de tinta são redefinidos DENTRO do card em vez de recolorir filho
   por filho: .kpi .eyebrow, .kpi-caption, .kpi .sub, a régua do .kpi-total e o
   divisor inline da view já leem --ink / --ink-soft / --hairline, então todos
   acompanham a inversão sozinhos. É o mesmo recurso que .board-module usa. */
.kpi.kpi-destaque {
  --destaque-fundo: #0a0a0a;
  --ink: #eeede2;
  --ink-mute: rgba(238, 237, 226, 0.90);
  --ink-soft: rgba(238, 237, 226, 0.70);
  --hairline: rgba(238, 237, 226, 0.22);
  color: var(--ink);
  border-right: 0;
}
/* No escuro a RELAÇÃO se mantém invertendo os dois lados: a página é escura,
   então o card claro é o que destaca. Repetir o fundo escuro aqui faria o card
   sumir dentro da própria página. */
[data-dark="true"] .kpi.kpi-destaque {
  --destaque-fundo: #eeede2;
  --ink: #16161a;
  --ink-mute: rgba(22, 22, 26, 0.88);
  --ink-soft: rgba(22, 22, 26, 0.60);
  --hairline: rgba(22, 22, 26, 0.20);
}
/* O conteúdo sobe pra cima da moldura (o ::before é o primeiro na ordem de
   pintura; basta posicionar os filhos pra eles ficarem por cima). */
.kpi.kpi-destaque > * { position: relative; }
/* O card à esquerda perde o fio divisor: com a caixa do destaque logo ao lado,
   os dois traços juntos leem como um erro de alinhamento. */
.kpi:has(+ .kpi-destaque) { border-right: 0; }

/* Coluna mesclada (ex.: BV) — as "3 linhas" viram um valor único,
   centralizado, ocupando a mesma altura que as outras colunas (2 blocos +
   régua do total) pra manter o grid nivelado. */
.kpi-merged {
  min-height: 194px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
/* Legenda mono dos cards de Rentabilidade — força 1 linha só (nowrap +
   ellipsis) pra nunca quebrar em 2 linhas e desalinhar a régua do total
   entre os 6 cards, mesmo com legendas de tamanhos diferentes. */
.kpi-caption {
  font-size: 11px;
  color: var(--ink-soft);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kpi .big {
  font-family: var(--font-mono);
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 4px 0 2px;
}
.kpi .big sup { font-size: 0.45em; vertical-align: 0.9em; color: var(--ink-soft); margin-left: 4px; letter-spacing: 0; }
.kpi .delta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: -0.01em;
  display: inline-flex; align-items: center; gap: 6px;
}
.kpi .delta[data-dir="up"] { color: var(--good); }
.kpi .delta[data-dir="down"] { color: var(--signal); }
.kpi .spark {
  position: absolute;
  right: 18px; top: 22px;
  width: 70px; height: 32px;
  opacity: 0.7;
}
.kpi .sub {
  font-size: 11.5px;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-style: italic;
  margin-top: 2px;
}

/* ── Sections ─────────────────────────────────────── */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px;
  margin: 40px 0 18px;
  padding-bottom: 12px;
  border-bottom: 0.5px solid var(--hairline);
}
.section-head .title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1;
}
.section-head .title em { font-style: italic; }
.section-head .meta { font-family: var(--font-mono); font-size: 11px; color: var(--ink-soft); }
.section-head .actions { display: flex; gap: 8px; }
.section-head-scratch {
  position: relative;
}
.section-head-scratch::before {
  content: "";
  position: absolute;
  left: 200px; bottom: 6px;
  width: 56px; height: 56px;
  background: url("../assets/scratch-3.png") no-repeat center / contain;
  opacity: 0.45;
  pointer-events: none;
  transform: rotate(-8deg);
}
[data-dark="true"] .section-head-scratch::before { filter: invert(1); }

/* ── Grid columns ─────────────────────────────────────── */
.cols { display: grid; gap: 0; }
.cols-2 { grid-template-columns: 1.4fr 1fr; }
.cols-2-eq { grid-template-columns: 1fr 1fr; }
.cols-3 { grid-template-columns: 2fr 1fr 1fr; }
.col { padding: 0 28px; border-right: 0.5px solid var(--hairline); min-width: 0; }
.col:first-child { padding-left: 0; }
.col:last-child { padding-right: 0; border-right: 0; }

/* ── Table ─────────────────────────────────────── */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table thead th {
  text-align: left;
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 10px 12px;
  border-bottom: 0.5px solid var(--hairline-strong);
  background: var(--paper);
  position: sticky; top: 0;
  white-space: nowrap;
}
.table tbody td {
  padding: 12px;
  border-bottom: 0.5px solid var(--hairline);
  vertical-align: middle;
}
.table tbody tr:hover td { background: rgba(20, 18, 14, 0.025); }
.table .num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; text-align: right; letter-spacing: -0.02em; }
.table .who {
  display: flex; align-items: center; gap: 10px;
}
.table .who .avatar { width: 26px; height: 26px; font-size: 10px; }
.table .who b { font-weight: 500; font-size: 13px; }
.table .who span { font-size: 11px; color: var(--ink-soft); }

/* Status pill */
.pill {
  display: inline-flex; align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  border: 0.5px solid var(--hairline-strong);
  color: var(--ink-mute);
}
.pill[data-tone="signal"] { color: var(--signal); border-color: rgba(197,51,26,.28); background: var(--signal-soft); }
.pill[data-tone="good"] { color: var(--good); border-color: rgba(29,107,62,.28); background: var(--good-soft); }
.pill[data-tone="warn"] { color: var(--warn); border-color: rgba(153,122,0,.30); background: var(--warn-soft); }
.pill[data-tone="ink"] { color: var(--paper); background: var(--ink); border-color: var(--ink); }

/* Progress */
.prog {
  position: relative;
  width: 100%; height: 4px;
  background: rgba(20,18,14,.07);
  border-radius: 999px;
  overflow: hidden;
}
.prog i {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--ink);
  border-radius: 999px;
}
.prog[data-tone="signal"] i { background: var(--signal); }
.prog[data-tone="warn"] i { background: var(--warn); }
.prog[data-tone="good"] i { background: var(--good); }

/* ── Timesheet weekly grid ─────────────────────────────────────── */
.week-grid {
  display: grid;
  grid-template-columns: 220px repeat(7, 1fr) 90px;
  font-size: 12px;
}
.week-grid > .gh {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 10px 8px;
  border-bottom: 0.5px solid var(--hairline-strong);
  text-align: center;
}
.week-grid > .gh.col-name { text-align: left; padding-left: 0; }
.week-grid > .gh small {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-soft);
  font-weight: 400;
  margin-top: 2px;
  letter-spacing: -0.02em;
}
.week-grid > .gh.today {
  color: var(--ink);
}
.week-grid > .gh.today small { color: var(--ink); }

.week-grid .row-name {
  padding: 12px 0;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 0.5px solid var(--hairline);
  min-width: 0;
}
.week-grid .row-name .avatar { width: 26px; height: 26px; font-size: 10px; }
.week-grid .row-name b { font-size: 13px; font-weight: 500; }
.week-grid .row-name span { font-size: 10.5px; color: var(--ink-soft); display: block; line-height: 1.1; }

.cell {
  border-bottom: 0.5px solid var(--hairline);
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: -0.02em;
  color: var(--ink-mute);
  padding: 12px 0;
  position: relative;
}
.cell[data-state="full"] { color: var(--ink); }
.cell[data-state="full"]::before {
  content: ""; position: absolute; inset: 4px;
  background: rgba(20,18,14,.06);
  border-radius: 3px;
  z-index: 0;
}
.cell[data-state="full"] span { position: relative; z-index: 1; }
.cell[data-state="partial"]::before {
  content: ""; position: absolute; inset: 4px;
  background: var(--warn-soft);
  border-radius: 3px;
  z-index: 0;
}
.cell[data-state="partial"] { color: var(--warn); }
.cell[data-state="partial"] span { position: relative; z-index: 1; }
.cell[data-state="empty"] { color: var(--ink-soft); }
.cell[data-state="empty"]::after {
  content: "·"; color: var(--ink-soft); font-size: 18px; line-height: 0.5;
}
.cell[data-state="empty"] span { display: none; }
.cell[data-state="absent"] {
  color: var(--ink-soft);
}
.cell[data-state="absent"]::before {
  content: ""; position: absolute; inset: 4px;
  background: repeating-linear-gradient(135deg, transparent 0 4px, rgba(20,18,14,.08) 4px 5px);
  border-radius: 3px;
  z-index: 0;
}
.cell[data-state="absent"] span { position: relative; z-index: 1; }
.cell[data-state="weekend"] {
  color: var(--ink-soft);
  background: rgba(20,18,14,.02);
}
.cell.today::after {
  content: ""; position: absolute; left: 50%; bottom: 0;
  width: 18px; height: 2px; transform: translateX(-50%);
  background: var(--signal);
}

.cell-total {
  padding: 12px 0;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  text-align: right;
  border-bottom: 0.5px solid var(--hairline);
  letter-spacing: -0.02em;
}

/* ── List rows ─────────────────────────────────────── */
.list { display: flex; flex-direction: column; }
.list .item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 0.5px solid var(--hairline);
}
.list .item:last-child { border-bottom: 0; }
.list .item .who b { font-weight: 500; font-size: 14px; display: block; }
.list .item .who span { font-size: 11.5px; color: var(--ink-soft); }
.list .item .meta {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.list .item .meta small { color: var(--ink-soft); font-size: 10.5px; display: block; margin-top: 2px; }

/* ── Generic blocks ─────────────────────────────────────── */
.note {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 17px;
  line-height: 1.4;
  color: var(--ink-mute);
  border-left: 2px solid var(--ink);
  padding-left: 18px;
  margin: 18px 0;
  max-width: 50ch;
}
.note b { font-style: normal; color: var(--ink); font-family: var(--font-ui); font-weight: 500; }

.calloutbar {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 18px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 4px;
}
.calloutbar .num {
  font-family: var(--font-mono);
  font-size: 28px;
  letter-spacing: -0.04em;
  line-height: 1;
}
.calloutbar .lab {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 14px;
  flex: 1;
}

/* Notify panel — develops the "Notificar gestores" action */
.notify-panel {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 0;
  margin-bottom: 24px;
  border: 0.5px solid var(--hairline-strong);
  border-top: 0;
  border-radius: 0 0 4px 4px;
  background: var(--paper-2);
  overflow: hidden;
}
.notify-meta { padding: 22px 24px; border-right: 0.5px solid var(--hairline); }
.notify-meta .eyebrow { margin-bottom: 12px; }
.notify-meta p {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-mute);
  max-width: 52ch;
}
.notify-meta p b { color: var(--ink); font-style: normal; font-family: var(--font-ui); font-weight: 500; }
.notify-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.notify-tags .tag {
  display: inline-flex; align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 4px;
  border: 0.5px solid var(--hairline-strong);
  background: var(--paper);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--ink);
}

.notify-actions {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}
.notify-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 18px;
  border: 0.5px solid var(--hairline-strong);
  border-radius: 6px;
  background: var(--paper);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  text-align: left;
  justify-content: center;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.notify-btn:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.notify-btn.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.notify-btn.primary:hover { background: #000; }
.notify-btn.secondary { background: transparent; }
.notify-btn .hint {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink-soft);
}
.notify-btn:hover .hint { color: rgba(238, 237, 226, 0.6); }
.notify-btn.primary .hint { color: rgba(238, 237, 226, 0.6); }

/* Cell click modal — hours by project/task */
.modal-scrim {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 200;
  display: grid; place-items: center;
  padding: 40px 20px;
  backdrop-filter: blur(2px);
  animation: scrim-in 0.15s ease-out;
}
@keyframes scrim-in { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 100%;
  max-width: 760px;
  max-height: calc(100vh - 80px);
  background: var(--paper);
  color: var(--ink);
  border-radius: 6px;
  border: 0.5px solid var(--hairline-strong);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: modal-in 0.22s cubic-bezier(.3,.7,.4,1);
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(8px) scale(0.99); }
  to { opacity: 1; transform: none; }
}
.modal-head {
  padding: 24px 26px 18px;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px;
  border-bottom: 0.5px solid var(--hairline);
}
.modal-head .eyebrow { margin-bottom: 10px; }
.modal-head h3 {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 28px;
  font-weight: 400;
  margin: 0 0 4px;
  letter-spacing: -0.015em;
  line-height: 1;
}
.modal-head .sub {
  font-size: 12px;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.modal-x {
  width: 30px; height: 30px;
  border-radius: 6px;
  border: 0.5px solid var(--hairline-strong);
  background: var(--paper-2);
  color: var(--ink-mute);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.modal-x:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.modal-body {
  padding: 18px 26px 22px;
  flex: 1;
  overflow-y: auto;
}
.modal-total {
  display: flex; align-items: baseline; gap: 18px;
  padding: 8px 0 18px;
  border-bottom: 0.5px solid var(--hairline);
}
.modal-total .big {
  font-size: 56px;
  letter-spacing: -0.05em;
  line-height: 1;
  font-weight: 400;
  color: var(--ink);
}
.modal-total .big small {
  font-size: 0.34em;
  color: var(--ink-soft);
  font-weight: 400;
  margin-left: 4px;
  letter-spacing: -0.02em;
}
.modal-total .sub {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-mute);
}

.modal-empty {
  padding: 40px 0;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  text-align: center;
}
.modal-empty .big {
  font-size: 64px;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--ink-soft);
}
.modal-empty .big small {
  font-size: 0.32em;
  margin-left: 4px;
}
.modal-empty p {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--ink-mute);
  margin: 0;
  line-height: 1.4;
}
.modal-empty p i {
  color: var(--signal);
  font-style: italic;
  font-size: 14px;
}

.modal-entries {
  list-style: none;
  margin: 0;
  padding: 0;
}
.modal-entries li {
  padding: 14px 0;
  border-bottom: 0.5px solid var(--hairline);
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 14px;
}
.modal-entries li:last-child { border-bottom: 0; }

.client-logo {
  width: 36px; height: 36px;
  border: 0.5px solid var(--hairline-strong);
  background: var(--ink);
  color: var(--paper);
  border-radius: 4px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.client-logo svg { width: 22px; height: 22px; }
.client-logo .cl-type {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.04em;
}
.client-logo[data-kind="type-i"] .cl-type { font-style: normal; font-family: var(--font-wordmark); }
.client-logo[data-kind="type-p"] .cl-type { font-family: var(--font-wordmark); font-style: normal; }
.client-logo[data-kind="type-g"] .cl-type { font-family: var(--font-wordmark); font-style: normal; }
.client-logo[data-kind="type-i2"] .cl-type { font-family: var(--font-wordmark); font-style: normal; font-size: 20px; }

.modal-entries .e-task {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.005em;
  line-height: 1.3;
}
.modal-entries .e-h {
  font-family: var(--font-mono);
  font-size: 20px;
  letter-spacing: -0.03em;
  font-weight: 400;
  color: var(--ink);
  min-width: 56px;
  text-align: right;
}
.modal-entries .e-h small {
  font-size: 0.55em;
  color: var(--ink-soft);
  margin-left: 2px;
  letter-spacing: -0.02em;
}
.modal-entries .e-status {
  text-transform: capitalize;
  letter-spacing: 0.02em;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  min-width: 70px;
  justify-content: center;
}

.modal-foot {
  padding: 16px 26px;
  border-top: 0.5px solid var(--hairline);
  display: flex; gap: 10px; justify-content: flex-end;
  background: var(--paper-2);
}
.modal-foot .topbtn { height: 36px; }

/* Make cells clickable */
button.cell {
  cursor: pointer;
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  width: 100%;
  transition: background 0.1s;
}
button.cell:hover {
  background: rgba(0, 0, 0, 0.04);
}
button.cell:hover::before {
  outline: 0.5px solid var(--ink);
  outline-offset: -1px;
}
[data-dark="true"] button.cell:hover { background: rgba(255, 255, 255, 0.05); }

/* ─── People cards grid (Pessoas, Pauta livre) ─── */
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 0;
  border-top: 0.5px solid var(--hairline);
  border-left: 0.5px solid var(--hairline);
}
.person-card {
  border-right: 0.5px solid var(--hairline);
  border-bottom: 0.5px solid var(--hairline);
  padding: 22px 22px 18px;
  display: flex; flex-direction: column;
  gap: 16px;
  background: var(--paper);
  position: relative;
}
.person-card[data-risk="high"] {
  background: linear-gradient(180deg, var(--signal-soft) 0%, var(--paper) 60%);
}
.person-card[data-risk="med"] {
  background: linear-gradient(180deg, var(--warn-soft) 0%, var(--paper) 60%);
}
.person-card header {
  display: flex; align-items: center; gap: 12px;
}
.person-card header .avatar { width: 36px; height: 36px; font-size: 12px; }
.person-card header b {
  font-weight: 500; font-size: 14px; display: block; letter-spacing: -0.005em;
}
.person-card header span {
  font-size: 11px; color: var(--ink-soft); display: block; margin-top: 1px;
}
.person-card header .pill { margin-left: auto; flex-shrink: 0; }
.pc-rows { display: flex; flex-direction: column; gap: 0; }
.pc-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 8px 0;
  border-bottom: 0.5px solid var(--hairline);
}
.pc-row:last-child { border-bottom: 0; }
.pc-row .lab {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
}
.pc-row .val {
  font-size: 16px;
  color: var(--ink);
}
.pc-row .val small {
  font-size: 0.55em;
  color: var(--ink-soft);
  margin-left: 2px;
  letter-spacing: -0.02em;
}
.person-card footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 0.5px dashed var(--hairline);
  display: flex; justify-content: space-between; align-items: baseline;
}
.person-card.available {
  border-left: 2px solid var(--good);
  padding-left: 20px;
}

/* ─── Lolovers podium ─── */
.podium {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 0;
  margin: 24px 0;
  align-items: end;
  border-top: 0.5px solid var(--hairline);
  border-bottom: 0.5px solid var(--hairline);
}
.pod {
  padding: 28px 22px;
  text-align: center;
  border-right: 0.5px solid var(--hairline);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.pod:last-child { border-right: 0; }
.pod-1 { padding: 36px 22px 40px; background: var(--ink); color: var(--paper); }
.pod-1 .rank { color: var(--paper); opacity: 0.5; }
.pod-1 .name, .pod-1 .score { color: var(--paper); }
.pod-1 .role { color: rgba(238,237,226,.55); }
.pod-1 .avatar { background: var(--paper); color: var(--ink); }
.pod .rank {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.pod .avatar.big {
  width: 52px; height: 52px; font-size: 16px;
  margin: 4px 0 6px;
}
.pod-1 .avatar.big { width: 64px; height: 64px; font-size: 20px; }
.pod .name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.pod-1 .name { font-size: 26px; }
.pod .role {
  font-size: 11px;
  color: var(--ink-soft);
  margin-bottom: 12px;
}
.pod .score {
  font-family: var(--font-mono);
  font-size: 44px;
  letter-spacing: -0.04em;
  line-height: 1;
}
.pod-1 .score { font-size: 56px; }
.pod .tier {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 18px;
  margin-top: 4px;
  border: 0.5px solid var(--hairline-strong);
  font-weight: 500;
}
.pod .tier[data-tier="S"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pod .tier[data-tier="A"] { background: var(--good); color: #fff; border-color: var(--good); }
.pod .tier[data-tier="B"] { background: var(--warn-soft); color: var(--warn); }
.pod-1 .tier[data-tier="S"] { background: var(--paper); color: var(--ink); }

/* Tier breakdown row */
.tier-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  border: 0.5px solid var(--hairline);
}
.tier-cell {
  padding: 22px 18px;
  border-right: 0.5px solid var(--hairline);
  display: flex; flex-direction: column; gap: 6px;
}
.tier-cell:last-child { border-right: 0; }
.tier-letter {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 56px;
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 0.85;
}
.tier-cell[data-tier="S"] .tier-letter { color: var(--ink); }
.tier-cell[data-tier="A"] .tier-letter { color: var(--good); }
.tier-cell[data-tier="B"] .tier-letter { color: var(--warn); }
.tier-cell[data-tier="C"] .tier-letter,
.tier-cell[data-tier="D"] .tier-letter { color: var(--signal); }
.tier-count {
  font-family: var(--font-mono);
  font-size: 22px;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.tier-label {
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 0;
  margin-top: -2px;
}
.tier-pill {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px;
  border-radius: 4px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 14px;
  font-weight: 500;
  border: 0.5px solid var(--hairline-strong);
}
.tier-pill[data-tier="S"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.tier-pill[data-tier="A"] { background: var(--good); color: #fff; border-color: var(--good); }
.tier-pill[data-tier="B"] { background: var(--warn-soft); color: var(--warn); }
.tier-pill[data-tier="C"],
.tier-pill[data-tier="D"] { background: var(--signal-soft); color: var(--signal); }

/* ─── Análise: chart + dept stack ─── */
.chart-svg { width: 100%; height: auto; display: block; margin: 16px 0; }

.dept-stack {
  display: flex; flex-direction: column;
  border-top: 0.5px solid var(--hairline);
}
.dept-row {
  display: grid;
  grid-template-columns: 240px 1fr 80px 60px;
  align-items: center;
  gap: 18px;
  padding: 16px 0;
  border-bottom: 0.5px solid var(--hairline);
}
.dept-row .dept-name b { font-weight: 500; font-size: 14px; display: block; }
.dept-row .dept-name span { font-size: 11px; color: var(--ink-soft); }
.dept-row .dept-bar {
  position: relative;
  height: 10px;
  background: rgba(0,0,0,.06);
  border: 0.5px solid var(--hairline);
  border-radius: 3px;
  overflow: hidden;
}
.dept-row .dept-bar i {
  display: block; height: 100%;
  background: var(--ink);
  border-radius: 2px;
}
.dept-row .dept-pct {
  font-family: var(--font-mono);
  font-size: 18px;
  letter-spacing: -0.03em;
  text-align: right;
}
.dept-row .dept-pct small {
  font-size: 10px;
  color: var(--ink-soft);
  margin-left: 1px;
}
.dept-row .dept-delta {
  font-size: 11px;
  text-align: right;
  letter-spacing: -0.01em;
}
.dept-row .dept-delta[data-dir="up"] { color: var(--good); }
.dept-row .dept-delta[data-dir="down"] { color: var(--signal); }
.dept-row .dept-delta[data-dir="flat"] { color: var(--ink-soft); }

/* ─── Presencial ─── */
.presencial-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border: 0.5px solid var(--hairline);
  margin-bottom: 24px;
}
.ps-day {
  padding: 18px 18px 22px;
  border-right: 0.5px solid var(--hairline);
  display: flex; flex-direction: column; gap: 4px;
  position: relative;
}
.ps-day:last-child { border-right: 0; }
.ps-lab {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
}
.ps-date {
  font-size: 10.5px;
  color: var(--ink-soft);
  letter-spacing: -0.01em;
}
.ps-num {
  font-size: 56px;
  letter-spacing: -0.05em;
  line-height: 1;
  margin: 12px 0 8px;
  color: var(--ink);
}
.ps-bar {
  position: relative;
  height: 4px;
  background: rgba(0,0,0,.06);
  border-radius: 2px;
  overflow: hidden;
  margin: 4px 0 6px;
}
.ps-bar i {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: var(--ink);
  height: 100%;
}
.ps-sub {
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: -0.01em;
}

.presencial-grid {
  display: grid;
  grid-template-columns: 220px repeat(5, 1fr) 80px 100px;
  font-size: 12px;
}
.presencial-grid .pg-head {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 10px 8px;
  border-bottom: 0.5px solid var(--hairline-strong);
  text-align: center;
}
.presencial-grid .pg-head.pg-name { text-align: left; padding-left: 0; }
.presencial-grid .pg-head small {
  display: block;
  font-size: 10px;
  color: var(--ink-soft);
  font-weight: 400;
  margin-top: 2px;
  letter-spacing: -0.02em;
}
.presencial-grid .pg-name-row {
  padding: 12px 0;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 0.5px solid var(--hairline);
  min-width: 0;
}
.presencial-grid .pg-name-row .avatar { width: 26px; height: 26px; font-size: 10px; }
.presencial-grid .pg-name-row b { font-size: 13px; font-weight: 500; display: block; }
.presencial-grid .pg-name-row span { font-size: 10.5px; color: var(--ink-soft); }
.presencial-grid .pg-cell {
  border-bottom: 0.5px solid var(--hairline);
  display: grid; place-items: center;
  padding: 12px 0;
  color: var(--ink-soft);
}
.presencial-grid .pg-cell[data-present="1"] {
  color: var(--ink);
  background: rgba(0,0,0,.04);
}
.presencial-grid .pg-cell[data-present="1"] svg {
  color: var(--good);
}
[data-dark="true"] .presencial-grid .pg-cell[data-present="1"] {
  background: rgba(255,255,255,.04);
}
.presencial-grid .pg-total {
  padding: 12px 0;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  text-align: right;
  border-bottom: 0.5px solid var(--hairline);
  letter-spacing: -0.02em;
}
.presencial-grid .pg-total small {
  font-size: 11px;
  color: var(--ink-soft);
}
.presencial-grid .pg-policy {
  padding: 12px 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  border-bottom: 0.5px solid var(--hairline);
}

/* ─── Insights cards ─── */
.insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 0;
  border-top: 0.5px solid var(--hairline);
  border-left: 0.5px solid var(--hairline);
  margin-top: 0;
}
.insight-card {
  padding: 26px 26px 22px;
  border-right: 0.5px solid var(--hairline);
  border-bottom: 0.5px solid var(--hairline);
  background: var(--paper);
  display: flex; flex-direction: column;
  gap: 12px;
  position: relative;
}
.insight-card .ic-mark {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--paper-2);
  border: 0.5px solid var(--hairline-strong);
  color: var(--ink);
}
.insight-card[data-kind="alert"] .ic-mark { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.insight-card[data-kind="risk"] .ic-mark { background: var(--signal); color: #fff; border-color: var(--signal); }
.insight-card[data-kind="opportunity"] .ic-mark { background: var(--good); color: #fff; border-color: var(--good); }
.insight-card[data-kind="trend"] .ic-mark { background: var(--paper-2); color: var(--ink); }
.insight-card .ic-meta {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
}
.insight-card .ic-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: pretty;
}
.insight-card[data-kind="alert"] .ic-title em,
.insight-card[data-kind="risk"] .ic-title em { font-style: italic; }
.insight-card .ic-body {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-mute);
  margin: 0;
}
.insight-card footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 0.5px dashed var(--hairline);
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 10px;
}
.insight-card .ic-action {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent;
  border: 0;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  padding: 0;
  text-align: left;
}
.insight-card .ic-action:hover { text-decoration: underline; }
.insight-card .ic-conf {
  font-size: 10.5px;
  color: var(--ink-soft);
  letter-spacing: -0.01em;
}

/* ─── Helper: extra column count for kpi-row ─── */
.kpi-row.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Tabs */
.tabs {
  display: flex; gap: 0;
  border-bottom: 0.5px solid var(--hairline-strong);
  margin-bottom: 22px;
}
.tab {
  padding: 10px 16px 12px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid transparent;
  margin-bottom: -0.5px;
  display: inline-flex; align-items: center; gap: 8px;
}
.tab .badge {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(20,18,14,.07);
  color: var(--ink-mute);
  letter-spacing: -0.02em;
}
.tab[data-active="true"] {
  color: var(--ink);
  border-bottom-color: var(--ink);
}
.tab:hover { color: var(--ink); }

/* Filter chips */
.filters {
  display: flex; gap: 8px; flex-wrap: wrap;
  align-items: center;
  margin-bottom: 22px;
}
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 30px;
  padding: 0 12px;
  border: 0.5px solid var(--hairline-strong);
  border-radius: 7px;
  background: var(--paper-2);
  font-size: 12px;
  color: var(--ink-mute);
}
.chip b { color: var(--ink); font-weight: 500; }
.chip svg { width: 12px; height: 12px; opacity: 0.6; }
.chip[data-active="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip[data-active="true"] b { color: var(--paper); }

/* ── HOME hero ─────────────────────────────────────── */
.home-hero {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 0;
  padding-bottom: 36px;
  margin-bottom: 0;
  border-bottom: 0.5px solid var(--hairline);
  position: relative;
  overflow: hidden;
}
.home-hero::before {
  content: "";
  position: absolute;
  right: -80px;
  top: 50%;
  transform: translateY(-50%) rotate(-8deg);
  width: 380px;
  height: 380px;
  background: url("../assets/scratch-2.png") no-repeat center / contain;
  opacity: 0.08;
  pointer-events: none;
  z-index: 0;
}
[data-dark="true"] .home-hero::before { filter: invert(1); }
.home-hero > * { position: relative; z-index: 1; }

/* Blue-pen scratch behind the .col-l hero headline */
.home-hero .col-l { position: relative; }
.home-hero .col-l > * { position: relative; z-index: 1; }

/* Page footer with centered BRA seal */
.page-footer {
  margin-top: auto;
  padding: 28px 40px;
  border-top: 0.5px solid var(--hairline);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: -0.01em;
  background: var(--paper);
}
.page-footer .pf-left { text-align: left; }
/* Metades da assinatura: deixam a quebra cair no "·", nunca num órfão. */
.page-footer .pf-nb { white-space: nowrap; }
.page-footer .pf-right { text-align: right; }
.page-footer .pf-seal {
  display: grid; place-items: center;
}
.page-footer .pf-seal img {
  width: 44px;
  height: 36px;
  object-fit: contain;
  display: block;
  opacity: 0.85;
}
.main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.main > .page { flex: 1; }
.home-hero .col-l { padding-right: 40px; border-right: 0.5px solid var(--hairline); }
.home-hero .col-r { padding-left: 40px; }
.home-hero .eyebrow { margin-bottom: 22px; }
.home-hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: normal;
  font-size: clamp(56px, 7vw, 104px);
  line-height: 0.9;
  letter-spacing: -0.035em;
  margin: 0 0 22px;
  text-wrap: balance;
}
.home-hero h1 em {
  font-style: italic;
  letter-spacing: -0.025em;
}
.home-hero .lede {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 20px;
  line-height: 1.35;
  color: var(--ink-mute);
  margin: 0 0 26px;
  max-width: 32ch;
}
.home-hero .pulse {
  display: flex; flex-direction: column; gap: 14px;
  height: 100%;
}
.pulse-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  padding-bottom: 14px;
  border-bottom: 0.5px solid var(--hairline);
}
.pulse-row:last-child { border-bottom: 0; }
.pulse-row .lab {
  font-family: var(--font-ui);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.pulse-row .val {
  font-family: var(--font-mono);
  font-size: 32px;
  letter-spacing: -0.04em;
  line-height: 1;
  font-weight: 400;
}
.pulse-row .val small {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 400;
  margin-left: 6px;
  letter-spacing: -0.01em;
}
.pulse-row .sub {
  grid-column: 1 / -1;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-mute);
  margin-top: 6px;
}

/* Home modules tiles */
.home-modules {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-bottom: 0.5px solid var(--hairline);
}
.home-mod {
  padding: 26px 28px 28px;
  border-right: 0.5px solid var(--hairline);
  display: flex; flex-direction: column; gap: 8px;
  text-align: left;
  background: transparent;
  border-top: 0; border-bottom: 0; border-left: 0;
  position: relative;
  color: var(--ink);
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}
.home-mod:last-child { border-right: 0; }
.home-mod:hover { background: rgba(20,18,14,.025); }
.home-mod .num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}
.home-mod .name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 30px;
  line-height: 1;
  font-weight: 400;
  margin: 16px 0 8px;
  letter-spacing: -0.01em;
}
.home-mod .desc { font-size: 12.5px; color: var(--ink-mute); max-width: 32ch; line-height: 1.4; }
.home-mod .live {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.home-mod .live b { font-weight: 500; }
.home-mod .live span { color: var(--ink-soft); }
.home-mod .arrow {
  position: absolute; right: 22px; bottom: 24px;
  width: 26px; height: 26px;
  border: 0.5px solid var(--hairline-strong);
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--ink);
  transition: background 0.15s, color 0.15s;
}
.home-mod:hover .arrow { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ── Overview: diagnóstico ─────────────────────────── */
.ov { max-width: 1180px; }
.ov-head { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 0.5px solid var(--hairline); }
.ov-fonte { font-size: 11px; color: var(--ink-soft); }
.ov-fonte b { color: var(--ink); font-weight: 500; }
.ov-manchete { font-family: var(--font-display); font-weight: 400; font-size: clamp(28px, 3vw, 40px); line-height: 1.15; letter-spacing: -0.015em; margin: 28px 0 10px; max-width: 34ch; }
.ov-manchete b { font-weight: 400; font-style: italic; color: var(--signal); }
.ov-resumo { font-family: var(--font-display); font-style: italic; font-size: 16px; color: var(--ink-mute); margin: 0 0 18px; }
.ov-insights { list-style: none; margin: 0; padding: 0; border-top: 0.5px solid var(--hairline-strong); }
.ov-insight { display: grid; grid-template-columns: 130px minmax(0, 1fr) 220px; gap: 28px; padding: 22px 0; border-bottom: 0.5px solid var(--hairline); align-items: start; }
.ov-ins-lado { display: flex; flex-direction: column; gap: 6px; }
.ov-ins-n { font-size: 11px; color: var(--ink-soft); }
.ov-area { font-size: 12px; color: var(--ink-mute); }
.ov-selo { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 6px; }
.ov-selo i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.ov-ins-txt h2 { font-family: var(--font-display); font-weight: 400; font-size: 21px; line-height: 1.3; margin: 0 0 8px; letter-spacing: -0.005em; }
.ov-ins-txt h2 b { font-weight: 600; }
.ov-ins-txt p { font-size: 13.5px; line-height: 1.6; color: var(--ink-mute); margin: 0; max-width: 78ch; }
.ov-ins-txt p b { color: var(--ink); font-weight: 600; }
.ov-fig { margin: 4px 0 0; }
.ov-fig figcaption { font-family: var(--font-mono); font-size: 10px; color: var(--ink-soft); margin-top: 6px; }
.ov-barras { display: flex; flex-direction: column; gap: 6px; }
.ov-barra-lin { display: grid; grid-template-columns: 82px 1fr 34px; gap: 8px; align-items: center; font-size: 11px; }
.ov-barra-k { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-mute); }
.ov-barra-t { height: 6px; background: var(--hairline); border-radius: 3px; overflow: hidden; }
.ov-barra-t i { display: block; height: 100%; border-radius: 3px; }
.ov-barra-v { text-align: right; font-size: 11px; }
.ov-nota { font-size: 10.5px; color: var(--ink-soft); line-height: 1.6; margin-top: 18px; max-width: 110ch; }
.ov-vazio { color: var(--ink-soft); font-family: var(--font-display); font-style: italic; font-size: 16px; padding: 24px 0; }
@media (max-width: 1000px) {
  .ov-insight { grid-template-columns: 110px minmax(0, 1fr); }
  .ov-ins-fig { grid-column: 2; }
}
@media (max-width: 720px) {
  .ov-insight { grid-template-columns: 1fr; gap: 10px; }
  .ov-ins-lado { flex-direction: row; gap: 12px; align-items: baseline; }
  .ov-ins-fig { grid-column: 1; }
}

/* ── Landing: scratch da capa ──────────────────────────────
   O rabisco azul-elétrico da capa do deck oficial, atrás do conteúdo da
   landing. O PNG preto entra como máscara e a cor vem do background-color —
   por isso o azul continua azul no dark mode, sem o filter: invert(1) de que
   os outros scratches precisam. Ancora no root da view, que é position:fixed. */
.landing-scratch {
  position: absolute; z-index: 0;
  pointer-events: none;
  /* Ancorado pela DIREITA, colado na borda da tela. O bloco de cards cresce a
     partir da esquerda, então a faixa livre onde o traço realmente aparece é
     sempre a da direita. right:0 resolve contra a padding-box do root da view
     (position:fixed, inset:0) — ou seja, a própria borda do viewport. */
  right: 0; top: 50%;
  transform: translateY(-50%) rotate(-4deg);
  /* O 76vh é o que segura o traço dentro da faixa entre o header e o rodapé:
     sem ele, num viewport baixo (720px) o desenho cruza as duas réguas. */
  width: min(760px, 54vw, 76vh);
  aspect-ratio: 1 / 1;
  background-color: #0000FF;
  /* Qual scratch entra é sorteado a cada abertura da landing (views/landing.jsx
     grava --landing-scratch no style do elemento). O fallback aqui é só rede de
     segurança: se a variável faltar, a capa continua com um traço em vez de
     ficar vazia. O scratch-7 saiu da identidade — não voltar a citá-lo. */
  --landing-scratch: url("../assets/scratches/scratch-1.png");
  -webkit-mask: var(--landing-scratch) no-repeat center / contain;
          mask: var(--landing-scratch) no-repeat center / contain;
  /* Traço fino pede cor cheia: rebaixar a opacidade só o deixa lavado. */
  opacity: 0.92;
}
[data-dark="true"] .landing-scratch { opacity: 1; }

/* ── Landing: cards de entrada ─────────────────────────────
   Fundo SEMPRE opaco: o scratch passa por trás do bloco, e qualquer cor com
   alpha no hover deixa o traço azul atravessar o card (era o que acontecia no
   Financeiro). O destaque do hover é uma régua elétrica correndo no topo do
   card + a seta preenchida — nunca opacidade. */
.landing-cards {
  --landing-blue: #0000FF;
  display: grid;
  background: var(--paper);
  border: 0.5px solid var(--hairline-strong);
  border-radius: 6px;
  overflow: hidden;
}
[data-dark="true"] .landing-cards { --landing-blue: #5b5bff; }
/* Cinco módulos (com Talent Review) não cabem na régua de quatro: card mais
   estreito, título menor, sem quebrar "Dashboards" no meio. */
.landing-cards[data-n="5"] .landing-card { padding: 32px 28px; }
.landing-cards[data-n="5"] .landing-card-title { font-size: clamp(30px, 3vw, 44px); }

.landing-card {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  border: 0;
  padding: 36px 40px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  display: flex; flex-direction: column; gap: 10px;
  transition: background 0.18s ease;
}
.landing-card + .landing-card { border-left: 0.5px solid var(--hairline-strong); }
.landing-card:hover { background: var(--paper-2); }

/* A régua elétrica: mesma cor do scratch da capa, entra correndo da esquerda. */
.landing-card::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: var(--landing-blue);
  transform: scaleX(0); transform-origin: left center;
  transition: transform 0.28s cubic-bezier(.22, .61, .36, 1);
}
.landing-card:hover::before,
.landing-card:focus-visible::before { transform: scaleX(1); }

/* Card escuro (Dashboards): superfície invertida, então os tokens de tinta
   também invertem — senão o texto some quando o tema muda. */
.landing-card.is-ink {
  --landing-blue: #5b5bff;
  --ink-mute: rgba(238, 237, 226, 0.62);
  --ink-soft: rgba(238, 237, 226, 0.42);
  --hairline-strong: rgba(238, 237, 226, 0.22);
  background: var(--ink); color: var(--paper);
}
.landing-card.is-ink:hover { background: #17171b; }
[data-dark="true"] .landing-card.is-ink {
  --landing-blue: #0000FF;
  --ink-mute: rgba(22, 22, 26, 0.70);
  --ink-soft: rgba(22, 22, 26, 0.48);
  --hairline-strong: rgba(22, 22, 26, 0.24);
}
[data-dark="true"] .landing-card.is-ink:hover { background: #ffffff; }

.landing-card-num {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.04em; color: var(--ink-soft);
}
.landing-card-title {
  font-family: var(--font-display); font-style: italic; font-weight: 400;
  font-size: clamp(38px, 4.2vw, 56px);
  letter-spacing: -0.02em; line-height: 1;
}
.landing-card-desc {
  font-size: 13px; line-height: 1.5; max-width: 34ch; color: var(--ink-mute);
}
.landing-card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.landing-card-tags span {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.04em;
  padding: 2px 9px; border-radius: 999px;
  border: 0.5px solid var(--hairline-strong);
  color: var(--ink-mute);
}
.landing-card-arrow {
  position: absolute; right: 24px; bottom: 24px;
  width: 28px; height: 28px;
  border: 0.5px solid var(--hairline-strong); border-radius: 50%;
  display: grid; place-items: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.landing-card:hover .landing-card-arrow {
  background: var(--landing-blue);
  border-color: var(--landing-blue);
  color: #eeede2;
}

/* ── TV Dashboard ─────────────────────────────────────── */
.tv {
  background: #000;
  color: #eeede2;
  min-height: 100vh;
  width: 100%;
  padding: 0;
  font-family: var(--font-ui);
  display: flex; flex-direction: column;
  overflow: hidden;
  position: relative;
}
/* Full-bleed TV watermark — barely-there, sets the "expressive" tone */
.tv::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    url("../assets/scratch-8.png") no-repeat 105% 60% / 50% auto,
    url("../assets/scratch-3.png") no-repeat -5% 15% / 28% auto;
  opacity: 0.045;
  filter: invert(1);
  pointer-events: none;
  z-index: 0;
}
.tv > * { position: relative; z-index: 1; }
.tv-head {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  gap: 28px;
  align-items: center;
  padding: 22px 40px;
  border-bottom: 0.5px solid rgba(238,237,226,.18);
}
.tv-head-seal {
  display: grid; place-items: center;
}
.tv-head-seal img {
  width: 56px; height: 44px;
  object-fit: contain;
  display: block;
}
.tv-mark {
  display: flex; align-items: center; gap: 16px;
}
.tv-logo {
  height: 56px;
  width: auto;
  display: block;
}
.tv-mark .tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 13px;
  color: rgba(238,237,226,.62);
  letter-spacing: 0;
  max-width: 22ch;
  line-height: 1.25;
  padding-left: 16px;
  border-left: 0.5px solid rgba(238,237,226,.22);
}
.tv-eyebrow {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(238,237,226,.55);
  display: flex; align-items: center; gap: 12px;
}
.tv-eyebrow .live {
  display: inline-flex; align-items: center; gap: 8px;
  color: #eeede2;
}
.tv-eyebrow .live .pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 0 rgba(197,51,26,.6);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(197,51,26,.6); }
  70% { box-shadow: 0 0 0 12px rgba(197,51,26,0); }
  100% { box-shadow: 0 0 0 0 rgba(197,51,26,0); }
}
.tv-clock {
  font-family: var(--font-mono);
  font-size: 36px;
  letter-spacing: -0.04em;
  font-weight: 400;
  line-height: 1;
}
.tv-date {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: rgba(238,237,226,.55);
  text-transform: uppercase;
  line-height: 1.6;
}

.tv-body { flex: 1; display: grid; grid-template-rows: auto 1fr; }

/* MONOLITH energy: huge hero KPI + supporting */
.tv-monolith {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  flex: 1;
  border-bottom: 0.5px solid rgba(238,237,226,.18);
}
.tv-hero {
  padding: 56px 60px;
  border-right: 0.5px solid rgba(238,237,226,.18);
  display: flex; flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.tv-hero::after {
  content: "";
  position: absolute;
  right: -60px;
  top: 40px;
  width: 320px;
  height: 320px;
  background: url("../assets/scratch-7.png") no-repeat center / contain;
  opacity: 0.10;
  filter: invert(1);
  pointer-events: none;
  transform: rotate(12deg);
}
.tv-hero > * { position: relative; z-index: 1; }
.tv-hero .label {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 36px;
  line-height: 1.05;
  font-weight: 400;
  max-width: 14ch;
  letter-spacing: -0.01em;
}
.tv-hero .label em { font-style: italic; color: rgba(238,237,226,.55); }
.tv-hero .massive {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-family: var(--font-mono);
  font-size: clamp(180px, 22vw, 360px);
  font-weight: 400;
  letter-spacing: -0.06em;
  line-height: 0.85;
  margin: 32px 0 0;
}
.tv-hero .massive .of {
  font-family: var(--font-mono);
  font-size: clamp(22px, 2.4vw, 38px);
  color: rgba(238,237,226,.55);
  letter-spacing: -0.02em;
  line-height: 1;
  vertical-align: baseline;
  margin: 0;
}
.tv-hero .massive .unit {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(24px, 2.6vw, 42px);
  font-weight: 400;
  color: rgba(238,237,226,.62);
  letter-spacing: -0.01em;
  line-height: 1;
  vertical-align: baseline;
  margin: 0;
}
.tv-hero .foot {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 0.5px solid rgba(238,237,226,.18);
  margin-top: 32px;
  padding-top: 24px;
}
.tv-hero .foot > div { padding-right: 24px; border-right: 0.5px solid rgba(238,237,226,.12); }
.tv-hero .foot > div:last-child { border-right: 0; }
.tv-hero .foot .lab {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(238,237,226,.5);
  margin-bottom: 8px;
}
.tv-hero .foot .v {
  font-family: var(--font-mono);
  font-size: 38px;
  letter-spacing: -0.04em;
  line-height: 1;
}
.tv-hero .foot .s {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 13px;
  color: rgba(238,237,226,.55);
  margin-top: 4px;
}

.tv-side {
  display: flex; flex-direction: column;
}
.tv-side h3 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 22px;
  margin: 0;
  letter-spacing: -0.01em;
}
.tv-side-block { padding: 32px 40px; border-bottom: 0.5px solid rgba(238,237,226,.18); position: relative; overflow: hidden; }
.tv-side-block:last-child { border-bottom: 0; flex: 1; }
.tv-side-block > * { position: relative; z-index: 1; }
.tv-side-block.pauta-livre::before {
  content: "";
  position: absolute;
  right: -40px; top: 40px;
  width: 280px; height: 280px;
  background: url("../assets/scratch-4.png") no-repeat center / contain;
  opacity: 0.08;
  filter: invert(1);
  pointer-events: none;
  transform: rotate(-12deg);
}
.tv-side-block .head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 18px;
}
.tv-side-block .head .count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(238,237,226,.5);
  letter-spacing: 0.04em;
}
.tv-leaders {
  display: flex; flex-direction: column;
  gap: 0;
}
.tv-leaders li {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  padding: 12px 0;
  border-top: 0.5px solid rgba(238,237,226,.10);
  list-style: none;
}
.tv-leaders li:first-child { border-top: 0; }
.tv-leaders .rk {
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(238,237,226,.4);
  letter-spacing: -0.02em;
}
.tv-leaders .nm {
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 450;
}
.tv-leaders .nm span {
  font-family: var(--font-display);
  font-style: italic;
  display: block;
  font-size: 12px;
  color: rgba(238,237,226,.5);
  font-weight: 400;
  margin-top: 1px;
}
.tv-leaders .vl {
  font-family: var(--font-mono);
  font-size: 22px;
  letter-spacing: -0.04em;
}
.tv-leaders .vl small {
  font-size: 11px;
  color: rgba(238,237,226,.45);
}

.tv-ticker {
  height: 56px;
  display: flex; align-items: center;
  overflow: hidden;
  border-top: 0.5px solid rgba(238,237,226,.18);
  position: relative;
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: -0.01em;
  background: #000;
}
.tv-ticker .label {
  flex-shrink: 0;
  padding: 0 24px;
  background: var(--signal);
  color: #eeede2;
  height: 100%;
  display: flex; align-items: center;
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  z-index: 2;
}
.tv-ticker .stream {
  display: flex;
  gap: 56px;
  padding: 0 32px;
  white-space: nowrap;
  animation: scroll 60s linear infinite;
  color: rgba(238,237,226,.85);
}
.tv-ticker .stream span b {
  color: #eeede2;
  font-weight: 500;
  margin-right: 8px;
}
.tv-ticker .stream span i {
  font-style: normal;
  color: var(--signal);
  margin: 0 6px;
}
@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* SCOREBOARD energy: dense grid of big numbers */
.tv-scoreboard {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  flex: 1;
  border-bottom: 0.5px solid rgba(238,237,226,.18);
}
.tv-tile {
  padding: 36px 36px;
  border-right: 0.5px solid rgba(238,237,226,.18);
  border-top: 0.5px solid rgba(238,237,226,.18);
  display: flex; flex-direction: column;
  justify-content: space-between;
  position: relative;
  min-width: 0;
}
.tv-tile:nth-child(4n) { border-right: 0; }
.tv-tile.span-2 { grid-column: span 2; }
.tv-tile.span-2-row { grid-row: span 2; }
.tv-tile .lab {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(238,237,226,.55);
}
.tv-tile .v {
  font-family: var(--font-mono);
  font-size: clamp(60px, 8vw, 124px);
  letter-spacing: -0.05em;
  line-height: 0.88;
  font-weight: 400;
}
.tv-tile .v .unit {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.28em;
  color: rgba(238,237,226,.5);
  margin-left: 8px;
  vertical-align: 0.5em;
  letter-spacing: -0.01em;
}
.tv-tile .sub {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 19px;
  color: rgba(238,237,226,.78);
  max-width: 28ch;
  line-height: 1.3;
}
.tv-tile .bar {
  height: 4px; background: rgba(238,237,226,.10); margin-top: 12px; border-radius: 2px; overflow: hidden;
}
.tv-tile .bar i { display: block; height: 100%; background: #eeede2; }
.tv-tile .bar-big {
  position: relative;
  height: 28px;
  background: rgba(238,237,226,.08);
  border: 0.5px solid rgba(238,237,226,.22);
  border-radius: 4px;
  margin-top: 18px;
  overflow: visible;
  display: flex; align-items: center;
}
.tv-tile .bar-big > i {
  display: block;
  height: 100%;
  background: #eeede2;
  border-radius: 3px;
  transition: width 0.5s cubic-bezier(.3,.7,.4,1);
}
.tv-tile .bar-big .bar-pct {
  position: absolute;
  left: 89%;
  transform: translateX(12px);
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #eeede2;
  font-variant-numeric: tabular-nums;
}
.tv-tile .bar-big .bar-pct small {
  font-size: 16px;
  color: rgba(238,237,226,.55);
  margin-left: 1px;
  letter-spacing: -0.02em;
}
.tv-tile.signal .v { color: var(--signal); }
.tv-tile.signal .bar i { background: var(--signal); }
.tv-tile.signal {
  position: relative;
  overflow: hidden;
}
.tv-tile.signal::before {
  content: "";
  position: absolute;
  right: -30px; bottom: -30px;
  width: 200px; height: 200px;
  background: url("../assets/scratch-1.png") no-repeat center / contain;
  opacity: 0.10;
  filter: invert(1);
  pointer-events: none;
  transform: rotate(15deg);
}
.tv-tile.span-2 {
  position: relative;
  overflow: hidden;
}
.tv-tile.span-2::after {
  content: "";
  position: absolute;
  right: 6%; top: 8%;
  width: 240px; height: 240px;
  background: url("../assets/scratch-10.png") no-repeat center / contain;
  opacity: 0.08;
  filter: invert(1);
  pointer-events: none;
  transform: rotate(-6deg);
}

/* NEWSROOM energy: chart-driven */
.tv-newsroom {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  flex: 1;
  border-bottom: 0.5px solid rgba(238,237,226,.18);
}
.tv-chart-pane {
  padding: 40px 48px;
  border-right: 0.5px solid rgba(238,237,226,.18);
  display: flex; flex-direction: column;
  min-width: 0;
  position: relative;
  overflow: hidden;
}
.tv-chart-pane::before {
  content: "";
  position: absolute;
  left: -20px; bottom: 60px;
  width: 200px; height: 200px;
  background: url("../assets/scratch-6.png") no-repeat center / contain;
  opacity: 0.07;
  filter: invert(1);
  pointer-events: none;
  transform: rotate(20deg);
  z-index: 0;
}
.tv-chart-pane > * { position: relative; z-index: 1; }
.tv-chart-pane .head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 18px; }
.tv-chart-pane .head .ttl {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 26px;
  line-height: 1;
}
.tv-chart-pane .head .delta {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--good);
  letter-spacing: -0.02em;
}
.tv-chart-pane svg { width: 100%; flex: 1; }

.tv-newsroom .tv-side-block .vl { font-size: 26px; }
.tv-newsroom .tv-side-block .nm { font-size: 14px; }

/* Department bars — TV view, readable at distance. Each row shows the dept's progress
   against its own expected hours (own 100% — not share of agency total). */
.dept-bars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex; flex-direction: column;
}
.dept-bars li {
  padding: 14px 0;
  border-top: 0.5px solid rgba(238,237,226,.10);
}
.dept-bars li:first-child { border-top: 0; padding-top: 0; }
.dept-bars .row1 {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 10px;
  gap: 12px;
}
.dept-bars .nm {
  font-family: var(--font-ui);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: #eeede2;
}
.dept-bars .meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: -0.01em;
  color: rgba(238,237,226,.5);
}
.dept-bars .bar-row {
  display: flex; align-items: center; gap: 14px;
}
.dept-bars .bar {
  position: relative;
  flex: 1;
  height: 14px;
  background: rgba(238,237,226,.10);
  border: 0.5px solid rgba(238,237,226,.16);
  border-radius: 3px;
  overflow: hidden;
}
.dept-bars .bar i {
  display: block;
  height: 100%;
  background: #eeede2;
  border-radius: 2px;
  transition: width 0.4s cubic-bezier(.3,.7,.4,1);
}
.dept-bars .vl {
  font-family: var(--font-mono);
  font-size: 24px;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #eeede2;
  min-width: 62px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.dept-bars .vl small {
  font-size: 13px;
  color: rgba(238,237,226,.5);
  letter-spacing: -0.02em;
  margin-left: 2px;
}

/* SVG helpers */
.iconbtn {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 0.5px solid var(--hairline-strong);
  border-radius: 7px;
  background: var(--paper-2);
  color: var(--ink-mute);
}
.iconbtn:hover { color: var(--ink); border-color: var(--ink); background: var(--paper); }

/* Sparkline */
.sparkline { display: block; }

/* utility: rule */
.rule { height: 0.5px; background: var(--hairline); margin: 24px 0; }

/* legend dots */
.dot-good { display: inline-block; width: 8px; height: 8px; background: var(--good); border-radius: 50%; }
.dot-warn { display: inline-block; width: 8px; height: 8px; background: var(--warn); border-radius: 50%; }
.dot-signal { display: inline-block; width: 8px; height: 8px; background: var(--signal); border-radius: 50%; }
.dot-ink { display: inline-block; width: 8px; height: 8px; background: var(--ink); border-radius: 50%; }

.legend {
  display: inline-flex; align-items: center; gap: 16px;
  font-size: 11px;
  color: var(--ink-mute);
}
.legend > span { display: inline-flex; align-items: center; gap: 6px; }

/* ── Login (porta de entrada — vídeo de fundo + card estilo referência) ── */
.login-screen {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #14110d;                 /* fallback quando não há vídeo */
  color: #efeadf;
  font-family: var(--font-ui);
}
.login-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.login-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(130% 100% at 50% 42%, rgba(0,0,0,.22), rgba(0,0,0,.62));
}
.login-stage {
  position: relative;
  z-index: 3;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px;
}
.login-logo {
  height: 90px;
  width: auto;
  max-width: 78vw;
  opacity: 0.97;
  margin-bottom: 34px;   /* sobe o logo e o afasta da caixa de login */
}
.login-card {
  width: 420px;
  max-width: 92vw;
  background: rgba(18,16,12,.9);
  border: 0.5px solid rgba(255,255,255,.1);
  border-radius: 18px;
  padding: 26px 28px 20px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
}
.login-title {
  font-family: var(--font-brand-serif);  /* Instrument Serif — fonte oficial da marca */
  font-size: 30px;
  font-weight: 400;
  letter-spacing: 0;
  color: #c6a15e;                         /* dourado da referência */
  margin: 0 0 18px;
}
.login-input {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fbfaf7;
  border-radius: 999px;
  padding: 0 16px;
  height: 46px;
  margin-bottom: 12px;
}
.login-input .ic { color: #8a8378; display: flex; flex-shrink: 0; }
.login-input input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--font-ui);
  font-size: 14px;
  color: #1a1712;
  letter-spacing: 0.01em;
}
.login-input input::placeholder { color: #9a938700; color: #a49c8e; }
.login-input .eye {
  border: 0;
  background: transparent;
  color: #8a8378;
  display: flex;
  cursor: pointer;
  padding: 4px;
}
.login-input .eye:hover { color: #5c564c; }
.login-error {
  font-size: 12px;
  color: #e2896b;
  margin: 2px 2px 12px;
}
.login-actions { display: flex; gap: 10px; margin-top: 4px; }
.login-btn {
  flex: 1;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: #c6a15e;
  color: #1a1410;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  cursor: pointer;
  transition: filter 0.15s;
}
.login-btn:hover:not(:disabled) { filter: brightness(1.07); }
.login-btn:disabled { opacity: 0.55; cursor: default; }
.login-btn--ghost {
  background: transparent;
  color: #c6a15e;
  border: 0.5px solid rgba(198,161,94,.7);
}
.login-divider { height: 0.5px; background: rgba(255,255,255,.14); margin: 18px 0 12px; }
.login-forgot {
  border: 0;
  background: transparent;
  color: #b8b1a4;
  font-family: var(--font-ui);
  font-size: 12.5px;
  cursor: pointer;
  padding: 2px 0;
}
.login-forgot:hover { color: #efeadf; }
.login-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;             /* distância ©Brasil → © 2026 TBWA\Lola */
  margin-top: 28px;      /* distância caixa de login → ©Brasil */
}
.login-brasil { height: 26px; width: auto; opacity: 0.8; }
.login-copy {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: rgba(239,234,223,.55);
}

/* ── Splash pós-login — scratch aleatório da marca a cada login ─────────── */
.login-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: #eeede2;                 /* off-white da marca */
  cursor: pointer;
  animation: splash-in 0.35s ease both;
}
.login-splash.is-leaving { animation: splash-out 0.5s ease forwards; }
.login-splash__scratch {
  width: min(46vw, 440px);
  height: min(52vh, 440px);
  overflow: visible;
}
/* Cada traço se anima sozinho; delay e duração vêm inline, de views/login.jsx.
   Linear de propósito: com easing por traço, a mão daria um solavanco a cada um.
   A espessura é non-scaling-stroke, então é a mesma caneta em qualquer escala. */
.login-splash__scratch path {
  animation-name: scratch-draw;
  animation-timing-function: linear;
  animation-fill-mode: both;
}
.login-splash__hi {
  font-family: var(--font-brand-serif);
  font-style: italic;
  font-size: clamp(22px, 3vw, 34px);
  color: #000;                        /* preto sempre — só o desenho é colorido */
  min-height: 1.3em;                  /* evita pulo de layout ao trocar idioma */
  animation: hi-word 0.42s ease both; /* re-dispara a cada key (troca de idioma) */
}
@keyframes splash-in  { from { opacity: 0; } to { opacity: 1; } }
@keyframes splash-out { from { opacity: 1; } to { opacity: 0; } }
/* A caneta riscando: o dash cobre o caminho inteiro (pathLength=1) e o offset
   recua de 1 a 0, revelando o traço na ordem em que foi desenhado. */
@keyframes scratch-draw {
  from { stroke-dasharray: 1; stroke-dashoffset: 1; }
  to   { stroke-dasharray: 1; stroke-dashoffset: 0; }
}
@keyframes hi-word {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .login-splash, .login-splash__scratch, .login-splash__hi,
  .login-splash.is-leaving { animation: none; opacity: 1; }
  /* sem animação o traço tem que aparecer inteiro, não zerado pelo dash */
  .login-splash__scratch path {
    animation: none;
    stroke-dasharray: none;
    stroke-dashoffset: 0;
  }
}

/* ── Frescor dos dados + notificações (topbar) ──────────────────
   O indicador de "atualizado há X" fica na barra superior de todas as telas
   de Relatoria: é a resposta para "esse número é de quando?", que antes só
   existia no console. O sino ao lado usa a mesma mecânica de popover. */
.freshness {
  display: inline-flex; align-items: center; gap: 7px;
  height: 30px; padding: 0 10px;
  border: 0.5px solid var(--hairline-strong);
  border-radius: 7px;
  background: var(--paper-2);
  color: var(--ink-mute);
  font-size: 11.5px;
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
}
.freshness:hover { border-color: var(--ink); color: var(--ink); }
.freshness .fdot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--good);
  flex: none;
}
.freshness[data-state="warn"]  .fdot { background: var(--warn); }
.freshness[data-state="error"] .fdot { background: var(--signal); }
.freshness[data-state="live"]  .fdot { animation: fpulse 1.6s ease-in-out infinite; }
@keyframes fpulse { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }

.pop-wrap { position: relative; display: inline-flex; }
.pop {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 330px; max-height: 70vh; overflow: auto;
  background: var(--paper);
  border: 0.5px solid var(--hairline-strong);
  border-radius: 9px;
  box-shadow: 0 12px 34px rgba(0,0,0,0.14);
  padding: 14px;
  z-index: 60;
  text-align: left;
}
.pop h4 {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--ink-soft); font-weight: 500; margin: 0 0 10px;
}
.pop-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 6px 0;
  border-bottom: 0.5px solid var(--hairline);
  font-size: 12px;
}
.pop-row:last-of-type { border-bottom: 0; }
.pop-row .k { color: var(--ink-mute); }
.pop-row .v { font-family: var(--font-mono); font-size: 11px; color: var(--ink); }
.pop-row .v[data-old="true"] { color: var(--warn); }
.pop-foot {
  margin-top: 12px; padding-top: 12px;
  border-top: 0.5px solid var(--hairline);
  display: flex; align-items: center; gap: 8px;
}
.pop-note { font-size: 11px; color: var(--ink-soft); line-height: 1.5; }

.notif-badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 15px; height: 15px; padding: 0 4px;
  border-radius: 8px;
  background: var(--signal); color: #fff;
  font-size: 9.5px; font-weight: 600;
  display: grid; place-items: center;
}
.notif {
  display: flex; gap: 9px; padding: 10px 0;
  border-bottom: 0.5px solid var(--hairline);
}
.notif:last-child { border-bottom: 0; }
.notif .ndot { width: 6px; height: 6px; border-radius: 50%; margin-top: 5px; flex: none; background: var(--ink-soft); }
.notif[data-sev="warn"]  .ndot { background: var(--warn); }
.notif[data-sev="error"] .ndot { background: var(--signal); }
.notif .ntitle { font-size: 12.5px; font-weight: 500; color: var(--ink); }
.notif .ndetail { font-size: 11.5px; color: var(--ink-mute); line-height: 1.45; margin-top: 2px; }
.notif .nwhen { font-size: 10.5px; color: var(--ink-soft); font-family: var(--font-mono); margin-top: 3px; }
.notif-empty { font-size: 12px; color: var(--ink-soft); padding: 6px 0 2px; }

/* Marca d'água de frescor nas telas de TV — a parede não tem barra superior,
   e sem isso ninguém sabe se o painel congelou. */
.tv-fresh {
  position: fixed; right: 20px; bottom: 16px;
  display: flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--ink-soft); opacity: 0.55;
  z-index: 40; pointer-events: none;
}
.tv-fresh .fdot { width: 6px; height: 6px; border-radius: 50%; background: var(--good); }
.tv-fresh[data-state="warn"]  .fdot { background: var(--warn); }
.tv-fresh[data-state="error"] .fdot { background: var(--signal); }

/* ── Paleta de comandos, menus de linha e avisos ────────────────────────────
   Tudo que a camada lib/nav.jsx desenha. A .searchbar da topbar virou <button>
   (era um <div> decorativo) e por isso precisa resetar o estilo de botão. */
.topbar .searchbar {
  font-family: var(--font-ui);
  text-align: left;
  cursor: pointer;
}
.topbar .searchbar:hover { border-color: var(--ink); color: var(--ink); }

.cmdk-backdrop {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,0.34);
  backdrop-filter: blur(2px);
  /* align-items no padrão (stretch) esticava a caixa até o fim da tela — com
     um resultado só, sobrava meia página em branco. */
  display: flex; justify-content: center; align-items: flex-start;
  padding: 12vh 20px 20px;
}
.cmdk {
  width: 620px; max-width: 100%;
  max-height: 68vh;
  display: flex; flex-direction: column;
  background: var(--paper);
  border: 0.5px solid var(--hairline-strong);
  border-radius: 12px;
  box-shadow: 0 26px 70px rgba(0,0,0,0.30);
  overflow: hidden;
}
.cmdk-field {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  border-bottom: 0.5px solid var(--hairline);
  color: var(--ink-soft);
  flex: none;
}
.cmdk-field input {
  flex: 1;
  border: 0; background: transparent; outline: none;
  font-family: var(--font-ui); font-size: 15px; color: var(--ink);
}
.cmdk-list { overflow-y: auto; padding: 6px; }
.cmdk-item {
  width: 100%;
  display: flex; align-items: baseline; gap: 10px;
  padding: 9px 10px;
  border: 0; border-radius: 7px;
  background: transparent;
  font-family: var(--font-ui);
  text-align: left; cursor: pointer;
}
.cmdk-item[data-sel="true"] { background: var(--paper-2); }
.cmdk-item .ck-kind {
  flex: none; min-width: 58px;
  font-family: var(--font-mono); font-size: 9.5px;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-soft);
}
.cmdk-item .ck-label { font-size: 13.5px; color: var(--ink); }
.cmdk-item .ck-hint {
  font-size: 11.5px; color: var(--ink-soft);
  margin-left: auto; padding-left: 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 44%;
}
.cmdk-empty { padding: 22px 12px; font-size: 12.5px; color: var(--ink-soft); text-align: center; }
.cmdk-foot {
  display: flex; align-items: center; gap: 14px;
  padding: 9px 14px;
  border-top: 0.5px solid var(--hairline);
  font-size: 11px; color: var(--ink-soft);
  flex: none;
}
.cmdk-foot .grow { flex: 1; }
.cmdk-foot .kbd { padding: 1px 5px; }

/* Menu "..." das tabelas — substitui o ícone decorativo que existia no fim
   de cada linha. */
.rowmenu-wrap { display: inline-flex; }
.rowmenu-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px;
  border: 0; border-radius: 6px;
  background: transparent; color: var(--ink-soft);
  cursor: pointer;
}
.rowmenu-btn:hover { background: var(--paper-2); color: var(--ink); }
.pop.rowmenu { width: 250px; padding: 6px; }
.pop.rowmenu button {
  width: 100%;
  display: flex; align-items: center; gap: 9px;
  padding: 8px 9px;
  border: 0; border-radius: 6px;
  background: transparent;
  font-family: var(--font-ui); font-size: 12.5px; color: var(--ink);
  text-align: left; cursor: pointer;
}
.pop.rowmenu button:hover { background: var(--paper-2); }
.pop.rowmenu button svg { color: var(--ink-soft); flex: none; }

/* Ação de uma notificação — o servidor já mandava o destino; agora ele é
   clicável. */
.notif .naction {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 6px; padding: 0;
  border: 0; background: transparent;
  font-family: var(--font-ui); font-size: 11.5px; font-weight: 500;
  color: var(--ink); cursor: pointer;
}
.notif .naction:hover { text-decoration: underline; }

.insight-card .ic-action { cursor: pointer; }

/* Aviso curto para ações que não mudam de tela (copiar para a área de
   transferência). */
.lola-toast {
  position: fixed; left: 50%; bottom: 28px;
  transform: translateX(-50%) translateY(10px);
  z-index: 400;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font-family: var(--font-ui); font-size: 12.5px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.22);
  opacity: 0; pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.lola-toast[data-on="true"] { opacity: 1; transform: translateX(-50%) translateY(0); }

/* "Esqueceu a senha?" — o painel que o botão abre no login. */
.login-forgot-panel {
  width: 420px; max-width: 92vw;
  margin-top: 12px;
  padding: 18px 20px;
  border-radius: 14px;
  background: rgba(18,16,12,.9);
  border: 0.5px solid rgba(255,255,255,.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.login-forgot-panel .lf-note,
.login-forgot-panel .lf-done {
  margin: 0 0 14px;
  font-family: var(--font-ui); font-size: 12.5px; line-height: 1.55;
  color: #b8b1a4;
}
.login-forgot-panel .lf-done { margin: 0; color: #efeadf; }

/* ══ MÓDULO FINANCEIRO ═════════════════════════════════════════════════════
   O módulo usa a MESMA casca da Relatoria — .app + Sidebar + .main + .topbar
   + .page. Nada de shell próprio: logo, menu lateral, recolhimento, tema e
   rodapé vêm todos de lá. O que segue é só o que as telas de digitação pedem
   e o produto ainda não tinha: grade de P&L editável, ficha cadastral e a
   lista de pendências. */

/* Contraste mais alto, como no módulo Board: aqui também se lê número
   financeiro por tempo prolongado. */
[data-view="financeiro"] .main {
  --ink-mute: rgba(0, 0, 0, 0.86);
  --ink-soft: rgba(0, 0, 0, 0.62);
}
[data-dark="true"] [data-view="financeiro"] .main {
  --ink-mute: rgba(238, 237, 226, 0.90);
  --ink-soft: rgba(238, 237, 226, 0.68);
}

.fin-contagem {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-soft);
}
.fin-fraco { color: var(--ink-soft); }
/* Marca de linha com hora apontada e custo nenhum — o caso que distorce margem
   em silêncio. --signal é o único acento do sistema; usado só aqui. */
.fin-ponto { width: 5px; height: 5px; border-radius: 50%; background: var(--signal); flex-shrink: 0; }

/* ── Ficha cadastral ────────────────────────────────── */
.fin-ficha {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 18px 28px; margin: 0 0 6px; padding: 18px 0;
  border-top: 0.5px solid var(--hairline); border-bottom: 0.5px solid var(--hairline);
}
.fin-ficha dt {
  font-family: var(--font-ui); font-size: 10.5px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft);
}
.fin-ficha dd { margin: 5px 0 0; font-size: 14px; }
.fin-ficha dd.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

/* Observação curta. Não é a .note do sistema, que é citação em serifada
   itálica e tem outro peso editorial. */
.fin-obs { font-size: 11.5px; color: var(--ink-soft); line-height: 1.6; margin: 12px 0 0; max-width: 88ch; }
.fin-aviso {
  font-size: 12.5px; line-height: 1.55; margin: 16px 0; max-width: 88ch;
  padding: 12px 16px; border-left: 2px solid var(--signal);
  background: var(--signal-soft); color: var(--ink);
}
.fin-aviso-ok { border-left-color: var(--good); background: var(--good-soft); }
.fin-aviso-acoes { display: flex; gap: 8px; margin-top: 12px; }

/* ── Formulário ─────────────────────────────────────── */
.fin-form {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px 24px; margin: 16px 0 0; align-items: end; max-width: 1000px;
}
.fin-form label { display: flex; flex-direction: column; gap: 6px; }
.fin-form label > span {
  font-family: var(--font-ui); font-size: 10.5px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft);
}
.fin-form-larga { grid-column: 1 / -1; }
.fin-check { flex-direction: row !important; align-items: center; gap: 9px !important; }
.fin-check span { text-transform: none !important; letter-spacing: 0 !important; font-size: 13px !important; color: var(--ink) !important; }
/* Seleção de clientes da Rentabilidade (aba Geral). Lista longa (30+ nomes),
   então grade densa de colunas fluidas em vez de uma coluna só — e altura
   máxima com rolagem própria pra não empurrar o botão de salvar pra fora da
   tela. */
.fin-sel-cab {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-top: 14px;
}
.fin-sel-grade {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2px 18px; margin-top: 12px;
  max-height: 340px; overflow-y: auto;
  border: 0.5px solid var(--hairline-strong); border-radius: 8px;
  padding: 12px 14px;
}
.fin-sel-item {
  display: flex; align-items: baseline; gap: 9px;
  padding: 5px 2px; min-width: 0; cursor: pointer;
}
.fin-sel-item input { flex-shrink: 0; align-self: center; }
.fin-sel-item .nome {
  font-size: 13px; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fin-sel-item .meta {
  font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-soft);
  margin-left: auto; flex-shrink: 0; white-space: nowrap;
}
/* Cliente desmarcado fica apagado: dá pra varrer a lista e ver o que está
   fora sem ler cada caixinha. */
.fin-sel-item:has(input:not(:checked)) .nome { color: var(--ink-soft); text-decoration: line-through; }

.fin-derivado {
  font-family: var(--font-mono); font-size: 13px; font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em; padding: 9px 0; color: var(--ink-mute);
}

/* ── Grade de P&L ───────────────────────────────────── */
.fin-grade-wrap { overflow-x: auto; border-top: 0.5px solid var(--hairline-strong); margin-top: 4px; }
.fin-grade { border-collapse: collapse; }
.fin-grade thead th {
  font-family: var(--font-ui); font-size: 10.5px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft);
  padding: 11px 10px; text-align: right; white-space: nowrap;
  border-bottom: 0.5px solid var(--hairline);
}
.fin-grade tbody th {
  font-weight: 400; font-size: 13px; text-align: left;
  padding: 0 24px 0 0; white-space: nowrap;
  border-bottom: 0.5px solid var(--hairline);
}
.fin-grade td { padding: 4px 3px; border-bottom: 0.5px solid var(--hairline); }
/* Primeira coluna fixa: rolar 12 meses sem ela perde a referência da linha. */
.fin-grade th:first-child { position: sticky; left: 0; z-index: 1; background: var(--paper); }
.fin-grade [data-fechado="true"] { background: rgba(20, 18, 14, 0.035); }
[data-dark="true"] .fin-grade [data-fechado="true"] { background: rgba(238, 237, 226, 0.05); }

/* ── Inconsistências ────────────────────────────────── */
.fin-inc-lista { list-style: none; margin: 0; padding: 0; }
.fin-inc-item {
  display: grid; grid-template-columns: 2px 1fr auto; gap: 22px; align-items: start;
  padding: 22px 0; border-bottom: 0.5px solid var(--hairline);
}
.fin-sev { align-self: stretch; background: var(--hairline-strong); }
.fin-inc-item[data-sev="alta"] .fin-sev { background: var(--signal); }
.fin-inc-cab { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.fin-inc-cab strong {
  font-family: var(--font-display); font-size: 20px; font-weight: 400; letter-spacing: -0.015em;
}
.fin-inc-resumo { font-size: 13.5px; margin-top: 4px; }
.fin-inc-efeito { font-size: 12.5px; color: var(--ink-soft); margin-top: 6px; line-height: 1.55; max-width: 82ch; }
.fin-inc-acao { display: flex; align-items: center; gap: 7px; font-size: 12.5px; margin-top: 9px; color: var(--ink-mute); }
.fin-inc-amostra { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-soft); margin-top: 9px; line-height: 1.7; max-width: 86ch; }

/* ── Períodos ───────────────────────────────────────── */
.fin-meses tr[data-fechado="true"] td { background: rgba(20, 18, 14, 0.035); }
[data-dark="true"] .fin-meses tr[data-fechado="true"] td { background: rgba(238, 237, 226, 0.05); }
.fin-mes-nome { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.02em; }

/* ── Financeiro · fechamento mensal ───────────────────── */
.fin-fech-barra { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.fin-fech-ano { display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 13px; }
.fin-fech-acoes { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; align-items: center; }
.fin-fech-hist td { background: transparent !important; padding-top: 0; }
/* Linha do mês: clicável, abre a janela do fechamento. */
.fin-admissao { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fin-admissao .s-input { width: auto; padding: 4px 8px; }
.fin-id td { vertical-align: top; }
.fin-id-chips { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.fin-id-chip { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono); font-size: 11.5px; border: 0.5px solid var(--hairline-strong); border-radius: 4px; padding: 2px 6px; overflow-wrap: anywhere; }
.fin-id-x { border: 0; background: none; color: var(--ink-mute); cursor: pointer; font-size: 14px; line-height: 1; padding: 0 0 0 2px; }
.fin-id-x:hover { color: var(--signal); }
.fin-id-add { border: 0; background: none; color: var(--ink-mute); cursor: pointer; font-size: 12px; padding: 2px 0; }
.fin-id-add:hover { color: var(--ink); text-decoration: underline; }
.fin-id-form { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.fin-id-form .s-input { flex: 1 1 140px; min-width: 0; }
.fin-id-pend { margin-top: 10px; }
.fin-fech-linha { cursor: pointer; }
.fin-fech-linha:hover td, .fin-fech-linha:focus-visible td { background: var(--hairline) !important; }
.fin-fech-linha:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.fin-fech-abrir { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-mute); white-space: nowrap; }
.fin-fech-linha:hover .fin-fech-abrir { color: var(--ink); }
/* O que o mês precisa: Fee · BV · Compensation · Mídia. */
.fin-fech-check { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; }
.fin-fech-check[data-compacto="true"] { gap: 2px 10px; font-size: 11.5px; }
.fin-fech-item { color: var(--ink-mute); white-space: nowrap; }
.fin-fech-resumo { font-size: 12.5px; }
.fin-fech-resumo[data-ok="true"] { color: var(--good); }
.fin-fech-item[data-ok="true"] { color: var(--good); }
/* Os dois arquivos do mês, lado a lado (empilham no celular). */
.fin-fech-slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-top: 14px; }
.fin-fech-slot { border: 0.5px solid var(--hairline-strong); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.fin-fech-slot[data-estado="ok"] { border-color: rgba(29,107,62,.35); }
.fin-fech-slot[data-estado="erro"] { border-color: rgba(197,51,26,.35); }
.fin-fech-slot-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.fin-fech-arq { font-family: var(--font-mono); font-size: 12px; overflow-wrap: anywhere; }
.fin-fech-vals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; margin: 4px 0 0; }
.fin-fech-vals dt { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-mute); }
.fin-fech-vals dd { margin: 0; font-size: 14px; }
.fin-fech-alertas { margin: 0; padding-left: 18px; font-size: 12px; color: var(--ink-soft); line-height: 1.55; }
.fin-fech-vazio { padding: 12px 0; }
.fin-fech-modal-off, .s-modal footer .s-btn:disabled { opacity: .45; cursor: not-allowed; }
.fin-fech-slot-acoes { display: flex; gap: 6px; margin-top: auto; padding-top: 4px; }
.fin-fech-trilha { list-style: none; margin: 4px 0 8px; padding: 0 0 0 12px; border-left: 1px solid var(--hairline-strong); font-size: 12.5px; line-height: 1.7; }
.fin-fech-trilha li + li { margin-top: 4px; }
.fin-fech-linhas { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 14px 0 10px; }
.fin-fech-linhas .s-btn[data-on="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.fin-fech-totais, .fin-fech-mud, .fin-fech-comp { width: 100%; }
/* Bottom line do fechamento: realizado, forecast e total do ano. */
.fin-fech-soma td { padding: 12px; font-weight: 500; border-top: 0.5px solid var(--hairline-strong); }
.fin-fech-soma[data-total="true"] td { font-weight: 600; font-size: 14px; border-top: 1.5px solid var(--ink); background: var(--paper-2, transparent); }
.fin-fech-totais tr[data-fechado="true"] td,
.fin-fech-comp tr[data-fechado="true"] td { background: rgba(20, 18, 14, 0.035); }
[data-dark="true"] .fin-fech-totais tr[data-fechado="true"] td,
[data-dark="true"] .fin-fech-comp tr[data-fechado="true"] td { background: rgba(238, 237, 226, 0.05); }
td[data-sinal="+"] { color: var(--good); }
td[data-sinal="-"] { color: var(--signal); }
.fin-aviso ul { margin: 6px 0 0; padding-left: 18px; }
/* ── Financeiro · visão geral ─────────────────────────── */
.fin-ov-passos { list-style: none; margin: 0 0 8px; padding: 0; }
.fin-ov-passos li {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 12px 14px; border-left: 2px solid var(--hairline-strong); border-bottom: 0.5px solid var(--hairline);
}
.fin-ov-passos li[data-tom="warn"] { border-left-color: var(--warn); }
.fin-ov-passos li[data-tom="signal"] { border-left-color: var(--signal); }
.fin-ov-graf { margin-bottom: 8px; }
.fin-ov-legenda { display: flex; gap: 16px; font-size: 12px; color: var(--ink-mute); margin-bottom: 10px; }
.fin-ov-legenda span { display: inline-flex; align-items: center; gap: 6px; }
.fin-ov-legenda i { width: 12px; height: 12px; border-radius: 2px; display: inline-block; }
.fin-ov-barras { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px; height: 240px; margin-bottom: 18px; }
.fin-ov-col { display: flex; flex-direction: column; min-width: 0; outline: none; }
.fin-ov-barra-area { flex: 1; position: relative; }
.fin-ov-zero { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--hairline-strong); }
.fin-ov-barra { position: absolute; left: 18%; right: 18%; border-radius: 4px 4px 0 0; transition: opacity .12s; }
.fin-ov-barra[data-neg="true"] { border-radius: 0 0 4px 4px; }
.fin-ov-barras:hover .fin-ov-barra:not([data-on="true"]) { opacity: .55; }
.fin-ov-barra[data-tipo="real"], .fin-ov-legenda i[data-tipo="real"] { background: var(--ink); }
.fin-ov-barra[data-tipo="fcst"], .fin-ov-legenda i[data-tipo="fcst"] {
  background: repeating-linear-gradient(45deg, var(--ink-soft) 0 2px, transparent 2px 6px);
  box-shadow: inset 0 0 0 1px var(--ink-soft);
}
.fin-ov-rot { text-align: center; font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-soft); padding-top: 6px; }
.fin-ov-tip {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%); z-index: 3; white-space: nowrap;
  background: var(--paper); border: 0.5px solid var(--hairline-strong); box-shadow: 0 4px 14px rgba(0,0,0,.12);
  padding: 6px 9px; font-size: 12px; color: var(--ink); pointer-events: none;
}
.fin-ov-tip div { font-family: var(--font-mono); margin-top: 2px; }
.fin-ov-inc { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0; }
.fin-ov-inc li { display: flex; justify-content: space-between; padding: 9px 12px; border-bottom: 0.5px solid var(--hairline); font-size: 13px; }
.fin-ov-inc b { font-family: var(--font-mono); }
.fin-ov-atalhos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 24px; }
@media (max-width: 900px) { .fin-ov-atalhos { grid-template-columns: 1fr; } }
.fin-ov-atalho {
  text-align: left; display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; cursor: pointer;
  background: transparent; border: 0.5px solid var(--hairline-strong); color: var(--ink); font: inherit;
}
.fin-ov-atalho:hover { border-color: var(--ink); }
.fin-ov-atalho span { font-size: 12px; color: var(--ink-mute); line-height: 1.45; }

.fin-cr2 { margin-bottom: 22px; }
.fin-cr2-acao { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.fin-cr2-acao .s-select { min-width: 220px; }
.fin-cr2 tr[data-destaque="true"] td { background: var(--warn-soft); }

/* ── Vazio ──────────────────────────────────────────── */
.fin-vazio {
  display: grid; place-items: center; align-content: center; gap: 12px;
  padding: 96px 40px; color: var(--ink-soft);
  font-family: var(--font-display); font-style: italic; font-size: 17px; text-align: center;
}
.fin-limpo { color: var(--good); }
.fin-inc-corpo { min-width: 0; }

/* ── Financeiro · campos de dinheiro ────────────────────
   O símbolo fica FORA do input, como prefixo fixo. Dentro, o campo seria
   number e o "R$" viraria texto digitável — ou obrigaria a máscara, que
   atrapalha quem cola valor de planilha. */
/* Campo de número desenhado como CAIXA, igual ao .searchbar: fundo claro,
   fio de contorno e cantos arredondados. Um input transparente com fio embaixo
   não parecia editável — a pessoa não sabia onde podia digitar. */
.fin-campo {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 0 9px;
  background: var(--paper-2);
  border: 0.5px solid var(--hairline-strong);
  border-radius: 7px;
}
.fin-campo:focus-within { border-color: var(--ink); background: var(--paper); }
.fin-cifra {
  font-family: var(--font-ui); font-size: 11px; color: var(--ink-soft);
  flex-shrink: 0; letter-spacing: 0.02em;
}
/* Mesma fonte de TODO campo de digitação do produto (a do .s-input das
   Ajustes). Antes estes usavam --font-mono a 11.5px e o resto do módulo
   --font-ui a 13px — duas fontes na mesma tela, às vezes na mesma linha.
   `tabular-nums` preserva o alinhamento das colunas de número sem precisar
   trocar a família. */
.fin-campo input, .fin-edita input {
  border: 0; background: transparent; color: var(--ink);
  font-family: var(--font-ui); font-size: 13px; font-variant-numeric: tabular-nums;
  /* 118px é o que cabe "100.000.000,00" sem cortar: com ponto de milhar o
     texto é ~30% mais largo que o 1000000 que o type=number mostrava. */
  text-align: right; padding: 8px 4px; width: 118px;
}
.fin-campo input:focus, .fin-edita input:focus { outline: none; }
.fin-campo input.salvando, .fin-edita input.salvando { opacity: 0.35; }
.fin-campo-form { display: flex; height: 38px; }
.fin-campo-form input { width: 100%; text-align: left; }

/* Custo direto editável na própria lista de usuários — mesma caixa. */
.fin-edita {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 0 9px;
  background: var(--paper-2);
  border: 0.5px solid var(--hairline-strong);
  border-radius: 7px;
}
.fin-edita:focus-within { border-color: var(--ink); background: var(--paper); }
.fin-edita input { width: 108px; }
.fin-edita input::placeholder { color: var(--ink-soft); }
/* A célula centra a caixa à direita sem virar caixa ela mesma. */
.fin-tabela td.fin-edita-td { text-align: right; }

/* Campo que a aba Inconsistências apontou. --signal é o acento do sistema. */
.fin-erro { border-color: var(--signal) !important; box-shadow: inset 0 0 0 1px var(--signal); }
.fin-erro-txt { color: var(--signal); }

/* Abre o cadastro a partir da linha, sem transformar a linha inteira em botão. */
.fin-abre {
  appearance: none; border: 0; background: transparent; padding: 0;
  font: inherit; color: inherit; cursor: pointer; text-align: left; width: 100%;
}
.fin-abre:hover b { text-decoration: underline; }

/* Voltar para a lista — âncora de navegação, precisa de peso. */
.fin-voltar {
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 24px; padding: 10px 18px; font-size: 13px;
}

/* Cabeçalho e primeira coluna em negrito: são as duas âncoras de leitura de
   uma tabela larga com rolagem horizontal. */
.fin-th { font-weight: 700 !important; color: var(--ink) !important; }
.fin-td1 { font-weight: 600; }
.fin-grade tbody th.fin-td1 { font-weight: 600; }
.fin-total { border-left: 0.5px solid var(--hairline-strong); font-weight: 600; white-space: nowrap; padding: 0 12px; }

/* Explicação do tipo de inconsistência, acima da lista da aba. */
.fin-explica {
  margin: 4px 0 18px; padding: 14px 18px;
  background: var(--paper-2); border-left: 2px solid var(--hairline-strong);
}
.fin-explica-efeito { font-size: 13px; color: var(--ink-mute); line-height: 1.55; max-width: 86ch; }
.fin-refresh { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }

/* ── Financeiro · lista de usuários ─────────────────────
   Escopado no módulo: .who é compartilhado com outras telas, e empilhar
   nome/e-mail lá mudaria o Organograma e a Saúde do Time junto. */
[data-view="financeiro"] .table .who > div {
  display: flex; flex-direction: column; gap: 1px; min-width: 0;
}
[data-view="financeiro"] .table .who span { line-height: 1.3; }

/* Cabeçalho que ordena e filtra. O título é botão; o seletor embaixo recorta
   um valor. Sem o seletor, achar "todos os Freelancer de Mídia" exigia
   rolar 274 linhas. */
.fin-tabela thead th { vertical-align: top; padding-bottom: 8px; }
.fin-ord {
  appearance: none; border: 0; background: transparent; padding: 0; cursor: pointer;
  font: inherit; font-weight: 700; color: var(--ink);
  letter-spacing: inherit; text-transform: inherit;
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
}
.fin-tabela thead th.num .fin-ord { flex-direction: row-reverse; }
.fin-ord:hover { text-decoration: underline; }
.fin-ord-seta { font-size: 10px; opacity: 0.35; }
.fin-ord-seta[data-dir="desc"], .fin-ord-seta[data-dir="asc"] { opacity: 1; color: var(--signal); }

.fin-filtro-col {
  display: block; width: 100%; margin-top: 6px;
  font-family: var(--font-ui); font-size: 11px; color: var(--ink-soft);
  background: transparent; border: 0; border-bottom: 0.5px solid var(--hairline);
  padding: 3px 0; cursor: pointer; text-transform: none; letter-spacing: 0;
  max-width: 150px;
}
.fin-filtro-col[data-on="true"] { color: var(--signal); border-bottom-color: var(--signal); }
.fin-filtro-col:focus { outline: none; border-bottom-color: var(--ink); }

/* ── Rentabilidade · faixas de margem ───────────────────
   Versões VIVAS de --good/--warn/--signal, escopadas no módulo Board. O
   sistema é deliberadamente dessaturado, mas aqui a cor não é decoração: ela
   É o indicador, lida de longe numa reunião. Fora do .board-module o resto do
   produto segue com a paleta sóbria. */
.board-module {
  --rent-bom:   #0f9d58;
  --rent-medio: #e8a300;
  --rent-ruim:  #e03a1f;
}
[data-dark="true"] .board-module {
  --rent-bom:   #2ecc71;
  --rent-medio: #ffc043;
  --rent-ruim:  #ff6b52;
}

/* A legenda acompanha a rolagem: os rankings são longos e a cor perde sentido
   quando a régua fica para trás. `top` casa com a altura da .topbar, que é
   sticky em 0 — sem isso a legenda desliza para baixo dela. O z-index fica
   abaixo do da topbar (20) para passar por trás, não por cima. */
.rent-legenda {
  position: sticky; top: 62px; z-index: 15;
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px;
  padding: 10px 14px;
  border: 0.5px solid var(--hairline-strong);
  border-radius: 8px;
  background: var(--paper-2);
  font-size: 12px; color: var(--ink-mute);
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.rent-legenda span { display: inline-flex; align-items: center; gap: 7px; }
.rent-legenda i {
  width: 11px; height: 11px; border-radius: 3px; display: inline-block; flex-shrink: 0;
}

/* ── Personificação ("Ver como") ─────────────────────────────────────────────
   A faixa que diz que a identidade da tela não é a de quem está ao teclado.
   Fixa no rodapé — a sidebar e a topbar são `sticky` em `top: 0`, então uma
   faixa no topo passaria por baixo delas. Cor de sinal, e não de interface:
   ela precisa ser impossível de confundir com um rodapé qualquer. */
.imp-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 300;
  display: flex; align-items: center; gap: 12px;
  padding: 9px 18px;
  background: var(--signal); color: #fff;
  font-family: var(--font-ui); font-size: 12.5px;
  box-shadow: 0 -8px 24px rgba(0,0,0,0.18);
}
.imp-banner .imp-grow { flex: 1; }
.imp-banner .imp-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  background: #fff;
  animation: imp-pulse 2s ease-in-out infinite;
}
@keyframes imp-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.imp-banner .imp-alvo { font-weight: 600; letter-spacing: 0.01em; }
.imp-banner .imp-meta { opacity: 0.82; }
.imp-banner .imp-nota {
  padding: 2px 9px; border-radius: 999px;
  background: rgba(255,255,255,0.16); opacity: 1;
}
.imp-banner .imp-exit {
  border: 1px solid rgba(255,255,255,0.55);
  background: transparent; color: #fff;
  border-radius: 999px; padding: 5px 14px;
  font: inherit; cursor: pointer;
  transition: background 0.15s ease;
}
.imp-banner .imp-exit:hover:not(:disabled) { background: rgba(255,255,255,0.16); }
.imp-banner .imp-exit:disabled { opacity: 0.6; cursor: default; }

/* Folga para a faixa não cobrir o rodapé da última tela, e o aviso curto
   subindo acima dela. */
body[data-impersonating="true"] { padding-bottom: 42px; }
body[data-impersonating="true"] .lola-toast { bottom: 70px; }

@media (max-width: 720px) {
  .imp-banner { flex-wrap: wrap; gap: 6px 10px; }
  .imp-banner .imp-grow { display: none; }
}

/* Acesso demandado, no formulário de login: a caixa que um admin marca para
   entrar, com a própria senha, na conta de outra pessoa. Fica visível para
   todo mundo de propósito — mostrá-la só para admin exigiria perguntar ao
   servidor "este e-mail é admin?" antes de qualquer autenticação. */
.login-check {
  display: flex; align-items: center; gap: 9px;
  margin-top: 2px;
  font-size: 12.5px; color: rgba(255,255,255,0.78);
  cursor: pointer; user-select: none;
}
.login-check input { width: 15px; height: 15px; accent-color: var(--signal); cursor: pointer; }
.login-check:hover span { color: #fff; }

.login-note {
  margin: 0; font-size: 11.5px; line-height: 1.5;
  color: rgba(255,255,255,0.62);
}
.login-note b { color: rgba(255,255,255,0.85); font-weight: 600; }
.login-note-warn {
  padding: 9px 12px; border-radius: 8px;
  background: rgba(255,255,255,0.09);
  color: rgba(255,255,255,0.82);
}

/* ── Aniversariantes ──────────────────────────────────────────────────────
   Tokens do projeto, sem nada importado do Lovable: mesma tipografia
   editorial, mesma densidade das outras listas. */
.aniv-sub{ font-family:var(--font-mono); font-size:11px; color:var(--ink-mute);
  text-transform:uppercase; letter-spacing:.08em; margin:2px 0 10px }
.aniv-vazio{ font-family:var(--font-display); font-style:italic; font-size:16px;
  color:var(--ink-mute); padding:18px 0 }

.aniv-lista{ display:grid; gap:1px; background:var(--hairline) }
.aniv-linha{ display:flex; align-items:center; gap:12px; padding:10px 12px;
  background:var(--paper); transition:background .12s }
.aniv-linha:hover{ background:var(--paper-2) }
.aniv-linha b{ display:block; font-family:var(--font-ui); font-weight:500;
  font-size:14px; line-height:1.25; white-space:nowrap; overflow:hidden;
  text-overflow:ellipsis }
.aniv-linha span{ display:block; font-family:var(--font-mono); font-size:10px;
  color:var(--ink-mute); text-transform:uppercase; letter-spacing:.07em;
  margin-top:2px }

/* Aniversário de hoje: a única coisa na tela que pede destaque. */
.aniv-linha[data-destaque]{ background:var(--paper-2) }
.aniv-linha[data-destaque] b{ font-weight:600 }
.aniv-linha[data-destaque] .aniv-data b{ color:var(--signal) }

.aniv-data{ text-align:right; flex:none; min-width:44px }
.aniv-data b{ display:block; font-family:var(--font-display); font-size:20px;
  line-height:1 }
.aniv-data span{ font-family:var(--font-mono); font-size:9px; color:var(--ink-mute);
  letter-spacing:.1em }

/* Distribuição no ano — barras que também são o filtro de mês. */
.aniv-meses{ display:grid; grid-template-columns:repeat(12,1fr); gap:6px;
  align-items:end; margin-top:12px }
.aniv-mes{ display:grid; grid-template-rows:1fr auto auto; gap:6px;
  justify-items:center; border:0; background:none; cursor:pointer;
  padding:0 0 6px; border-bottom:2px solid transparent }
/* A barra precisa de uma linha de altura FIXA para o height:% ter referência —
   sem isso o percentual não resolve contra nada e todas somem. */
.aniv-trilha{ display:flex; align-items:flex-end; height:72px; width:100%;
  justify-content:center }
.aniv-mes:hover .aniv-barra{ background:var(--ink) }
.aniv-mes[data-ativo]{ border-bottom-color:var(--signal) }
.aniv-mes[data-ativo] .aniv-barra{ background:var(--signal) }
.aniv-barra{ width:100%; min-height:3px; background:var(--hairline-strong);
  transition:background .12s, height .18s }
.aniv-mes-n{ font-family:var(--font-mono); font-size:11px; color:var(--ink) }
.aniv-mes-l{ font-family:var(--font-mono); font-size:9px; color:var(--ink-mute);
  letter-spacing:.08em }

.aniv-controles{ display:flex; gap:10px; align-items:center; margin-bottom:18px;
  flex-wrap:wrap }
.aniv-limpar{ font-family:var(--font-mono); font-size:11px; text-transform:uppercase;
  letter-spacing:.08em; padding:7px 12px; border:1px solid var(--hairline);
  background:var(--paper); cursor:pointer; color:var(--ink-mute) }
.aniv-limpar:hover{ border-color:var(--ink); color:var(--ink) }

@media (max-width:720px){
  .aniv-meses{ grid-template-columns:repeat(6,1fr); row-gap:12px }
}

.aniv-cobertura{ font-family:var(--font-display); font-style:italic; font-size:15px;
  line-height:1.5; color:var(--ink-mute); border-left:2px solid var(--hairline-strong);
  padding:2px 0 2px 14px; margin:0 0 28px }
.aniv-cobertura b{ font-style:normal; color:var(--ink) }
.aniv-fonte{ font-style:normal; opacity:.6; margin-left:6px }

/* Overview: card sem destino (perfil não enxerga a tela) é só leitura. */
div.home-mod { cursor: default; }
div.home-mod:hover { background: transparent; }
/* Rótulo do destino — aparece no hover, ao lado da seta. */
.home-mod-ir {
  position: absolute; right: 22px; top: 24px;
  font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-soft);
  opacity: 0; transition: opacity .15s;
}
button.home-mod:hover .home-mod-ir, button.home-mod:focus-visible .home-mod-ir { opacity: 1; }

/* Campanhas */
.camp-select {
  border: 0.5px solid var(--hairline-strong); border-radius: 999px; background: transparent;
  padding: 6px 12px; font: inherit; font-size: 12px; color: var(--ink); max-width: 220px;
}
.camp-ord { cursor: pointer; user-select: none; }
.camp-ord[data-on="true"] { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.camp-linha { cursor: pointer; }
.camp-linha:hover td, .camp-linha[data-aberta="true"] td { background: var(--paper-2); }
.camp-tag {
  margin-left: 8px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--good); border: 0.5px solid var(--good); border-radius: 999px; padding: 1px 6px; vertical-align: 1px;
}
.camp-detalhe td { background: var(--paper-2); padding: 4px 16px 20px !important; }
.camp-time-meta { font-size: 11px; color: var(--ink-soft); margin: 4px 0 14px; }
.camp-grupos { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px 28px; }
.camp-grupo-head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 6px; margin-bottom: 4px; border-bottom: 0.5px solid var(--hairline-strong); font-size: 12.5px; }
.camp-grupo-head span { font-size: 10.5px; color: var(--ink-soft); }
.camp-grupo[data-criativo="true"] .camp-grupo-head b { color: var(--signal); }
.camp-pessoa { display: grid; grid-template-columns: minmax(0, 1fr) 60px 48px; gap: 8px; align-items: center; font-size: 12px; padding: 3px 0; }
.camp-pessoa-nome { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.camp-pessoa-barra { height: 4px; background: var(--hairline); border-radius: 2px; overflow: hidden; }
.camp-pessoa-barra i { display: block; height: 100%; background: var(--ink); opacity: .55; }
.camp-pessoa .mono { text-align: right; font-size: 11px; color: var(--ink-mute); }

/* Ajustes › Sessões: resumo do tutorial no filtro "Tutorial". */
.s-tut-resumo { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; border-top: 0.5px solid var(--hairline); border-bottom: 0.5px solid var(--hairline); margin-bottom: 16px; }
.s-tut-resumo > div { padding: 12px 14px; border-right: 0.5px solid var(--hairline); display: flex; flex-direction: column; gap: 4px; }
.s-tut-resumo > div:last-child { border-right: 0; }
.s-tut-resumo b { font-family: var(--font-mono); font-size: 22px; font-weight: 400; }
.s-tut-resumo span { font-size: 11.5px; color: var(--ink-soft); }
@media (max-width: 900px) { .s-tut-resumo { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Ajustes › Sugestões */
.sug-lista { display: flex; flex-direction: column; border-top: 0.5px solid var(--hairline); }
.sug-item { padding: 16px 0; border-bottom: 0.5px solid var(--hairline); display: flex; flex-direction: column; gap: 8px; }
.sug-item header { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.sug-item header b { font-weight: 500; }
.sug-tipo { font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; border: 0.5px solid var(--hairline-strong); color: var(--ink-mute); }
.sug-tipo[data-tipo="erro"] { color: var(--signal); border-color: var(--signal); }
.sug-meta { font-size: 11.5px; color: var(--ink-soft); }
.sug-status { margin-left: auto; font-family: var(--font-mono); font-size: 11px; }
.sug-relato { margin: 0; font-size: 14px; line-height: 1.5; white-space: pre-wrap; }
.sug-sugestao { margin: 0; font-size: 13px; line-height: 1.5; color: var(--ink-mute); white-space: pre-wrap; }
.sug-sugestao em { font-style: normal; color: var(--ink-soft); }
.sug-item footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sug-acoes { display: flex; gap: 6px; }

/* Overview executiva */
.hm-confianca { font-family: var(--font-mono); font-size: 11px; color: var(--ink-soft); margin-top: 18px; max-width: 56ch; line-height: 1.5; }
.hm-tom { font-family: var(--font-mono); font-size: 10px; letter-spacing: .04em; margin-left: 8px; }
.hm-decisao { margin-top: 14px; padding-top: 10px; border-top: 0.5px solid var(--hairline); font-size: 12.5px; line-height: 1.45; color: var(--ink); max-width: 36ch; padding-right: 34px; }
.hm-decisao b { font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); font-weight: 400; display: block; margin-bottom: 3px; }


/* Filtro suspenso de multisseleção (PautaFiltro) — nasceu no Planejamento de
   Pauta, com o CSS dentro do <style> daquela tela. O Cronograma de Pauta usa
   o MESMO componente, e o <style> de uma tela só existe enquanto ela está
   montada: aberto direto no Cronograma, o dropdown vinha sem borda, sem
   fundo e sem sombra (medido: border-radius 0px, fundo transparente). Regra
   de componente compartilhado mora no CSS global. As cópias dentro de
   planejamento.jsx são idênticas e podem sair quando aquela tela for
   mexida. */
.pauta-ctl { display: inline-flex; align-items: center; gap: 8px; border: 0.5px solid var(--hairline-strong); background: var(--paper-2); color: var(--ink); border-radius: 999px; padding: 7px 14px; font-size: 12px; cursor: pointer; font-family: inherit; }
.pauta-ctl b { font-weight: 500; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pauta-ctl[data-active] { border-color: var(--ink); box-shadow: inset 0 0 0 0.5px var(--ink); }
.pauta-ctl-k { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.pauta-caret { font-size: 10px; color: var(--ink-soft); }
.pauta-dd { position: relative; }
.pauta-dd-pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 50; width: 300px; background: var(--paper-2); border: 0.5px solid var(--hairline-strong); border-radius: 12px; box-shadow: 0 18px 40px rgba(0,0,0,.18); padding: 8px; }
.pauta-dd-busca { width: 100%; box-sizing: border-box; border: 0.5px solid var(--hairline-strong); background: var(--paper); color: var(--ink); border-radius: 8px; padding: 7px 10px; font-size: 12px; margin-bottom: 6px; outline: none; font-family: inherit; }
.pauta-dd-lista { max-height: 320px; overflow-y: auto; }
.pauta-dd-linha { display: flex; align-items: center; }
.pauta-dd-item { flex: 1; display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; font-size: 12px; cursor: pointer; min-width: 0; }
.pauta-dd-item:hover { background: var(--hairline); }
.pauta-dd-item span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pauta-dd-item em { font-style: normal; font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-soft); }
.pauta-dd-todos { border-bottom: 0.5px solid var(--hairline); border-radius: 6px 6px 0 0; margin-bottom: 4px; font-weight: 500; }
.pauta-dd-so { border: 0; background: transparent; color: var(--ink-soft); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; padding: 4px 6px; opacity: 0; }
.pauta-dd-linha:hover .pauta-dd-so { opacity: 1; }
.pauta-dd-so:hover { color: var(--ink); }
.pauta-dd-vazio { padding: 12px 8px; color: var(--ink-soft); font-size: 12px; }
.pauta-dd-logo { width: 18px; height: 18px; border-radius: 4px; object-fit: contain; background: #fff; border: 0.5px solid var(--hairline); flex: none; }

.lola-contagem { font-family: var(--font-mono); font-size: 11px; color: var(--ink-soft); }

/* Páginas nomeadas para impressão. `@page` é global e não tem especificidade:
   quem declara por último ganha, e o `@page { size: a4 }` do organograma.css
   vale para o sistema inteiro — foi o que fez o Cronograma sair em retrato
   mesmo pedindo paisagem no <style> da tela (que, aliás, não chega ao CSSOM).
   Quem precisa de paisagem opta: `.minha-pagina { page: paisagem }` dentro do
   @media print. Inerte para quem não opta. */
@page paisagem { size: A4 landscape; margin: 8mm; }
