/* Portal de entregas Deep Copy
   Preto, creme e laranja da marca. Títulos em grotesca condensada (anúncio de resposta direta), copy em Century Schoolbook
   (a fonte das cartas de venda clássicas), interface em Helvetica. As fontes são arquivos do próprio portal: a CSP só aceita
   fonte, folha de estilo e script de 'self'.

   SISTEMA VISUAL. Leia antes de criar uma tela: use estes componentes em vez de inventar estilo. A tela nova fica com o mesmo
   acabamento das outras sem CSS próprio ou com um bloco curto no fim do arquivo, logo antes do bloco "Lucro e rateio das
   despesas" (que precisa continuar o último). Cor, raio, sombra e espaço vêm dos tokens do :root: nada de cor solta fora deles.

   Tokens (:root)
     Marca: --ink e --ink-2 (texto), --muted (texto secundário, contraste AA), --faint (só traço e enfeite, nunca texto), --paper
       (fundo da página), --sheet e --surface (cartão), --surface-sunken (faixa interna, cabeçalho de tabela), --surface-dark
       (barra lateral), --orange (destaque), --orange-ink (laranja de texto e de foco, AA), --orange-wash, --orange-glow (o brilho
       laranja translúcido sobre o fundo escuro, como no Diagnóstico da Narrativa), --danger, --danger-wash,
       --danger-ink, --success, --success-wash, --calm-wash. Linhas: --line (borda fina), --line-strong (campo, hover), --rule.
     Espaço: --space-1 a --space-10 (4, 8, 12, 16, 20, 24, 32, 40, 48 e 64 px). Raio: --radius-sm 6, --radius 8, --radius-lg 12,
       --radius-xl 16 e --radius-pill. Sombra: --shadow-xs, --shadow-sm, --shadow-md e --shadow-lg. Texto: --text-xs a --text-2xl
       e --display-size. Movimento: --dur e --ease. Estrutura: --container, --gutter e --sidebar-w.

   Estrutura (layouts/app.php)
     header.masthead: .appbar (topo do celular e do tablet, com o botão Menu) e .sidenav#menu (barra lateral fixa do dono, barra
     de topo do cliente e gaveta no celular), com .nav > .nav__group, .nav__list, .nav__item, a.nav__link[aria-current] e
     .nav__icon. O menu é a lista $menu do layout: um item por linha. Depois vem .shell com .testmode, main.page e .footer.
     Tela: .container; .page-head (+ --with-actions, __kicker ou .eyebrow, h1.display, .lead, __actions à direita); .crumbs;
     .section-title (+ .count); .split (principal e lateral) e .split--even.

   Componentes
     Botões: .btn com --primary (preto), --accent (laranja, a ação principal do cliente), --ghost (secundário), --danger,
       --quiet-danger, --on-dark, --small, --block e --icon (só o ícone, sempre com aria-label). .linkish é a ação em texto.
     Campos: .field (label, campo e .hint; com erro, .field.has-error e .field__error), .field-row, .fieldset (+ legend), .check
       (checkbox e rádio), .form-actions, .inline-form e .stack (espaço entre blocos).
     Cartões: .card (+ __head, __title, __body, __foot; --accent põe a faixa laranja no alto; --link deixa o cartão inteiro
       clicável pelo a.card__link do título), .cards (grade de cartões, 300 px ou mais por coluna) e .panel (seção de
       configuração). Pessoa: .who (avatar, __name e __meta) e .avatar (+ --sm, --lg, --accent).
     Chips e etiquetas: .chips com .chip (filtro; .is-active ou aria-current marca), .badge (etiqueta em caixa alta; --accent,
       --dark, --danger, --success, --outline e --dot), .mark--* (status do entregável, com forma além da cor), .prio--*
       (prioridade), .count (contagem ao lado de um título) e .eyebrow (rótulo pequeno em caixa alta).
     Abas: div.tabs[data-tabs] com a.tabs__tab[href="#painel"] e section.tabs__panel#painel. Com JavaScript (app.js) viram abas
       de verdade: role tab, setas do teclado e a aba escolhida no endereço (um link para #painel também troca a aba); sem
       JavaScript são links para as seções, todas à vista.
     Indicadores: dl.kpis com .kpi (dt.kpi__label, dd.kpi__value, dd.kpi__sub; kpi__value--money para reais e
       kpi__sub--quiet para o texto neutro).
     Linha do tempo: ol.timeline com .timeline__item (--accent, --ink, --success, --danger e .is-future), __head, __title,
       __when, __body e __meta.
     Diálogo: dialog.modal (__body, __title, __text, __actions), aberto por [data-open="id"] e fechado por [data-close]. Um
       form[data-confirm="pergunta"] pede confirmação no diálogo do layout. Antes de um envio, resuma o que vai sair com .facts.
     Gaveta: dialog.drawer à direita (__head, __title, __close, __body, __foot), aberta e fechada do mesmo jeito.
     Vazio: .empty (frase curta em caixa tracejada) e .empty-state (__icon, __title, __text, __actions) para a seção que começa
       vazia e ensina o próximo passo.
     Avisos: .flash (--ok, --error), .notice, .callout (--accent, --danger, --success; __label) e .toast (DC.toast no app.js).
     Tabelas: .table-wrap com table.table (th[data-sort] ordena; .table__strong, .table__sub, .table__actions; .table--stack
       vira cartões no celular, com td[data-label]).
     Ícones: Icon::svg('nome') (app/lib/Icon.php), na cor do texto.
   Acessibilidade: foco visível (:focus-visible com contorno --orange-ink) em tudo, alvos de 44 px no celular, nada só por cor
   e nenhuma animação com prefers-reduced-motion. */

@font-face { font-family: "Heros"; src: url("../fonts/texgyreheros-regular.otf") format("opentype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Heros"; src: url("../fonts/texgyreheros-bold.otf") format("opentype"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Heros Condensed"; src: url("../fonts/texgyreheroscn-bold.otf") format("opentype"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Schola"; src: url("../fonts/texgyreschola-regular.otf") format("opentype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Schola"; src: url("../fonts/texgyreschola-italic.otf") format("opentype"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Schola"; src: url("../fonts/texgyreschola-bold.otf") format("opentype"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Schola"; src: url("../fonts/texgyreschola-bolditalic.otf") format("opentype"); font-weight: 700; font-style: italic; font-display: swap; }

:root {
  /* Marca */
  --ink: #0a0a0a;
  --ink-2: #24211d;
  --muted: #5f5a54;
  --faint: #8d877f;
  --rule: #d6d0c8;
  --rule-soft: #e3ddd4;
  --paper: #f0ece6;
  --sheet: #fcfbf9;
  --orange: #ff7c00;
  --orange-hover: #ff9233;
  --orange-ink: #a34600;
  --orange-wash: #ffe6cc;
  --orange-soft: #fff4e8;
  --orange-glow: rgba(255, 124, 0, 0.16);
  --danger: #b42318;
  --danger-wash: #fbeae7;
  --danger-ink: #5c130c;
  --danger-line: #efc6bf;
  --success: #2e7d4f;
  --success-wash: #e3f0e7;
  --calm-wash: #e9e5de;

  /* Superfícies e linhas */
  --surface: var(--sheet);
  --surface-sunken: #f5f2ed;
  --surface-dark: #0d0c0b;
  --line: #e2dcd3;
  --line-strong: #cbc4b9;
  --on-dark: #f0ece6;
  --on-dark-muted: rgba(240, 236, 230, 0.76);
  --on-dark-faint: rgba(240, 236, 230, 0.56);
  --on-dark-line: rgba(240, 236, 230, 0.13);
  --on-dark-hover: rgba(240, 236, 230, 0.08);

  /* Tipografia */
  --font-ui: "Heros", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: "Heros Condensed", "Helvetica Neue", Helvetica, "Arial Narrow", Arial, sans-serif;
  --font-copy: "Schola", "Century Schoolbook", "New Century Schoolbook", "Century Schoolbook L", Georgia, serif;
  --text-xs: 12px;
  --text-sm: 13.5px;
  --text-base: 15px;
  --text-md: 16.5px;
  --text-lg: 19px;
  --text-xl: 23px;
  --text-2xl: 30px;
  --display-size: clamp(30px, 1.6vw + 21px, 46px);

  /* Espaço */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
  --space-9: 48px;
  --space-10: 64px;

  /* Forma e profundidade */
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 999px;
  --shadow-xs: 0 1px 2px rgba(28, 22, 15, 0.05);
  --shadow-sm: 0 1px 2px rgba(28, 22, 15, 0.05), 0 2px 8px -3px rgba(28, 22, 15, 0.08);
  --shadow-md: 0 1px 3px rgba(28, 22, 15, 0.06), 0 12px 28px -12px rgba(28, 22, 15, 0.2);
  --shadow-lg: 0 4px 12px rgba(28, 22, 15, 0.08), 0 32px 64px -20px rgba(28, 22, 15, 0.38);
  --focus: var(--orange-ink);

  /* Movimento */
  --dur: 0.16s;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  /* Estrutura */
  --container: 1200px;
  --gutter: 16px;
  --sidebar-w: 216px;
}
@media (min-width: 600px) {
  :root { --gutter: 24px; }
}
@media (min-width: 1024px) {
  :root { --gutter: 28px; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--text-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.page { flex: 1 0 auto; padding-bottom: var(--space-10); }
.page:focus { outline: none; }
a { color: var(--ink); text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 3px; transition: color var(--dur), text-decoration-color var(--dur); }
a:hover { color: var(--orange-ink); }
img { max-width: 100%; }
svg { flex: none; }
p { margin: 0 0 12px; }
strong, b { font-weight: 700; }
code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.88em; background: var(--calm-wash); padding: 1px 6px; border-radius: 4px; word-break: break-all; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
::selection { background: var(--orange-wash); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -9999px; top: 0; z-index: 100; padding: 10px 16px; border-radius: var(--radius); background: var(--ink); color: var(--paper); font-weight: 700; text-decoration: none; box-shadow: var(--shadow-md); }
.skip:focus { left: 12px; top: 12px; color: var(--paper); outline-color: var(--orange); }
.container { width: min(var(--container), calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
[hidden] { display: none !important; }
.eyebrow { margin: 0 0 var(--space-2); font: 700 12px/1.35 var(--font-ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--orange-ink); }

/* ---------- Estrutura: barra lateral, barra de topo e menu ---------- */
/* Celular e tablet (até 1023 px): .appbar no topo e o menu (.sidenav) numa gaveta que o botão Menu abre (app.js). Sem JavaScript,
   o link Menu leva a #menu e a gaveta abre pelo :target. A partir de 1024 px: barra lateral fixa no painel do dono
   (.has-sidebar) e barra de topo no portal do cliente (.has-topnav). */
.shell { flex: 1 0 auto; display: flex; flex-direction: column; min-width: 0; }
.brand { position: relative; display: inline-block; font-family: var(--font-display); font-size: 23px; letter-spacing: 0.02em; text-decoration: none; line-height: 1; padding-bottom: 4px; border-bottom: 2px solid var(--orange); white-space: nowrap; }
/* área de toque de 44 px sem mexer no desenho da marca */
a.brand::before { content: ""; position: absolute; inset: -8px -6px; }
.brand__a { color: var(--on-dark); }
.brand__b { color: var(--orange); }
.brand:hover .brand__a { color: var(--on-dark); }
.brand:focus-visible { outline-color: var(--orange); outline-offset: 5px; border-radius: 2px; }
.brand--large { font-size: 30px; align-self: flex-start; }

.appbar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: 60px; padding: 6px var(--gutter); background: var(--surface-dark); color: var(--on-dark); border-top: 3px solid var(--orange); }
.appbar__menu { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-right: -4px; padding: 0 14px 0 11px; border: 1px solid var(--on-dark-line); border-radius: var(--radius); background: transparent; color: var(--on-dark); font: 700 14px/1 var(--font-ui); text-decoration: none; cursor: pointer; transition: background-color var(--dur), border-color var(--dur); }
.appbar__menu:hover { background: var(--on-dark-hover); border-color: rgba(240, 236, 230, 0.32); color: var(--on-dark); }
.appbar__menu:focus-visible { outline-color: var(--orange); }
.appbar__icon { width: 20px; height: 20px; }

.sidenav { position: fixed; top: 0; bottom: 0; left: 0; z-index: 80; display: flex; flex-direction: column; width: min(320px, 86vw); padding: 14px 12px 16px; background: var(--surface-dark); color: var(--on-dark); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(240, 236, 230, 0.2) transparent; transform: translateX(-104%); visibility: hidden; transition: transform 0.26s var(--ease), visibility 0s linear 0.26s; }
.sidenav.is-open, .sidenav:target:not(.is-enhanced) { transform: none; visibility: visible; transition: transform 0.26s var(--ease); box-shadow: var(--shadow-lg); }
.sidenav:target:not(.is-enhanced) { box-shadow: 0 0 0 100vmax rgba(10, 10, 10, 0.5); }
.nav-backdrop { position: fixed; inset: 0; z-index: 79; background: rgba(10, 10, 10, 0.5); animation: fade-in 0.2s ease-out; }
html.nav-open { overflow: hidden; }
.sidenav__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: 6px 8px 16px 10px; }
.sidenav__close { display: inline-grid; place-items: center; width: 44px; height: 44px; margin: -6px -4px -6px 0; padding: 0; border: 0; border-radius: var(--radius); background: transparent; color: var(--on-dark-muted); cursor: pointer; }
.sidenav__close:hover { background: var(--on-dark-hover); color: var(--on-dark); }
.sidenav__close:focus-visible { outline-color: var(--orange); outline-offset: -2px; }
.sidenav__close svg { width: 22px; height: 22px; }

.nav { display: flex; flex-direction: column; flex: 1 0 auto; }
.nav__group { margin: 20px 12px 6px; font: 700 10.5px/1.2 var(--font-ui); letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-dark-faint); }
.nav__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.nav__item { position: relative; }
.nav__link { display: flex; align-items: center; min-height: 44px; padding: 8px 12px 8px 44px; border-radius: var(--radius); color: var(--on-dark-muted); font-size: 14.5px; line-height: 1.25; text-decoration: none; transition: background-color var(--dur), color var(--dur), box-shadow var(--dur); }
.nav__icon { position: absolute; left: 13px; top: 50%; width: 19px; height: 19px; margin-top: -9.5px; color: var(--on-dark-faint); pointer-events: none; transition: color var(--dur); }
.nav__link:hover { background: var(--on-dark-hover); color: var(--on-dark); }
.nav__link:hover + .nav__icon { color: var(--on-dark); }
.nav__link[aria-current="page"] { background: rgba(240, 236, 230, 0.11); color: var(--on-dark); font-weight: 700; box-shadow: inset 3px 0 0 var(--orange); }
.nav__link[aria-current="page"] + .nav__icon { color: var(--orange); }
.nav__link:focus-visible { outline: 2px solid var(--orange); outline-offset: -2px; }

.sidenav__foot { display: flex; align-items: center; gap: 4px; margin-top: var(--space-6); padding-top: var(--space-3); border-top: 1px solid var(--on-dark-line); }
.account { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; min-height: 48px; padding: 6px; border-radius: var(--radius); color: var(--on-dark); text-decoration: none; transition: background-color var(--dur); }
.account:hover, .account[aria-current="page"] { background: var(--on-dark-hover); color: var(--on-dark); }
.account:focus-visible { outline-color: var(--orange); outline-offset: -2px; }
.account .avatar { background: var(--orange); color: var(--ink); }
.account__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.account__name { font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account__sub { font-size: 12px; color: var(--on-dark-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account__out { flex: none; margin: 0; }
.account__logout { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; padding: 0 8px; border: 0; border-radius: var(--radius); background: transparent; color: var(--on-dark-muted); font: 700 13px/1 var(--font-ui); cursor: pointer; transition: background-color var(--dur), color var(--dur); }
.account__logout:hover { background: var(--on-dark-hover); color: var(--on-dark); }
.account__logout:focus-visible { outline-color: var(--orange); outline-offset: -2px; }
.account__logout svg { width: 18px; height: 18px; }

@media (min-width: 1024px) {
  .appbar, .nav-backdrop { display: none !important; }
  html.nav-open { overflow: visible; }
  .sidenav, .sidenav.is-open, .sidenav:target:not(.is-enhanced) { transform: none; visibility: visible; transition: none; box-shadow: none; }
  .sidenav__close { display: none !important; }
  /* Painel do dono: barra lateral fixa */
  .has-sidebar .sidenav { z-index: 30; width: var(--sidebar-w); padding: 22px 12px 14px; border-right: 1px solid rgba(240, 236, 230, 0.04); }
  .has-sidebar .sidenav__head { padding: 2px 10px 10px; }
  .has-sidebar .shell { margin-left: var(--sidebar-w); }
  /* Portal do cliente: barra de topo, com o conteúdo alinhado ao .container */
  .has-topnav .sidenav { position: static; flex-direction: row; align-items: center; gap: var(--space-6); width: auto; min-height: 64px; padding: 0 max(var(--gutter), calc((100% - var(--container)) / 2)); overflow: visible; border-top: 3px solid var(--orange); }
  .has-topnav .sidenav__head { padding: 0 var(--space-3) 0 0; }
  .has-topnav .nav { flex: 1 1 auto; flex-direction: row; align-items: stretch; min-width: 0; }
  .has-topnav .nav__list { flex-direction: row; gap: 2px; }
  .has-topnav .nav__link { min-height: 61px; padding: 0 12px 0 40px; border-radius: 0; }
  .has-topnav .nav__icon { left: 13px; width: 18px; height: 18px; margin-top: -9px; }
  .has-topnav .nav__link:hover { background: var(--on-dark-hover); }
  .has-topnav .nav__link[aria-current="page"] { background: transparent; box-shadow: inset 0 -3px 0 var(--orange); }
  .has-topnav .sidenav__foot { margin: 0; padding: 0; border: 0; gap: 2px; }
  .has-topnav .account { min-height: 44px; flex: none; }
  .has-topnav .account__sub { display: none; }
}
@media (min-width: 1024px) and (max-width: 1199px) {
  .has-topnav .nav__link { padding: 0 10px; }
  .has-topnav .nav__icon { display: none; }
  .has-topnav .account__logout span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

.testmode { padding: 8px var(--gutter); background: var(--orange); color: var(--ink); font-size: 13px; font-weight: 700; line-height: 1.4; text-align: center; }
.preview-banner { padding: 10px 0; background: var(--orange-wash); border-bottom: 1px solid #f3c99c; font-size: 14px; }

/* ---------- Rodapé ---------- */
.footer { flex-shrink: 0; border-top: 1px solid var(--line); padding: 20px 0 24px; font-size: 13px; color: var(--muted); }
.footer__inner { display: flex; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--ink); }

/* ---------- Cabeçalhos de página ---------- */
.page-head { padding: var(--space-8) 0 var(--space-6); }
.page-head--with-actions { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-4) var(--space-7); flex-wrap: wrap; }
.page-head--with-actions > div:first-child { flex: 1 1 380px; min-width: 0; }
.page-head__kicker { margin: 0 0 var(--space-2); font: 700 12px/1.35 var(--font-ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--orange-ink); }
.page-head__actions { display: flex; gap: var(--space-2); flex-wrap: wrap; align-items: center; margin: 0; }
.page-head__actions form { margin: 0; }
.display { font-family: var(--font-display); font-weight: 700; font-size: var(--display-size); line-height: 1.04; letter-spacing: -0.005em; margin: 0 0 var(--space-3); max-width: 24ch; text-wrap: balance; color: var(--ink); overflow-wrap: break-word; }
.display--small { font-size: clamp(24px, 1vw + 18px, 32px); max-width: none; }
.lead { font-size: var(--text-md); line-height: 1.55; color: var(--ink-2); max-width: 64ch; margin: 0 0 var(--space-2); }
.crumbs { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 0 0 var(--space-3); font-size: 13.5px; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--orange); }
.crumbs > span[aria-hidden] { color: var(--line-strong); }
.statusline { display: flex; gap: 8px 12px; align-items: center; flex-wrap: wrap; font-size: 14px; color: var(--ink-2); margin: 6px 0 0; }

.section-title { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: var(--space-8) 0 var(--space-3); font-family: var(--font-display); font-weight: 700; font-size: 21px; line-height: 1.2; color: var(--ink); }
/* Título que abre uma coluna: logo abaixo do cabeçalho da página fica perto; depois de outra seção, guarda a distância normal. */
.page-head + .split > .split__main > .section-title:first-child, .page-head + .split > .split__side > .section-title:first-child,
.proofs + .split > .split__main > .section-title:first-child, .proofs + .split > .split__side > .section-title:first-child { margin-top: 6px; }
.side-title { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin: 0 0 var(--space-3); font-family: var(--font-display); font-weight: 700; font-size: 19px; line-height: 1.2; }
.side-sub { margin: var(--space-6) 0 var(--space-2); font: 700 12px/1.3 var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: var(--radius-pill); background: var(--calm-wash); color: var(--ink-2); font: 700 12px/1 var(--font-ui); font-variant-numeric: tabular-nums; letter-spacing: 0; vertical-align: 2px; }
.empty { margin: 0; padding: 16px 18px; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); background: rgba(252, 251, 249, 0.55); color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.more { margin-top: var(--space-4); font-size: 14px; }
.notice { position: relative; margin: 14px 0 0; padding: 12px 16px 12px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: inset 3px 0 0 var(--orange), var(--shadow-xs); font-size: 14.5px; }

/* ---------- Avisos ---------- */
.flashes { padding-top: var(--space-6); }
.flash { position: relative; margin: 0 0 var(--space-2); padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-xs); color: var(--ink); font-size: 14.5px; line-height: 1.5; }
.flash--ok, .flash--error, .flash.wa-warning { padding-left: 44px; }
.flash--ok::before, .flash--error::before, .flash.wa-warning::before { content: ""; position: absolute; left: 14px; top: 12.5px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.3l3 3 6-6.6' fill='none' stroke='%23f0ece6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; }
.flash--error { background: var(--danger-wash); border-color: var(--danger-line); color: var(--danger-ink); }
.flash--error::before, .flash.wa-warning::before { background: var(--danger) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 5.4v5.4' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round'/%3E%3Ccircle cx='10' cy='14.4' r='1.3' fill='%23fff'/%3E%3C/svg%3E") center / 100% no-repeat; }
.flash.wa-warning::before { background-color: var(--orange-ink); }
.flash a { color: inherit; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px;
  border: 1px solid var(--ink); border-radius: var(--radius);
  background: transparent; color: var(--ink);
  font: 700 14px/1.15 var(--font-ui); letter-spacing: 0.005em; text-decoration: none; text-align: center;
  cursor: pointer; white-space: nowrap;
  transition: background-color var(--dur), color var(--dur), border-color var(--dur), box-shadow var(--dur), transform 0.08s;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.btn svg { width: 18px; height: 18px; }
.btn--primary { background: var(--ink); border-color: var(--ink); color: var(--paper); box-shadow: 0 1px 2px rgba(10, 10, 10, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08); }
.btn--primary:hover { background: var(--ink-2); border-color: var(--ink-2); color: var(--paper); }
.btn--accent { background: var(--orange); border-color: var(--orange); color: var(--ink); box-shadow: 0 1px 2px rgba(163, 70, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.28); }
.btn--accent:hover { background: var(--orange-hover); border-color: var(--orange-hover); color: var(--ink); }
.btn--ghost { background: var(--surface); border-color: var(--line-strong); color: var(--ink); box-shadow: var(--shadow-xs); }
.btn--ghost:hover { background: #fff; border-color: var(--ink); color: var(--ink); }
.btn--danger { background: var(--surface); border-color: var(--danger); color: var(--danger); }
.btn--danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn--on-dark { background: transparent; border-color: rgba(240, 236, 230, 0.45); color: var(--on-dark); }
.btn--on-dark:hover { background: var(--on-dark-hover); border-color: var(--on-dark); color: var(--on-dark); }
.btn--on-dark:focus-visible { outline-color: var(--orange); }
.btn--small { min-height: 34px; padding: 0 12px; font-size: 13px; gap: 6px; }
.btn--block { width: 100%; }
.btn--icon { width: 40px; padding: 0; }
.btn--small.btn--icon { width: 34px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; box-shadow: none; pointer-events: none; }
.linkish { background: none; border: 0; padding: 0; font: inherit; font-size: 13.5px; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; cursor: pointer; transition: color var(--dur), text-decoration-color var(--dur); }
.linkish:hover { color: var(--ink); text-decoration-color: var(--orange); }
.linkish:disabled { opacity: 0.5; cursor: not-allowed; }
.linkish--danger { color: var(--danger); }
.linkish--danger:hover { color: var(--danger); text-decoration-color: var(--danger); }

/* ---------- Formulários ---------- */
.stack > * + * { margin-top: var(--space-4); }
.form-narrow { max-width: 560px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-4); }
label, .field-label { font-weight: 700; font-size: 13.5px; color: var(--ink-2); }
.field-label { margin: 18px 0 6px; }
input[type="text"], input[type="email"], input[type="password"], input[type="url"], input[type="date"], input[type="time"], input[type="datetime-local"], input[type="tel"], input[type="search"], input[type="number"], input:not([type]), select, textarea {
  font: 15px/1.4 var(--font-ui); color: var(--ink); background-color: #fff;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 9px 12px; min-height: 42px; width: 100%;
  box-shadow: inset 0 1px 2px rgba(28, 22, 15, 0.04);
  transition: border-color var(--dur), box-shadow var(--dur);
}
input::placeholder, textarea::placeholder { color: #7d776f; opacity: 1; }
input:hover, select:hover, textarea:hover { border-color: #b5ada1; }
textarea { min-height: 0; resize: vertical; line-height: 1.5; }
select { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%230a0a0a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; cursor: pointer; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--ink); box-shadow: none; }
input:disabled, select:disabled, textarea:disabled { background-color: var(--surface-sunken); color: var(--muted); cursor: not-allowed; }
input[type="file"] { font-size: 13.5px; max-width: 100%; }
input[type="file"]::file-selector-button { margin-right: 10px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: 700 13px/1 var(--font-ui); cursor: pointer; }
input[type="file"]::file-selector-button:hover { border-color: var(--ink); }
.input--narrow { width: 90px; }
.hint { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.45; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.field__error { margin: 0; font-size: 13px; font-weight: 700; color: var(--danger); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14.5px; color: var(--ink); cursor: pointer; }
.check input { accent-color: var(--ink); width: 18px; height: 18px; margin: 1px 0 0; flex: none; cursor: pointer; }
.check--block { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.check--block em { font-family: var(--font-copy); color: var(--muted); }
.fieldset { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px 18px 18px; margin: 0; min-width: 0; background: rgba(255, 255, 255, 0.4); }
.fieldset > * + * { margin-top: var(--space-3); }
.fieldset legend { font-weight: 700; padding: 0 6px; font-size: 13.5px; color: var(--ink-2); }
.fieldset--tight > * + * { margin-top: 4px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 6px; }
.inline-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 12px 0 0; }
.inline-form input { max-width: 320px; }
.danger-zone { margin-top: var(--space-10); padding-top: 4px; }
.danger-zone .section-title { color: var(--danger); }

/* ---------- Marcas de status ---------- */
/* Cada status tem uma forma própria no ponto (tracejado, miolo, cheio, metade, aro e visto), além da cor e do texto. */
.mark { display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px 3px 8px; border-radius: var(--radius-pill); background: var(--surface-sunken); box-shadow: inset 0 0 0 1px var(--line); font-size: 12.5px; font-weight: 700; color: var(--ink); white-space: nowrap; line-height: 1.3; }
.mark::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 2px solid currentColor; flex: none; }
.mark--fila { color: var(--muted); background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); }
.mark--fila::before { border-style: dashed; border-width: 1.5px; }
.mark--producao { color: var(--ink-2); }
.mark--producao::before { background: radial-gradient(circle, currentColor 0 1.6px, transparent 1.9px) border-box no-repeat; }
.mark--aprovacao { color: var(--orange-ink); background: var(--orange-wash); box-shadow: none; }
.mark--aprovacao::before { background: var(--orange); border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 124, 0, 0.18); }
.mark--ajustes { background: var(--orange-soft); box-shadow: inset 0 0 0 1px #f2d3b1; }
.mark--ajustes::before { background: linear-gradient(90deg, var(--ink) 50%, transparent 50%); border-color: var(--ink); }
.mark--publicada { color: var(--ink-2); }
.mark--aprovado { background: var(--calm-wash); box-shadow: none; }
.mark--aprovado::before { width: 12px; height: 12px; border: 0; background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 6.2l2 2 4-4.4' fill='none' stroke='%23f0ece6' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; }

/* ---------- Componentes: cartão, pessoa, etiqueta, abas, indicadores, linha do tempo, gaveta, vazio e destaque ---------- */
.card { position: relative; display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; padding: var(--space-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); transition: border-color var(--dur), box-shadow var(--dur), transform var(--dur); }
.card--accent { box-shadow: inset 0 3px 0 var(--orange), var(--shadow-sm); }
.card--link:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.card--link.card--accent:hover { box-shadow: inset 0 3px 0 var(--orange), var(--shadow-md); }
.card__link { color: inherit; text-decoration: none; }
.card--link .card__link::after { content: ""; position: absolute; inset: 0; z-index: 0; border-radius: inherit; }
.card--link .card__link:focus-visible { outline: none; }
.card--link .card__link:focus-visible::after { outline: 2px solid var(--focus); outline-offset: 2px; }
.card--link a:not(.card__link), .card--link button, .card--link form, .card--link input, .card--link select, .card--link summary { position: relative; z-index: 1; }
.card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.card__title { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 20px; line-height: 1.15; overflow-wrap: anywhere; }
.card__body { min-width: 0; font-size: 14.5px; color: var(--ink-2); }
.card__body > :last-child { margin-bottom: 0; }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-3); flex-wrap: wrap; margin-top: auto; padding-top: var(--space-3); border-top: 1px solid var(--line); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--space-4); }

.avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--calm-wash); color: var(--ink); font-size: 12px; font-weight: 700; line-height: 1; letter-spacing: 0.02em; flex: none; }
.avatar--sm { width: 24px; height: 24px; font-size: 10px; }
.avatar--lg { width: 44px; height: 44px; font-size: 15px; }
.avatar--accent { background: var(--orange-wash); color: var(--orange-ink); }
.who { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
.who__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.who__name { font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.who__meta { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px 2px; border-radius: var(--radius-sm); background: var(--calm-wash); color: var(--ink-2); font: 700 11px/1.3 var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; vertical-align: 1px; }
.badge--accent { background: var(--orange-wash); color: var(--orange-ink); }
.badge--dark { background: var(--ink); color: var(--paper); }
.badge--danger { background: var(--danger-wash); color: var(--danger); }
.badge--success { background: var(--success-wash); color: var(--success); }
.badge--outline { background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); }
.badge--dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.tabs { display: flex; gap: 2px; margin: 0 0 var(--space-5); border-bottom: 1px solid var(--line); overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs__tab { position: relative; display: inline-flex; align-items: center; gap: 8px; flex: none; min-height: 44px; padding: 0 14px; border: 0; border-radius: var(--radius) var(--radius) 0 0; background: transparent; color: var(--muted); font: 700 14px/1 var(--font-ui); text-decoration: none; white-space: nowrap; cursor: pointer; transition: color var(--dur), background-color var(--dur); }
.tabs__tab:hover { color: var(--ink); background: rgba(10, 10, 10, 0.03); }
.tabs__tab:focus-visible { outline-offset: -2px; }
.tabs__tab[aria-selected="true"], .tabs__tab[aria-current="page"], .tabs__tab.is-active { color: var(--ink); }
.tabs__tab[aria-selected="true"]::after, .tabs__tab[aria-current="page"]::after, .tabs__tab.is-active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--orange); }
.tabs__tab .count { vertical-align: 0; }
.tabs__panel { min-width: 0; }
.tabs__panel:focus-visible { outline-offset: 4px; border-radius: var(--radius); }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: var(--space-3); margin: var(--space-5) 0 0; }
.kpi { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; padding: 16px 18px 15px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); }
.kpi__label { margin: 0; font-size: 13px; font-weight: 700; line-height: 1.3; color: var(--muted); }
.kpi__value { margin: 0; font-family: var(--font-display); font-size: clamp(30px, 1.4vw + 18px, 42px); line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.kpi__sub { margin: 0; font-size: 12.5px; font-weight: 700; line-height: 1.35; color: var(--orange-ink); }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline__item { position: relative; padding: 0 0 var(--space-5) 30px; }
.timeline__item::before { content: ""; position: absolute; left: 7px; top: 20px; bottom: 2px; width: 2px; border-radius: 2px; background: var(--line); }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item:last-child::before { display: none; }
.timeline__item::after { content: ""; position: absolute; left: 0; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-strong); }
.timeline__item--accent::after { background: var(--orange); border-color: var(--orange); }
.timeline__item--ink::after { background: var(--ink); border-color: var(--ink); }
.timeline__item--success::after { background: var(--success); border-color: var(--success); }
.timeline__item--danger::after { background: var(--danger); border-color: var(--danger); }
.timeline__item.is-future::after { background: var(--surface); border-style: dashed; border-color: var(--ink); }
.timeline__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.timeline__title { margin: 0; font-size: 14.5px; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.timeline__when { font-size: 12.5px; color: var(--muted); }
.timeline__body { margin-top: 4px; font-size: 14px; line-height: 1.5; color: var(--ink-2); overflow-wrap: anywhere; }
.timeline__body > :last-child { margin-bottom: 0; }
.timeline__meta { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }

.drawer { position: fixed; inset: 0 0 0 auto; width: min(460px, 100vw); max-width: 100vw; height: 100%; max-height: 100%; margin: 0; padding: 0; border: 0; border-radius: var(--radius-xl) 0 0 var(--radius-xl); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); flex-direction: column; overflow: hidden; }
.drawer[open] { display: flex; animation: drawer-in 0.26s var(--ease); }
.drawer::backdrop { background: rgba(10, 10, 10, 0.45); }
.drawer__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); padding: 20px 22px 16px; border-bottom: 1px solid var(--line); }
.drawer__title { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 24px; line-height: 1.1; overflow-wrap: anywhere; }
.drawer__close { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; margin: -6px -8px 0 0; padding: 0; border: 0; border-radius: var(--radius); background: transparent; color: var(--ink-2); cursor: pointer; }
.drawer__close:hover { background: var(--calm-wash); color: var(--ink); }
.drawer__close svg { width: 22px; height: 22px; }
.drawer__body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 20px 22px; }
.drawer__foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--surface-sunken); }
@media (max-width: 600px) {
  .drawer { width: 100vw; border-radius: 0; }
  .drawer__foot .btn { flex: 1 1 auto; }
}

.empty-state { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); padding: var(--space-8) var(--space-6); border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); background: rgba(252, 251, 249, 0.55); text-align: center; }
.empty-state__icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 4px; border-radius: 14px; background: var(--orange-wash); color: var(--orange-ink); }
.empty-state__icon svg { width: 24px; height: 24px; }
.empty-state__title { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 21px; line-height: 1.2; }
.empty-state__text { margin: 0; max-width: 52ch; color: var(--muted); font-size: 14.5px; }
.empty-state__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2); margin: var(--space-2) 0 0; }
.empty-state--page { padding: var(--space-10) var(--space-6); background: var(--surface); border-style: solid; border-color: var(--line); box-shadow: var(--shadow-sm); }
.empty-state--page .display, .empty-state--page .lead { margin-inline: auto; }

.callout { position: relative; padding: 12px 16px 12px 18px; background: var(--surface-sunken); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: inset 3px 0 0 var(--ink-2); font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.callout > :last-child { margin-bottom: 0; }
.callout__label { display: block; margin: 0 0 4px; font: 700 11px/1.3 var(--font-ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.callout--accent { background: var(--orange-soft); border-color: #f2d3b1; box-shadow: inset 3px 0 0 var(--orange); }
.callout--accent .callout__label { color: var(--orange-ink); }
.callout--danger { background: var(--danger-wash); border-color: var(--danger-line); box-shadow: inset 3px 0 0 var(--danger); color: var(--danger-ink); }
.callout--success { background: var(--success-wash); border-color: #c4dccb; box-shadow: inset 3px 0 0 var(--success); }

/* ---------- Listas de entregáveis ---------- */
/* Listas em cartão: .rows, .sprintlist, .feed, .people, .journey e .loglist ficam numa superfície clara com borda fina. */
.rows, .sprintlist, .feed, .people, .journey, .loglist { list-style: none; margin: 0; padding: 0 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); }
.rows:not(:has(> li)), .sprintlist:not(:has(> li)), .feed:not(:has(> li)), .people:not(:has(> li)), .journey:not(:has(> li)), .loglist:not(:has(> li)) { display: none; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row__main { min-width: 0; }
.row__title { font-weight: 700; font-size: 15.5px; color: var(--ink); text-decoration: none; }
a.row__title:hover { text-decoration: underline; text-decoration-color: var(--orange); color: var(--ink); }
.row__meta { font-size: 13.5px; color: var(--muted); margin: 3px 0 0; }
.row__aside { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: none; text-align: right; }
.row__when { font-size: 12.5px; color: var(--muted); }
.rows--compact .row { padding: 11px 0; }
.split__side .row { flex-direction: column; align-items: flex-start; gap: 6px; }
.split__side .row__aside { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 10px; text-align: left; }
.manuscript--diff .diff-li { margin: 0 0 0.35em; }
.diff-none { font-family: var(--font-ui); font-size: 14px; color: var(--muted); }
.rows--compact .row__title { font-size: 14.5px; }
.is-late { color: var(--danger) !important; font-weight: 700; }

/* ---------- Sprints ---------- */
.sprintlist--grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: var(--space-4); padding: 0; background: none; border: 0; box-shadow: none; }
.sprintrow { padding: 17px 0; border-bottom: 1px solid var(--line); }
.sprintrow:last-child { border-bottom: 0; }
.sprintlist--grid .sprintrow { display: flex; flex-direction: column; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); transition: border-color var(--dur), box-shadow var(--dur); }
.sprintlist--grid .sprintrow:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.sprintrow__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sprintrow__name { font-weight: 700; font-size: 16.5px; line-height: 1.3; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.sprintrow__name:hover { text-decoration: underline; text-decoration-color: var(--orange); color: var(--ink); }
.sprintrow__status { flex: none; padding: 3px 9px; border-radius: var(--radius-pill); background: var(--calm-wash); font-size: 12px; font-weight: 700; line-height: 1.3; color: var(--ink-2); white-space: nowrap; }
.sprintrow--andamento .sprintrow__status { background: var(--orange-wash); color: var(--orange-ink); }
.sprintrow--planejado .sprintrow__status { background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--muted); }
.sprintrow__meta { font-size: 13px; color: var(--muted); margin: 4px 0 12px; min-height: 1px; }
.sprintrow__count { font-size: 13.5px; margin: 10px 0 0; color: var(--ink-2); }
.sprintrow__late { display: block; margin-top: 2px; } /* "Passou do fim há N dias": a cor vem de .is-late */
.sprintlist--compact .sprintrow { padding: 11px 0; }
.sprintlist--compact .sprintrow__name { font-size: 14.5px; }
.progress { height: 6px; background: var(--calm-wash); border-radius: var(--radius-pill); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--ink); min-width: 0; border-radius: var(--radius-pill); transition: width 0.4s var(--ease); }
.progress--large { height: 10px; }
.sprint-meter { margin: 4px 0 0; max-width: 640px; }
.sprint-meter__text { margin: 10px 0 0; font-size: 14.5px; display: flex; gap: 4px 18px; flex-wrap: wrap; }
.sprint-meter__dates { color: var(--muted); }
.sprint-close { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; margin: 20px 0 8px; padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); font-size: 14px; }
.sprint-close p { margin: 0; flex: 1 1 280px; }
.sprint-close--ready { box-shadow: inset 3px 0 0 var(--orange), var(--shadow-xs); }

/* ---------- Layout em duas colunas ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--space-8) 44px; }
.split--even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.split__main, .split__side { min-width: 0; }

/* ---------- Início do cliente: provas aguardando aprovação ---------- */
.proofs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: var(--space-5); margin-bottom: var(--space-6); }
.proof { display: flex; flex-direction: column; gap: 8px; padding: 22px 24px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: inset 0 3px 0 var(--orange), var(--shadow-md); }
.proof__meta { margin: 0; font: 700 11.5px/1.35 var(--font-ui); letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.proof__title { font-family: var(--font-display); font-size: 27px; line-height: 1.08; margin: 0; overflow-wrap: anywhere; }
.proof__title a { color: var(--ink); text-decoration: none; }
.proof__title a:hover { text-decoration: underline; text-decoration-color: var(--orange); }
.proof__excerpt { font-family: var(--font-copy); font-size: 16.5px; line-height: 1.62; color: var(--ink-2); margin: 4px 0 6px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.proof__link { font-family: var(--font-display); font-size: 20px; margin: 4px 0; color: var(--ink-2); overflow-wrap: anywhere; }
.proof__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.proof__when { font-size: 13px; color: var(--muted); }

/* ---------- Movimentação ---------- */
.feed__item { display: grid; gap: 1px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.feed__item:last-child { border-bottom: 0; }
.feed__label { font-size: 11.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.feed__item--entrega .feed__label { color: var(--orange-ink); }
.feed__item--aprovacao .feed__label { color: var(--ink); }
.feed__title { font-weight: 700; overflow-wrap: anywhere; }
.feed__title a { color: var(--ink); text-decoration: none; }
.feed__title a:hover { text-decoration: underline; text-decoration-color: var(--orange); }
.feed__detail { font-size: 12.5px; color: var(--muted); }

/* ---------- Jornada do cliente: como chegou e a linha do tempo ---------- */
.origin { padding: 14px 0 4px; border-bottom: 1px solid var(--line); }
.origin__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin: 0 0 10px; }
.origin__name { font-weight: 700; font-size: 16px; overflow-wrap: anywhere; }
.origin__stage { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.origin__notes { margin: 0 0 12px; font-size: 14px; }
.origin__notes summary { cursor: pointer; font-weight: 700; color: var(--ink-2); }
.origin__notes .prose { margin-top: 8px; }
.journey-bar { margin: 12px 0 10px; }
.journey__item { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 0 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.journey__item:last-child { border-bottom: 0; }
.journey__when { font-size: 12.5px; color: var(--muted); padding-top: 1px; }
.journey__main { display: grid; gap: 1px; min-width: 0; }
.journey__label { font-size: 11.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.journey__item--entregas .journey__label, .journey__item.is-future .journey__label { color: var(--orange-ink); }
.journey__item--vendas .journey__label { color: var(--ink); }
.journey__title { font-weight: 700; overflow-wrap: anywhere; }
.journey__title a { color: var(--ink); text-decoration: none; }
.journey__title a:hover { text-decoration: underline; text-decoration-color: var(--orange); }
.journey__detail { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.journey__more { margin: 14px 0 0; }
@media (max-width: 720px) {
  .journey__item { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

/* ---------- Filtros ---------- */
.filters { display: flex; flex-direction: column; gap: 12px; margin: 0 0 var(--space-5); }
.filters__row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filters__row input[type="search"] { width: 280px; max-width: 100%; }
.filters__row select { width: auto; min-width: 190px; max-width: 100%; }
.filters__row .btn { min-height: 42px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: var(--surface); color: var(--ink-2); font: 700 13px/1 var(--font-ui); text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color var(--dur), border-color var(--dur), color var(--dur); }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.is-active:hover { color: var(--paper); }
.chip.is-active, .chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip__n { font-weight: 400; opacity: 0.72; }
.status-switch { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.status-switch__label { font: 700 11.5px/1 var(--font-ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.status-switch__hint { font-size: 13px; color: var(--muted); margin-left: 6px; }
.period { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin: 12px 0 0; }
.period__custom { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); }
.period__custom input { width: auto; min-height: 36px; padding: 6px 10px; font-size: 14px; }

/* ---------- Tabelas ---------- */
/* A tabela fica num cartão que rola de lado sozinho: a página nunca. */
.table-wrap {
  position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs);
  /* Sombra nas bordas quando há mais tabela para o lado (some quando a rolagem chega ao fim) */
  background:
    linear-gradient(to right, var(--surface) 30%, rgba(252, 251, 249, 0)) left center / 40px 100% no-repeat local,
    linear-gradient(to left, var(--surface) 30%, rgba(252, 251, 249, 0)) right center / 40px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(28, 22, 15, 0.16), rgba(28, 22, 15, 0)) left center / 14px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(28, 22, 15, 0.16), rgba(28, 22, 15, 0)) right center / 14px 100% no-repeat scroll,
    var(--surface);
}
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: left; padding: 11px 12px; background: var(--surface-sunken); border-bottom: 1px solid var(--line); font: 700 12.5px/1.3 var(--font-ui); color: var(--muted); white-space: nowrap; }
.table td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background-color var(--dur); }
.table tbody tr:hover { background: rgba(240, 236, 230, 0.42); }
.table tr.is-muted td { color: var(--muted); }
.table__strong { font-weight: 700; color: var(--ink); text-decoration: none; }
.table__strong:hover { text-decoration: underline; text-decoration-color: var(--orange); }
.table__sub { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.table__actions { display: flex; gap: 12px; align-items: center; white-space: nowrap; }
.table__actions form { margin: 0; }
.table--form td { vertical-align: middle; padding: 8px 8px; }
.table--form input:not([type="checkbox"]), .table--form select { min-height: 36px; padding: 6px 10px; font-size: 14px; }
.table--dns td { font-size: 13.5px; }
.table__value code { display: inline-block; max-width: 420px; }
.panel .table-wrap, .capivara .table-wrap { box-shadow: none; }
.sent { font-weight: 700; font-size: 13px; }
.sent--falhou { color: var(--danger); }
.sent--simulado { color: var(--muted); }

/* ---------- Mesa de trabalho e quadro do sprint ---------- */
/* Colunas em raia clara; cada cartão (.slip) é clicável inteiro pelo título, e o que tem ação própria fica por cima. */
.desk { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 8px; margin-bottom: 0; }
.desk__col, .board__col { min-width: 0; padding: 12px 10px 12px; background: rgba(252, 251, 249, 0.5); border: 1px solid rgba(214, 208, 200, 0.6); border-radius: var(--radius-lg); }
.col-title { display: flex; align-items: center; gap: 8px; margin: 0 2px 12px; padding: 0 0 10px; border-bottom: 2px solid var(--ink); font-family: var(--font-display); font-weight: 700; font-size: 19px; line-height: 1.15; }
.desk__col--todo .col-title { border-bottom-color: var(--orange); }
.slips { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.slip { --slip-accent: transparent; position: relative; display: flex; flex-direction: column; gap: 3px; padding: 11px 13px 11px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: inset 3px 0 0 var(--slip-accent), var(--shadow-xs); transition: border-color var(--dur), box-shadow var(--dur), transform var(--dur); }
.slip:hover { border-color: var(--line-strong); box-shadow: inset 3px 0 0 var(--slip-accent), var(--shadow-md); }
.desk__col--todo .slip { --slip-accent: var(--orange); }
.slip__title { font-weight: 700; color: var(--ink); text-decoration: none; font-size: 14.5px; line-height: 1.3; overflow-wrap: anywhere; }
.slip__title::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.slip__title:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--orange); }
.slip__title:focus-visible { outline: none; }
.slip__title:focus-visible::after { outline: 2px solid var(--focus); outline-offset: 2px; }
.slip .prio, .slip .rate, .slip__action, .slip__join, .slip form, .slip .liveform { position: relative; z-index: 1; }
.slip__meta, .slip__when { font-size: 12.5px; color: var(--muted); }
.slip__action { margin: 6px 0 0; }
.slip__action .linkish { font-weight: 700; color: var(--ink); text-decoration-color: var(--orange); }
.board__col--fila .slip, .desk__col--fila .slip { background: rgba(252, 251, 249, 0.6); border-style: dashed; border-color: var(--line-strong); box-shadow: none; }
.board__col--fila .slip:hover, .desk__col--fila .slip:hover { background: var(--surface); box-shadow: var(--shadow-sm); }
.board { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.board__col--aprovacao .col-title { border-bottom-color: var(--orange); }
.board__col--aprovacao .slip { --slip-accent: var(--orange); }
.board__col--ajustes .slip { --slip-accent: var(--ink); }
.board__col--aprovado .slip { --slip-accent: var(--ink); background: var(--surface-sunken); }
.onboard { margin: 16px 0; padding: 8px 24px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: inset 0 3px 0 var(--orange), var(--shadow-sm); }
.onboard__steps { margin: 12px 0 0; padding-left: 22px; }
.onboard__steps li { margin: 6px 0; }

/* ---------- Pessoas ---------- */
.people { margin: 8px 0 12px; }
.person { display: flex; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.person:last-child { border-bottom: 0; }
.person.is-muted { opacity: 0.6; }
.person__main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.person__name { font-weight: 700; }
.person__email { font-size: 13.5px; color: var(--ink-2); word-break: break-all; }
.person__state { font-size: 12.5px; color: var(--muted); }
.person__actions { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; }
.person__actions form { margin: 0; }
.addbox { margin: 10px 0 0; }
.addbox > summary { list-style: none; display: inline-flex; }
.addbox > summary::-webkit-details-marker { display: none; }
.addbox[open] > summary { margin-bottom: 14px; }
.prose p { margin: 0 0 10px; }
.prose--small { font-size: 14px; color: var(--ink-2); }

/* ---------- Painel de configurações ---------- */
.settings { display: grid; gap: var(--space-5); }
.panel { min-width: 0; padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.panel > .section-title:first-child { margin: 0 0 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.panel .section-title:first-child { margin-top: 0; }
.panel--publish { box-shadow: inset 0 3px 0 var(--orange), var(--shadow-sm); }
.panel--publish > * + * { margin-top: 12px; }
.panel--scheduled { box-shadow: inset 0 3px 0 var(--ink), var(--shadow-sm); }
.panel--scheduled form + form { margin-top: 8px; }
.schedule-when { font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1.15; margin: 0; }
.when { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.when__legend { float: left; font-weight: 700; font-size: 13.5px; padding: 0; margin-right: 4px; }
.when__later { flex-basis: 100%; display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.when__later > p { margin: 0; }
.when__fields { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 10px; }
.when__fields .field { margin: 0; }
.when__fields input, .when__fields select { min-height: 40px; padding: 6px 10px; font-size: 14.5px; }
.editbar--scheduled .editbar__title::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--ink); margin-right: 8px; vertical-align: 1px; }
.slip__when.is-scheduled { color: var(--ink-2); font-weight: 700; }
.panel--danger { display: flex; flex-direction: column; gap: 10px; background: transparent; border-style: dashed; border-color: var(--line-strong); box-shadow: none; }
.panel--danger form { margin: 0; }
details.panel > summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0; cursor: pointer; list-style: none; }
details.panel > summary::-webkit-details-marker { display: none; }
details.panel > summary::after { content: ""; flex: none; width: 10px; height: 10px; margin-right: 4px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translate(-2px, -2px); transition: transform var(--dur); }
details.panel[open] > summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
details.panel[open] > summary { margin-bottom: 14px; }
.facts { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 10px 16px; margin: 0 0 16px; font-size: 14.5px; }
.facts dt { font-weight: 700; color: var(--ink-2); }
.facts dd { margin: 0; min-width: 0; }
.facts .hint { display: block; margin-top: 4px; }
.code-block { display: inline-block; padding: 4px 8px; }
.domain { border-top: 1px solid var(--line); padding: 14px 0 6px; }
.domain__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.domain__name { margin: 0; font-size: 17px; }
.recipients { font-size: 13.5px; color: var(--ink-2); margin: 0; }
.mailpreview { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--space-6); align-items: start; }
.mailpreview__frame { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.mailpreview__frame iframe { width: 100%; height: 760px; border: 0; display: block; }

/* ---------- Página de leitura do entregável ---------- */
.doc-head { padding: var(--space-7) 0 var(--space-5); }
.doc-head__row { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.doc-head__status { padding-top: 28px; }
.doc-head__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: 8px; }
.doc-head__info { font-size: 14px; color: var(--muted); margin: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.doc-head__reading { color: var(--ink-2); }
.versions { display: flex; flex-wrap: wrap; gap: 2px; padding: 3px; background: var(--calm-wash); border-radius: 10px; }
.versions__item { padding: 6px 12px; border-radius: 7px; color: var(--ink-2); font-size: 13.5px; font-weight: 700; text-decoration: none; transition: background-color var(--dur), color var(--dur); }
.versions__item:hover { background: rgba(255, 255, 255, 0.6); color: var(--ink); }
.versions__item.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.brief { margin: 16px 0 0; font-size: 14.5px; max-width: 70ch; }
.brief summary { cursor: pointer; font-weight: 700; color: var(--ink-2); }
.brief .prose { margin-top: 8px; color: var(--ink-2); }
.brief--open { margin-top: 20px; }

.doc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 44px; align-items: start; }
.doc-side { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; padding-right: 4px; scrollbar-width: thin; }
.has-decision .doc-side { max-height: calc(100vh - 120px); }

.sheet { position: relative; padding: clamp(24px, 5vw, 64px) clamp(20px, 6vw, 76px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: inset 0 3px 0 var(--orange), var(--shadow-md); }
.sheet__label { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }

.manuscript { font-family: var(--font-copy); font-size: 19px; line-height: 1.72; color: var(--ink-2); max-width: 66ch; overflow-wrap: break-word; }
.manuscript > :first-child { margin-top: 0; }
.manuscript > :last-child { margin-bottom: 0; }
.manuscript p { margin: 0 0 1em; }
.manuscript h2 { font-family: var(--font-display); font-weight: 700; font-size: 31px; line-height: 1.1; color: var(--ink); margin: 1.5em 0 0.45em; }
.manuscript h3 { font-family: var(--font-display); font-weight: 700; font-size: 24px; line-height: 1.15; color: var(--ink); margin: 1.35em 0 0.4em; }
.manuscript h4 { font-family: var(--font-ui); font-weight: 700; font-size: 17px; line-height: 1.3; color: var(--ink); margin: 1.3em 0 0.35em; }
.manuscript strong { font-weight: 700; color: var(--ink); }
.manuscript blockquote { margin: 1.2em 0; padding: 0.1em 0 0.1em 1.1em; border-left: 3px solid var(--orange); font-style: italic; }
.manuscript blockquote p:last-child { margin-bottom: 0; }
.manuscript ul, .manuscript ol { padding-left: 1.35em; margin: 0 0 1em; }
.manuscript li { margin: 0.3em 0; padding-left: 0.15em; }
.manuscript ul > li::marker { color: var(--orange-ink); }
.manuscript ol > li::marker { font-family: var(--font-ui); font-weight: 700; font-size: 0.85em; color: var(--ink); }
.manuscript hr { border: 0; height: 1px; background: var(--rule); margin: 2.2em auto; width: 40%; }
.manuscript a { color: var(--ink); text-decoration-color: var(--orange); }
.manuscript table { border-collapse: collapse; width: 100%; font-family: var(--font-ui); font-size: 15px; line-height: 1.45; margin: 1.3em 0; display: block; overflow-x: auto; }
.manuscript th, .manuscript td { border-bottom: 1px solid var(--rule); padding: 8px 12px 8px 0; text-align: left; vertical-align: top; }
.manuscript th { border-bottom: 2px solid var(--ink); font-weight: 700; }

/* Comentários ancorados no texto */
mark.cmt { background: linear-gradient(transparent 58%, var(--orange-wash) 58%); color: inherit; border-bottom: 2px solid var(--orange); padding: 0; cursor: pointer; }
mark.cmt.is-active { background: var(--orange-wash); }
mark.cmt--done { border-bottom-color: var(--rule); background: none; }
.selbtn { position: absolute; z-index: 45; padding: 9px 14px; border: 0; border-bottom: 3px solid var(--orange); border-radius: var(--radius); background: var(--ink); color: var(--paper); font: 700 13.5px var(--font-ui); cursor: pointer; box-shadow: var(--shadow-md); }
.selbtn:hover { background: var(--ink-2); }
.popover { position: absolute; z-index: 46; width: min(380px, calc(100vw - 32px)); padding: 16px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.popover__quote { font-family: var(--font-copy); font-style: italic; font-size: 14.5px; line-height: 1.5; color: var(--muted); border-left: 3px solid var(--orange); padding-left: 10px; margin: 0 0 10px; max-height: 4.6em; overflow: hidden; }
.popover textarea { margin-bottom: 10px; }
.popover__actions { display: flex; justify-content: flex-end; gap: 8px; }
.popover__error { color: var(--danger); font-size: 13px; margin: 0 0 8px; }

.notes { list-style: none; margin: 0 0 10px; padding: 0; }
.note { position: relative; margin: 0 0 10px; padding: 11px 12px 11px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: inset 3px 0 0 var(--line-strong); }
.note--pending { box-shadow: inset 3px 0 0 var(--orange); }
.note--resolved { opacity: 0.72; }
.note.is-active { background: linear-gradient(90deg, var(--orange-wash), var(--surface)); }
.note__quote { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 0; margin: 0 0 6px; font-family: var(--font-copy); font-style: italic; font-size: 14.5px; line-height: 1.45; color: var(--muted); cursor: pointer; }
.note__quote:hover { color: var(--ink); }
.note__body { margin: 0 0 4px; font-size: 14.5px; line-height: 1.5; overflow-wrap: break-word; }
.note__meta { font-size: 12.5px; color: var(--muted); margin: 0; }
.note__remove { margin-top: 4px; font-size: 12.5px; }
.note-form { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; margin-top: 6px; }
.note-form textarea { font-size: 14.5px; }
.margin .hint { margin-bottom: 12px; }
.history { margin-top: 28px; }
.history__list { list-style: none; margin: 0; padding: 0 0 0 2px; }
.history__item { position: relative; display: flex; flex-direction: column; padding: 0 0 16px 24px; font-size: 13.5px; }
.history__item::before { content: ""; position: absolute; left: 0; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-strong); }
.history__item::after { content: ""; position: absolute; left: 5px; top: 19px; bottom: 1px; width: 2px; border-radius: 2px; background: var(--line); }
.history__item:last-child::after { display: none; }
.history__item--aprovado::before { background: var(--ink); border-color: var(--ink); }
.history__item--ajustes::before { background: var(--orange); border-color: var(--orange); }
.history__what { font-weight: 700; }
.history__when { font-size: 12.5px; color: var(--muted); }
.history__msg { font-size: 13px; color: var(--ink-2); margin-top: 3px; }

.letter { border-left: 3px solid var(--ink); padding: 2px 0 2px 16px; margin: 0 0 26px; max-width: 66ch; }
.letter__from { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.letter__body { font-family: var(--font-copy); font-size: 17px; line-height: 1.6; color: var(--ink-2); }
.letter__body p { margin: 0 0 8px; }
.resolved { margin: 0 0 26px; padding: 16px 20px; background: var(--surface-sunken); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.resolved .side-title { font-size: 17px; }
.resolved__list { list-style: none; margin: 0; padding: 0; }
.resolved__list li { position: relative; padding: 7px 0 7px 26px; font-size: 14px; border-top: 1px solid var(--line); }
.resolved__list li:first-child { border-top: 0; }
.resolved__list li::before { content: ""; position: absolute; left: 0; top: 10px; width: 14px; height: 14px; border-radius: 50%; background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 6.2l2 2 4-4.4' fill='none' stroke='%23f0ece6' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; }
.resolved__quote { display: block; font-family: var(--font-copy); font-style: italic; color: var(--muted); }
.stamp { display: inline-flex; flex-direction: column; gap: 3px; margin: 0 0 26px; padding: 10px 18px 9px; background: var(--surface); border: 3px solid var(--ink); border-radius: var(--radius-sm); transform: rotate(-1.2deg); box-shadow: var(--shadow-sm); }
.stamp__word { font-family: var(--font-display); font-size: 32px; line-height: 1; letter-spacing: 0.03em; }
.stamp__meta { font-size: 13px; color: var(--muted); }

.linkcard { margin: 0 0 26px; padding: 24px 26px; background: var(--surface-dark); color: var(--on-dark); border-radius: var(--radius-xl); box-shadow: inset 0 3px 0 var(--orange), var(--shadow-md); }
.linkcard__label { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #bdb6ac; margin: 0 0 8px; }
.linkcard__url { display: block; font-family: var(--font-display); font-size: clamp(24px, 3.4vw, 34px); line-height: 1.1; color: var(--on-dark); text-decoration: none; overflow-wrap: anywhere; }
.linkcard__url span { color: #9d968c; }
.linkcard__url:hover { color: var(--on-dark); text-decoration: underline; text-decoration-color: var(--orange); }
.linkcard__url:focus-visible { outline-color: var(--orange); }
.linkcard__actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.linkcard .btn--primary { background: var(--orange); border-color: var(--orange); color: var(--ink); }
.linkcard .btn--primary:hover { background: var(--orange-hover); border-color: var(--orange-hover); }
.linkcard .btn--ghost { background: transparent; border-color: rgba(240, 236, 230, 0.45); color: var(--on-dark); box-shadow: none; }
.linkcard .btn--ghost:hover { border-color: var(--on-dark); background: var(--on-dark-hover); color: var(--on-dark); }
.linkcard .btn:focus-visible { outline-color: var(--orange); }
.linkcard--compact { padding: 16px 20px; }
.linkcard--compact .linkcard__url { font-size: 22px; }
.preview { margin-top: 18px; }
.preview__bar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 10px; }
.preview__bar .hint { color: #bdb6ac; }
.preview .chip { background: transparent; color: var(--on-dark); border-color: rgba(240, 236, 230, 0.4); }
.preview .chip.is-active { background: var(--on-dark); color: var(--ink); border-color: var(--on-dark); }
.preview__stage { display: flex; justify-content: center; padding: 12px; background: #1d1b18; border-radius: var(--radius-lg); }
.preview__stage iframe { width: 100%; height: 720px; border: 0; border-radius: var(--radius); background: #fff; display: block; }
.preview__stage.is-mobile iframe { width: 390px; max-width: 100%; height: 780px; }

.diffbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 0 0 12px; }
.diffbar__legend { font-size: 13.5px; color: var(--muted); display: inline-flex; gap: 12px; }
.manuscript--diff ins, .diffbar__legend ins { text-decoration: none; background: var(--orange-wash); box-shadow: inset 0 -2px 0 var(--orange); }
.manuscript--diff del, .diffbar__legend del { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--danger); }
.diff-added { border-left: 3px solid var(--orange); padding-left: 12px; margin-left: -15px; }
.diff-removed { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--danger); border-left: 3px solid var(--rule); padding-left: 12px; margin-left: -15px; }
.diff-li::before { content: "• "; color: var(--orange-ink); }
.diff-li[data-num]::before { content: attr(data-num) " "; }

.files { margin-top: 28px; }
.files__list { list-style: none; margin: 0; padding: 0; }
.files__item { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.files__item > a:first-child { font-weight: 700; overflow-wrap: anywhere; }
.files__item form { margin: 0; }
.files__size { font-size: 12.5px; color: var(--muted); }
.upload { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.upload .hint { flex-basis: 100%; }

/* Barra de decisão do cliente */
.decision { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--surface-dark); color: var(--on-dark); border-top: 3px solid var(--orange); box-shadow: 0 -12px 32px -16px rgba(10, 10, 10, 0.45); }
.decision__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.decision__text { margin: 0; font-size: 15px; }
.decision__text span { color: #c9c2b8; }
.decision__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.has-decision .page { padding-bottom: 120px; }
.has-decision .footer { padding-bottom: 96px; }
.has-decision .toast { bottom: 100px; }

/* ---------- Editor (painel) ---------- */
.workbench { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 36px; align-items: start; }
.workbench__main { min-width: 0; }
.workbench__side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.editbar { display: flex; justify-content: space-between; align-items: center; gap: 12px 20px; flex-wrap: wrap; padding: 0 0 12px; }
.editbar form { margin: 0; }
.editbar__title { font-weight: 700; margin: 0; font-size: 15.5px; }
.editbar__hint { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.editbar__actions { display: flex; gap: 8px; align-items: center; }
.linkfields { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 12px 16px; margin: 0 0 14px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.linkfields--optional { display: block; padding: 12px 16px; }
.linkfields--optional > summary { cursor: pointer; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.linkfields--optional[open] > summary { margin-bottom: 12px; }
.linkfields--optional .field + .field { margin-top: 12px; }
.editor { position: relative; }
.editor__toolbar { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 3px; margin-bottom: 14px; padding: 8px; background: rgba(240, 236, 230, 0.94); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); }
.editor__toolbar select { width: auto; min-height: 34px; padding: 4px 30px 4px 10px; font-size: 13.5px; background-position: right 10px center; }
.tool { font: 13.5px/1 var(--font-ui); padding: 0 9px; min-height: 34px; min-width: 34px; border: 1px solid transparent; background: transparent; border-radius: var(--radius-sm); color: var(--ink); cursor: pointer; transition: background-color var(--dur), border-color var(--dur); }
.tool:hover { border-color: var(--line); background: var(--surface); }
.tool.is-on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.tool--strong { font-weight: 700; border-color: var(--line-strong); }
.tool strong, .tool em, .tool u, .tool s { font-family: var(--font-copy); font-size: 15px; }
.editor__sep { width: 1px; height: 22px; background: var(--line-strong); margin: 0 5px; }
.editor__grow { flex: 1; }
.sheet--editing:focus-within { border-color: var(--ink); }
.editor__surface { min-height: 460px; outline: none; position: relative; caret-color: var(--orange-ink); }
.editor__surface.is-empty::before { content: attr(data-placeholder); position: absolute; top: 0; left: 0; color: #7d776f; font-style: italic; pointer-events: none; }
.editor__foot { position: sticky; bottom: 0; z-index: 20; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 14px; padding: 10px 14px; background: rgba(240, 236, 230, 0.94); border: 1px solid var(--line); border-radius: var(--radius-lg); font-size: 13px; color: var(--muted); }
.editor__count { flex: 1; }
.editor__status.is-dirty { color: var(--orange-ink); font-weight: 700; }
.editor__status.is-error { color: var(--danger); font-weight: 700; }
.linkpop { position: absolute; z-index: 25; display: flex; gap: 6px; align-items: center; width: min(460px, calc(100vw - 32px)); padding: 8px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.linkpop input { min-height: 34px; padding: 4px 10px; font-size: 14px; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 60; max-width: calc(100vw - 32px); padding: 11px 18px; background: var(--ink); color: var(--paper); border-radius: var(--radius); border-bottom: 3px solid var(--orange); font-size: 14px; box-shadow: var(--shadow-lg); transform: translateX(-50%); animation: toast-in 0.22s var(--ease); }

.review { border-top: 1px solid var(--line); padding: 12px 0; font-size: 14px; }
.review:first-of-type { border-top: 0; padding-top: 0; }
.review__head { margin: 0 0 6px; }
.review--ajustes .review__head strong { color: var(--orange-ink); }
.review__msg { font-family: var(--font-copy); font-size: 15px; line-height: 1.55; border-left: 3px solid var(--ink); padding-left: 10px; margin: 6px 0 8px; }
.review__msg p { margin: 0 0 6px; }
.review__comments { list-style: none; margin: 0; padding: 0; }
.review__comments li { display: flex; flex-direction: column; gap: 3px; margin: 6px 0; padding: 8px 0 8px 12px; border-left: 3px solid var(--orange); }
.review__comments li.is-resolved { border-left-color: var(--rule); opacity: 0.75; }
.review__quote { font-family: var(--font-copy); font-style: italic; color: var(--muted); font-size: 14px; }
.review__body { font-size: 14px; }
.review__resolve { margin: 2px 0 0; }
.vlist { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.vlist li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.vlist li:last-child { border-bottom: 0; }
.vlist li span { color: var(--muted); font-size: 12.5px; text-align: right; }
.vlist li.is-active a { font-weight: 700; text-decoration-color: var(--orange); }
.typepick { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); gap: 8px; }
.typepick__item { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 11px 13px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); cursor: pointer; transition: border-color var(--dur), box-shadow var(--dur); }
.typepick__item:hover { border-color: var(--ink); }
.typepick__item input { position: absolute; opacity: 0; pointer-events: none; }
.typepick__item:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink), var(--shadow-sm); background: #fff; }
.typepick__item:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.typepick__name { font-weight: 700; }
.typepick__format { font-size: 12.5px; font-weight: 400; color: var(--muted); }

/* ---------- Reuniões ---------- */
.meeting-links { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin: 0 0 18px; }
.meeting-link { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 13px 16px 14px; background: var(--surface-dark); color: var(--on-dark); border-radius: var(--radius-lg); box-shadow: inset 0 3px 0 var(--orange), var(--shadow-sm); text-decoration: none; transition: background-color var(--dur); }
.meeting-link:hover { color: var(--on-dark); background: #1d1b18; }
.meeting-link:focus-visible { outline-color: var(--orange-ink); }
.meeting-link__label { font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: #bdb6ac; }
.meeting-link__url { font-family: var(--font-display); font-size: 19px; line-height: 1.2; overflow-wrap: anywhere; }
.meeting-link--empty { background: transparent; color: var(--muted); border: 1px dashed var(--line-strong); box-shadow: none; }
.meeting-link--empty:hover { background: var(--surface); color: var(--ink); }
.meeting-link--empty .meeting-link__label { color: var(--muted); }
.meeting-link--empty .meeting-link__url { font-family: var(--font-ui); font-size: 14px; }
.decisions-field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 18px; padding: 14px 16px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: inset 3px 0 0 var(--orange); }
.decisions-field textarea { font-size: 15px; line-height: 1.6; }
.modes { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.mode { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); cursor: pointer; font-weight: 400; transition: border-color var(--dur), box-shadow var(--dur); }
.mode:hover { border-color: var(--ink); }
.mode:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: #fff; }
.mode input { accent-color: var(--ink); width: 18px; height: 18px; margin: 1px 0 0; flex: none; }
.mode strong { display: block; font-size: 14.5px; }
.mode .hint { display: block; margin-top: 2px; }
.modes + .recipients, .modes + .flash { margin-top: 14px; }
.panel--sent { box-shadow: inset 0 3px 0 var(--ink), var(--shadow-sm); }
.panel--sent > * + * { margin-top: 8px; }
.history__list--panel { margin-top: 4px; }
.ask { margin: 0 0 4px; padding: 14px 18px; background: var(--orange-soft); border: 1px solid #f2d3b1; border-radius: var(--radius-lg); box-shadow: inset 3px 0 0 var(--orange); }
.ask__head { margin: 0 0 6px; font-size: 15px; }
.ask__msg { font-family: var(--font-copy); font-size: 16.5px; line-height: 1.6; color: var(--ink-2); max-width: 70ch; }
.ask__msg p { margin: 0 0 8px; }
.decisions { margin: 0 0 26px; padding: 20px 26px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: inset 0 3px 0 var(--ink), var(--shadow-md); }
.decisions__title { font-family: var(--font-display); font-size: 26px; line-height: 1.1; margin: 0 0 8px; }
.decisions__list { margin: 0; padding: 0; list-style: none; counter-reset: decisao; }
.decisions__list li { counter-increment: decisao; position: relative; padding: 11px 0 11px 42px; border-top: 1px solid var(--line); font-family: var(--font-copy); font-size: 18px; line-height: 1.5; color: var(--ink); }
.decisions__list li:first-child { border-top: 0; }
.decisions__list li::before { content: counter(decisao); position: absolute; left: 0; top: 12px; width: 26px; height: 26px; border-radius: 50%; background: var(--orange); color: var(--ink); font: 700 13px/26px var(--font-ui); text-align: center; }
.linkcard--meeting .linkcard__actions { margin-top: 8px; }
.proof--ata { box-shadow: inset 0 3px 0 var(--ink), var(--shadow-md); }
.proof__decisions { margin: 4px 0 6px; padding: 0 0 0 18px; font-family: var(--font-copy); font-size: 16px; line-height: 1.5; color: var(--ink-2); }
.proof__decisions li { margin: 3px 0; }
.proof__decisions li::marker { color: var(--orange-ink); }
.proof__decisions .proof__more { list-style: none; margin-left: -18px; font-family: var(--font-ui); font-size: 13px; color: var(--muted); }

/* ---------- Página do cliente: redes, capivara, inativo ---------- */
.social { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.social__link { display: inline-flex; align-items: baseline; gap: 8px; max-width: 100%; padding: 7px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: var(--surface); font-size: 14px; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; transition: border-color var(--dur); }
.social__link:hover { border-color: var(--ink); color: var(--ink); }
.social__label { flex: none; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.capivara { margin: 12px 0 8px; padding: 18px 20px 16px; background: var(--surface-dark); color: var(--on-dark); border-radius: var(--radius-lg); box-shadow: inset 0 3px 0 var(--orange), var(--shadow-md); }
.capivara__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.capivara__head .side-title { color: var(--on-dark); margin: 0; }
.capivara .linkish { color: #c9c2b8; text-decoration-color: rgba(240, 236, 230, 0.35); }
.capivara .linkish:hover { color: var(--on-dark); text-decoration-color: var(--orange); }
.capivara a:focus-visible { outline-color: var(--orange); }
.capivara__lock { font-size: 12.5px; color: #a49d93; margin: 3px 0 12px; }
.capivara__body { color: #e8e3db; max-height: 560px; overflow-y: auto; scrollbar-width: thin; }
.capivara__body h2, .capivara__body h3, .capivara__body h4 { color: var(--on-dark); font-size: 15px; line-height: 1.3; margin: 14px 0 4px; }
.capivara__body strong { color: var(--on-dark); }
.capivara__body a { color: var(--on-dark); }
.capivara__body ul, .capivara__body ol { padding-left: 18px; margin: 0 0 10px; }
.capivara__body blockquote { margin: 0 0 10px; padding-left: 10px; border-left: 2px solid var(--orange); }
.capivara .empty { padding: 0; border: 0; background: none; color: #a49d93; }
.inactive-banner { display: flex; justify-content: space-between; align-items: center; gap: 12px 20px; flex-wrap: wrap; margin-top: 22px; padding: 12px 16px; background: var(--calm-wash); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: inset 3px 0 0 var(--ink); font-size: 14.5px; }
.inactive-banner p { margin: 0; flex: 1 1 320px; }
.inactive-banner form { margin: 0; }
.btn--quiet-danger { color: var(--danger); }
.btn--quiet-danger:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-wash); }
.modal__list { margin: 0 0 14px; padding-left: 20px; color: var(--ink-2); }
.modal__list li { margin: 4px 0; }

/* ---------- Relatório ---------- */
.report { margin-top: 8px; }
.report__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-top: 20px; }
.report__head .display { margin: 0; }
.report__summary { font-family: var(--font-display); font-size: clamp(22px, 2.6vw, 28px); line-height: 1.2; margin: 18px 0 4px; max-width: 46ch; }
.period-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 20px; flex-wrap: wrap; }
.period-row .period { margin-top: 12px; }
.day__title { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 22px 0 6px; }
.day__events { list-style: none; margin: 0; padding: 0 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.event { display: grid; grid-template-columns: 140px minmax(0, 1fr); column-gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.event:last-child { border-bottom: 0; }
.event__kind { font-size: 13px; font-weight: 700; grid-row: span 2; }
.event--entrega .event__kind { color: var(--orange-ink); }
.event--ajustes .event__kind { color: var(--muted); }
.event__title { font-weight: 700; color: var(--ink); text-decoration: none; }
a.event__title:hover { text-decoration: underline; text-decoration-color: var(--orange); }
.event__meta { font-size: 13px; color: var(--muted); }

/* ---------- Rotinas ---------- */
.quicklog > * + * { margin-top: 12px; }
.quicklog__row { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 12px; align-items: start; }
.quicklog__foot { display: flex; justify-content: space-between; align-items: center; gap: 10px 16px; flex-wrap: wrap; }
.logmonth { margin-top: 18px; }
.logmonth__title { font-size: 14px; font-weight: 700; margin: 0 0 6px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.logmonth__title span { font-weight: 400; color: var(--muted); font-size: 13px; }
.loglist__item { display: grid; grid-template-columns: 82px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.loglist__item:last-child { border-bottom: 0; }
.loglist__item.is-internal .loglist__note { color: var(--muted); }
.loglist__date { font-size: 13px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.loglist__note { overflow-wrap: anywhere; line-height: 1.45; }
.loglist__remove { margin: 0; }
.tag { display: inline-block; padding: 2px 7px 1px; border-radius: var(--radius-sm); box-shadow: inset 0 0 0 1px var(--line-strong); font-size: 10.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); vertical-align: 1px; }
.row__action { font-weight: 700; color: var(--ink); text-decoration-color: var(--orange); }
.duebar { margin: 0 0 var(--space-5); padding: 16px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: inset 3px 0 0 var(--orange), var(--shadow-sm); }
.duebar__title { display: flex; gap: 8px; align-items: center; margin: 0 0 8px; font-family: var(--font-display); font-size: 19px; line-height: 1.2; }
.duebar__list { list-style: none; margin: 0; padding: 0; }
.duebar__item { display: flex; justify-content: space-between; align-items: center; gap: 8px 16px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.duebar__item:first-child { border-top: 0; }
.duebar__text { min-width: 0; overflow-wrap: anywhere; }
.duebar__text a { font-weight: 700; color: var(--ink); text-decoration: none; }
.duebar__text a:hover { text-decoration: underline; text-decoration-color: var(--orange); }
.duebar__text > span { color: var(--muted); font-size: 13.5px; }
/* Faixa CRM hoje: os motivos de cada contato, separados por ponto médio; o atrasado vem de .is-late */
.crm-why { font-size: 13.5px; color: var(--ink-2); }
.crm-why span + span::before { content: " · "; color: var(--muted); font-weight: 400; }
/* Conferência do link do Google Drive no editor */
.linkcheck { margin: 10px 0 14px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: inset 3px 0 0 var(--line-strong); font-size: 13.5px; line-height: 1.45; }
.linkcheck__text { margin: 0; }
.linkcheck .linkish { margin-top: 6px; font-size: 13px; }
.linkcheck--bad { background: var(--danger-wash); border-color: var(--danger-line); box-shadow: inset 3px 0 0 var(--danger); color: var(--danger-ink); }
.linkcheck--ok { background: transparent; border-color: transparent; box-shadow: inset 2px 0 0 var(--line-strong); color: var(--muted); padding: 2px 0 2px 10px; font-size: 12.5px; }
.linkcard .linkcheck { margin-bottom: 0; }
.linkcheck-ack { color: var(--danger-ink); }
/* Dica de anexo nas janelas de aprovação e ajuste */
.attach-tip { margin: 8px 0 0; padding: 9px 12px; background: var(--surface-sunken); border-radius: var(--radius); box-shadow: inset 3px 0 0 var(--orange); font-size: 13px; line-height: 1.45; color: var(--ink-2); }
/* Endereços colados em mensagens e comentários quebram a linha em vez de vazar */
.note__body a, .review__msg a, .review__body a, .history__msg a, .letter__body a, .ask__msg a, .loglist__note a, .prose a { overflow-wrap: anywhere; }

.routine-card { padding: 14px 16px 12px; margin: 0 0 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.routine-card__head { margin: 0 0 6px; display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.routine-card__head span { font-size: 12.5px; color: var(--muted); }
.routine-card__list { list-style: none; margin: 0; padding: 0; font-size: 13.5px; color: var(--ink-2); }
.routine-card__list li { padding: 3px 0; line-height: 1.45; }
.routine-card__date { font-weight: 700; color: var(--ink); margin-right: 4px; }

/* Relatório: destaques e gráficos (os números do topo são os .kpis dos componentes) */
.report-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 24px; margin: 24px 0 8px; align-items: start; }
.report-top--single { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
.wins { padding: 18px 20px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: inset 0 3px 0 var(--orange), var(--shadow-sm); }
.wins__list { list-style: none; margin: 0; padding: 0; }
.wins__list li { position: relative; padding: 8px 0 8px 28px; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.45; }
.wins__list li:first-child { border-top: 0; }
.wins__list li::before { content: ""; position: absolute; left: 0; top: 10px; width: 17px; height: 17px; border-radius: 50%; background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 6.2l2 2 4-4.4' fill='none' stroke='%23ff7c00' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; }
.chart { margin: 0; padding: 18px 20px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: inset 0 3px 0 var(--ink), var(--shadow-sm); }
.chart__plot { display: flex; align-items: stretch; gap: 6px; height: 190px; padding-top: 18px; border-bottom: 1px solid var(--line-strong); }
.chart__col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; position: relative; }
.chart__bars { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.chart__bar { position: relative; width: min(18px, 40%); background: var(--orange); border-radius: 3px 3px 0 0; display: block; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.chart__bar--b { background: var(--ink); }
.chart__bar--c { background: var(--faint); }
.chart__bar.is-zero { height: 2px !important; background: var(--rule); }
.chart__value { position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); font-size: 11px; font-weight: 700; line-height: 16px; color: var(--ink); }
.chart__label { font-size: 12px; text-align: center; color: var(--ink-2); padding: 6px 0 0; line-height: 1.25; position: absolute; top: 100%; left: 0; right: 0; }
.chart__label span { display: block; color: var(--muted); font-size: 11px; }
.chart__legend { margin: 44px 0 0; font-size: 12.5px; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; }
.key { display: inline-flex; align-items: center; gap: 6px; }
.key::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--orange); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.key--b::before, .key--aprovado::before { background: var(--ink); }
.key--c::before { background: var(--faint); }
.key--aprovacao::before { background: var(--orange); }
.key--ajustes::before { background: #ffb36b; }
.key--producao::before { background: var(--faint); }
.key--fila::before { background: var(--rule); }
.meet-sum { padding: 14px 0 6px; border-bottom: 1px solid var(--line); }
.meet-sum__title { font-size: 17px; margin: 0; }
.meet-sum__title a { color: var(--ink); text-decoration: none; }
.meet-sum__title a:hover { text-decoration: underline; text-decoration-color: var(--orange); }
.meet-sum__meta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); margin: 3px 0 8px; }
.meet-sum__list { margin: 0 0 8px; padding-left: 22px; font-family: var(--font-copy); font-size: 16.5px; line-height: 1.5; color: var(--ink-2); }
.meet-sum__list li { margin: 4px 0; padding-left: 4px; }
.meet-sum__list li::marker { font-family: var(--font-ui); font-weight: 700; font-size: 0.85em; color: var(--orange-ink); }
.routine-sum__desc { font-size: 14px; color: var(--ink-2); margin: 0 0 8px; max-width: 70ch; }
.routine-sum__list { list-style: none; margin: 0 0 8px; padding: 0; font-size: 15px; line-height: 1.5; }
.routine-sum__list li { padding: 5px 0 5px 58px; position: relative; border-top: 1px solid var(--line); }
.routine-sum__list li:first-child { border-top: 0; }
.routine-sum__date { position: absolute; left: 0; top: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.event--reuniao .event__kind { color: var(--ink); }
.event--ata_aprovada .event__kind { color: var(--ink); }
.stackbars { margin-top: 6px; }
.stackbar { margin: 0 0 14px; }
.stackbar__head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin: 0 0 5px; font-size: 14px; }
.stackbar__head a { font-weight: 700; color: var(--ink); text-decoration: none; min-width: 0; overflow-wrap: anywhere; }
.stackbar__head a:hover { text-decoration: underline; text-decoration-color: var(--orange); }
.stackbar__head span { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.stackbar__bar { display: flex; height: 12px; background: var(--calm-wash); border-radius: var(--radius-pill); overflow: hidden; }
.seg { display: block; height: 100%; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.seg + .seg { box-shadow: inset 2px 0 0 var(--sheet); }
.seg--aprovado { background: var(--ink); }
.seg--aprovacao { background: var(--orange); }
.seg--ajustes { background: #ffb36b; }
.seg--producao { background: var(--faint); }
.seg--fila { background: var(--rule); }
.stackbars__legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); margin: 2px 0 0; }

/* ---------- Modais ---------- */
.modal { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: var(--radius-xl); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); overflow: auto; }
.modal[open] { animation: modal-in 0.22s var(--ease); }
.modal::backdrop { background: rgba(10, 10, 10, 0.5); }
.modal--wide { width: min(820px, calc(100vw - 32px)); }
.modal__body { padding: 26px 26px 24px; }
.modal__title { font-family: var(--font-display); font-size: 26px; line-height: 1.1; margin: 0 0 10px; overflow-wrap: anywhere; }
.modal__text { color: var(--ink-2); margin: 0 0 16px; }
.modal__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.modal textarea { font-size: 15px; }
.modal [data-import-text] { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13.5px; }
.modal .facts { grid-template-columns: 120px minmax(0, 1fr); padding: 12px 14px; background: var(--surface-sunken); border: 1px solid var(--line); border-radius: var(--radius); }

/* ---------- Acesso (login, convite, senha e erro sem login) ---------- */
.auth { background: var(--paper); }
.auth__split { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr); }
.auth__statement { position: relative; display: flex; flex-direction: column; padding: 44px clamp(28px, 6vw, 84px) 56px; background: var(--surface-dark); color: var(--on-dark); border-top: 4px solid var(--orange); overflow: hidden; }
.auth__statement::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 360px; height: 360px; border-radius: 50%; border: 1px solid rgba(255, 124, 0, 0.22); box-shadow: 0 0 0 48px rgba(255, 124, 0, 0.04), 0 0 0 96px rgba(255, 124, 0, 0.025); pointer-events: none; }
.auth__claim { position: relative; font-family: var(--font-display); font-size: clamp(42px, 5.6vw, 78px); line-height: 0.98; margin: auto 0 22px; max-width: 11ch; letter-spacing: -0.01em; }
.auth__sub { position: relative; color: #c9c2b8; max-width: 46ch; font-size: 16.5px; line-height: 1.55; margin: 0; }
.auth__panel { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 48px clamp(20px, 5vw, 64px); }
.auth__panel .flashes { padding-top: 0; max-width: 420px; width: 100%; }
.auth__form { width: 100%; max-width: 420px; padding: 32px 32px 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow-md); }
.auth__form .lead { font-size: 15px; color: var(--muted); }
.auth__form input:not([type="checkbox"]):not([type="radio"]) { min-height: 46px; }
.auth__form .btn { min-height: 46px; }
.auth__title { font-family: var(--font-display); font-size: 34px; line-height: 1.05; margin: 0 0 14px; }
.auth__aside { margin: 18px 0 0; font-size: 14px; }

/* ---------- Responsivo ---------- */
@media (max-width: 1080px) {
  .workbench { grid-template-columns: minmax(0, 1fr); }
  .doc-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .doc-side { position: static; max-height: none; overflow: visible; }
  .board { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .desk { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mailpreview { grid-template-columns: minmax(0, 1fr); }
}
/* Com a barra lateral, o conteúdo tem 216 px a menos: as telas de duas colunas largas esperam um pouco mais para abrir. */
@media (min-width: 1024px) and (max-width: 1279px) {
  .has-sidebar .workbench, .has-sidebar .doc-layout { grid-template-columns: minmax(0, 1fr); }
  .has-sidebar .doc-side { position: static; max-height: none; overflow: visible; }
  .has-sidebar .board, .has-sidebar .board--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1280px) and (max-width: 1439px) {
  .has-sidebar .board--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) and (max-width: 1199px) {
  .has-sidebar .split:not(.split--even) { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
}
@media (min-width: 1024px) {
  .has-sidebar .decision { left: var(--sidebar-w); }
}
@media (max-width: 900px) {
  .split, .split--even { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
  .desk { grid-template-columns: minmax(0, 1fr); }
  .auth__split { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .auth__statement { padding: 22px var(--gutter) 26px; }
  .auth__statement::after { right: -160px; bottom: -200px; }
  .auth__claim { font-size: clamp(32px, 7vw, 44px); margin: 26px 0 10px; }
  .auth__sub { font-size: 15px; }
  .auth__panel { justify-content: flex-start; padding: 24px var(--gutter) 40px; }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .facts dd { margin-bottom: 10px; }
  .modal .facts { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  body { font-size: 15px; }
  .page-head { padding: var(--space-6) 0 var(--space-4); }
  .section-title { margin-top: var(--space-7); font-size: 20px; }
  .rows, .sprintlist, .feed, .people, .journey, .loglist { padding: 0 14px; }
  .row { flex-direction: column; align-items: flex-start; gap: 7px; }
  .row__aside { flex-direction: row; align-items: center; gap: 10px; text-align: left; flex-wrap: wrap; }
  .board { grid-template-columns: minmax(0, 1fr); }
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .linkfields { grid-template-columns: minmax(0, 1fr); }
  .meeting-links { grid-template-columns: minmax(0, 1fr); }
  .quicklog__row { grid-template-columns: minmax(0, 1fr); }
  .loglist__item { grid-template-columns: minmax(0, 1fr) auto; }
  .loglist__date { grid-column: 1 / -1; }
  .panel { padding: 16px; }
  .decisions { padding: 16px 16px 8px; }
  .decisions__list li { font-size: 17px; }
  .manuscript { font-size: 18px; line-height: 1.68; }
  .manuscript h2 { font-size: 26px; }
  .sheet { border-radius: var(--radius-lg); }
  .doc-head__row { flex-direction: column; gap: 4px; }
  .doc-head__status { padding-top: 0; }
  .decision__inner { padding-top: 10px; padding-bottom: 10px; }
  .decision__text { font-size: 14px; }
  .decision__actions { width: 100%; }
  .decision__actions .btn { flex: 1; }
  .has-decision .page { padding-bottom: 150px; }
  .day__events { padding: 0 14px; }
  .event { grid-template-columns: minmax(0, 1fr); }
  .event__kind { grid-row: auto; }
  .report-top { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 13px 14px 12px; }
  .chart__plot { height: 160px; gap: 3px; }
  .chart__label { font-size: 11px; }
  .preview__stage iframe { height: 560px; }
  .filters__row input[type="search"], .filters__row select { width: 100%; }
  .period__custom { flex-wrap: wrap; }
  .auth__form { padding: 24px 20px 22px; border-radius: var(--radius-lg); }
  .auth__title { font-size: 30px; }
  .modal__body { padding: 22px 18px 18px; }
  .modal__actions .btn { flex: 1 1 auto; }
}
/* Toque (celular e tablet): alvos de 44 px nos botões, filtros, campos e ações em texto. */
@media (max-width: 720px), (pointer: coarse) {
  .btn, .btn--small { min-height: 44px; }
  .btn--icon, .btn--small.btn--icon { width: 44px; }
  .chip { min-height: 44px; padding: 0 16px; }
  input[type="text"], input[type="email"], input[type="password"], input[type="url"], input[type="date"], input[type="time"], input[type="datetime-local"], input[type="tel"], input[type="search"], input[type="number"], input:not([type]), select { min-height: 44px; font-size: 16px; }
  textarea { font-size: 16px; }
  .linkish { display: inline-flex; align-items: center; min-height: 44px; }
  .check { min-height: 44px; align-items: center; }
  .check input { margin-top: 0; }
  .tabs__tab, .versions__item { min-height: 44px; display: inline-flex; align-items: center; }
  .crumbs a { display: inline-flex; align-items: center; min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@keyframes pulse-mark { 0% { background: var(--orange); } 100% { background: var(--orange-wash); } }
mark.cmt.is-pulsing { animation: pulse-mark 0.9s ease-out; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes drawer-in { from { transform: translateX(32px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translateX(-50%); } }

/* ---------- Impressão (relatório em PDF) ---------- */
@media print {
  body { background: #fff; font-size: 12px; display: block; }
  .masthead, .appbar, .sidenav, .nav-backdrop, .testmode, .footer, .filters, .period, .page-head__actions, .preview-banner, .decision, .skip, [data-print], .more { display: none !important; }
  .shell { margin: 0 !important; }
  .page { padding: 0; }
  .container { width: 100%; }
  .split { grid-template-columns: 1fr 260px; gap: 24px; }
  .display { font-size: 30px; }
  a { text-decoration: none; }
  .rows, .sprintlist, .feed, .people, .journey, .loglist, .table-wrap, .kpi, .panel, .card, .wins, .chart { box-shadow: none !important; }
  .row, .event, .feed__item, .meet-sum, .stackbar, .kpi { break-inside: avoid; }
  .report-top { grid-template-columns: 1fr 1.2fr; gap: 16px; }
  .wins, .chart { break-inside: avoid; }
}

/* ---------- Produtos e contratos ---------- */
.row--wrap .row__title, .row--wrap .row__text, .contract-text { overflow-wrap: anywhere; }
.row.is-ended { opacity: 0.72; }
.row__text { max-width: 70ch; }
.contract-total { margin: 12px 0 0; font-size: 14.5px; color: var(--ink-2); }
.contract-side > .panel + .panel { margin-top: 16px; }
.contract-side .field-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.contract-side input[type="date"] { min-width: 0; }
.loglist--notes { margin-top: 18px; }
.loglist--notes .loglist__item { grid-template-columns: 124px minmax(0, 1fr) auto; }
.loglist__by { display: block; font-weight: 400; color: var(--muted); }
.page-head--wrap .page-head__kicker, .page-head--wrap .display, .page-head--wrap .crumbs a { overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .loglist--notes .loglist__item { grid-template-columns: 1fr auto; }
  .contract-side .field-row { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Despesas da empresa ---------- */
/* Campo de mês: o Chrome abre o seletor; onde não existe, vira texto no formato AAAA-MM. Mesmo aspecto dos outros campos. */
input[type="month"] { font: 15px/1.4 var(--font-ui); color: var(--ink); background-color: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 9px 12px; min-height: 42px; width: 100%; box-shadow: inset 0 1px 2px rgba(28, 22, 15, 0.04); }
@media (max-width: 720px), (pointer: coarse) {
  input[type="month"] { min-height: 44px; font-size: 16px; }
}
.exp-rule { font-size: 14.5px; line-height: 1.5; color: var(--muted); max-width: 78ch; margin: 0 0 8px; }
.exp-note { margin: 8px 0 12px; max-width: 78ch; }
.exp-form .form-actions { padding-top: 0; }
.exp-form .exp-kinds { margin-top: 20px; }
.exp-kinds__legend { font-weight: 700; font-size: 14px; padding: 0; margin: 0 0 8px; }
.exp-cats { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 40px; }
.exp-cats li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 4px 12px; }
.exp-cats__name { font-size: 14.5px; overflow-wrap: anywhere; }
.exp-cats__value { font-weight: 700; font-size: 14.5px; white-space: nowrap; }
.exp-cats__share { font-weight: 400; font-size: 12.5px; color: var(--muted); }
.exp-cats .is-zero .exp-cats__name, .exp-cats .is-zero .exp-cats__value { color: var(--muted); font-weight: 400; }
.exp-cats__bar { grid-column: 1 / -1; display: block; height: 6px; background: var(--calm-wash); border-radius: var(--radius-pill); overflow: hidden; }
.exp-cats__bar > span { display: block; height: 100%; background: var(--ink); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.exp-bar { display: block; min-width: 90px; height: 4px; margin-top: 6px; background: var(--calm-wash); border-radius: var(--radius-pill); overflow: hidden; }
.exp-bar > span { display: block; height: 100%; background: var(--ink); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.exp-table tr.is-forecast .exp-bar > span { background: var(--faint); }
.exp-table tr.is-forecast { background-image: repeating-linear-gradient(135deg, transparent 0 8px, rgba(10, 10, 10, 0.035) 8px 9px); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.exp-table tr.is-total td { font-weight: 700; }
.exp-list td { vertical-align: top; }
.exp-list td.stack-title, .exp-list td[data-label="Cliente"] { overflow-wrap: anywhere; }
@media (min-width: 721px) {
  .exp-list td[data-label="Valor"] { min-width: 9em; }
  .exp-table th:nth-child(n + 2), .exp-table td:nth-child(n + 2) { text-align: right; }
  .exp-table tr.is-current td:first-child { box-shadow: inset 3px 0 0 var(--orange); }
  .exp-table tr.is-total td { border-top: 2px solid var(--ink); border-bottom: 0; }
  .exp-table tr.is-total + tr.is-total td { border-top: 1px solid var(--rule); }
}
@media (max-width: 720px) {
  .exp-cats { grid-template-columns: minmax(0, 1fr); }
  .exp-kpis .kpi__value { font-size: clamp(24px, 7.6vw, 40px); white-space: nowrap; overflow-wrap: normal; }
  .exp-table td.is-zero { display: none; }
  .exp-table tfoot { display: block; }
  .exp-table .exp-total { font-size: 16px; }
  .exp-table tr.is-current { border-left-color: var(--orange); }
  .exp-table tr.is-forecast { border-left-style: dashed; border-left-color: var(--ink-2); }
  .exp-table tr.is-total { border-left-color: var(--ink); border-top: 2px solid var(--ink); }
  .exp-table tr.is-total + tr.is-total { border-top: 1px solid var(--rule-soft); }
  .exp-table .forecast-tag { display: none; }
}

/* ---------- Esforço e rentabilidade ---------- */
.kpi__value--money { overflow-wrap: anywhere; }
.kpi__sub--quiet { color: var(--muted); font-weight: 400; }
.profit-period { margin: 10px 0 0; }
.profit-table td { vertical-align: middle; }
.profit-rating { color: var(--orange-ink); font-weight: 700; font-size: 13px; white-space: nowrap; }
.mark a { color: inherit; }
.share { display: grid; gap: 6px; min-width: 200px; }
.share__row { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 8px; align-items: center; }
.share__track { display: block; height: 8px; background: var(--calm-wash); border-radius: var(--radius-pill); overflow: hidden; }
.share__fill { display: block; height: 100%; background: var(--ink); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.share__fill--effort { background: var(--orange); }
.share__value { font-size: 12.5px; color: var(--muted); text-align: right; }
.share-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin: 12px 0 0; font-size: 12.5px; color: var(--muted); }
.share-legend .hint { flex-basis: 100%; }
.level-cell { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.level-form { margin: 0; position: relative; } /* o rótulo .sr-only fica preso ao formulário e não alarga a página dentro de .table-wrap */
.level-form select { width: auto; min-width: 200px; max-width: 100%; min-height: 36px; padding: 6px 30px 6px 10px; font-size: 14px; }
.level-source { font-size: 12.5px; color: var(--muted); }
.level-source--set { color: var(--orange-ink); font-weight: 700; }
tr[id^="tarefa-"], tr[id^="rotina-"] { scroll-margin-top: 140px; }
tr[id^="tarefa-"]:target, tr[id^="rotina-"]:target { background: var(--orange-wash); }
.effort-panel:target { border-color: var(--orange); }
.split__side > .effort-panel { margin-bottom: 16px; }
.effort-panel__level { margin: 0 0 4px; display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; }
.effort-panel__level strong { font-family: var(--font-display); font-size: 26px; line-height: 1.1; }
.effort-panel__level span { font-size: 13.5px; color: var(--muted); }
.effort-panel .level-form { margin: 8px 0 10px; }
.effort-panel .level-form select { width: 100%; }
.how p { max-width: 78ch; }
.how p:last-child { margin-bottom: 0; }
/* Celular: as tabelas viram cartões, para a leitura e o seletor de nível aparecerem sem rolar de lado */
@media (max-width: 720px) {
  .level-form select { min-width: 0; }
  .table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .table--stack, .table--stack tbody { display: block; width: 100%; }
  .table-wrap:has(> .table--stack) { background: none; border: 0; border-radius: 0; box-shadow: none; }
  .table--stack tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px; margin: 0 0 10px; padding: 13px 15px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--line-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); }
  .table--stack tbody tr:hover { background: var(--surface); }
  .table--stack td { display: block; padding: 0; border: 0; min-width: 0; white-space: normal; }
  .table--stack td[data-label]::before { content: attr(data-label); display: block; font-size: 11.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
  .table--stack .stack-title, .table--stack .stack-lead, .table--stack .stack-wide { flex: 0 0 100%; }
  .table--stack .stack-title { order: -2; font-size: 16px; }
  .table--stack .stack-lead { order: -1; }
  .table--stack .share { min-width: 0; }
  .table--stack .level-form { flex: 1 1 100%; }
  .table--stack .level-form select { width: 100%; }
}

/* ---------- Mesa, prioridade, nota e finalização ---------- */
/* Mesa: cinco colunas a partir de 1200px, que quebram em 3, 2 e 1 nas telas menores. */
.desk { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.desk__col { min-width: 0; }
.desk .col-title { font-size: 17px; }
.desk__col--fila .col-title { border-bottom-color: var(--faint); }
.desk__col--waiting .col-title { border-bottom-color: var(--orange); }
.desk__col--done .col-title { border-bottom-color: var(--ink); }
.desk .slip { overflow-wrap: anywhere; }
@media (max-width: 1199px) { .desk { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 899px) { .desk { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) { .desk { grid-template-columns: 1fr; } }
/* Com a barra lateral do painel, a Mesa abre as cinco colunas a partir de 1280 px. */
@media (min-width: 1024px) and (max-width: 1279px) { .has-sidebar .desk { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.slip__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 8px; }
.slip.slip--urgente, .desk .slip--urgente, .board .slip--urgente { --slip-accent: var(--danger); }
.desk__col--done .slip { --slip-accent: var(--ink); background: rgba(252, 251, 249, 0.6); }
.desk__col--done .slip--finalized { background: var(--calm-wash); }
.desk__more { margin: 12px 0 0; font-size: 13.5px; }
.desk__more a { font-weight: 700; }
.desk__note { margin: 8px 0 0; }

/* Prioridade do entregável (só o dono vê): urgente em vermelho, alta em laranja, baixa apagada. A média não ganha selo. */
.prio { display: inline-flex; align-items: center; flex: none; font: 700 10.5px/1 var(--font-ui); letter-spacing: 0.05em; text-transform: uppercase; padding: 3px 7px 2px; border-radius: 5px; white-space: nowrap; }
.prio--urgente { background: var(--danger); color: #fff; }
.prio--alta { background: var(--orange-wash); color: var(--orange-ink); box-shadow: inset 0 0 0 1px var(--orange); }
.prio--baixa { color: var(--muted); box-shadow: inset 0 0 0 1px var(--rule); }
.row__main > .prio { margin-left: 8px; vertical-align: 2px; }
.statusline .prio { vertical-align: 1px; }

/* Nota do cliente (só o dono vê) */
.rate { display: inline-flex; align-items: center; font-weight: 700; font-size: 12px; color: var(--orange-ink); white-space: nowrap; }
.slip__meta .rate { margin-left: 1px; }
.stars { color: var(--orange); letter-spacing: 1px; white-space: nowrap; }
.table__rating { white-space: nowrap; }
.rating-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin: 0 0 10px; font-size: 14px; color: var(--muted); }
.rating-line__stars { color: var(--orange); font-size: 18px; letter-spacing: 2px; }
.rating { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; }
.rating__stars { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; }
.rating__stars input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.rating__stars label { font-size: 34px; line-height: 1; padding: 0 3px; color: var(--rule); cursor: pointer; font-weight: 400; }
.rating__stars label:hover, .rating__stars label:hover ~ label, .rating__stars input:checked ~ label { color: var(--orange); }
.rating__stars input:focus-visible + label { outline: 2px solid var(--orange-ink); outline-offset: 2px; border-radius: 2px; }
.rating__none { margin: 0; }
.rating__caption { flex-basis: 100%; margin: 0; min-height: 1.4em; font-size: 14px; color: var(--muted); }
.rating__caption span { display: none; }
.rating:has(input[name="nota"][value="5"]:checked) [data-nota="5"],
.rating:has(input[name="nota"][value="4"]:checked) [data-nota="4"],
.rating:has(input[name="nota"][value="3"]:checked) [data-nota="3"],
.rating:has(input[name="nota"][value="2"]:checked) [data-nota="2"],
.rating:has(input[name="nota"][value="1"]:checked) [data-nota="1"],
.rating:has(input[name="nota"][value=""]:checked) [data-nota="0"] { display: inline; }

/* Entregar ao cliente: pedir aprovação ou finalizar sem aprovação */
.panel--publish .modes { margin-bottom: 4px; }

/* ---------- Agenda do Google ---------- */
.slip__join { align-self: flex-start; display: inline-flex; align-items: center; min-height: 30px; margin-top: 6px; padding: 0 12px; border: 1px solid var(--orange); border-radius: var(--radius-sm); background: var(--orange); color: var(--ink); font-size: 12.5px; font-weight: 700; text-decoration: none; }
.slip__join:hover { background: var(--orange-hover); border-color: var(--orange-hover); color: var(--ink); }
.slip__join:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.calendar-origin { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.calendar-origin::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 7px; background: var(--orange); border-radius: 50%; }
.agenda-address { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; max-width: 100%; }
.agenda-address__label { font-weight: 700; font-size: 14px; }
.agenda-address code { max-width: 100%; overflow-wrap: anywhere; }
.agenda-status { margin: 16px 0 12px; }
.agenda-status__error { display: block; margin-top: 4px; color: var(--danger); font-weight: 700; overflow-wrap: anywhere; }
.agenda-actions { align-items: center; gap: 6px 18px; padding-top: 0; }
.agenda-actions form { margin: 0; }
.agenda-howto { margin-top: 16px; }
.agenda-steps { margin: 0 0 4px; padding-left: 22px; font-size: 14.5px; }
.agenda-steps li { margin: 5px 0; }
.agenda-warning { margin: 14px 0 0; }
.agenda-rules { margin: 12px 0 0; padding-left: 20px; font-size: 14px; color: var(--ink-2); }
.agenda-rules li { margin: 5px 0; }
@media (max-width: 600px) {
  .agenda-actions { flex-direction: column; align-items: flex-start; }
  .slip__join { min-height: 44px; }
}
/* Configurações no celular: nenhum painel alarga a página. Já rolava de lado por causa de "Últimos emails" e dos botões que levam o email no texto. */
@media (max-width: 600px) {
  .settings { grid-template-columns: minmax(0, 1fr); }
  .settings .btn { max-width: 100%; padding-top: 8px; padding-bottom: 8px; white-space: normal; line-height: 1.25; overflow-wrap: anywhere; }
}

/* ---------- WhatsApp e telefone internacional ---------- */
/* Campo de telefone: país (bandeira e código) e número numa caixa só. O seletor de verdade fica por cima do país, transparente, para abrir a lista inteira. */
.phone__box { display: flex; align-items: stretch; width: 100%; min-width: 0; background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: inset 0 1px 2px rgba(28, 22, 15, 0.04); }
.phone__box:focus-within { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--ink); }
.phone__country { position: relative; flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; min-height: 42px; border-right: 1px solid var(--line-strong); border-radius: var(--radius) 0 0 var(--radius); white-space: nowrap; cursor: pointer; }
.phone__country:hover { background: var(--calm-wash); }
.phone__country::after { content: ""; width: 0; height: 0; margin-left: 2px; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid var(--ink); }
.phone__flag, .social__flag { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; line-height: 1; }
.phone__flag { font-size: 20px; }
.phone__code { font-size: 15px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.phone__box select.phone__select { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; padding: 0; border: 0; background: none; opacity: 0; cursor: pointer; font-size: 16px; }
.phone__box select.phone__select:focus { outline: none; }
.phone__box input.phone__input { flex: 1 1 auto; width: auto; min-width: 0; min-height: 42px; border: 0; border-radius: 0 var(--radius) var(--radius) 0; background: transparent; box-shadow: none; }
.phone__box input.phone__input:focus { outline: none; }

/* Página do cliente e Configurações */
.wa-line { margin: 10px 0 0; font-size: 13.5px; color: var(--muted); }
.wa-line strong { color: var(--ink); }
.wa-warning { background: var(--orange-soft); border-color: #f2d3b1; color: var(--ink); max-width: 62ch; }
.wa-when { display: block; font-size: 13px; line-height: 1.4; color: var(--muted); }
.wa-status { margin-top: 22px; }
.wa-status dd { overflow-wrap: anywhere; }
.wa-ok, .wa-bad { display: inline-block; }
.wa-ok::before, .wa-bad::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; }
.wa-ok::before { background: var(--success); }
.wa-bad { color: var(--danger); overflow-wrap: anywhere; }
.wa-bad::before { background: var(--danger); }
.wa-actions { align-items: center; gap: 6px 18px; padding-top: 0; }
.wa-actions form { margin: 0; }
.wa-howto { margin-top: 16px; }
.wa-table td { vertical-align: top; }
.wa-table .table__sub { max-width: 34ch; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .wa-actions { flex-direction: column; align-items: flex-start; }
  .phone__country { padding: 0 9px; gap: 4px; }
  .phone__code { font-size: 14px; }
}

/* ---------- Backup (Configurações) ---------- */
.backup-list { list-style: none; margin: 6px 0 18px; padding: 0; border-top: 1px solid var(--line); }
.backup-list li { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.backup-list__day { flex: none; min-width: 86px; font-weight: 700; }
.backup-list__meta { flex: 1 1 auto; font-size: 13.5px; color: var(--muted); }
.backup-list form { flex: none; margin: 0; }
.backup-error { display: block; color: var(--danger); font-weight: 700; overflow-wrap: anywhere; }
.backup-actions { align-items: center; gap: 8px 18px; }
.backup-actions form { margin: 0; }
.backup-note { margin-top: 12px; max-width: 70ch; }
.backup-howto { margin-top: 14px; }
@media (max-width: 600px) {
  .backup-actions { flex-direction: column; align-items: flex-start; }
}

/* ---------- Rentabilidade por mês fechado ---------- */
.profit-rule { font-size: 14.5px; line-height: 1.5; color: var(--muted); max-width: 78ch; margin: 0 0 8px; }
.pf { display: grid; gap: 10px; margin: 16px 0 0; }
.pf__row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.pf__label { flex: 0 0 40px; font: 700 12px/1 var(--font-ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.pf .chip { min-height: 38px; justify-content: center; }
.chip--month { min-width: 56px; }
.chip.is-range { background: var(--orange-wash); border-color: var(--orange); }
.chip.is-disabled, .chip.is-disabled:hover { position: relative; color: var(--faint); border-style: dashed; border-color: var(--rule); background: transparent; cursor: not-allowed; }
.pf__group { margin: 2px 0 0; }
.pf__form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 0; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.pf__form .field { flex: 1 1 130px; max-width: 200px; min-width: 0; }
.pf__form select { min-height: 38px; padding-top: 6px; padding-bottom: 6px; }
.month-note { margin: 8px 0 12px; max-width: 78ch; }
.month-table tr.is-selected { background: var(--orange-wash); }
.month-table tr.is-total td { font-weight: 700; }
@media (min-width: 721px) {
  .month-table tr.is-total td { border-top: 2px solid var(--ink); border-bottom: 0; }
}
@media (max-width: 720px) {
  .pf__label { flex-basis: 100%; }
  .pf__row .chips { flex: 1 1 100%; }
  .chips--months { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .chips--months .chip { min-width: 0; padding-left: 0; padding-right: 0; }
  .pf .chip { min-height: 44px; }
  .pf__form .btn { flex: 1 1 100%; min-height: 44px; }
  .pf__form select { min-height: 44px; }
  .month-table tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 12px; align-items: start; }
  .month-table .stack-title { grid-column: 1 / -1; }
  .month-table tr.is-selected { border-left-color: var(--orange); }
  .month-table tr.is-total { border-left-color: var(--ink); border-top: 2px solid var(--ink); }
}

/* Mês em andamento e meses de previsão: o botão do mês de hoje leva um ponto, o da previsão é tracejado em pontos com listras */
.chip.is-current { position: relative; }
.chip.is-current::after { content: ""; position: absolute; left: 50%; bottom: 4px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--orange-ink); }
.chip.is-current.is-active::after { background: var(--paper); }
.chip.is-forecast { border-style: dotted; border-color: var(--ink-2); background-image: repeating-linear-gradient(135deg, transparent 0 5px, var(--rule-soft) 5px 6px); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.chip.is-forecast:hover { border-style: solid; border-color: var(--ink); }
.chip.is-forecast.is-range { border-style: solid; border-color: var(--orange); background-image: none; }
.chip.is-forecast.is-active { border-style: solid; border-color: var(--ink); background-image: none; }
.month-kind { display: inline-block; margin-left: 8px; padding: 3px 7px 2px; border: 1px solid var(--rule); border-radius: var(--radius-sm); font: 700 11px/1.2 var(--font-ui); letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); vertical-align: 2px; white-space: nowrap; }
.month-kind--andamento { border-color: var(--orange); background: var(--orange-wash); color: var(--orange-ink); }
.month-kind--previsao { border-style: dashed; border-color: var(--ink-2); color: var(--ink-2); }
.forecast-tag { display: inline-block; margin-left: 6px; font: 700 11px/1.2 var(--font-ui); letter-spacing: 0.05em; text-transform: uppercase; color: var(--orange-ink); white-space: nowrap; }
.forecast-money, .kpi__value--forecast { color: var(--orange-ink); }
.forecast-money { font-weight: 700; }
.month-table tr.is-forecast { background-image: repeating-linear-gradient(135deg, transparent 0 8px, rgba(10, 10, 10, 0.035) 8px 9px); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.month-table tr.is-grand td { background: var(--sheet); }
.forecast-table td { vertical-align: top; }
.forecast-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.forecast-list li { display: flex; flex-wrap: wrap; gap: 0 10px; align-items: baseline; }
.forecast-list__price { color: var(--ink-2); }
.forecast-list .table__sub { flex-basis: 100%; margin-top: 0; }
@media (min-width: 721px) {
  .month-table tr.is-current td:first-child { box-shadow: inset 3px 0 0 var(--orange); }
  .month-table tr.is-total + tr.is-total td { border-top: 1px solid var(--rule); }
  .month-table tr.is-total + tr.is-grand td { border-top: 1px solid var(--ink); }
}
@media (max-width: 720px) {
  .kpis--five .kpi:nth-child(5) { grid-column: 1 / -1; }
  .month-table tfoot { display: block; }
  .month-table td:empty { display: none; }
  .month-table tr.is-current { border-left-color: var(--orange); }
  .month-table tr.is-forecast { border-left-style: dashed; border-left-color: var(--ink-2); }
  .month-table tr.is-total + tr.is-total { border-top: 1px solid var(--rule-soft); }
  .month-table tr.is-total + tr.is-grand { border-left-color: var(--orange); }
}
/* No celular o rótulo do cartão já diz "Previsto": a marca ao lado do valor só repetiria e quebraria a linha */
@media (max-width: 720px) {
  .month-table .forecast-tag { display: none; }
}
/* Cinco números no topo (receita e previsto juntos): cinco colunas em tela larga, três em tela média, e o valor em reais cabe numa linha só */
@media (min-width: 721px) {
  .kpis--five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .kpis--five .kpi__value { font-size: clamp(24px, 1.9vw, 36px); }
}
/* Três por linha em tela média (e com a barra lateral até 1279 px): a quarta e a quinta dividem a segunda linha. */
@media (min-width: 721px) and (max-width: 999px) {
  .kpis--five { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .kpis--five .kpi { grid-column: span 2; }
  .kpis--five .kpi:nth-child(4), .kpis--five .kpi:nth-child(5) { grid-column: span 3; }
}
@media (min-width: 1024px) and (max-width: 1279px) {
  .has-sidebar .kpis--five { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .has-sidebar .kpis--five .kpi { grid-column: span 2; }
  .has-sidebar .kpis--five .kpi:nth-child(4), .has-sidebar .kpis--five .kpi:nth-child(5) { grid-column: span 3; }
}

/* ---------- Ordenação ---------- */
/* Seletor de ordem das listas (Mesa, entregáveis, reuniões, sprints, produtos) e, no celular, da tabela que vira cartões. */
.sort-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 14px; }
.sort-bar__label { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.sort-select { width: auto; min-width: 190px; max-width: 100%; }
.sort-select--stack { display: none; }

/* Cabeçalho que ordena: o botão tem o aspecto do texto do cabeçalho, com uma seta pequena (as duas pontas; a ativa fica cheia). */
.sort-btn { display: inline-flex; align-items: center; gap: 7px; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-align: inherit; text-transform: inherit; white-space: inherit; cursor: pointer; }
.sort-btn:hover, th[aria-sort] .sort-btn { color: var(--ink); }
.sort-btn:focus-visible { outline: 2px solid var(--orange-ink); outline-offset: 3px; border-radius: 2px; }
.sort-btn__arrow { position: relative; flex: none; width: 8px; height: 12px; }
.sort-btn__arrow::before, .sort-btn__arrow::after { content: ""; position: absolute; left: 0; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; opacity: 0.35; }
.sort-btn__arrow::before { top: 0; border-bottom: 5px solid currentColor; }
.sort-btn__arrow::after { bottom: 0; border-top: 5px solid currentColor; }
th[aria-sort="ascending"] .sort-btn__arrow::before, th[aria-sort="descending"] .sort-btn__arrow::after { opacity: 1; }

@media (max-width: 720px) {
  .sort-bar { flex-direction: column; align-items: stretch; }
  .sort-bar .sort-select { width: 100%; }
  /* A tabela em cartões esconde o cabeçalho: o seletor assume, e os botões saem da ordem do Tab. */
  .sort-select--stack { display: block; width: 100%; margin: 0 0 12px; }
  .table--stack .sort-btn { display: none; }
}
@media print {
  .sort-bar, .sort-select--stack { display: none !important; }
  .sort-btn__arrow { display: none; }
}

/* ---------- Rentabilidade no celular: números do topo numa linha só ---------- */
/* Em duas colunas, "R$ 109.000" no tamanho cheio quebrava e deixava o "R$" sozinho em cima do número. */
@media (max-width: 720px) {
  .kpis--profit .kpi__value { font-size: clamp(24px, 7.6vw, 40px); white-space: nowrap; overflow-wrap: normal; }
}

/* ---------- Em publicação: aprovado, mas a página ainda vai ao ar ---------- */
/* Marca: o anel do aprovado, ainda sem o visto, com o ponto laranja de quem espera um passo. */
.mark--publicacao { color: var(--ink); }
.mark--publicacao::before { border-color: var(--ink); background: radial-gradient(circle, var(--orange) 0 2.4px, transparent 2.8px) border-box no-repeat; }
.board__col--publicacao .col-title { border-bottom-color: var(--orange); }
.board__col--publicacao .slip { --slip-accent: var(--orange); }
/* O quadro do sprint ganha a sexta coluna só quando há página para pôr no ar; nas telas menores segue em 3 e 1. */
@media (min-width: 1081px) {
  .board--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
}
.seg--publicacao { background: var(--muted); }
.key--publicacao::before { background: var(--muted); }
.duebar--publish .duebar__item form { margin: 0; }
/* Página no ar: o campo do endereço e o botão, na Mesa, na tela do entregável e no quadro do sprint; e o endereço onde o cliente lê. */
.duebar__hint { margin: 0 0 6px; }
.duebar--live .hint { margin-top: 8px; }
.liveform { display: flex; gap: 8px 10px; align-items: flex-end; flex-wrap: wrap; margin: 0; flex: 1 1 360px; max-width: 620px; }
.liveform__field { display: flex; flex-direction: column; gap: 4px; flex: 1 1 220px; min-width: 0; }
.liveform label { font-size: 13px; }
.liveform input[type="url"] { min-height: 36px; padding: 6px 10px; font-size: 14.5px; }
.liveform .btn { flex: none; }
.duebar--publish .duebar__item .liveform { margin-left: auto; }
.liveform--page { flex: none; width: 100%; max-width: 720px; }
.liveform--page input[type="url"] { min-height: 42px; padding: 9px 12px; font-size: 15px; }
.liveform--panel, .liveform--slip { flex: none; flex-direction: column; align-items: stretch; max-width: none; }
.liveform--panel .liveform__field, .liveform--slip .liveform__field { flex: none; }
.liveform--panel { margin-top: 10px; }
.liveform--panel input[type="url"] { min-height: 40px; }
.liveform--panel .btn { align-self: flex-start; }
.liveform--slip { margin-top: 6px; }
.liveform--slip .btn { width: 100%; }
.statusline__live { font-weight: 700; overflow-wrap: anywhere; }
.notice--live a { font-weight: 700; overflow-wrap: anywhere; }
.row__live a { overflow-wrap: anywhere; }
.feed__link { justify-self: start; font-size: 12.5px; overflow-wrap: anywhere; }
/* Tabelas com rolagem própria: o rótulo .sr-only do cabeçalho (posição absoluta) fica preso à tabela e não alarga a página no celular. */
.table-wrap { position: relative; }

/* ---------- CRM: quadro de vendas, lead e configurações ---------- */
/* O quadro rola de lado dentro dele mesmo (a página nunca) e começa alinhado ao conteúdo. Cada coluna leva a cor da etapa em
   --stage (no style da coluna); Encerrado sem venda e Ganho são details, recolhidos por padrão. Arrastar fica no app.js. */
.crm-top { margin-bottom: 6px; }
.crm-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3); margin: 0 0 8px; }
.crm-kpi { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 16px 18px 15px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); }
.crm-kpi dt { margin: 0; font-size: 13px; font-weight: 700; color: var(--muted); }
.crm-kpi dd { margin: 0; font-family: var(--font-display); font-size: clamp(26px, 1.4vw + 16px, 38px); line-height: 1; white-space: nowrap; font-variant-numeric: tabular-nums; }
.crm-kpi dd a { color: inherit; text-decoration: none; }
.crm-kpi dd a:hover { text-decoration: underline; text-decoration-color: var(--orange); }
.crm-kpi--late.is-on { background: var(--danger-wash); border-color: var(--danger-line); }
.crm-kpi--late.is-on dd { color: var(--danger); }
.crm-kpis__hint { margin: 0 0 18px; }
.crm-filters { margin-bottom: 12px; }
.crm-filters .filters__row select { min-width: 0; }
.crm-filters__check { align-items: center; margin: 0 2px; white-space: nowrap; }
.crm-sort { margin: 0 0 14px; }
.crm-sort__hint { flex: 1 1 260px; }
.crm-error { margin: 0 0 14px; }

.crm-board {
  --crm-gutter: max(var(--gutter), calc((100% - var(--container)) / 2));
  display: flex; align-items: flex-start; gap: 28px;
  overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: thin;
  padding: 4px var(--crm-gutter) 28px; scroll-padding-inline: var(--crm-gutter);
}
.crm-group { flex: none; display: flex; flex-direction: column; gap: 10px; min-width: 0; padding-top: 8px; border-top: 3px solid var(--faint); }
.crm-group--ativo { border-top-color: var(--orange); }
.crm-group--perdido { border-top-color: var(--danger); }
.crm-group--ganho { border-top-color: #2e8b57; }
.crm-group__title { position: sticky; left: 16px; align-self: flex-start; display: flex; align-items: baseline; gap: 8px; margin: 0; font: 700 12px/1.3 var(--font-ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; }
.crm-group__count { font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--muted); }
.crm-group__cols { display: flex; align-items: flex-start; gap: 12px; }

.crm-col { flex: none; width: 276px; min-width: 0; }
.crm-col__head { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 3px 10px; margin: 0 0 8px; padding: 13px 12px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: inset 0 3px 0 var(--stage, var(--ink)), var(--shadow-xs); }
.crm-col__name { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 18px; line-height: 1.15; overflow-wrap: anywhere; }
.crm-col__count { padding: 4px 8px 3px; border-radius: 999px; background: var(--calm-wash); font: 700 12.5px/1 var(--font-ui); color: var(--ink); font-variant-numeric: tabular-nums; }
.crm-col__money { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); }
.crm-col__money [data-col-sum] { font-weight: 700; color: var(--ink); }
.crm-col__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; min-height: 48px; }
.crm-col__empty { display: none; margin: 0; padding: 14px 10px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius-lg); font-size: 13px; color: var(--muted); text-align: center; }
.crm-col.is-empty .crm-col__list { min-height: 0; }
.crm-col__add { display: block; margin: 8px 0 0; padding: 7px 10px; border: 1.5px dashed transparent; border-radius: var(--radius); font-size: 13px; color: var(--muted); text-decoration: none; }
.crm-col__add::before { content: "+ "; content: "+ " / ""; font-weight: 700; }
.crm-col__add:hover, .crm-col__add:focus-visible { border-color: var(--rule); color: var(--ink); }
.crm-col.is-empty .crm-col__empty { display: block; }
.crm-col--fold > summary { list-style: none; cursor: pointer; }
.crm-col--fold > summary::-webkit-details-marker { display: none; }
.crm-col--fold > summary::after { content: "\2212"; position: absolute; top: 7px; right: 10px; font: 400 18px/1 var(--font-ui); color: var(--muted); }
.crm-col--fold[open] > summary { padding-right: 34px; }
.crm-col--fold > summary:hover { border-color: var(--line-strong); }
.crm-col--fold:not([open]) { width: 50px; }
.crm-col--fold:not([open]) > summary { display: flex; flex-direction: column; align-items: center; gap: 10px; min-height: 250px; padding: 10px 4px 12px; }
.crm-col--fold:not([open]) > summary::after { content: "+"; position: static; order: -1; }
.crm-col--fold:not([open]) .crm-col__name, .crm-col--fold:not([open]) .crm-col__money { writing-mode: vertical-rl; font-size: 16px; white-space: nowrap; }
.crm-col--fold:not([open]) .crm-col__money { font-size: 12px; }
.crm-col--fold:not([open]) .crm-col__forecast { display: none; }
.crm-col.is-drop-target > .crm-col__head { box-shadow: inset 0 3px 0 var(--stage, var(--ink)), 0 0 0 3px var(--stage, var(--ink)); }

.crm-card { position: relative; display: flex; flex-direction: column; gap: 5px; padding: 11px 12px 9px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: inset 3px 0 0 var(--stage, var(--line-strong)), var(--shadow-xs); cursor: grab; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; transition: box-shadow 0.15s, transform 0.15s; }
.crm-card:hover { border-color: var(--line-strong); box-shadow: inset 3px 0 0 var(--stage, var(--line-strong)), var(--shadow-md); }
.crm-card:focus-within { border-color: var(--ink); }
.crm-card__top { display: flex; align-items: flex-start; gap: 10px; }
.crm-card__top .prio { margin-left: auto; }
.crm-card__who { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.crm-card__name { font-weight: 700; font-size: 15px; line-height: 1.25; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.crm-card__name::after { content: ""; position: absolute; inset: 0; }
.crm-card__name:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--orange); }
.crm-card__name:focus-visible { outline: none; }
.crm-card__name:focus-visible::after { outline: 2px solid var(--orange-ink); outline-offset: 2px; }
.crm-card__company { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.crm-card__deal { margin: 0; font-size: 13.5px; font-weight: 700; color: var(--ink-2); overflow-wrap: anywhere; }
.crm-card__tags { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12.5px; color: var(--muted); }
.crm-card__next { margin: 0; font-size: 12.5px; line-height: 1.4; color: var(--ink-2); overflow-wrap: anywhere; }
.crm-card__label { color: var(--muted); }
.crm-card__late { display: none; }
.crm-card--late .crm-card__next, .crm-card--late .crm-card__label { color: var(--danger); font-weight: 700; }
.crm-card--late .crm-card__late { display: inline; }
.crm-card__client { margin: 0; font-size: 12.5px; color: var(--muted); }
.crm-card__convert { margin: 0; font-size: 12.5px; }
.crm-card__convert a { font-weight: 700; color: var(--orange-ink); text-decoration-color: var(--orange); text-underline-offset: 3px; }
.crm-card__client a, .crm-card .crm-ring, .crm-card__convert a, .crm-card__move { position: relative; z-index: 1; }
.crm-card__client a { color: var(--ink-2); }
.crm-card__msgs { margin: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.crm-flag { display: inline-block; padding: 4px 7px 3px; border-radius: 5px; font: 700 11px/1.1 var(--font-ui); }
.crm-flag--draft { background: var(--orange-wash); color: var(--orange-ink); box-shadow: inset 0 0 0 1px #f3c99c; }
.crm-flag--scheduled { background: var(--ink); color: var(--paper); }
.crm-card__move { align-self: flex-end; margin-top: 1px; font-size: 12.5px; }
.crm-card__move > summary { list-style: none; cursor: pointer; padding: 2px 0; color: var(--muted); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
.crm-card__move > summary::-webkit-details-marker { display: none; }
.crm-card__move > summary:hover { color: var(--ink); text-decoration-color: var(--orange); }
.crm-card__move[open] { align-self: stretch; cursor: auto; }
.crm-card__moveform { display: flex; gap: 6px; margin-top: 6px; }
.crm-card__moveform select { flex: 1 1 auto; min-width: 0; min-height: 34px; padding: 4px 28px 4px 8px; font-size: 13.5px; background-position: right 9px center; }

/* Lead scoring: anel com a nota, na cor da faixa (alto, bom, médio, baixo). crm-ring, e não crm-score: o gráfico da página de
   números usa crm-score como bloco. */
.crm-ring { --band: var(--faint); position: relative; flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: conic-gradient(var(--band) calc(var(--score, 0) * 3.6deg), var(--rule-soft) 0); }
.crm-ring::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--sheet); }
.crm-ring__n { position: relative; font: 700 12.5px/1 var(--font-ui); color: var(--ink); font-variant-numeric: tabular-nums; }
.crm-ring--alto { --band: var(--orange); }
.crm-ring--bom { --band: #2e8b57; }
.crm-ring--medio { --band: #d4b01e; }
.crm-ring--baixo { --band: var(--faint); }
.crm-ring--big { width: 62px; height: 62px; }
.crm-ring--big::before { inset: 6px; }
.crm-ring--big .crm-ring__n { font-size: 21px; }

/* Temperatura */
.crm-temp { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px 3px; border-radius: 999px; font: 700 11px/1 var(--font-ui); letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.crm-temp::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.crm-temp--quente { background: #ffe1cc; color: #a33a00; }
.crm-temp--morno { background: #fbf0c8; color: #6f5200; }
.crm-temp--frio { background: #e0ecf5; color: #1f5a85; }
.crm-temp--congelado { background: #eef5f8; color: #35657a; box-shadow: inset 0 0 0 1px #b9d3df; }

/* Arrastar e soltar */
.crm-card.is-pressing { transform: scale(0.98); box-shadow: inset 3px 0 0 var(--stage, var(--line-strong)), 0 0 0 2px var(--stage, var(--ink)); }
.crm-card.is-dragging { position: fixed; z-index: 70; margin: 0; pointer-events: none; cursor: grabbing; border-color: var(--ink); box-shadow: inset 3px 0 0 var(--stage, var(--line-strong)), 0 26px 46px -18px rgba(10, 10, 10, 0.6); transition: none; will-change: transform; }
.crm-card.is-saving { opacity: 0.72; }
.crm-card.is-dropped { animation: crm-dropped 1.1s ease-out; }
@keyframes crm-dropped { 0% { background: var(--orange-wash); } 100% { background: var(--sheet); } }
.crm-drop { list-style: none; border: 2px dashed var(--stage, var(--ink)); border-radius: var(--radius); background: rgba(255, 124, 0, 0.06); }
.crm-board.is-dragging { scroll-snap-type: none; }
html.crm-dragging, html.crm-dragging * { cursor: grabbing !important; }

/* Página do lead */
.crm-lead-head .display { max-width: none; overflow-wrap: anywhere; }
.crm-statusline { gap: 8px 12px; margin-top: 2px; }
.crm-stage-chip { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 700; }
.crm-stage-chip::before { content: ""; width: 12px; height: 12px; border-radius: 3px; background: var(--stage, var(--ink)); }
.crm-stars { color: var(--orange); font-size: 17px; letter-spacing: 1px; white-space: nowrap; }
.crm-stars__off { color: var(--faint); }
.crm-stars--card { font-size: 13px; letter-spacing: 0; line-height: 1; }
.crm-lead-top { margin-bottom: 18px; }
.crm-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 4px 24px; margin: 4px 0 0; padding: 10px 20px 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: inset 0 3px 0 var(--stage, var(--ink)), var(--shadow-xs); }
.crm-facts__item { min-width: 0; padding: 10px 0; }
.crm-facts dt { font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.crm-facts dd { margin: 4px 0 0; font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.crm-facts dd .muted { font-weight: 400; }
.crm-facts__sub { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--muted); }
.crm-facts__sub.is-late { color: var(--danger); font-weight: 700; }
.crm-notice { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0 0 14px; }
.crm-notice p { flex: 1 1 320px; margin: 0; }
.crm-notice--strong { box-shadow: inset 3px 0 0 var(--ink), var(--shadow-xs); }
.crm-notice__form { margin: 0; }
.crm-notice__list { flex-basis: 100%; margin: 0; padding-left: 20px; }
.crm-quickmove { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 4px 0 0; }
.crm-quickmove select { width: auto; min-width: 220px; max-width: 100%; min-height: 36px; padding: 6px 30px 6px 10px; }
.crm-logform { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 20px; }
.crm-logform__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.crm-logform__foot input { width: auto; max-width: 100%; min-height: 36px; padding: 6px 10px; }
.crm-seg { display: flex; flex-wrap: wrap; margin: 0; padding: 0; border: 0; min-width: 0; }
.crm-seg legend { padding: 0; margin: 0 0 6px; font-weight: 700; font-size: 14px; }
.crm-seg input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.crm-seg label { margin: 0 0 0 -1px; padding: 8px 12px; border: 1px solid var(--line-strong); background: var(--surface); font-weight: 700; font-size: 13.5px; cursor: pointer; }
.crm-seg label:first-of-type { margin-left: 0; border-radius: var(--radius) 0 0 var(--radius); }
.crm-seg label:last-of-type { border-radius: 0 var(--radius) var(--radius) 0; }
.crm-seg label:hover { background: var(--calm-wash); }
.crm-seg input:checked + label { position: relative; background: var(--ink); border-color: var(--ink); color: var(--paper); }
.crm-seg input:checked + .crm-seg__quente { background: #a33a00; border-color: #a33a00; }
.crm-seg input:checked + .crm-seg__morno { background: #6f5200; border-color: #6f5200; }
.crm-seg input:checked + .crm-seg__frio { background: #1f5a85; border-color: #1f5a85; }
.crm-seg input:checked + .crm-seg__congelado { background: #35657a; border-color: #35657a; }
.crm-seg input:focus-visible + label { position: relative; outline: 2px solid var(--orange-ink); outline-offset: 2px; }
@media (max-width: 720px), (pointer: coarse) {
  .crm-seg label { display: inline-flex; align-items: center; min-height: 44px; }
}
.crm-timeline { list-style: none; margin: 0 0 8px; padding: 0; border-left: 2px solid var(--rule); }
.crm-timeline__item { position: relative; padding: 0 0 16px 18px; }
.crm-timeline__item::before { content: ""; position: absolute; left: -7px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--paper); border: 2px solid var(--muted); }
.crm-timeline__item--etapa::before { background: var(--orange); border-color: var(--orange); }
.crm-timeline__item--conversao::before { background: #2e8b57; border-color: #2e8b57; }
.crm-timeline__item--reuniao::before, .crm-timeline__item--ligacao::before, .crm-timeline__item--email::before, .crm-timeline__item--whatsapp::before, .crm-timeline__item--mensagem_recebida::before { background: var(--ink); border-color: var(--ink); }
.crm-timeline__item.is-future::before { background: var(--paper); border-style: dashed; border-color: var(--ink); }
.crm-timeline__what { margin: 0; font-weight: 700; font-size: 14.5px; }
.crm-timeline__when { margin-left: 6px; font-weight: 400; font-size: 12.5px; color: var(--muted); }
.crm-timeline__detail { margin: 2px 0 0; font-size: 13.5px; color: var(--ink-2); }
.crm-timeline__title { font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.crm-timeline__body { margin-top: 4px; font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
.crm-timeline__body p { margin: 0 0 6px; }
.crm-timeline__by { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
/* Lead scoring na página do lead: o anel e o motivo, parte por parte, numa faixa abaixo dos números */
.crm-scorebar { display: flex; align-items: flex-start; gap: 16px; margin: 14px 0 0; padding: 14px 16px 12px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: inset 4px 0 0 var(--band, var(--faint)), var(--shadow-xs); }
.crm-scorebar--alto { --band: var(--orange); }
.crm-scorebar--bom { --band: #2e8b57; }
.crm-scorebar--medio { --band: #d4b01e; }
.crm-scorebar__text { flex: 1 1 auto; min-width: 0; }
.crm-scorebar__title { margin: 2px 0 8px; font: 700 16px/1.3 var(--font-ui); }
.crm-scorebar__parts { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crm-scorebar__parts li { padding: 4px 8px 3px; border: 1px solid var(--rule); border-radius: 999px; background: var(--paper); font-size: 13px; color: var(--ink-2); }
.crm-scorebar__parts strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.crm-scorebar__parts li.is-minus, .crm-scorebar__parts li.is-minus strong { color: var(--danger); border-color: #e7b7b0; }
.crm-scorebar__none { margin: 0 0 8px; font-size: 14px; color: var(--muted); }
.crm-scorebar__how { margin: 0; }
.crm-delete { margin: 18px 0 0; }
.crm-convert .fieldset > * + * { margin-top: 8px; }
.crm-convert select { margin-top: 6px; }
.crm-convert__contract { margin-top: 14px; }

/* Formulário do lead */
.crm-form .fieldset--bare { min-width: 0; margin: 0; padding: 0; border: 0; }
.crm-form .fieldset--bare legend, .crm-form .fieldset .crm-seg legend { padding: 0; }
.crm-form .fieldset--bare .field-label { margin: 0 0 6px; }
.crm-form .fieldset > .crm-seg { margin-top: 18px; }
.crm-form .rating__stars label { font-size: 30px; }

/* Configurações do CRM */
.crm-settings__intro { max-width: 86ch; margin: 6px 0 4px; }
.crm-settings__group { margin: 22px 0 6px; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.crm-stage-list, .crm-source-list { list-style: none; margin: 0; padding: 0; }
.crm-stage, .crm-source { position: relative; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 18px; padding: 12px 0 12px 14px; border-bottom: 1px solid var(--rule-soft); border-left: 4px solid var(--stage, var(--rule)); }
.crm-source { border-left-color: var(--rule); }
.crm-source.is-off { opacity: 0.72; }
.crm-stage:target, .crm-source:target { background: var(--orange-wash); }
.crm-stage__form, .crm-source__form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 10px; flex: 1 1 560px; min-width: 0; margin: 0; }
.crm-stage__form .field, .crm-source__form .field { gap: 4px; }
.crm-stage__form label, .crm-source__form label { font-size: 12.5px; }
.crm-stage__form input, .crm-stage__form select, .crm-source__form input { min-height: 36px; padding: 6px 10px; font-size: 14px; }
.crm-stage__form select { width: auto; max-width: 100%; padding-right: 30px; background-position: right 10px center; }
.crm-stage__name, .crm-source__name { flex: 1 1 180px; min-width: 0; }
.crm-stage__num input { width: 86px; }
.crm-stage__color input[type="color"] { width: 46px; height: 36px; padding: 2px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--sheet); cursor: pointer; }
.crm-stage__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.crm-stage__tools form { margin: 0; }
.crm-stage__count { min-width: 58px; font-size: 12.5px; color: var(--muted); }
.crm-arrow { width: 34px; height: 34px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--sheet); color: var(--ink); font-size: 16px; line-height: 1; cursor: pointer; }
.crm-arrow:hover:not(:disabled) { border-color: var(--ink); }
.crm-arrow:disabled { opacity: 0.35; cursor: default; }
.crm-stage__delete > summary { list-style: none; cursor: pointer; }
.crm-stage__delete > summary::-webkit-details-marker { display: none; }
.crm-stage__deleteform { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; max-width: 380px; margin-top: 8px; }
.crm-stage__deleteform label { font-weight: 400; font-size: 13px; }
.crm-stage__deleteform select { width: auto; max-width: 100%; min-height: 34px; padding: 4px 28px 4px 8px; font-size: 13.5px; }
.crm-stage__form--new { margin-top: 8px; }
.crm-stage__save .btn { min-height: 36px; }
.crm-source__name { flex: 0 1 340px; }
.crm-source__active { align-self: flex-end; align-items: center; min-height: 36px; margin: 0; }
.crm-source__form--new { margin: 14px 0 0; }
.crm-weights__how p { max-width: 86ch; color: var(--ink-2); }
.crm-weights { display: grid; gap: 14px; max-width: 780px; margin-top: 8px; }
.crm-weights__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.crm-weights__grid--five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.crm-weights input { min-height: 36px; padding: 6px 10px; }
.crm-bands { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.crm-bands__row, .crm-weights__line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0; font-size: 14px; }
.crm-bands__row label, .crm-weights__line label { font-weight: 400; }
.crm-bands__row input { width: 92px; }
.crm-bands__row input[inputmode="decimal"] { width: 140px; }
.crm-weights__line input { width: 90px; }
.crm-recalc { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 14px 0 0; }

/* Na tela larga, as linhas de etapas e origens viram uma tabela: os rótulos aparecem só na primeira de cada lista (os outros
   continuam para o leitor de tela) e grupo e papel têm a mesma largura em todas. */
@media (min-width: 721px) {
  .crm-stage__group select, .crm-stage__role select { width: 190px; }
  .crm-stage + .crm-stage .crm-stage__form label, .crm-source + .crm-source .crm-source__form .field label { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
}

@media (max-width: 720px) {
  .crm-stage__form > .field, .crm-source__form > .field { flex: 1 1 calc(50% - 10px); }
  .crm-stage__form > .crm-stage__color { flex: 0 0 auto; }
  .crm-stage__form > .crm-stage__name { flex: 1 1 calc(100% - 66px); }
  .crm-source__form > .crm-source__name { flex: 1 1 100%; }
  .crm-stage__form select, .crm-stage__num input { width: 100%; }
  .crm-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .crm-kpi { padding: 13px 14px 12px; }
  .crm-kpi dd { font-size: clamp(22px, 7vw, 30px); }
  .crm-filters .filters__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
  .crm-filters .filters__row .crm-filters__q { grid-column: 1 / -1; }
  .crm-sort__hint { display: none; }
  .crm-board { gap: 20px; scroll-snap-type: x proximity; }
  .crm-col { width: min(84vw, 300px); scroll-snap-align: start; }
  .crm-col--fold:not([open]) { width: 50px; }
  .crm-weights__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .crm-weights__grid--five { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .crm-stage__form { flex-basis: 100%; }
  .crm-quickmove select { min-width: 0; flex: 1 1 180px; }
  .crm-scorebar { gap: 12px; padding: 12px 12px 10px; }
  .crm-scorebar .crm-ring--big { width: 48px; height: 48px; }
  .crm-scorebar .crm-ring--big .crm-ring__n { font-size: 17px; }
}
@media (max-width: 720px), (pointer: coarse) {
  .crm-card__move > summary, .crm-col__add { display: flex; align-items: center; min-height: 44px; }
  .crm-card__move > summary { justify-content: flex-end; }
}
@media print {
  .crm-filters, .crm-sort, .crm-card__move { display: none !important; }
}

/* ---------- Aprovação automática ---------- */
/* Cadastro do cliente: o número de dias na mesma linha do texto; a página do cliente mostra a escolha como a linha do WhatsApp. */
.days-field { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.days-field input { width: 96px; flex: none; }
.days-field span { font-size: 14.5px; color: var(--ink-2); }
.auto-line { margin: 8px 0 0; font-size: 13.5px; color: var(--muted); }
.auto-line strong { color: var(--ink); }

/* ---------- CRM: números ---------- */
/* Seletor de período (o da Rentabilidade, com janelas em dias), notas curtas e o quadro de quando não há o que contar */
.crm-pf .pf__label { flex-basis: 64px; }
.crm-note { margin: 8px 0 12px; max-width: 86ch; }
.crm-empty { max-width: 760px; box-shadow: inset 0 3px 0 var(--orange), var(--shadow-sm); }
.crm-empty p { margin: 0 0 8px; }
.crm-empty__steps { margin: 4px 0 8px; padding-left: 22px; font-size: 14.5px; }
.crm-empty__steps li { margin: 6px 0; }

/* Os oito números do topo: quatro por linha na tela larga e dois no celular (a regra de duas colunas de .kpis vale até 720 px) */
.kpis--crm .kpi__value { overflow-wrap: normal; }
.kpi__unit { font-family: var(--font-ui); font-size: max(12px, 0.34em); font-weight: 700; letter-spacing: 0.02em; color: var(--muted); }
@media (min-width: 721px) {
  .kpis--crm { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .kpis--crm .kpi__value { font-size: clamp(30px, 1.6vw + 16px, 42px); }
}
@media (max-width: 720px) {
  .kpis--crm .kpi__value { font-size: clamp(22px, 7vw, 40px); white-space: nowrap; }
}

/* Leitura: uma frase por item; o ponto diz o tom (vermelho risco alto, laranja moderado, preto bom sinal, contorno informação) */
.crm-reading { list-style: none; margin: 6px 0 0; padding: 4px 20px; max-width: 96ch; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); }
.crm-reading__item { position: relative; padding: 11px 0 11px 24px; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.crm-reading__item:first-child { border-top: 0; }
.crm-reading__item::before { content: ""; position: absolute; left: 3px; top: 17px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--faint); }
.crm-reading__item--alto::before { background: var(--danger); border-color: var(--danger); }
.crm-reading__item--moderado::before { background: var(--orange); border-color: var(--orange); }
.crm-reading__item--baixo::before { background: var(--ink); border-color: var(--ink); }
.crm-reading__topic { margin-right: 2px; }

/* Funil: duas versões do mesmo SVG, a estreita no celular e a larga a partir de 960 px */
.crm-funnel { margin: 10px 0 0; padding: 14px 12px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: inset 0 3px 0 var(--ink), var(--shadow-sm); }
.crm-legend { list-style: none; margin: 0 0 8px; padding: 0 2px; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12.5px; color: var(--ink-2); }
.crm-legend li { display: inline-flex; align-items: center; gap: 7px; }
.crm-key { display: inline-block; flex: none; width: 12px; height: 12px; border-radius: 3px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.crm-key--go { background: var(--ink-2); }
.crm-key--wait { background: var(--rule); }
.crm-key--lost { background: var(--danger); }
.crm-key--won { background: var(--orange); }
.crm-funnel__svg { display: block; width: 100%; height: auto; font-family: var(--font-ui); }
.crm-funnel__svg--compact { max-width: 520px; }
.crm-funnel__svg--wide { display: none; }
.crm-funnel__caption { margin: 8px 2px 0; }
.crm-funnel__name, .crm-funnel__count { fill: var(--ink); font-weight: 700; }
.crm-funnel__note { fill: var(--muted); }
.crm-funnel__track { fill: var(--rule-soft); fill-opacity: 0.7; }
.crm-funnel__seg--go { fill: var(--ink-2); }
.crm-funnel__seg--wait { fill: var(--rule); }
.crm-funnel__seg--lost { fill: var(--danger); }
.crm-funnel__seg--won { fill: var(--orange); }
.crm-funnel__row:hover .crm-funnel__track { fill-opacity: 1; }
@media (min-width: 960px) {
  .crm-funnel { padding: 16px 18px 12px; }
  .crm-funnel__svg--compact { display: none; }
  .crm-funnel__svg--wide { display: block; }
}

/* Tabelas (origens e funil aberto): no celular viram cartões, como as da Rentabilidade */
.crm-table { font-size: 14px; }
.crm-table th, .crm-table td { padding-left: 10px; padding-right: 10px; }
.crm-table th { white-space: normal; vertical-align: bottom; line-height: 1.25; }
.crm-table tfoot td { font-weight: 700; vertical-align: top; }
.crm-table td.stack-title { overflow-wrap: anywhere; }
@media (min-width: 721px) {
  .crm-table tfoot td { border-top: 2px solid var(--ink); border-bottom: 0; }
}
@media (max-width: 720px) {
  .crm-table tfoot { display: block; }
  .crm-table tfoot td:empty { display: none; }
  .crm-table tr.is-total { border-left-color: var(--ink); border-top: 2px solid var(--ink); }
}

/* Motivos de perda e temperatura dos encerrados, lado a lado na tela larga */
.crm-pair { gap: 40px; }
.crm-bars { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 14px; }
.crm-bar { display: grid; gap: 5px; min-width: 0; }
.crm-bar__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14.5px; }
.crm-bar__label { min-width: 0; overflow-wrap: anywhere; }
.crm-bar__n { flex: none; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.crm-bar__sub { font-size: 12.5px; color: var(--muted); }
.crm-temps { margin-top: 0; }
.crm-pair > *, .crm-score > * { min-width: 0; }
/* As duas tabelas de quatro colunas (temperatura e faixas da nota): em 320 px o cabeçalho quebra a linha em vez de alargar a página */
@media (max-width: 420px) {
  .crm-temps th, .crm-temps td { padding-left: 6px; padding-right: 6px; }
  .crm-temps th { white-space: normal; line-height: 1.25; vertical-align: bottom; }
}

/* A nota prevê o fechamento? A resposta em uma frase, o gráfico e a tabela por faixa */
.crm-verdict { margin: 10px 0 0; padding: 4px 0 4px 14px; border-left: 4px solid var(--faint); font-family: var(--font-display); font-size: 22px; line-height: 1.2; }
.crm-verdict--baixo { border-left-color: var(--ink); }
.crm-verdict--moderado { border-left-color: var(--orange); }
.crm-score { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 28px; align-items: start; margin-top: 12px; }
.crm-score__figure { margin: 0; padding: 14px 12px 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: inset 0 3px 0 var(--ink), var(--shadow-sm); }
.crm-score__svg { display: block; width: 100%; height: auto; font-family: var(--font-ui); }
.crm-score__caption { margin: 6px 2px 0; }
.crm-score__base { stroke: var(--rule); stroke-width: 1; }
.crm-score__grid { stroke: var(--rule-soft); stroke-width: 1; }
.crm-score__axis { fill: var(--muted); }
.crm-score__bar { fill: var(--ink-2); }
.crm-score__bar--few { fill: var(--faint); }
.crm-score__value, .crm-score__label { fill: var(--ink); font-weight: 700; }
.crm-score__value--few { fill: var(--muted); }
.crm-score__detail { fill: var(--muted); }
.crm-score__avg { stroke: var(--orange-ink); stroke-width: 1.6; stroke-dasharray: 5 4; }
.crm-score__text .crm-temps { margin-top: 0; }
@media (max-width: 900px) {
  .crm-score { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}
@media (min-width: 1024px) and (max-width: 1199px) {
  .has-sidebar .crm-score { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}

/* Como as contas são feitas */
.crm-how { margin-top: 28px; }
.crm-how__list { margin: 0; padding-left: 20px; font-size: 14px; max-width: 86ch; }
.crm-how__list li { margin: 6px 0; }
@media print {
  .crm-how { display: none; }
  .crm-funnel__svg--compact { display: none; }
  .crm-funnel__svg--wide { display: block; }
}

/* ---------- Curva ABC ---------- */
/* Seletor de inativos, notas curtas e o quadro de quando não há curva */
.abc-inactive { margin: 12px 0 0; }
.abc-note { margin: 8px 0 12px; max-width: 86ch; }
.abc-empty { max-width: 760px; box-shadow: inset 0 3px 0 var(--orange), var(--shadow-sm); }
.abc-empty p { margin: 0 0 8px; }
.abc-empty__steps { margin: 4px 0 0; padding-left: 22px; font-size: 14.5px; }
.abc-empty__steps li { margin: 6px 0; }

/* Leitura: uma frase por item; o ponto diz o tom (vermelho risco alto, laranja moderado, preto baixo, contorno informação) */
.abc-reading { list-style: none; margin: 6px 0 0; padding: 4px 20px; max-width: 96ch; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); }
.abc-reading__item { position: relative; padding: 11px 0 11px 24px; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.abc-reading__item:first-child { border-top: 0; }
.abc-reading__item::before { content: ""; position: absolute; left: 3px; top: 17px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--faint); }
.abc-reading__item--alto::before { background: var(--danger); border-color: var(--danger); }
.abc-reading__item--moderado::before { background: var(--orange); border-color: var(--orange); }
.abc-reading__item--baixo::before { background: var(--ink); border-color: var(--ink); }
.abc-reading__topic { margin-right: 2px; }

/* Marca da classe: a letra num quadrado. A cheia, B contornada sobre o creme, C tracejada. */
.abc-class { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 5px; border: 1.5px solid var(--ink); border-radius: var(--radius-sm); font: 700 13px/1 var(--font-ui); color: var(--ink); background: transparent; vertical-align: middle; }
.abc-class--A { background: var(--ink); color: var(--paper); }
.abc-class--B { background: var(--calm-wash); }
.abc-class--C { border-style: dashed; border-color: var(--muted); color: var(--ink-2); }
.abc-class--small { min-width: 20px; height: 20px; font-size: 12px; padding: 0 4px; }

/* Curva de Pareto: duas versões do mesmo SVG, a estreita no celular e a larga a partir de 960 px. Um eixo só, em %. */
.pareto { margin: 10px 0 0; padding: 14px 10px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: inset 0 3px 0 var(--ink), var(--shadow-sm); }
.pareto__legend { list-style: none; margin: 0 0 6px; padding: 0 4px; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12.5px; color: var(--ink-2); }
.pareto__legend li { display: inline-flex; align-items: center; gap: 7px; }
.pareto__key { position: relative; display: inline-block; flex: none; width: 12px; height: 12px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.pareto__key--bar { width: 9px; height: 13px; background: var(--ink-2); border-radius: 2px 2px 0 0; }
.pareto__key--line { width: 18px; height: 2px; background: var(--orange); }
.pareto__key--line::after { content: ""; position: absolute; left: 5px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.pareto__key--A { background: var(--orange-wash); box-shadow: inset 0 0 0 1px var(--orange); }
.pareto__key--B { background: var(--calm-wash); box-shadow: inset 0 0 0 1px var(--rule); }
.pareto__key--C { background: var(--sheet); box-shadow: inset 0 0 0 1px var(--rule); }
.pareto__svg { display: block; width: 100%; height: auto; font-family: var(--font-ui); }
.pareto__svg--compact { max-width: 480px; }
.pareto__svg--wide { display: none; }
.pareto__caption { margin: 8px 4px 0; }
.pareto__only-wide { display: none; }
.pareto__zone--A { fill: var(--orange-wash); fill-opacity: 0.55; }
.pareto__zone--B { fill: var(--calm-wash); fill-opacity: 0.6; }
.pareto__zone--C { fill: none; }
.pareto__sep { stroke: var(--rule); stroke-width: 1; }
.pareto__zone-letter { font-weight: 700; fill: var(--ink); }
.pareto__zone-meta { fill: var(--ink-2); }
.pareto__base { stroke: var(--rule); stroke-width: 1; }
.pareto__grid { stroke: var(--rule-soft); stroke-width: 1; }
.pareto__ref { stroke: var(--muted); stroke-width: 1; stroke-opacity: 0.7; }
.pareto__axis { fill: var(--muted); }
.pareto__ref-label { fill: var(--ink-2); font-weight: 700; }
.pareto__bar { fill: var(--ink-2); }
.pareto__x { fill: var(--ink-2); }
.pareto__line { fill: none; stroke: var(--orange); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.pareto__dot { fill: var(--orange); stroke: var(--sheet); stroke-width: 2; }
.pareto__hit { fill: var(--ink); fill-opacity: 0; pointer-events: all; }
.pareto__col:hover .pareto__hit { fill-opacity: 0.05; }
.pareto__tip { visibility: hidden; pointer-events: none; }
.pareto__col:hover .pareto__tip { visibility: visible; }
.pareto__tip-box { fill: var(--sheet); stroke: var(--ink); stroke-width: 1; }
.pareto__tip-title { fill: var(--ink); font-weight: 700; }
.pareto__tip-text { fill: var(--ink-2); }
@media (min-width: 960px) {
  .pareto { padding: 16px 18px 12px; }
  .pareto__svg--compact, .pareto__only-compact { display: none; }
  .pareto__svg--wide { display: block; }
  .pareto__only-wide { display: inline; }
}

/* Resumo das classes, embaixo da curva */
.abc-classes { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.abc-classes__item { --cap: var(--line-strong); display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 14px 16px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: inset 0 3px 0 var(--cap), var(--shadow-xs); font-size: 14px; }
.abc-classes__item--A { --cap: var(--orange); }
.abc-classes__item--B { --cap: var(--ink-2); }
.abc-classes__head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.abc-classes__rule { font-size: 12.5px; color: var(--muted); }

/* Tabela: rola de lado dentro do próprio quadro, com o nome do cliente parado à esquerda */
.abc-wrap { margin-top: 4px; }
.abc-table { min-width: 1080px; font-size: 14px; }
.abc-table th { white-space: normal; vertical-align: bottom; line-height: 1.25; padding: 8px 6px; font-size: 12px; }
.abc-table td { padding: 10px 6px; }
.abc-table th:first-child, .abc-table td:first-child { position: sticky; left: 0; z-index: 1; min-width: 140px; max-width: 220px; background: var(--surface); box-shadow: inset -1px 0 0 var(--line); }
.abc-table th:first-child { background: var(--surface-sunken); }
.abc-table__client .table__strong { overflow-wrap: anywhere; }
.abc-table tfoot td { font-weight: 700; border-top: 2px solid var(--ink); border-bottom: 0; }
.abc-rank { display: inline-block; min-width: 22px; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.abc-trend { font-weight: 700; white-space: nowrap; }
.abc-trend--estavel, .abc-trend--sem { font-weight: 400; color: var(--muted); }
.abc-trend--sobe, .abc-trend--nova { color: var(--ink); }
.abc-trend--cai, .abc-trend--parou { color: var(--danger); }
.abc-alert { color: var(--danger); font-weight: 700; }

/* Matriz receita por eficiência: dois por dois na tela larga, uma coluna no celular */
.abc-matrix { display: grid; grid-template-columns: 132px minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 4px; }
.abc-matrix__axis { margin: 0; font: 700 12px/1.3 var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); align-self: end; }
.abc-matrix__axis--col1 { grid-column: 2; }
.abc-matrix__axis--col2 { grid-column: 3; }
.abc-matrix__axis--row { grid-column: 1; align-self: center; }
.abc-quad { --cap: var(--line-strong); min-width: 0; padding: 15px 16px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: inset 0 3px 0 var(--cap), var(--shadow-xs); }
.abc-quad--proteger { --cap: var(--ink); }
.abc-quad--renegociar { --cap: var(--orange); }
.abc-quad--crescer { --cap: var(--faint); }
.abc-quad--rever { --cap: var(--danger); }
.abc-quad__title { margin: 0; display: flex; align-items: baseline; gap: 8px; font-family: var(--font-display); font-size: 21px; line-height: 1.15; }
.abc-quad__rule { margin: 2px 0 8px; font-size: 13px; color: var(--muted); }
.abc-quad__list { list-style: none; margin: 0; padding: 0; }
.abc-quad__list li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; }
.abc-quad__list a { min-width: 0; font-weight: 700; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.abc-quad__list a:hover { text-decoration: underline; text-decoration-color: var(--orange); }
.abc-quad__gap { font-size: 12.5px; color: var(--muted); }
.abc-quad .empty { padding: 4px 0; border: 0; background: none; font-size: 13.5px; }

/* Recomendações: um cartão por cliente; a borda diz se pede ação (vermelha), atenção (laranja) ou só acompanhar */
.abc-recs { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 12px; }
.abc-rec { --cap: var(--line-strong); min-width: 0; padding: 14px 16px 12px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: inset 4px 0 0 var(--cap), var(--shadow-xs); }
.abc-rec--alto { --cap: var(--danger); }
.abc-rec--moderado { --cap: var(--orange); }
.abc-rec__head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0 0 6px; }
.abc-rec__head a { min-width: 0; font-weight: 700; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.abc-rec__head a:hover { text-decoration: underline; text-decoration-color: var(--orange); }
.abc-rec__quad { font: 700 11.5px/1.2 var(--font-ui); letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.abc-rec__list { margin: 0; padding-left: 18px; font-size: 14.5px; line-height: 1.45; }
.abc-rec__list li { margin: 3px 0; overflow-wrap: anywhere; }
.abc-rec__list li::marker { color: var(--orange-ink); }

@media (max-width: 720px) {
  .abc-classes { grid-template-columns: minmax(0, 1fr); }
  .abc-matrix { grid-template-columns: minmax(0, 1fr); }
  .abc-matrix__axis { display: none; }
  .abc-table th:first-child, .abc-table td:first-child { max-width: 160px; }
}
@media print {
  .abc-inactive, .pareto__tip { display: none !important; }
  .pareto__svg--compact { display: none; }
  .pareto__svg--wide { display: block; }
}

/* ---------- Capital Social: Copiloto ---------- */
/* O painel do Copiloto no dossiê (partials/social_copilot.php): o resultado nas seções da especificação, com a fonte de cada fato num selo
   que leva ao registro, o texto sugerido, a prévia do pós-conversa com o que marcar, e o pedido. Cartão, campos, avisos e selos vêm dos
   componentes; aqui fica só o arranjo. No celular, uma coluna, e os botões ocupam a linha. */
.copilot { display: flex; flex-direction: column; gap: var(--space-5); min-width: 0; }
.copilot__head .side-title { margin-bottom: var(--space-2); }
.copilot__head .hint { max-width: 72ch; }
.copilot__status { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: var(--space-3) 0 0; font-size: 13.5px; color: var(--muted); }
.copilot__status a { color: inherit; }
.copilot-result { gap: var(--space-4); }
.copilot-result__head { display: flex; flex-direction: column; gap: 4px; }
.copilot-result__head .eyebrow { margin: 0; }
.copilot-result__title { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1.15; overflow-wrap: anywhere; }
.copilot-result__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.copilot-result__origin { margin: 2px 0 0; font-size: 13.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.copilot-result__summary { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink-2); overflow-wrap: anywhere; }
.copilot-result .callout p, .copilot-result .callout .copilot-list { margin: 0; overflow-wrap: anywhere; }
.copilot-sec { min-width: 0; padding-top: var(--space-4); border-top: 1px solid var(--line); }
.copilot-sec__title { margin: 0 0 var(--space-2); font: 700 12px/1.3 var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.copilot-sec__text { margin: 0; font-size: 14.5px; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
.copilot-sec__text--muted { color: var(--muted); }
.copilot-list { display: grid; gap: 6px; margin: 0; padding-left: 20px; font-size: 14.5px; line-height: 1.5; overflow-wrap: anywhere; }
.copilot-facts { display: grid; gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
.copilot-fact { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0; font-size: 14.5px; line-height: 1.5; }
.copilot-fact__text { min-width: 0; overflow-wrap: anywhere; }
.copilot-src { display: inline-flex; align-items: center; max-width: 100%; padding: 2px 9px; border-radius: var(--radius-pill); background: var(--surface-sunken); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); font-size: 12px; font-weight: 700; line-height: 1.5; text-decoration: none; overflow-wrap: anywhere; }
a.copilot-src:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.copilot-draft { display: flex; flex-direction: column; gap: var(--space-3); margin-top: var(--space-2); }
.copilot-draft textarea { font-family: var(--font-copy); font-size: 15.5px; line-height: 1.55; }
.copilot-draft__actions, .copilot-ask__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.copilot-draft__status, .copilot-ask__status { margin: 0; font-size: 13.5px; font-weight: 700; color: var(--orange-ink); }
.copilot-draft__status:empty, .copilot-ask__status:empty { display: none; }
.copilot-review { display: flex; flex-direction: column; gap: var(--space-4); }
.copilot-pick__item { display: flex; flex-direction: column; gap: var(--space-3); padding-top: var(--space-3); border-top: 1px dashed var(--line-strong); }
.copilot-pick__item > * + * { margin-top: 0; }
.copilot-ask { gap: var(--space-4); }
.copilot-ask__title { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 19px; line-height: 1.2; }
.copilot-ask__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: var(--space-4); }
.copilot-ask__blocked { color: var(--danger); }
@media (max-width: 600px) {
  .copilot-ask__actions .btn, .copilot-draft__actions .btn, .copilot-review .form-actions .btn { flex: 1 1 100%; }
  .copilot-result__title { font-size: 20px; }
}

/* ---------- Capital Social: autoridade, apresentações e métricas ---------- */
/* A navegação interna do módulo (partials/social_nav.php), a Biblioteca de Autoridade (posicionamento, temas, cases com o selo de
   verificação e respostas de validação), as conexões e apresentações (a lista, as sugestões, os passos e os dois lados) e as métricas
   (dois painéis que não se misturam). Cartões, campos, selos, abas e avisos vêm dos componentes do topo; aqui fica só o arranjo. */
.soc-subnav { padding-top: var(--space-5); }
.soc-subnav .tabs { margin: 0; }
.soc-subnav + .page-head { padding-top: var(--space-6); }
.soc-drawer--wide { width: min(600px, 100vw); }

/* Posicionamento */
.soc-statement { margin: 0 0 var(--space-4); padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: inset 0 3px 0 var(--orange), var(--shadow-sm); min-width: 0; }
.soc-statement .eyebrow { margin-bottom: var(--space-3); }
.soc-statement__text { margin: 0 0 var(--space-4); font-family: var(--font-copy); font-size: clamp(19px, 0.8vw + 15px, 24px); line-height: 1.4; color: var(--ink); overflow-wrap: anywhere; }
.soc-statement__text p { margin: 0; }
.soc-statement__parts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: var(--space-3) var(--space-5); margin: 0; padding-top: var(--space-4); border-top: 1px solid var(--line); }
.soc-statement__parts dt { margin: 0 0 4px; font: 700 11px/1.3 var(--font-ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.soc-statement__parts dd { margin: 0; font-size: 14.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.soc-statement__notes { margin: var(--space-4) 0 0; font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
.soc-newversion { margin: 0 0 var(--space-2); }
.soc-newversion > summary { cursor: pointer; font-weight: 700; }
.soc-newversion[open] > summary { margin-bottom: var(--space-4); }
.soc-version.is-active { box-shadow: inset 3px 0 0 var(--ink), var(--shadow-xs); }

/* Cases e histórias */
.soc-cases { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: var(--space-4); align-items: start; }
.soc-cases__count { margin: 0 0 var(--space-3); }
.soc-case { gap: var(--space-3); scroll-margin-top: 16px; }
.soc-case.is-unverified { border-style: dashed; border-color: var(--line-strong); }
.soc-case__head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--space-2) var(--space-3); }
.soc-case__head .soc-tags { margin: 0; }
.soc-seal { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 5px 10px 4px; border-radius: var(--radius-pill); font: 700 12px/1.2 var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.soc-seal__icon { width: 16px; height: 16px; }
.soc-seal--ok { background: var(--success-wash); color: var(--success); }
.soc-seal--no { background: var(--danger-wash); color: var(--danger); box-shadow: inset 0 0 0 1.5px var(--danger); }
.soc-case__title { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 20px; line-height: 1.18; overflow-wrap: anywhere; }
.soc-case__audience { margin: -6px 0 0; font-size: 13.5px; color: var(--muted); overflow-wrap: anywhere; }
.soc-case__warn { margin: 0; padding: 8px 12px; background: var(--danger-wash); border-radius: var(--radius); color: var(--danger-ink); font-size: 13.5px; line-height: 1.45; }
.soc-case__body { display: grid; gap: var(--space-3); margin: 0; }
.soc-case__body dt, .soc-case__label { margin: 0 0 4px; font: 700 11px/1.3 var(--font-ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.soc-case__body dd { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); overflow-wrap: anywhere; }
.soc-case__more > summary { cursor: pointer; }
.soc-case__more[open] > summary { margin-bottom: var(--space-3); }
.soc-case__evidence { padding-top: var(--space-3); border-top: 1px solid var(--line); min-width: 0; }
.soc-case__evidence .soc-mini { margin: 0; }
.soc-case__evidence p { margin: 0; }
.soc-case__privacy { overflow-wrap: anywhere; }
.soc-case__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-3); margin-top: auto; padding-top: var(--space-3); border-top: 1px solid var(--line); }
.soc-case__actions { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); }
.soc-case__actions form { margin: 0; }
.soc-evidence > .hint { margin-top: 0; }
.soc-verify-warn { margin: 0; padding: 8px 12px; background: var(--danger-wash); border-radius: var(--radius); color: var(--danger-ink); font-size: 13.5px; font-weight: 700; }

/* Validação: a pergunta, sempre a mesma, e as respostas com as palavras de quem respondeu */
.soc-question { margin: 0 0 var(--space-5); }
.soc-question blockquote { margin: 0 0 var(--space-2); padding: 4px 0 4px 18px; border-left: 3px solid var(--orange); font-family: var(--font-copy); font-style: italic; font-size: clamp(20px, 0.8vw + 16px, 25px); line-height: 1.35; color: var(--ink); }
.soc-question blockquote p { margin: 0; }
.soc-question figcaption { max-width: 78ch; }
.soc-answer-form { margin: 0 0 var(--space-2); }
.soc-answer-form .soc-box__title { margin-bottom: 0; }
.soc-answer__text { margin: 0 0 var(--space-2); font-family: var(--font-copy); font-size: 16px; line-height: 1.5; color: var(--ink); overflow-wrap: anywhere; }
.soc-answer__text p { margin: 0; }

/* Conexões: a lista, as sugestões e a aba do dossiê */
.soc-conn { margin-bottom: var(--space-6); }
.soc-conn__title { margin-top: 0; }
.soc-intros, .soc-suggest-list { list-style: none; display: grid; gap: var(--space-3); margin: 0; padding: 0; }
.soc-intro { gap: var(--space-2); }
.soc-intro.is-closed { background: var(--surface-sunken); box-shadow: none; }
.soc-intro__head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--space-2) var(--space-3); }
.soc-intro__pair { font-family: var(--font-display); font-weight: 700; font-size: 19px; line-height: 1.2; overflow-wrap: anywhere; }
.soc-intro__and { font-family: var(--font-ui); font-weight: 400; font-size: 14px; color: var(--muted); }
.soc-intro__next { margin: 0; font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
.soc-intro .soc-tags { margin: 0; }
.soc-intro .soc-item__meta { margin: 0; }
.soc-suggestions > .hint { margin: 0 0 var(--space-3); }
.soc-suggest { gap: var(--space-2); padding: var(--space-4); }
.soc-suggest__pair { margin: 0; font-weight: 700; font-size: 15.5px; overflow-wrap: anywhere; }
.soc-suggest__pair a { color: var(--ink); }
.soc-suggest__why { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); overflow-wrap: anywhere; }
.soc-suggest__source { margin: 0; font-size: 13px; }
.soc-suggest__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); }
.soc-suggest__actions form { margin: 0; }
.soc-reminder { margin: 0; font-size: 13.5px; }
.soc-dismissed { margin-top: var(--space-4); }
.soc-dismissed .soc-item form { margin: var(--space-2) 0 0; }
.soc-conn-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: var(--space-4); margin: 0 0 var(--space-2); }
.soc-conn-grid .soc-box p { margin: 0; }
.soc-suggest-item .callout { margin: 0 0 6px; }
.soc-new-actions { margin-top: var(--space-5); }

/* A página da apresentação: o próximo passo, os passos, os dois lados e o que dá para fazer agora */
.soc-intro-head__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.soc-intro-page { display: grid; gap: var(--space-4); padding-bottom: var(--space-6); }
.soc-intro-page > * { min-width: 0; }
.soc-next-step p { margin: 0; font-size: 16px; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.soc-reminder-line { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: 14px; color: var(--ink-2); }
.soc-reminder-line__icon { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--orange-ink); }
.soc-steps-line { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0; padding: 0; }
.soc-step { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 4px; text-align: center; }
.soc-step::before { content: ""; position: absolute; top: 8px; right: 50%; left: -50%; height: 2px; background: var(--line-strong); }
.soc-step:first-child::before { display: none; }
.soc-step.is-done::before, .soc-step.is-current::before, .soc-step.is-stopped::before { background: var(--ink); }
.soc-step__dot { position: relative; z-index: 1; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 2px var(--line-strong); }
.soc-step.is-done .soc-step__dot { background: var(--ink); box-shadow: none; }
.soc-step.is-current .soc-step__dot { background: var(--orange); box-shadow: 0 0 0 4px var(--orange-wash); }
.soc-step.is-stopped .soc-step__dot { background: var(--danger); box-shadow: 0 0 0 4px var(--danger-wash); }
.soc-step__label { font-size: 13px; font-weight: 700; line-height: 1.25; color: var(--muted); overflow-wrap: anywhere; }
.soc-step.is-done .soc-step__label, .soc-step.is-current .soc-step__label { color: var(--ink); }
.soc-step.is-stopped .soc-step__label { color: var(--danger); }
.soc-step__date { font-size: 12px; color: var(--muted); }
.soc-closed-banner p { margin: 0; }
.soc-sides { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: var(--space-4); align-items: start; }
.soc-side { gap: var(--space-3); }
.soc-side .eyebrow { margin: 0; }
.soc-side__name { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1.15; overflow-wrap: anywhere; }
.soc-side__name a { color: var(--ink); text-decoration: none; }
.soc-side__name a:hover { text-decoration: underline; text-decoration-color: var(--orange); }
.soc-side .soc-noblock { margin: 0; }
.soc-side .notice { margin: 0; }
.soc-side__purpose > p:not(.soc-case__label) { margin: 0; font-size: 14.5px; line-height: 1.5; overflow-wrap: anywhere; }
.soc-side__consent { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; }
.soc-side__form { display: grid; gap: var(--space-3); margin: 0; padding-top: var(--space-3); border-top: 1px solid var(--line); }
.soc-side__form .btn { justify-self: start; }
.soc-side__form .hint { margin: 0; }
.soc-side__links { margin: 0; }
.soc-ai-line { margin: 0; }
.soc-written textarea, .soc-written input { background: var(--surface-sunken); }
.soc-written .field { margin: 0 0 var(--space-3); }
.soc-intro-actions { display: grid; gap: 0; }
.soc-act { display: grid; gap: var(--space-3); margin: 0; padding: var(--space-3) 0; border-top: 1px dashed var(--line-strong); }
.soc-intro-actions .soc-box__title + .soc-act { border-top: 0; padding-top: 0; }
.soc-act .btn, .soc-act .field { justify-self: start; }
.soc-act .field { width: min(100%, 520px); }
.soc-act > .hint { margin: 0; }
.soc-intro-actions > .soc-act:last-child { padding-bottom: 0; }
.soc-intro-notes__text { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--ink-2); overflow-wrap: anywhere; }

/* Métricas: dois painéis que não se misturam */
.soc-metrics-head .period { margin-top: var(--space-4); }
.soc-period__custom { gap: 8px 10px; color: var(--ink-2); }
.soc-period__label { margin: var(--space-3) 0 0; font-size: 14px; color: var(--ink-2); }
.soc-metrics { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-5); align-items: start; padding-bottom: var(--space-6); }
.soc-metric-panel { display: grid; gap: var(--space-4); min-width: 0; padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: inset 0 4px 0 var(--ink), var(--shadow-sm); }
.soc-metric-panel--sales { box-shadow: inset 0 4px 0 var(--orange), var(--shadow-sm); }
.soc-metric-panel__head .eyebrow { margin-bottom: 4px; }
.soc-metric-panel__title { margin: 0 0 6px; font-family: var(--font-display); font-weight: 700; font-size: 26px; line-height: 1.1; }
.soc-reading ul { margin: 0; padding-left: 18px; }
.soc-reading li { margin: 2px 0; overflow-wrap: anywhere; }
.soc-metric-list { display: grid; gap: 0; margin: 0; }
.soc-metric { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: baseline; padding: var(--space-3) 0; border-top: 1px solid var(--line); }
.soc-metric:first-child { border-top: 0; padding-top: 0; }
.soc-metric__label { margin: 0; font-weight: 700; font-size: 15px; color: var(--ink); }
.soc-metric__value { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 28px; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; text-align: right; }
.soc-metric__parts, .soc-metric__detail, .soc-metric__how { grid-column: 1 / -1; margin: 0; }
.soc-metric__parts ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; padding: 0; font-size: 14px; color: var(--ink-2); }
.soc-metric__parts strong { font-variant-numeric: tabular-nums; color: var(--ink); }
.soc-metric__detail { font-size: 14px; font-weight: 700; color: var(--orange-ink); }
.soc-metric__how { font-size: 13px; line-height: 1.45; color: var(--muted); }

@media (max-width: 900px) {
  .soc-metrics { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .soc-statement, .soc-metric-panel { padding: 16px; }
  .soc-case__foot { flex-direction: column; align-items: flex-start; }
  .soc-intro__pair { font-size: 18px; }
  .soc-side__name { font-size: 20px; }
  .soc-metric-panel__title { font-size: 23px; }
}
@media (max-width: 600px) {
  .soc-period__custom input[type="date"] { flex: 1 1 140px; min-width: 0; }
  .soc-steps-line { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .soc-step { flex-direction: row; align-items: center; gap: 12px; padding: 6px 0; text-align: left; }
  .soc-step::before { top: -50%; bottom: 50%; left: 8px; right: auto; width: 2px; height: auto; }
  .soc-step__date { margin-left: auto; }
  .soc-suggest__actions .btn, .soc-side__form .btn, .soc-act .btn { width: 100%; justify-content: center; }
  .soc-side__form .btn { justify-self: stretch; }
  .soc-act .btn, .soc-act .field { justify-self: stretch; }
  .soc-act .field { width: 100%; }
}

/* ---------- CRM: mensagens de WhatsApp (lead e cliente) e modelos de mensagem ---------- */
.cmsgs { margin: 32px 0 0; min-width: 0; }
.cmsgs .side-title { margin-bottom: 4px; }
.cmsgs__to { margin: 0 0 10px; font-size: 13.5px; color: var(--muted); overflow-wrap: anywhere; }
.cmsgs__to strong { color: var(--ink); }
.cmsgs__alert { margin: 0 0 10px; font-size: 13.5px; overflow-wrap: anywhere; }
.cmsgs__alert a { font-weight: 700; }
.cmsgs__new { margin: 0 0 6px; }
.cmsgs__new[open] > summary { margin-bottom: 4px; }
.cmsgs__group { display: flex; align-items: center; gap: 8px; margin: 22px 0 0; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.cmsgs__list { list-style: none; margin: 0; padding: 0; }
.cmsgs__cancelled { margin: 18px 0 0; }
.cmsgs__cancelled > summary { cursor: pointer; }
.cmsgs__reply { margin: 24px 0 0; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.cmsgs__reply label { font-size: 13.5px; }
.cmsgs__reply-row { display: flex; gap: 8px; align-items: stretch; }
.cmsgs__reply-row input { flex: 1 1 auto; min-width: 0; min-height: 36px; padding: 6px 10px; font-size: 14px; }
.cmsgs__reply-row .btn { flex: none; }

.cmsg { padding: 13px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.cmsg__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0 0 6px; font-size: 12.5px; color: var(--muted); }
.cmsg__tag { display: inline-block; padding: 3px 7px 2px; border: 1px solid var(--rule); border-radius: var(--radius-sm); font: 700 11px/1.2 var(--font-ui); letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; vertical-align: 1px; }
.cmsg__tag--rascunho { border-style: dashed; border-color: var(--ink-2); }
.cmsg__tag--claude { border-style: solid; border-color: var(--orange); background: var(--orange-wash); color: var(--orange-ink); }
.cmsg__tag--agendada { border-color: var(--ink); color: var(--ink); }
.cmsg__tag--enviada { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.cmsg__tag--falhou, .cmsg--late .cmsg__tag--agendada { border-color: var(--danger); background: var(--danger-wash); color: var(--danger); }
.cmsg__tag--cancelada { border-color: var(--line); color: var(--muted); }
.cmsg__text { margin: 0 0 8px; font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.cmsg__error { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--danger); overflow-wrap: anywhere; }
.cmsg__note { margin: 0; font-size: 12.5px; color: var(--muted); }
.cmsg__chan { font: 700 11px/1.2 var(--font-ui); letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.cmsg__subject { margin: 0 0 4px; font-size: 14.5px; overflow-wrap: anywhere; }
.cmsg__to { margin: 0 0 6px; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.cmsg__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.cmsg__actions form { margin: 0; }
.cmsg--cancelada .cmsg__text { color: var(--muted); }
.cmsg--enviada summary { cursor: pointer; display: block; font-size: 13.5px; }
.cmsg--enviada summary .cmsg__excerpt { display: block; margin-top: 4px; color: var(--ink-2); overflow-wrap: anywhere; }
.cmsg__excerpt-subject { display: block; color: var(--ink); }
.cmsg--enviada .cmsg__text { margin: 8px 0 0; }
.cmsg__edit { margin-top: 10px; }
.cmsg__edit > summary { cursor: pointer; display: inline-block; }

.cmsg-form { display: grid; gap: 12px; margin-top: 12px; min-width: 0; }
.cmsg-form .field { margin: 0; }
.cmsg-form textarea { min-height: 120px; }
.cmsg-when { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 10px; min-width: 0; margin: 0; padding: 8px 12px 12px; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.cmsg-when legend { padding: 0 6px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.cmsg-when input, .cmsg-when select { min-height: 40px; padding: 6px 10px; font-size: 14.5px; }
.cmsg-form__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cmsg-channel { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; margin: 0; padding: 0; border: 0; min-width: 0; }
.cmsg-channel legend { float: left; margin: 0 4px 0 0; padding: 0; font-size: 14px; font-weight: 700; }
.cmsg-form__channel { display: grid; gap: 8px; min-width: 0; }
.cmsg-form__channel > p { margin: 0; overflow-wrap: anywhere; }

.ctpl-vars { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 0 28px; margin: 12px 0 0; }
.ctpl-vars__item { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ctpl-vars dt, .ctpl-vars dd { margin: 0; }
.ctpl-vars dd { font-size: 14px; color: var(--ink-2); }
.ctpl-note { max-width: 78ch; margin: 10px 0 0; }
.ctpl-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 18px; }
.ctpl { --cap: var(--ink); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: start; padding: 20px 20px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: inset 0 3px 0 var(--cap), var(--shadow-sm); }
.ctpl.is-off { --cap: var(--line-strong); background: rgba(252, 251, 249, 0.55); box-shadow: inset 0 3px 0 var(--cap); }
.ctpl--new { --cap: var(--orange); display: block; margin-top: 14px; }
.ctpl__form { display: grid; gap: 14px; min-width: 0; max-width: 680px; }
.ctpl__form .field { margin: 0; }
.ctpl__side { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.ctpl__side form { margin: 0; }
.ctpl__side .linkish { align-self: flex-start; padding-top: 4px; }
.ctpl__vars { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ctpl__var { padding: 6px 9px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: 13px/1 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; cursor: pointer; }
.ctpl__var:hover { border-color: var(--ink); }
.ctpl__preview { padding: 12px 14px 12px 16px; background: var(--surface-sunken); border-radius: var(--radius); box-shadow: inset 3px 0 0 var(--orange); }
.ctpl__label { margin: 0 0 4px; font: 700 12px/1.2 var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.ctpl__text { margin: 0; font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.ctpl__subject { margin: 0 0 6px; font-size: 14.5px; overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .ctpl { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .ctpl__side { flex-direction: row; flex-wrap: wrap; align-items: center; }
}

/* ---------- CRM: formulários ---------- */
/* Painel: lista, modelos, configurações, campos, código para o site, respostas e a seção Formulários da página do cliente (e do lead). */
.cform-state { font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.cform-state.is-on { color: var(--ink); }
.cform-state.is-on::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--orange); vertical-align: 1px; }
.cform-table td.stack-title { overflow-wrap: anywhere; }
.cform-new { display: grid; gap: 16px; margin-top: 14px; max-width: 960px; min-width: 0; }
.cform-presets { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 12px; margin: 0; padding: 0; border: 0; min-width: 0; }
.cform-preset { --cap: var(--line-strong); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; align-items: start; padding: 16px 16px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: inset 0 3px 0 var(--cap), var(--shadow-xs); font-weight: 400; cursor: pointer; transition: border-color var(--dur), box-shadow var(--dur); }
.cform-preset:hover { border-color: var(--line-strong); }
.cform-preset:has(input:checked) { --cap: var(--orange); border-color: var(--line-strong); box-shadow: inset 0 3px 0 var(--cap), var(--shadow-sm); }
.cform-preset input { grid-row: 1 / span 2; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ink); }
.cform-preset__name { font-weight: 700; font-size: 15px; }
.cform-preset__hint { font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.cform-new__name { max-width: 560px; }
.cform-problem { max-width: 78ch; margin: 18px 0 0; }
.cform-settings { display: grid; gap: 16px; max-width: 880px; margin-top: 14px; min-width: 0; }
.cform-settings .field { margin: 0; min-width: 0; }
.cform-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; min-width: 0; }
.cform-slug { display: flex; align-items: stretch; min-width: 0; }
.cform-slug__prefix { display: inline-flex; align-items: center; padding: 0 10px; border: 1px solid var(--line-strong); border-right: 0; border-radius: var(--radius) 0 0 var(--radius); background: var(--calm-wash); color: var(--muted); font-size: 14px; }
.cform-slug input { min-width: 0; border-radius: 0 var(--radius) var(--radius) 0; }
.cform-kind { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.cform-kind legend { margin: 0 0 6px; padding: 0; font-size: 14px; font-weight: 700; }
.cform-box { min-width: 0; }
.cform-sub { display: block; margin-top: 2px; }
.cform-subtitle { margin: 14px 0 0; font: 700 17px/1.25 var(--font-ui); }
.cform-note { max-width: 78ch; margin: 6px 0 0; }
.cform-vars { margin-top: 0; }
.cform-message { display: grid; gap: 12px; padding: 18px 18px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: inset 0 3px 0 var(--ink), var(--shadow-xs); min-width: 0; }
.cform-message__switch { font-size: 15px; }
.cform-final { display: grid; gap: 10px; padding-top: 6px; }
.cform-fields { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; counter-reset: campo; }
.cform-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: start; padding: 13px 14px 13px 17px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: inset 3px 0 0 var(--ink), var(--shadow-xs); min-width: 0; }
.cform-field__box { min-width: 0; }
.cform-field__head { display: grid; gap: 6px; list-style: none; cursor: pointer; }
.cform-field__head::-webkit-details-marker { display: none; }
.cform-field__label { font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
.cform-field__label::before { counter-increment: campo; content: counter(campo) ". "; color: var(--muted); }
.cform-field__box[open] .cform-field__label { text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: 3px; }
.cform-field__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.cform-tag { display: inline-block; padding: 3px 7px 2px; border: 1px solid var(--rule); border-radius: var(--radius-sm); font: 700 11px/1.2 var(--font-ui); letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-2); }
.cform-tag--map { border-color: var(--orange); background: var(--orange-wash); color: var(--orange-ink); }
.cform-field__form { display: grid; gap: 12px; max-width: 680px; margin-top: 14px; min-width: 0; }
.cform-field__form .field { margin: 0; min-width: 0; }
.cform-field__side { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.cform-field__side form { margin: 0; }
.cform-field__side .linkish { align-self: flex-start; padding-top: 4px; }
.cform-newfield { margin-top: 14px; }
.cform-newfield .cform-field__form { margin-top: 0; padding: 18px 18px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: inset 0 3px 0 var(--orange), var(--shadow-xs); }
.cform-embed { display: grid; gap: 24px; max-width: 880px; margin-top: 14px; }
.cform-embed__item { display: grid; gap: 8px; justify-items: start; min-width: 0; }
.cform-embed__item > * { margin: 0; }
.cform-code { width: 100%; padding: 10px 12px; background: var(--calm-wash); border: 1px solid var(--rule); border-radius: var(--radius); font: 13px/1.5 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; color: var(--ink); overflow-wrap: anywhere; word-break: break-all; }
.cform-code code { padding: 0; background: none; font-size: inherit; }
textarea.cform-code--area { min-height: 0; font: 13px/1.5 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; background: var(--calm-wash); resize: vertical; }
.cform-answers-table th { min-width: 12ch; white-space: normal; }
.cform-answers-table .cform-cell { min-width: 16ch; white-space: pre-wrap; overflow-wrap: break-word; }
.cform-answers-table .cform-cell--welcome { min-width: 20ch; font-size: 13px; color: var(--muted); white-space: normal; }
.cform-answers-table .cform-cell--whatsapp, .cform-answers-table .cform-cell--data { white-space: nowrap; }
.cform-answers { margin: 32px 0 0; min-width: 0; }
.cform-answers .side-title { margin-bottom: 4px; }
.cform-answers__hint { margin: 0 0 10px; font-size: 13.5px; color: var(--muted); }
.cform-links { list-style: none; margin: 0 0 14px; padding: 0; }
.cform-links__item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cform-links__name { font-size: 14.5px; font-weight: 700; overflow-wrap: anywhere; }
.cform-links__actions { display: flex; align-items: center; gap: 12px; }
.cform-answers__list { list-style: none; margin: 0; padding: 0; }
.cform-answer { padding: 11px 0; border-bottom: 1px solid var(--line); }
.cform-answer__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; font-size: 14.5px; cursor: pointer; }
.cform-answer__head::-webkit-details-marker { display: none; }
.cform-answer__head::after { content: "+"; margin-left: auto; font: 400 18px/1 var(--font-ui); color: var(--muted); }
.cform-answer details[open] > .cform-answer__head::after { content: "\2212"; }
.cform-answer__when { font-size: 12.5px; color: var(--muted); }
.cform-answer__list { display: grid; gap: 8px; margin: 10px 0 0; }
.cform-answer__item dt { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.cform-answer__item dd { margin: 0; font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Página pública (/f/{slug}): branca e neutra, sozinha ou dentro do iframe de outro site (embed: sem margens). O fundo fica branco também
   no iframe: some numa página branca e continua legível numa escura. Campos com 16px de letra, para o celular não ampliar a tela ao tocar. */
.pform-html, .pform-body { background: #fff; }
.pform-body { display: block; min-height: 0; color: var(--ink); }
.pform { width: min(600px, 100%); margin: 0 auto; padding: 32px 16px 40px; }
.is-embed .pform { width: 100%; max-width: 640px; padding: 4px 4px 12px; }
.pform__preview { margin: 0 0 18px; padding: 10px 14px 10px 16px; background: var(--orange-wash); border-radius: var(--radius); box-shadow: inset 3px 0 0 var(--orange); font-size: 14px; }
.pform__title { margin: 0 0 10px; font: 700 26px/1.15 var(--font-ui); letter-spacing: -0.01em; overflow-wrap: anywhere; }
.pform__intro { margin: 0 0 22px; font-size: 16px; line-height: 1.55; color: var(--ink-2); overflow-wrap: anywhere; }
.pform__intro p { margin: 0 0 10px; }
.pform__intro p:last-child { margin-bottom: 0; }
.pform__alert { margin: 0 0 20px; padding: 12px 14px 12px 16px; background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: inset 3px 0 0 var(--orange); font-size: 15px; }
.pform__alert p { margin: 0; }
.pform__alert p + p { margin-top: 4px; }
.pform__alert--error { background: var(--danger-wash); border-color: var(--danger-line); box-shadow: inset 3px 0 0 var(--danger); color: var(--danger-ink); }
.pform__alert:focus { outline: none; }
.pform__form { display: grid; gap: 20px; margin: 0; min-width: 0; }
.pform__hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.pform__field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.pform__label { padding: 0; font-size: 15px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
legend.pform__label { margin: 0 0 6px; }
.pform__opt { font-size: 13.5px; font-weight: 400; color: var(--muted); }
.pform__help { margin: 0; font-size: 14px; line-height: 1.45; color: var(--muted); overflow-wrap: anywhere; }
.pform input[type="text"], .pform input[type="email"], .pform input[type="tel"], .pform input[type="date"], .pform select { min-height: 48px; font-size: 16px; background-color: #fff; }
.pform textarea { min-height: 120px; font-size: 16px; background: #fff; }
.pform__field.has-error input, .pform__field.has-error textarea, .pform__field.has-error select { border-color: var(--danger); }
.pform__error { margin: 0; font-size: 14px; font-weight: 700; color: var(--danger); }
.pform__choices { display: grid; gap: 2px; }
.pform__choices--row { display: flex; flex-wrap: wrap; gap: 2px 28px; }
.pform__check { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; font-size: 16px; font-weight: 400; line-height: 1.4; cursor: pointer; overflow-wrap: anywhere; }
.pform__check input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--ink); }
.pform__check--consent { font-size: 15px; color: var(--ink-2); }
.pform__actions { margin: 4px 0 0; }
.pform__submit { width: 100%; min-height: 52px; font-size: 16.5px; white-space: normal; }
.pform__done { padding: 8px 0 4px; }
.pform__icon { width: 44px; height: 44px; margin: 0 0 14px; border-radius: 50%; background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23f0ece6' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 22px no-repeat; }
.pform__text { margin: 0 0 16px; font-size: 17px; line-height: 1.55; color: var(--ink-2); overflow-wrap: anywhere; }
.pform__text p { margin: 0 0 10px; }
.pform__text p:last-child { margin-bottom: 0; }
@media (max-width: 720px) {
  .cform-grid { grid-template-columns: minmax(0, 1fr); }
  .cform-field { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .cform-field__side { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .cform-message, .cform-newfield .cform-field__form { padding: 14px 12px; }
  .cform-answers-table .cform-cell { flex: 0 0 100%; min-width: 0; max-width: none; }
  .table--stack td.cform-cell.is-empty { display: none; }
  .pform { padding: 22px 16px 32px; }
  .pform__title { font-size: 23px; }
}

/* ---------- Capital Social: Radar, pessoas, dossiê, configurações e a revisão das mensagens ---------- */
/* Usa os componentes do topo (card, badge, chip, kpis, tabs, timeline, drawer, modal, callout, empty-state); aqui só o arranjo. */
.soc-head .lead { max-width: 70ch; }
.soc-undo { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0 0 var(--space-4); }
.soc-undo p, .soc-undo form { margin: 0; }
.soc-error { margin: 0 0 var(--space-6); }
.soc-steps { max-width: 56ch; margin: var(--space-2) auto 0; padding-left: 22px; text-align: left; color: var(--ink-2); font-size: 14.5px; }
.soc-steps li { margin: 6px 0; }
.soc-kpis { margin: 0 0 var(--space-2); }
.soc-radar { margin-top: var(--space-6); }
.soc-radar__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); margin: 0 0 var(--space-3); }
.soc-radar__bar .section-title { margin: 0; }
.soc-filters { margin-bottom: var(--space-4); }
.soc-filters__checks { gap: 4px 18px; }
.soc-recs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: var(--space-4); align-items: start; }
.soc-more { margin: var(--space-5) 0 0; }
.soc-hidden { margin-top: var(--space-6); }
.soc-recs--hidden .soc-rec { box-shadow: none; background: var(--surface-sunken); }
.soc-rules { margin-top: var(--space-7); padding-top: var(--space-4); border-top: 1px solid var(--line); }
.soc-rules > summary { cursor: pointer; }
.soc-rules__list { margin: var(--space-3) 0; padding-left: 22px; font-size: 14px; color: var(--ink-2); }
.soc-rules__list li { margin: 4px 0; }

.soc-rec { gap: var(--space-3); }
.soc-rec.is-overdue { box-shadow: inset 0 3px 0 var(--danger), var(--shadow-sm); }
.soc-rec__head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--space-3); align-items: start; }
.soc-rec__who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.soc-rec__name { font-weight: 700; font-size: 16px; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.soc-rec__name:hover { text-decoration: underline; text-decoration-color: var(--orange); }
.soc-rec__meta { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.soc-rec__type { white-space: normal; text-align: center; }
.soc-rec__title { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 20px; line-height: 1.18; overflow-wrap: anywhere; }
.soc-rec__due { display: inline-flex; align-items: center; gap: 6px; margin: -4px 0 0; font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.soc-rec__icon { width: 16px; height: 16px; }
.soc-rec__why p { margin: 0 0 6px; overflow-wrap: anywhere; }
.soc-rec__why p:last-child { margin: 0; }
.soc-rec__source { font-size: 13px; color: var(--muted); }
.soc-rec__rule { display: block; margin-top: 2px; }
.soc-rec__next { margin: 0; font-size: 14.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.soc-rec__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; padding-top: var(--space-3); border-top: 1px solid var(--line); }
.soc-rec__actions form { margin: 0; }
.soc-rec__more { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: flex-start; }
.soc-rec__state { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); padding-top: var(--space-3); border-top: 1px solid var(--line); font-size: 14px; }
.soc-rec__state p, .soc-rec__state form { margin: 0; }
.soc-rec__reason { display: block; margin-top: 4px; color: var(--muted); }

/* Painel que abre no lugar (Agendar, Adiar, Descartar, editar um registro): ocupa a linha inteira quando aberto. */
.soc-pop { min-width: 0; }
.soc-pop > summary { cursor: pointer; list-style: none; }
.soc-pop > summary::-webkit-details-marker { display: none; }
.soc-pop[open] { flex: 1 0 100%; order: 10; }
.soc-pop__form { display: grid; gap: var(--space-3); margin: var(--space-2) 0 var(--space-1); padding: 14px; background: var(--surface-sunken); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.soc-pop__form .field { margin: 0; }
.soc-pop__form .btn { justify-self: start; }
.soc-pop__choices, .soc-pop__row { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.soc-pop__row input[type="date"] { width: auto; min-width: 0; flex: 1 1 150px; }

.soc-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: var(--space-2) 0 0; padding: 0; }
.soc-tags--small { margin-top: 4px; }
.soc-tags--small .badge { font-size: 10.5px; padding: 2px 6px 1px; }

.soc-people { list-style: none; margin: 0; padding: 0; }
.soc-person { gap: var(--space-3); }
.soc-person.is-blocked { box-shadow: inset 0 3px 0 var(--danger), var(--shadow-sm); }
.soc-person__facts { display: grid; gap: 6px; margin: 0; padding-top: var(--space-3); border-top: 1px solid var(--line); font-size: 13.5px; }
.soc-person__facts div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px; }
.soc-person__facts dt { color: var(--muted); font-weight: 700; }
.soc-person__facts dd { margin: 0; overflow-wrap: anywhere; }

.soc-add { display: grid; gap: var(--space-6); }
.soc-add__part { min-width: 0; }
.soc-add__part + .soc-add__part { padding-top: var(--space-5); border-top: 1px solid var(--line); }
.soc-add__title { margin: 0 0 6px; font: 700 17px/1.25 var(--font-ui); }
.soc-add__search { display: flex; gap: var(--space-2); margin: var(--space-3) 0; }
.soc-add__search input { flex: 1 1 auto; min-width: 0; }
.soc-found { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.soc-found__item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--space-3); align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.soc-found__item:last-child { border-bottom: 0; }
.soc-found__item form { margin: 0; }
.soc-found__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.soc-found__name { font-weight: 700; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.soc-found__meta { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.soc-addpage { max-width: 760px; }
.soc-add__part > .hint { margin: 0 0 var(--space-3); }
.soc-checks__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 130px), 1fr)); gap: 4px 16px; }
.soc-radios__row { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.soc-radios .check .hint { display: block; }
.soc-nocontact { display: grid; gap: var(--space-3); padding: 12px 14px; border: 1px dashed var(--danger-line); border-radius: var(--radius); }
.soc-nocontact .check > span .hint { display: block; font-weight: 400; }
.soc-dup { padding: 10px 12px; background: var(--danger-wash); border-radius: var(--radius); }

.soc-cats { list-style: none; margin: var(--space-4) 0 0; padding: 0; display: grid; gap: var(--space-3); }
.soc-cat { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-3); align-items: end; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: inset 3px 0 0 var(--ink); }
.soc-cat.is-off { background: var(--surface-sunken); box-shadow: inset 3px 0 0 var(--line-strong); }
.soc-cat__form { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: flex-end; margin: 0; min-width: 0; }
.soc-cat__form .field { flex: 1 1 200px; margin: 0; }
.soc-cat__people { font-size: 13px; color: var(--muted); align-self: center; }
.soc-cat__side { display: flex; gap: 6px; align-items: center; }
.soc-cat__side form { margin: 0; }
.soc-cat-new { display: grid; gap: var(--space-3); max-width: 420px; margin-top: var(--space-5); }
.soc-cat-new .side-sub { margin: 0; }
.soc-ret { gap: 10px 12px; }

.soc-dossier-head > div:first-child { flex-basis: 520px; }
.soc-ident { display: flex; align-items: center; gap: var(--space-4); }
.soc-ident__avatar { width: 64px; height: 64px; font-size: 22px; }
.soc-ident__text { min-width: 0; }
.soc-ident__text .display { margin: 0 0 4px; }
.soc-ident__lead { margin: 0; font-size: var(--text-md); color: var(--ink-2); overflow-wrap: anywhere; }
.soc-ident__origin { margin: 2px 0 0; font-size: 13.5px; color: var(--muted); overflow-wrap: anywhere; }
.soc-noblock { display: flex; gap: 10px; align-items: flex-start; margin: var(--space-4) 0 0; padding: 12px 14px; background: var(--danger-wash); border: 1px solid var(--danger-line); border-radius: var(--radius); color: var(--danger-ink); font-size: 14.5px; }
.soc-noblock svg { flex: none; width: 20px; height: 20px; margin-top: 1px; color: var(--danger); }
.soc-archived { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.soc-archived p, .soc-archived form { margin: 0; }
.soc-channels { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: var(--space-3) 0 0; padding: 0; }
.soc-channel { display: inline-flex; align-items: baseline; gap: 8px; max-width: 100%; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: var(--surface); font-size: 14px; overflow-wrap: anywhere; }
.soc-channel a { color: inherit; text-decoration: none; }
.soc-channel.is-ok { border-color: var(--success); }
.soc-channel.is-off { border-style: dashed; border-radius: var(--radius); color: var(--muted); }
.soc-channel__label { flex: none; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.soc-channel.is-ok .soc-channel__label::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--success); vertical-align: 1px; }
.soc-channel__why { font-size: 13px; }
.soc-pref, .soc-links { margin: var(--space-2) 0 0; font-size: 13.5px; color: var(--muted); }
.soc-pref { margin-top: var(--space-3); }
.soc-quick { margin-bottom: var(--space-5); }
.soc-quick__list { list-style: none; display: flex; gap: var(--space-2); margin: 0; padding: 2px 2px 6px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
.soc-quick__list li { flex: none; }
.soc-dossier { padding-bottom: var(--space-4); }
.soc-panel__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-4); margin: 0 0 var(--space-2); }
.soc-panel__head .side-title { margin: 0; }
.soc-panel > .hint { margin: 0 0 var(--space-4); max-width: 80ch; }
.soc-panel .side-sub:first-of-type { margin-top: var(--space-4); }
.soc-overview { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: var(--space-4); align-items: start; }
.soc-overview__main, .soc-overview__side { display: grid; gap: var(--space-4); min-width: 0; }
.soc-box { margin: 0; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); min-width: 0; }
.soc-box__title { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font: 700 15px/1.3 var(--font-ui); color: var(--ink); }
.soc-box__meta { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.soc-box > :last-child { margin-bottom: 0; }
.soc-intent { margin: 10px 0 0; font-size: 14.5px; color: var(--ink-2); }
.soc-mini { list-style: none; display: grid; gap: 8px; margin: 0 0 10px; padding: 0; font-size: 14px; }
.soc-mini li { overflow-wrap: anywhere; }
.soc-mini--actions li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
.soc-mini--actions form { margin: 0; }
.soc-next { box-shadow: inset 0 3px 0 var(--orange), var(--shadow-xs); }
.soc-next.is-late-box { box-shadow: inset 0 3px 0 var(--danger), var(--shadow-xs); }
.soc-next__text { margin: 0; font-weight: 700; font-size: 15.5px; overflow-wrap: anywhere; }
.soc-next__when { margin: 4px 0 8px; font-size: 13.5px; color: var(--muted); }
.soc-due { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.soc-facts { display: grid; gap: 8px; font-size: 13.5px; }
.soc-facts div { display: flex; justify-content: space-between; gap: 12px; }
.soc-facts dt { color: var(--muted); font-weight: 700; }
.soc-facts dd { margin: 0; text-align: right; }
.soc-tl-filter { margin: 0 0 var(--space-4); }
.soc-timeline .timeline__head { align-items: center; }
.soc-tl-status { font-size: 10.5px; }
.soc-long > summary { cursor: pointer; list-style: none; }
.soc-long > summary::-webkit-details-marker { display: none; }
.soc-long[open] > summary { display: none; }
.soc-list { list-style: none; display: grid; gap: var(--space-3); margin: 0; padding: 0; }
.soc-item { padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); min-width: 0; scroll-margin-top: 16px; }
.soc-item--hyp { border-style: dashed; background: var(--surface-sunken); }
.soc-item--late { box-shadow: inset 3px 0 0 var(--danger), var(--shadow-xs); }
.soc-item--closed { background: var(--surface-sunken); box-shadow: none; }
.soc-item__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 6px; }
.soc-item__date { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.soc-item__text { margin: 0 0 6px; font-size: 14.5px; line-height: 1.5; overflow-wrap: anywhere; }
.soc-item__text--strong { font-weight: 700; font-size: 15.5px; }
.soc-item__outcome { margin: 0 0 6px; font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
.soc-item__meta { margin: 0; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.soc-item__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 10px; }
.soc-item__actions form { margin: 0; }
.soc-closed { margin-top: var(--space-4); }
.soc-closed > summary { cursor: pointer; margin-bottom: var(--space-3); }
.soc-interest { margin: 0 0 var(--space-4); }
.soc-interest .soc-mini { margin: 0; }
.soc-drawer .drawer__body { display: grid; gap: var(--space-4); align-content: start; }
.soc-drawer .drawer__body.stack > * + * { margin-top: 0; }
.soc-link-box { padding-top: var(--space-4); border-top: 1px solid var(--line); }
.soc-link-box form { margin: 0; }
/* O alvo de um link (#insight-12, #compromisso-3): uma marca rápida para o olho achar. */
.is-target { outline: 2px solid var(--orange); outline-offset: 3px; transition: outline-color 1.2s var(--ease); }
.is-target.is-target--fade { outline-color: transparent; }

.crm-capital { display: inline; margin: 0; }
.capital-line .linkish { font-size: inherit; }

/* Mensagens: o que fazer quando o canal não pode mandar, e a revisão antes do envio. */
.cmsg-alt { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin: 0; font-size: 13.5px; }
.cmsg-alt .hint { flex-basis: 100%; }
.cmsg-review .facts { margin-bottom: var(--space-4); }
.cmsg-review .facts .hint { display: block; }
.cmsg-review__text { max-height: 40vh; overflow-y: auto; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-size: 14.5px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.cmsg-review__problem { margin: 0 0 var(--space-4); }
.cmsg-review__form { display: grid; gap: var(--space-3); }
.cmsg-review__form .modal__actions { margin-top: var(--space-2); }
.cmsg-review__rec { padding: 10px 12px; background: var(--orange-soft); border-radius: var(--radius); }

@media (max-width: 900px) {
  .soc-overview { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .soc-ident__avatar { width: 52px; height: 52px; font-size: 18px; }
  .soc-rec__head { grid-template-columns: auto minmax(0, 1fr); }
  .soc-rec__type { grid-column: 1 / -1; justify-self: start; }
  .soc-rec__title { font-size: 18px; }
  .soc-cat { grid-template-columns: minmax(0, 1fr); }
  .soc-found__item { grid-template-columns: auto minmax(0, 1fr); }
  .soc-found__item form { grid-column: 1 / -1; }
  .soc-found__item form .btn { width: 100%; }
  .soc-person__facts div { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .soc-facts div { flex-direction: column; gap: 0; }
  .soc-facts dd { text-align: left; }
}

/* ---------- Reuniões internas: de lead e de pessoa do Capital Social ---------- */
/* O dono da reunião no cabeçalho (.meeting-owner), o selo Interna (.meeting-seal, um .badge--dark) e a lista de reuniões da página do lead e
   da aba Reuniões do dossiê (partials/owner_meetings.php: .owner-meetings, com as próximas e as passadas em .rows). Só tokens. */
.meeting-owner { margin: var(--space-2) 0 0; font-size: var(--text-sm); color: var(--ink-2); overflow-wrap: anywhere; }
.meeting-owner a { font-weight: 700; }
.statusline .meeting-seal, .row__aside .meeting-seal { vertical-align: 1px; }
.owner-meetings { margin: 0 0 var(--space-7); min-width: 0; }
.owner-meetings__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-4); margin: 0 0 var(--space-3); }
.owner-meetings__head .hint { flex: 1 1 240px; margin: 0; }
.owner-meetings__title { margin: var(--space-4) 0 var(--space-2); font: 700 var(--text-xs)/1.35 var(--font-ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* ---------- Diagnóstico da Narrativa (o quiz público em /diagnostico e o resultado) ---------- */
/* Página escura e editorial, no celular primeiro: a entrada (.quiz-hero), as perguntas (.quiz-q, uma por tela com o app.js: .quiz.is-js mostra
   só a .quiz-screen.is-current) e o contato (.quiz-contact); o resultado (.quiz--result) com a análise da primeira exibição (.quiz-analysis),
   o medidor (.result-gauge), a oferta em laranja (.result-offer) e os pilares no papel creme (.result-section). Sem JavaScript, as telas
   aparecem uma embaixo da outra, a navegação some e o resultado aparece direto. */
.quiz-html, .quiz-body { background: var(--surface-dark); }
.quiz-body { color: var(--on-dark); }
.quiz { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; background: var(--surface-dark); color: var(--on-dark); }
.quiz-wrap { width: min(680px, calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.quiz-main { flex: 1 0 auto; }
.quiz :focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.quiz-top { position: sticky; top: 0; z-index: 20; background: var(--surface-dark); border-top: 3px solid var(--orange); border-bottom: 1px solid var(--on-dark-line); }
.quiz-top__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); width: min(680px, calc(100% - 2 * var(--gutter))); min-height: 56px; margin-inline: auto; }
.quiz-brand { font-family: var(--font-display); font-size: 21px; line-height: 1; letter-spacing: 0.02em; white-space: nowrap; }
.quiz-top__label { font: 700 11.5px/1.2 var(--font-ui); letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-dark-faint); text-align: right; }
.quiz-progress { display: flex; flex: 0 1 220px; flex-direction: column; align-items: flex-end; gap: 7px; min-width: 0; }
.quiz-progress__label { margin: 0; font: 700 12px/1 var(--font-ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-dark-muted); white-space: nowrap; }
.quiz-progress__track { width: 100%; height: 6px; overflow: hidden; border-radius: var(--radius-pill); background: var(--on-dark-line); }
.quiz-progress__fill { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--orange); transition: width 0.35s var(--ease); }

/* Botões */
.quiz-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 22px; border: 0; border-radius: var(--radius); font: 700 17px/1.2 var(--font-ui); text-align: center; text-decoration: none; cursor: pointer; transition: background-color var(--dur), color var(--dur), transform 0.08s; }
.quiz-btn:active { transform: translateY(1px); }
.quiz-btn--primary { background: var(--orange); color: var(--ink); }
.quiz-btn--primary:hover { background: var(--orange-hover); color: var(--ink); }
.quiz-btn--big { width: 100%; min-height: 60px; padding: 0 24px; font-size: 18px; }
.quiz-btn__icon { flex: none; width: 20px; height: 20px; transition: transform var(--dur); }
.quiz-btn:hover .quiz-btn__icon { transform: translateX(3px); }
.quiz-btn[disabled] { opacity: 0.7; cursor: progress; }
/* O envio do contato: o botão vira "Analisando..." com o indicador girando (parado com prefers-reduced-motion) e fica desabilitado */
.quiz-btn.is-sending, .quiz-btn.is-sending:hover { background: var(--orange); color: var(--ink); cursor: progress; }
.quiz-btn.is-sending[disabled] { opacity: 1; }
.quiz-btn__spinner { flex: none; width: 20px; height: 20px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: quiz-spin 0.75s linear infinite; }
@keyframes quiz-spin { to { transform: rotate(360deg); } }

/* A entrada */
.quiz-hero { padding: 36px 0 56px; background: radial-gradient(90% 46% at 100% 0%, var(--orange-glow), transparent 70%); }
.quiz-wrap--wide { width: min(1120px, calc(100% - 2 * var(--gutter))); }
.quiz-hero__grid { display: grid; gap: 40px; }
.quiz-hero__copy { min-width: 0; }
.quiz-badge { display: inline-flex; align-items: center; gap: 9px; margin: 0; padding: 7px 13px; border: 1px solid var(--orange); border-radius: var(--radius-pill); font: 700 12px/1 var(--font-ui); letter-spacing: 0.12em; text-transform: uppercase; color: var(--orange); }
.quiz-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }
.quiz-hero__title { margin: 22px 0 18px; font-family: var(--font-display); font-size: clamp(46px, 9vw + 10px, 84px); font-weight: 700; line-height: 0.98; letter-spacing: -0.01em; color: var(--on-dark); text-wrap: balance; overflow-wrap: break-word; }
.quiz-mark { color: var(--orange); }
.quiz-hero__lead { max-width: 34em; margin: 0 0 30px; font-family: var(--font-copy); font-size: 19px; line-height: 1.55; color: var(--on-dark-muted); }
.quiz-hero__note { margin: 12px 0 0; font-size: 14px; color: var(--on-dark-faint); }
/* A prévia do relatório: só a forma (o medidor e os 5 pilares), sem número inventado: o "?" vira o índice no fim. */
.quiz-preview { position: relative; padding: 22px 20px 22px; border: 1px solid var(--on-dark-line); border-top: 3px solid var(--orange); border-radius: var(--radius-xl); background: var(--ink-2); box-shadow: var(--shadow-lg); }
.quiz-preview__label { margin: 0 0 4px; font: 700 11.5px/1.2 var(--font-ui); letter-spacing: 0.14em; text-transform: uppercase; color: var(--orange); }
.quiz-preview__gauge { position: relative; width: min(230px, 80%); margin: 6px auto 0; }
.quiz-preview__gauge svg { display: block; width: 100%; height: auto; overflow: visible; }
.quiz-preview__track { fill: none; stroke: var(--on-dark-line); stroke-width: 16; }
.quiz-preview__dash { fill: none; stroke: var(--orange); stroke-width: 16; stroke-dasharray: 3 9; opacity: 0.85; }
.quiz-preview__score { position: absolute; right: 0; bottom: -4px; left: 0; display: flex; flex-direction: column; align-items: center; margin: 0; line-height: 1; }
.quiz-preview__q { font-family: var(--font-display); font-size: 68px; color: var(--on-dark); }
.quiz-preview__max { margin-top: 2px; font: 700 11px/1 var(--font-ui); letter-spacing: 0.16em; text-transform: uppercase; color: var(--on-dark-faint); }
.quiz-preview__title { margin: 14px 0 16px; font: 700 15px/1.3 var(--font-ui); text-align: center; color: var(--on-dark-muted); }
.quiz-preview__pillars { display: grid; gap: 11px; margin: 0; padding: 14px 0 0; border-top: 1px solid var(--on-dark-line); list-style: none; }
.quiz-preview__pillar { display: grid; grid-template-columns: 112px minmax(0, 1fr) 18px; gap: 10px; align-items: center; }
.quiz-preview__name { font-size: 14.5px; color: var(--on-dark); }
.quiz-preview__bar { height: 8px; border-radius: var(--radius-pill); background: linear-gradient(90deg, var(--on-dark-line) 25%, var(--on-dark-faint) 50%, var(--on-dark-line) 75%); background-size: 300% 100%; animation: quiz-shimmer 2.6s linear infinite; }
.quiz-preview__value { font: 700 14px/1 var(--font-ui); color: var(--orange); text-align: right; }
@keyframes quiz-shimmer { from { background-position: 100% 0; } to { background-position: -200% 0; } }
.quiz-discover { margin: 48px 0 0; padding: 30px 0 0; border-top: 1px solid var(--on-dark-line); }
.quiz-discover__title { margin: 0 0 18px; font: 700 13px/1.3 var(--font-ui); letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-dark-muted); }
.quiz-discover__list { display: grid; gap: 12px; margin: 0 0 30px; padding: 0; list-style: none; }
.quiz-discover__item { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 18px 18px 18px 16px; border: 1px solid var(--on-dark-line); border-radius: var(--radius-lg); background: var(--on-dark-hover); }
.quiz-discover__n { font-family: var(--font-display); font-size: 32px; line-height: 1; color: var(--orange); }
.quiz-discover__text { font-size: 17.5px; line-height: 1.4; color: var(--on-dark); overflow-wrap: anywhere; }
.quiz-author { display: flex; gap: 14px; align-items: center; margin: 44px 0 0; padding: 22px 0 0; border-top: 1px solid var(--on-dark-line); }
.quiz-author__mark { display: grid; flex: none; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: var(--orange); color: var(--ink); font: 700 16px/1 var(--font-ui); letter-spacing: 0.04em; }
.quiz-author__text { margin: 0; font-family: var(--font-copy); font-size: 15.5px; font-style: italic; line-height: 1.5; color: var(--on-dark-muted); }

/* As perguntas e o contato */
.quiz-form { margin: 0; }
.quiz-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.quiz-alert { padding: 14px 0; background: var(--orange); color: var(--ink); font-size: 16px; font-weight: 700; line-height: 1.45; }
.quiz-alert p { margin: 0; }
.quiz-alert:focus { outline: none; }
.quiz-q, .quiz-contact { padding: 40px 0 48px; border-top: 1px solid var(--on-dark-line); }
.quiz-q__count { margin: 0 0 12px; font: 700 12px/1.3 var(--font-ui); letter-spacing: 0.14em; text-transform: uppercase; color: var(--orange); }
.quiz-q__title { display: block; width: 100%; margin: 0 0 24px; padding: 0; font-family: var(--font-display); font-size: clamp(30px, 3.4vw + 16px, 44px); font-weight: 700; line-height: 1.06; letter-spacing: -0.005em; color: var(--on-dark); text-wrap: balance; overflow-wrap: break-word; }
legend.quiz-q__title { float: left; }
.quiz-set { min-width: 0; margin: 0; padding: 0; border: 0; }
.quiz-options { display: grid; clear: both; gap: 10px; }
.quiz-option { position: relative; display: flex; align-items: center; gap: 14px; min-height: 66px; padding: 14px 16px; border: 1.5px solid var(--on-dark-line); border-radius: var(--radius-lg); background: var(--on-dark-hover); color: var(--on-dark); font-size: 17.5px; font-weight: 400; line-height: 1.35; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: border-color var(--dur), background-color var(--dur), color var(--dur), transform 0.08s; }
.quiz-option:hover { border-color: var(--on-dark-faint); }
.quiz-option:active { transform: scale(0.99); }
.quiz-option input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.quiz-option__key { display: grid; flex: none; place-items: center; width: 34px; height: 34px; border: 1.5px solid var(--on-dark-line); border-radius: var(--radius-sm); font: 700 14px/1 var(--font-ui); color: var(--on-dark-muted); transition: background-color var(--dur), color var(--dur), border-color var(--dur); }
.quiz-option__text { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.quiz-option :checked + .quiz-option__key { border-color: var(--orange); background: var(--orange); color: var(--ink); }
.quiz-option.is-checked, .quiz-option:has(input:checked) { border-color: var(--orange); background: var(--orange); color: var(--ink); font-weight: 700; }
.quiz-option.is-checked .quiz-option__key, .quiz-option:has(input:checked) .quiz-option__key { border-color: var(--ink); background: var(--ink); color: var(--orange); }
.quiz-option:has(input:focus-visible), .quiz-option input:focus-visible + .quiz-option__key { outline: 3px solid var(--orange); outline-offset: 3px; }
.quiz-option.is-checked:has(input:focus-visible) { outline-color: var(--on-dark); }
.quiz .quiz-input { width: 100%; min-height: 58px; padding: 14px 16px; border: 2px solid transparent; border-radius: var(--radius-lg); background: var(--sheet); box-shadow: none; color: var(--ink); font: 400 18px/1.4 var(--font-ui); }
.quiz .quiz-input:focus { outline: 3px solid var(--orange); outline-offset: 2px; border-color: var(--orange); }
.quiz .quiz-input--big { min-height: 64px; font-size: 21px; }
.quiz .quiz-textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
.quiz-q__hint { margin: -10px 0 16px; font-family: var(--font-copy); font-size: 17px; font-style: italic; line-height: 1.5; color: var(--on-dark-muted); }
.quiz-q__optional { margin: 8px 0 0; font-size: 13.5px; color: var(--on-dark-faint); }
.quiz-error { margin: 12px 0 0; padding: 10px 12px; border-radius: var(--radius); background: var(--danger); color: var(--sheet); font-size: 15px; font-weight: 700; line-height: 1.4; }
.quiz .has-error .quiz-input, .quiz .quiz-field.has-error .quiz-phone__box { border-color: var(--danger); }
.quiz-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 26px 0 0; }
.quiz-nav .quiz-btn { margin-left: auto; }
.quiz-back, .quiz-skip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px 0 4px; border: 0; background: transparent; color: var(--on-dark-muted); font: 700 15px/1 var(--font-ui); cursor: pointer; }
.quiz-back svg { width: 18px; height: 18px; }
.quiz-back:hover, .quiz-skip:hover { color: var(--on-dark); }
.quiz-skip { margin-left: auto; padding: 0 10px; text-decoration: underline; text-decoration-color: var(--on-dark-faint); text-underline-offset: 4px; }
.quiz-skip + .quiz-btn { margin-left: 0; }
.quiz-fields { display: grid; gap: 18px; margin: 0 0 24px; }
.quiz .quiz-field label { display: block; margin: 0 0 7px; font: 700 14.5px/1.3 var(--font-ui); color: var(--on-dark); }
.quiz-field__hint { margin: 7px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--on-dark-faint); }
.quiz-phone__box { display: flex; align-items: stretch; min-width: 0; border: 2px solid transparent; border-radius: var(--radius-lg); background: var(--sheet); }
.quiz-phone__box:focus-within { outline: 3px solid var(--orange); outline-offset: 2px; border-color: var(--orange); }
.quiz-phone__country { position: relative; display: inline-flex; flex: none; align-items: center; gap: 6px; padding: 0 12px 0 16px; border-right: 1px solid var(--line-strong); color: var(--ink); cursor: pointer; }
.quiz-phone__country::after { content: ""; width: 0; height: 0; border-top: 5px solid var(--ink); border-right: 4px solid transparent; border-left: 4px solid transparent; }
.quiz-phone__code { font: 700 17px/1 var(--font-ui); font-variant-numeric: tabular-nums; }
.quiz .quiz-phone__select { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; padding: 0; border: 0; background: none; opacity: 0; font-size: 16px; cursor: pointer; }
.quiz .quiz-phone__box .quiz-phone__input { flex: 1 1 auto; width: auto; min-width: 0; border: 0; border-radius: 0 var(--radius-lg) var(--radius-lg) 0; outline: none; }
.quiz-contact__note { margin: 14px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--on-dark-faint); }
.quiz-contact__step { color: var(--orange); }
.quiz-foot { padding: 22px 0 28px; border-top: 1px solid var(--on-dark-line); font-size: 13px; line-height: 1.5; color: var(--on-dark-faint); }
.quiz-foot p { margin: 0; }
.quiz-foot p + p { margin-top: 6px; }

/* Com JavaScript: uma tela de cada vez, com a barra de progresso; sem ele, tudo à vista e sem os botões de navegar */
.quiz:not(.is-js) .quiz-nav { display: none; }
.quiz.is-js .quiz-screen { display: none; }
.quiz.is-js .quiz-screen.is-current { display: block; animation: quiz-in 0.32s var(--ease); }
.quiz.is-js .quiz-screen.is-current.is-instant { animation: none; }
.quiz-q__keys { display: none; margin: 14px 0 0; font-size: 13.5px; color: var(--on-dark-faint); }
@media (hover: hover) and (pointer: fine) {
  .quiz.is-js .quiz-q__keys { display: block; }
}
.quiz.is-js .quiz-q, .quiz.is-js .quiz-contact { min-height: calc(100vh - 60px); min-height: calc(100dvh - 60px); padding: 30px 0 48px; border-top: 0; }
.quiz.is-js .quiz-q__count { display: none; }
.quiz.is-js .quiz-q[data-quiz-type="escolha"]:not(.has-answer) [data-quiz-next] { visibility: hidden; }
.quiz.is-js.is-asking .quiz-foot { display: none; }
@keyframes quiz-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* O resultado */
.quiz--result .quiz-top__inner, .quiz--notice .quiz-top__inner { min-height: 56px; }
.result-hero { padding: 30px 0 44px; text-align: center; }
.result-hero__intro { max-width: 22em; margin: 0 auto 6px; font-family: var(--font-copy); font-size: 21px; font-style: italic; font-weight: 400; line-height: 1.4; color: var(--on-dark-muted); text-wrap: balance; }
.result-gauge { position: relative; width: min(340px, 92%); margin: 10px auto 0; }
.result-gauge__svg { display: block; width: 100%; height: auto; overflow: visible; }
.result-gauge__band { fill: none; stroke: var(--on-dark-line); stroke-width: 16; }
.result-gauge__band.is-current { stroke: var(--on-dark-faint); }
.result-gauge__value { fill: none; stroke: var(--orange); stroke-width: 16; stroke-dasharray: var(--len) 1000; animation: gauge-fill 1.1s var(--ease) 0.15s both; }
.result-gauge__dot { fill: var(--on-dark); stroke: var(--surface-dark); stroke-width: 3; }
@keyframes gauge-fill { from { stroke-dashoffset: var(--len); } to { stroke-dashoffset: 0; } }
.result-gauge__number { position: absolute; right: 0; bottom: -2px; left: 0; display: flex; flex-direction: column; align-items: center; margin: 0; line-height: 1; }
.result-gauge__value-text { font-family: var(--font-display); font-size: clamp(78px, 21vw, 112px); letter-spacing: -0.02em; color: var(--on-dark); }
.result-gauge__max { margin-top: 2px; font: 700 12.5px/1 var(--font-ui); letter-spacing: 0.16em; text-transform: uppercase; color: var(--on-dark-faint); }
.result-level { margin: 26px 0 8px; }
.result-level__label { display: block; margin: 0 0 8px; font: 700 12px/1 var(--font-ui); letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-dark-faint); }
.result-level__name { font-family: var(--font-display); font-size: clamp(30px, 2.5vw + 22px, 40px); line-height: 1.05; color: var(--orange); }
.result-level__text { max-width: 30em; margin: 0 auto; font-family: var(--font-copy); font-size: 18.5px; line-height: 1.55; color: var(--on-dark); text-wrap: pretty; }
.result-sent { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; margin: 24px auto 0; padding: 11px 16px; border: 1px solid var(--on-dark-line); border-radius: var(--radius-lg); font-size: 14px; line-height: 1.4; color: var(--on-dark-muted); text-align: left; overflow-wrap: anywhere; }
.result-sent svg { flex: none; width: 18px; height: 18px; color: var(--orange); }
.result-offer { padding: 38px 0 42px; background: var(--orange); color: var(--ink); }
.result-offer__eyebrow { margin: 0 0 12px; font: 700 12px/1 var(--font-ui); letter-spacing: 0.14em; text-transform: uppercase; }
.result-offer__title { margin: 0 0 14px; font-family: var(--font-display); font-size: clamp(30px, 3vw + 18px, 44px); line-height: 1.04; text-wrap: balance; }
.result-offer__text { max-width: 34em; margin: 0 0 24px; font-family: var(--font-copy); font-size: 18.5px; line-height: 1.5; }
.result-offer .quiz-btn--primary { background: var(--ink); color: var(--on-dark); }
.result-offer .quiz-btn--primary:hover { background: var(--ink-2); color: var(--on-dark); }
.result-offer :focus-visible { outline-color: var(--ink); }
.result-offer--final { border-top: 4px solid var(--orange); background: var(--surface-dark); color: var(--on-dark); }
.result-offer--final .quiz-btn--primary { background: var(--orange); color: var(--ink); }
.result-offer--final .quiz-btn--primary:hover { background: var(--orange-hover); color: var(--ink); }
.result-offer--final :focus-visible { outline-color: var(--orange); }
.result-offer__ps { margin: 26px 0 0; font-family: var(--font-copy); font-size: 17px; font-style: italic; line-height: 1.5; color: var(--on-dark-muted); }
.result-offer__ps strong { font-family: var(--font-ui); font-style: normal; color: var(--on-dark); }
.result-section { padding: 42px 0 46px; background: var(--paper); color: var(--ink); }
.result-section + .result-section { padding-top: 6px; }
.result-section :focus-visible { outline-color: var(--orange-ink); }
.result-section__eyebrow { margin: 0 0 10px; font: 700 12px/1 var(--font-ui); letter-spacing: 0.14em; text-transform: uppercase; color: var(--orange-ink); }
.result-section__title { margin: 0 0 22px; font-family: var(--font-display); font-size: clamp(28px, 2vw + 22px, 38px); line-height: 1.06; color: var(--ink); text-wrap: balance; }
.result-pillars__list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.result-pillar { padding: 16px 18px 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--sheet); box-shadow: var(--shadow-xs); }
.result-pillar.is-weakest { border: 2px solid var(--orange); box-shadow: var(--shadow-md); }
.result-pillar__badge { display: inline-block; margin: 0 0 12px; padding: 5px 10px; border-radius: var(--radius-pill); background: var(--orange); color: var(--ink); font: 700 11.5px/1.2 var(--font-ui); letter-spacing: 0.1em; text-transform: uppercase; }
.result-pillar__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin: 0 0 10px; }
.result-pillar__name { margin: 0; font: 700 20px/1.2 var(--font-ui); color: var(--ink); }
.result-pillar__score { margin: 0; font-size: 14px; color: var(--muted); white-space: nowrap; }
.result-pillar__score strong { font-size: 21px; color: var(--ink); }
.result-pillar__band { margin-left: 6px; padding: 3px 9px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; vertical-align: 2px; }
.result-pillar__bar { height: 10px; overflow: hidden; border-radius: var(--radius-pill); background: var(--calm-wash); }
.result-pillar__bar span { display: block; height: 100%; border-radius: inherit; background: var(--ink); }
.result-pillar--fraco .result-pillar__band { background: var(--danger-wash); color: var(--danger-ink); }
.result-pillar--fraco .result-pillar__bar span { background: var(--danger); }
.result-pillar--medio .result-pillar__band { background: var(--orange-wash); color: var(--orange-ink); }
.result-pillar--medio .result-pillar__bar span { background: var(--orange); }
.result-pillar--forte .result-pillar__band { background: var(--success-wash); color: var(--success); }
.result-pillar--forte .result-pillar__bar span { background: var(--success); }
.result-pillar__text { margin: 14px 0 0; font-family: var(--font-copy); font-size: 17.5px; line-height: 1.55; color: var(--ink); }
.result-pillars__more { margin: 18px 0 0; font-size: 14.5px; color: var(--muted); }
.result-copy { margin: 0 0 16px; font-family: var(--font-copy); font-size: 18.5px; line-height: 1.6; color: var(--ink); }
.result-why { margin: 26px 0 0; padding: 6px 0 6px 18px; border-left: 4px solid var(--orange); }
.result-why__title { margin: 0 0 6px; font: 700 14.5px/1.3 var(--font-ui); color: var(--ink); }
.result-why__text { margin: 0; font-family: var(--font-copy); font-size: 18.5px; font-style: italic; line-height: 1.55; color: var(--ink-2); }
.result-quote { margin: 26px 0 0; padding: 18px 20px; border-radius: var(--radius-lg); background: var(--orange-soft); box-shadow: inset 4px 0 0 var(--orange); font-family: var(--font-copy); font-size: 18px; line-height: 1.55; color: var(--ink); overflow-wrap: anywhere; }
/* A análise (.quiz-analysis): só na primeira exibição do resultado, logo depois do envio, em tela cheia por cima dele. O app.js marca as
   etapas (.is-active e .is-done), enche a barra, tira a tela (.is-leaving) e anima o medidor (.is-revealed). Sem JavaScript, o <noscript>
   do layout a esconde; se o app.js não rodar, ela sai sozinha depois de 9 segundos (quiz-analysis-out), e .is-running desliga esse plano B. */
.quiz-analysis { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; overflow-y: auto; border-top: 3px solid var(--orange); background: radial-gradient(90% 46% at 50% 0%, var(--orange-glow), transparent 70%), var(--surface-dark); color: var(--on-dark); animation: quiz-analysis-out 0.4s var(--ease) 9s both; }
.quiz-analysis.is-running { animation: none; }
.quiz-analysis.is-leaving { opacity: 0; transform: translateY(-18px); pointer-events: none; transition: opacity 0.45s var(--ease), transform 0.45s var(--ease); }
.quiz-analysis__top { flex: none; border-bottom: 1px solid var(--on-dark-line); }
.quiz-analysis__body { display: flex; flex: 1 0 auto; flex-direction: column; justify-content: center; width: min(560px, calc(100% - 2 * var(--gutter))); margin-inline: auto; padding: 36px 0 64px; }
.quiz-analysis__badge { align-self: flex-start; }
.quiz-analysis__badge::before { animation: quiz-pulse 1.1s var(--ease) infinite; }
.quiz-analysis__title { margin: 20px 0 28px; font-family: var(--font-display); font-size: clamp(36px, 3vw + 24px, 52px); font-weight: 700; line-height: 1.02; letter-spacing: -0.005em; color: var(--on-dark); text-wrap: balance; }
.quiz-analysis__meter { display: flex; align-items: center; gap: 14px; margin: 0 0 32px; }
.quiz-analysis__track { flex: 1 1 auto; height: 10px; overflow: hidden; border-radius: var(--radius-pill); background: var(--on-dark-line); }
.quiz-analysis__fill { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--orange); }
.quiz-analysis__pct { flex: none; min-width: 3em; font: 700 16px/1 var(--font-ui); font-variant-numeric: tabular-nums; text-align: right; color: var(--on-dark); }
.quiz-analysis__steps { display: grid; gap: 18px; margin: 0; padding: 0; list-style: none; }
.quiz-analysis__step { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 14px; align-items: center; font-size: 17.5px; line-height: 1.35; color: var(--on-dark-faint); transition: color 0.3s var(--ease); }
.quiz-analysis__step.is-active, .quiz-analysis__step.is-done { color: var(--on-dark); }
.quiz-analysis__step.is-active .quiz-analysis__text { font-weight: 700; }
.quiz-analysis__icon { display: grid; place-items: center; width: 30px; height: 30px; border: 2px solid var(--on-dark-line); border-radius: 50%; color: var(--ink); }
.quiz-analysis__icon svg { width: 17px; height: 17px; opacity: 0; transform: scale(0.3); transition: opacity 0.2s var(--ease), transform 0.35s var(--ease); }
.quiz-analysis__step.is-active .quiz-analysis__icon { border-top-color: var(--orange); border-right-color: var(--orange); animation: quiz-spin 0.8s linear infinite; }
.quiz-analysis__step.is-done .quiz-analysis__icon { border-color: var(--orange); background: var(--orange); animation: quiz-pop 0.35s var(--ease); }
.quiz-analysis__step.is-done .quiz-analysis__icon svg { opacity: 1; transform: none; }
@keyframes quiz-pulse { 50% { opacity: 0.2; } }
@keyframes quiz-pop { 50% { transform: scale(1.18); } }
@keyframes quiz-analysis-out { to { opacity: 0; visibility: hidden; } }
.quiz-analysis-open, .quiz-analysis-open body { overflow: hidden; }
.quiz--result.is-revealed .result-hero .quiz-wrap { animation: quiz-in 0.5s var(--ease) both; }
.quiz-notice { padding: 56px 0 64px; }
.quiz-notice__title { margin: 0 0 14px; font-family: var(--font-display); font-size: clamp(34px, 3vw + 24px, 52px); line-height: 1.04; color: var(--on-dark); }
.quiz-notice__text { max-width: 32em; margin: 0 0 24px; font-family: var(--font-copy); font-size: 19px; line-height: 1.55; color: var(--on-dark-muted); }

@media (min-width: 600px) {
  .quiz-btn--big { width: auto; padding: 0 34px; }
  .quiz-hero { padding: 64px 0 80px; }
  .quiz-discover__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quiz-preview { padding: 26px 28px 28px; }
  .quiz-options { gap: 12px; }
  .quiz-nav .quiz-btn--next { min-width: 170px; }
  .result-hero { padding: 48px 0 56px; }
  .result-offer, .result-section { padding-top: 52px; padding-bottom: 56px; }
}
@media (min-width: 960px) {
  .quiz-top__inner { width: min(1120px, calc(100% - 2 * var(--gutter))); }
  .quiz-hero { padding: 72px 0 88px; }
  .quiz-hero__grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; gap: 64px; }
  .quiz-hero__title { font-size: clamp(64px, 5vw + 12px, 88px); }
  .quiz-discover { margin-top: 64px; }
  .quiz-discover__list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .quiz-discover__item { grid-template-columns: minmax(0, 1fr); gap: 14px; align-content: start; }
  .quiz-author { max-width: 680px; }
}
@media (prefers-reduced-motion: reduce) {
  .quiz *, .quiz *::before, .quiz *::after { animation: none !important; transition: none !important; }
  .quiz .quiz-analysis:not(.is-running) { animation: quiz-analysis-out 0.01s linear 3s both !important; }
}

/* ---------- Diagnóstico da Narrativa: painel do dono e página do lead ---------- */
/* O painel em abas (/admin/crm/diagnostico, partials/quiz_*.php, prefixo qp-): os números do topo em dois grupos, o funil por tela com barras
   em CSS, as distribuições (reaproveitam .crm-bars e .share), as tabelas de origem e de respostas (.crm-table), os envios, o pixel da Meta, o
   desafio de cada pessoa e as configurações. Na página do lead (partials/crm_quiz.php, prefixo ql-): o último diagnóstico e o que fica
   recolhido. Só tokens; no celular, uma coluna e as tabelas viram cartões. */
.qp-off { margin: 0 0 var(--space-4); }
.qp-off p { margin: 0; }
.qp-caption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin: var(--space-6) 0 0; font: 700 13px/1.3 var(--font-ui); color: var(--ink-2); }
.qp-caption__note { font-weight: 400; color: var(--muted); }
.qp-kpis { margin-top: var(--space-2); }
.qp-note { margin: 0 0 var(--space-3); max-width: 86ch; }
.qp-subtitle { display: flex; align-items: center; gap: var(--space-2); margin: var(--space-5) 0 var(--space-2); font: 700 15px/1.3 var(--font-ui); color: var(--ink); }
.qp-empty { margin-top: var(--space-6); }

/* O funil: uma linha por tela, com a barra da parte das visitas, o número que chegou e quantos saíram ali */
.qp-funnel { list-style: none; margin: var(--space-3) 0 0; padding: 0; display: grid; gap: var(--space-2); }
.qp-step { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label reached" "bar bar" "lost lost"; gap: 5px 12px; align-items: baseline; padding: 9px 14px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-xs); }
.qp-step__label { grid-area: label; display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14.5px; font-weight: 700; line-height: 1.3; }
.qp-step__n { display: inline-grid; place-items: center; flex: none; min-width: 24px; height: 24px; padding: 0 6px; border-radius: var(--radius-pill); background: var(--calm-wash); font: 700 12px/1 var(--font-ui); font-variant-numeric: tabular-nums; }
.qp-step__text { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; overflow-wrap: anywhere; }
.qp-step__bar { grid-area: bar; align-self: center; }
.qp-step__reached { grid-area: reached; font-family: var(--font-display); font-size: 21px; line-height: 1; text-align: right; font-variant-numeric: tabular-nums; }
.qp-step__lost { grid-area: lost; font-size: 12.5px; color: var(--muted); }
.qp-step--done .share__fill { background: var(--success); }
.qp-step.is-worst { background: var(--orange-soft); box-shadow: inset 3px 0 0 var(--orange), var(--shadow-xs); }
.qp-step.is-worst .share__fill { background: var(--orange); }
.qp-step.is-worst .qp-step__lost { color: var(--orange-ink); font-weight: 700; }
.qp-worst { margin: 0 0 var(--space-4); }
.qp-worst p { margin: 0 0 6px; }
.qp-worst p:last-child { margin-bottom: 0; }
.qp-worst__question { font-family: var(--font-copy); font-style: italic; color: var(--ink-2); }
@media (min-width: 721px) {
  .qp-step { grid-template-columns: minmax(220px, 1.3fr) minmax(120px, 2.4fr) 64px minmax(150px, 1fr); grid-template-areas: "label bar reached lost"; align-items: center; gap: 12px 16px; padding: 8px 14px; }
}

/* Quem respondeu, os envios e o pixel: cartões com barras e listas curtas */
.qp-dist, .qp-sent { margin-top: var(--space-3); }
.qp-sent { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.qp-card .hint { margin: -4px 0 4px; }
.qp-card .crm-bars { margin-top: 2px; }
.qp-status { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.qp-status__item { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 10px; align-items: baseline; padding-left: 10px; border-left: 3px solid var(--line-strong); font-size: 14.5px; }
.qp-status__item--ok { border-left-color: var(--success); }
.qp-status__item--bad { border-left-color: var(--danger); }
.qp-status__item--warn { border-left-color: var(--orange); }
.qp-status__n { font-family: var(--font-display); font-size: 21px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.qp-status__label { min-width: 0; overflow-wrap: anywhere; }
.qp-meta p { margin: 0 0 8px; }
.qp-meta p:last-child { margin-bottom: 0; }
.qp-meta__line { padding-left: 12px; border-left: 3px solid var(--line-strong); }
.qp-meta__line--ok { border-left-color: var(--success); }
.qp-meta__line--bad { border-left-color: var(--danger); }
.qp-meta__line--warn { border-left-color: var(--orange); }

/* As tabelas de origem e de respostas */
.qp-answers { font-size: 13.5px; }
.qp-answers th, .qp-answers td { padding-left: 8px; padding-right: 8px; }
.qp-answers th { vertical-align: bottom; }
.qp-answers td.stack-title { min-width: 104px; overflow-wrap: break-word; }
.qp-time { display: block; }
.qp-level { text-transform: none; letter-spacing: 0; white-space: normal; font-size: 12.5px; line-height: 1.25; padding: 3px 8px; }
.qp-state { display: inline-flex; align-items: flex-start; gap: 7px; font-size: 13px; line-height: 1.4; overflow-wrap: break-word; }
.qp-state::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 0.45em; border-radius: 50%; background: var(--faint); }
.qp-state--ok::before { background: var(--success); }
.qp-state--bad::before { background: var(--danger); }
.qp-state--warn::before { background: var(--orange); }
.qp-filters { margin: var(--space-3) 0 var(--space-2); }
@media (min-width: 721px) {
  .qp-answers td:nth-child(8) { min-width: 130px; max-width: 220px; }
}

/* O desafio escrito por cada pessoa */
.qp-quotes { list-style: none; margin: var(--space-3) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: var(--space-3); }
.qp-quote { min-width: 0; margin: 0; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: inset 3px 0 0 var(--orange), var(--shadow-xs); }
.qp-quote__text { margin: 0 0 8px; padding: 0; font-family: var(--font-copy); font-size: 15.5px; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
.qp-quote__by { margin: 0; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.qp-how { margin: var(--space-8) 0 0; }
.qp-how > summary { list-style: none; display: inline-flex; cursor: pointer; }
.qp-how > summary::-webkit-details-marker { display: none; }
.qp-how[open] > summary { margin-bottom: var(--space-3); }

/* As configurações: o link do quiz, o formulário em painéis e as variáveis dos textos */
.qp-config { display: grid; gap: var(--space-5); max-width: 860px; }
.qp-form .input--narrow { width: 110px; }
.qp-form .panel > * + * { margin-top: var(--space-4); }
.qp-form .panel > .hint + .field, .qp-form .panel > .hint + .check { margin-top: var(--space-3); }
.qp-link { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); margin: var(--space-3) 0; }
.qp-link__url { flex: 1 1 280px; min-width: 0; padding: 8px 10px; font-size: 13.5px; line-height: 1.45; overflow-wrap: anywhere; }
.qp-link__actions { display: inline-flex; flex-wrap: wrap; gap: var(--space-2); }
.qp-link__hint { margin-top: var(--space-4); }
.qp-vars { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 4px; font-size: 13.5px; color: var(--ink-2); }
.qp-meta__status { margin: 0; }

/* A página do lead: o último diagnóstico e as perguntas e os diagnósticos anteriores recolhidos */
.ql { margin: var(--space-8) 0 0; min-width: 0; scroll-margin-top: var(--space-4); }
.ql .side-title { margin-bottom: 4px; }
.ql__hint { margin: 0 0 var(--space-3); font-size: 13.5px; color: var(--muted); }
.ql__top { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); margin: 0 0 var(--space-3); }
.ql__top p { margin: 0; }
.ql__index-n { font-family: var(--font-display); font-size: 46px; line-height: 1; font-variant-numeric: tabular-nums; }
.ql__index-of { font-size: 14px; color: var(--muted); }
.ql__pillars { list-style: none; margin: 0 0 var(--space-4); padding: 0; display: grid; gap: 10px; max-width: 560px; }
.ql__pillar { display: grid; gap: 4px; }
.ql__pillar-head { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.ql__pillar-head span { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.ql__facts { margin-bottom: var(--space-3); }
.ql__facts .qp-state { font-size: inherit; }
.ql__quote { margin: 0; padding: 8px 12px; border-left: 3px solid var(--orange); border-radius: 0 var(--radius) var(--radius) 0; background: var(--surface-sunken); font-family: var(--font-copy); font-size: 15px; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
.ql__actions { margin: 0 0 var(--space-3); }
.ql__more { margin: var(--space-2) 0 0; border-top: 1px solid var(--line); }
.ql__more > summary, .ql__prev > details > summary { cursor: pointer; }
.ql__more > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 11px 0; font-size: 14.5px; font-weight: 700; }
.ql__more > summary::-webkit-details-marker { display: none; }
.ql__more > summary::after { content: "+"; margin-left: auto; font: 400 18px/1 var(--font-ui); color: var(--muted); }
.ql__more[open] > summary::after { content: "\2212"; }
.ql__answers { display: grid; gap: 10px; margin: 0 0 var(--space-3); }
.ql__answers dt { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.ql__answers dd { margin: 0; font-size: 14px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.ql__older { list-style: none; margin: 0; padding: 0; }
.ql__prev { border-top: 1px solid var(--line); }
.ql__prev:first-child { border-top: 0; }
.ql__prev > details > summary { padding: 10px 0; font-size: 14px; overflow-wrap: anywhere; }
.ql__pillars-line { margin: 0 0 10px; font-size: 13.5px; color: var(--ink-2); }
@media (max-width: 720px) {
  .qp-kpis .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .qp-answers td:nth-child(8) { max-width: none; }
  .qp-time { display: inline; margin-left: 4px; }
}
@media (max-width: 600px) {
  .qp-tabs .tabs__tab { gap: 6px; padding: 0 9px; font-size: 13.5px; }
  .qp-link__actions { width: 100%; }
  .qp-link__actions .btn { flex: 1 1 auto; }
  .qp-filters .btn { flex: 1 1 auto; }
  .ql__index-n { font-size: 40px; }
  .ql__pillar-head { flex-wrap: wrap; gap: 0 12px; }
}

/* ---------- Copiloto em todo o portal ---------- */
/* A seção #copiloto do lead e do cliente (partials/copilot.php, com os componentes do Copiloto do Capital Social: .copilot, .copilot-result,
   .copilot-sec, .copilot-src e .copilot-ask), a revisão do texto no campo de escrever das mensagens (partials/copilot_review.php) e o acesso
   rápido do dono: o botão Copiloto na barra do topo e na barra lateral e a gaveta (partials/copilot_drawer.php). Só tokens; no celular, uma
   coluna, e o botão do topo fica só com o ícone nas telas mais estreitas. */
.copilot-panel { margin: var(--space-8) 0 0; min-width: 0; scroll-margin-top: var(--space-4); }
.copilot-panel .copilot__head .section-title { margin-top: 0; margin-bottom: var(--space-2); }
.copilot-panel__review { margin-top: calc(-1 * var(--space-2)); }
.page-head__actions .btn svg { flex: none; }

.appbar__copilot { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-left: auto; padding: 0 14px 0 11px; border: 1px solid var(--on-dark-line); border-radius: var(--radius); background: transparent; color: var(--on-dark); font: 700 14px/1 var(--font-ui); text-decoration: none; white-space: nowrap; transition: background-color var(--dur), border-color var(--dur); }
.appbar__copilot:hover { background: var(--on-dark-hover); border-color: var(--on-dark-faint); color: var(--on-dark); }
.appbar__copilot:focus-visible { outline-color: var(--orange); }
.appbar__copilot .appbar__icon { color: var(--orange); }
.sidenav__copilot { display: none; }
.sidenav__copilot-link { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--on-dark-line); border-radius: var(--radius); color: var(--on-dark); font: 700 14px/1.2 var(--font-ui); text-decoration: none; transition: background-color var(--dur), border-color var(--dur); }
.sidenav__copilot-link:hover { background: var(--on-dark-hover); border-color: var(--on-dark-faint); color: var(--on-dark); }
.sidenav__copilot-link:focus-visible { outline: 2px solid var(--orange); outline-offset: -2px; }
.sidenav__copilot-icon { width: 19px; height: 19px; color: var(--orange); }
@media (min-width: 1024px) {
  .has-sidebar .sidenav__copilot { display: block; margin: 0 0 var(--space-2); }
}
@media (max-width: 380px) {
  .appbar__copilot { padding: 0 11px; }
  .appbar__copilot-text { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

.copilot-drawer .drawer__body { display: grid; gap: var(--space-4); align-content: start; }
.copilot-drawer .copilot__status { margin: 0; }
.copilot-drawer__lead { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.copilot-quick { display: grid; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.copilot-quick__link { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); text-decoration: none; box-shadow: var(--shadow-xs); transition: border-color var(--dur), box-shadow var(--dur); }
.copilot-quick__link:hover { border-color: var(--ink); color: var(--ink); box-shadow: var(--shadow-sm); }
.copilot-quick__label { font-weight: 700; font-size: 15px; line-height: 1.3; }
.copilot-quick__hint { font-size: 13px; line-height: 1.45; color: var(--muted); overflow-wrap: anywhere; }

.cmsg-form__copilot svg { color: var(--orange-ink); }
.cmsg-copilot { margin: var(--space-4) 0 0; gap: var(--space-4); scroll-margin-top: var(--space-4); }
.cmsg-copilot .callout p { margin: 0; overflow-wrap: anywhere; }
.cmsg-copilot .callout p + p { margin-top: 6px; }
.cmsg-copilot__foot { margin: 0; }
.copilot-checks { display: grid; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.copilot-check { display: flex; align-items: baseline; gap: 10px; font-size: 14px; line-height: 1.45; }
.copilot-check__mark { flex: none; min-width: 64px; padding: 2px 8px; border-radius: var(--radius-pill); font: 700 11px/1.5 var(--font-ui); letter-spacing: 0.05em; text-align: center; text-transform: uppercase; }
.copilot-check.is-ok .copilot-check__mark { background: var(--success-wash); color: var(--success); }
.copilot-check.is-warn .copilot-check__mark { background: var(--orange-wash); color: var(--orange-ink); }
.copilot-check__text { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .copilot-check { flex-direction: column; gap: 4px; }
  .cmsg-copilot .copilot-draft__actions .btn { flex: 1 1 100%; }
}

/* O entregável (partials/copilot_deliverable.php: um painel na coluna do lado, logo depois do retorno do cliente, com a lista dos ajustes
   em cartões), a reunião (partials/copilot_meeting.php, embaixo da ata: as decisões com a caixa ao lado do campo) e os números
   (partials/copilot_numbers.php, depois da leitura por regras). */
.copilot-side { display: flex; flex-direction: column; gap: var(--space-3); scroll-margin-top: var(--space-4); }
.copilot-side .side-title { margin: 0; }
.copilot-side .copilot__status { margin: 0; }
.copilot-side__ask { display: flex; flex-direction: column; gap: var(--space-2); margin: 0; }
.copilot-result--side { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; padding-top: var(--space-3); border-top: 1px solid var(--line); }
.copilot-result__title--side { font-size: 19px; }
.copilot-result--side .copilot-sec { padding-top: var(--space-3); }
.copilot-adjust { display: grid; gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
.copilot-adjust__item { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-sunken); }
.copilot-adjust__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0; font-size: 12.5px; color: var(--muted); }
.copilot-adjust__theme { min-width: 0; overflow-wrap: anywhere; }
.copilot-adjust__quote { margin: 0; padding-left: 10px; border-left: 2px solid var(--line-strong); font-family: var(--font-copy); font-size: 14px; line-height: 1.5; color: var(--ink-2); overflow-wrap: anywhere; }
.copilot-adjust__line { margin: 0; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.copilot-adjust__line--muted { color: var(--muted); }
.copilot-adjust__src { margin: 0; }
.copilot-adjust__ref { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.copilot-copy { display: flex; flex-direction: column; gap: var(--space-2); }
.copilot-copy__box summary { cursor: pointer; font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.copilot-copy__box textarea { margin-top: var(--space-2); font-size: 13.5px; }
.copilot-modes { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.copilot-decisions { display: grid; gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
.copilot-decision { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.copilot-decision > input[type="checkbox"] { flex: none; width: 18px; height: 18px; margin: 12px 0 0; accent-color: var(--ink); cursor: pointer; }
.copilot-decision .field { flex: 1 1 auto; }
.copilot-decision .hint { overflow-wrap: anywhere; }
.copilot-explain { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0; }
.copilot-explain__hint { flex: 1 1 220px; }
.copilot-explain .copilot-ask__status { flex: 1 1 100%; }
.copilot-panel--numbers .callout p { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .copilot-explain .btn { flex: 1 1 100%; }
}

/* O follow-up depois da reunião com lead (partials/meeting_followup.php): o aviso no alto da página do lead e da reunião enquanto o
   lembrete vale (--pending, com a faixa laranja), e na seção do Copiloto da reunião depois. O canal com Escrever o follow-up e o Não
   precisa lado a lado; no celular, uma coluna, com os botões na largura toda. */
.followup { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; margin: 0 0 var(--space-5); padding: var(--space-4) var(--space-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); scroll-margin-top: var(--space-4); }
.followup--pending { border-color: var(--orange-wash); box-shadow: inset 3px 0 0 var(--orange), var(--shadow-sm); }
.copilot .followup { margin: 0; }
.followup__head .eyebrow { margin: 0 0 var(--space-1); }
.followup__title { margin: 0; font-family: var(--font-display); font-size: var(--text-lg); line-height: 1.25; overflow-wrap: anywhere; }
.followup__state { margin: var(--space-1) 0 0; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); overflow-wrap: anywhere; }
.followup__state a { font-weight: 700; }
.followup__note { margin: 0; padding: 8px 12px; background: var(--orange-soft); border-radius: var(--radius); font-size: 14px; line-height: 1.5; color: var(--ink-2); overflow-wrap: anywhere; }
.followup__actions { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-3) var(--space-4); }
.followup__form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-2) var(--space-3); margin: 0; }
.followup__channel { min-width: 150px; }
.followup__skip { margin: 0; }
.followup__status { flex: 1 1 100%; margin: 0; font-size: 13.5px; color: var(--muted); }
.followup__status:empty { display: none; }
.followup__blocked, .followup__hint { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .followup { padding: var(--space-4); }
  .followup__actions, .followup__form, .followup__skip { flex: 1 1 100%; flex-direction: column; align-items: stretch; }
  .followup__actions .btn { width: 100%; }
}

/* A classificação do lead: o Recalcular no fim da linha de selos do topo da página do lead (.crm-classify-form, com o aviso de espera ao
   lado) e o painel "Classificação sugerida" logo abaixo do topo (partials/crm_classify.php): a temperatura, as estrelas e a prioridade lado
   a lado no computador, cada uma com o atual, o sugerido, os motivos com a fonte e o campo; no celular, uma embaixo da outra, com os botões
   na largura toda. */
.crm-classify-form { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); min-width: 0; margin: 0; }
.crm-classify-form__status { font-size: 13px; font-weight: 700; color: var(--orange-ink); overflow-wrap: anywhere; }
.crm-classify-form__status:empty { display: none; }
.crm-classify { margin-bottom: var(--space-6); scroll-margin-top: var(--space-4); }
.crm-classify__form { display: flex; flex-direction: column; gap: var(--space-4); margin: 0; }
.crm-classify__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: var(--space-4); }
.crm-classify__item { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-sunken); }
.crm-classify__title { margin: 0; font: 700 12px/1.3 var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.crm-classify__values { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); margin: 0; }
.crm-classify__values > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.crm-classify__values dt { font-size: 12.5px; color: var(--muted); }
.crm-classify__values dd { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-height: 24px; margin: 0; }
.crm-classify__same { font-size: 12.5px; color: var(--muted); }
.crm-classify__origin { margin: 0; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.crm-classify__origin--warn { color: var(--orange-ink); font-weight: 700; }
.crm-classify__reasons { gap: var(--space-2); }
.crm-classify__reasons .copilot-fact { font-size: 14px; }
.crm-classify .prio--media { box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--ink-2); }
/* As estrelas do cliente: o mesmo Recalcular na linha da nota do topo da página do cliente (.rating-line) e o painel "Estrelas sugeridas"
   (partials/client_stars.php), com os mesmos componentes e um campo só, numa coluna que não estica demais no computador. */
.rating-line .crm-classify-form { align-self: center; }
.client-stars__item { max-width: 72ch; }
.client-stars__field select { max-width: 100%; }
@media (max-width: 600px) {
  .crm-classify__actions .btn { flex: 1 1 100%; }
}

/* ---------- Lucro e rateio das despesas ---------- */
/* Prejuízo em vermelho. Com despesas, a Rentabilidade mostra duas linhas de números: a do dinheiro e, logo abaixo, a do esforço. */
.money-loss, .kpi__value--loss, .kpi__sub--loss { color: var(--danger); }
.kpis--next { margin-top: var(--space-3); }
.profit-ask { margin: 12px 0 0; max-width: 78ch; }
.profit-verdict { font-weight: 700; color: var(--ink-2); }
.profit-verdict.money-loss { color: var(--danger); }
.profit-table--costs td[data-label="Despesas"] { min-width: 130px; }
.profit-table tfoot td { vertical-align: top; }
.profit-table tr.is-total td { font-weight: 700; }
.abc-table--costs { min-width: 1320px; }
@media (min-width: 721px) {
  .profit-table tfoot tr:first-child td { border-top: 2px solid var(--ink); }
  .profit-table tr.is-total td { background: var(--sheet); border-bottom: 0; }
  /* Dez colunas cabem em 1200 px: menos folga entre elas, nome do cliente com espaço e barras um pouco mais curtas */
  .profit-table--costs th, .profit-table--costs td { padding-left: 7px; padding-right: 7px; }
  .profit-table--costs td.stack-title { min-width: 140px; }
  .profit-table--costs .share { min-width: 136px; }
  /* Quando a tabela rola de lado (tela até uns 1440 px com a barra lateral), o nome do cliente fica parado à esquerda */
  .profit-table--costs th:first-child, .profit-table--costs td:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: inset -1px 0 0 var(--line); }
  .profit-table--costs th:first-child { background: var(--surface-sunken); }
}
/* Celular: o rodapé da tabela de clientes vira cartão como as linhas; o mês de previsão não repete quatro traços */
@media (max-width: 720px) {
  .profit-table tfoot { display: block; }
  .profit-table tfoot td:empty { display: none; }
  .profit-table tr.is-total { border-left-color: var(--ink); border-top: 2px solid var(--ink); }
  .profit-table tr.is-unallocated { border-left-color: var(--danger); }
  .month-table td.is-na { display: none; }
}
