/* ============================================================
   Ecossistema HQ — Sistema de design do aplicativo
   Mobile first. O layout nasce no celular e cresce.

   As FICHAS (cores, escalas, sombras) vivem em tokens.css.
   As mesmas fichas alimentam o Escritorio Digital e a Operacao.
   ============================================================ */
@import url("./tokens.css");

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

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: var(--t-md);
  line-height: 1.6;          /* 1.6-1.65 no pacote; 1.5 apertava */
  letter-spacing: var(--ls-texto);
  color: var(--ink);
  background: var(--fundo);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  /* cv11: o "a" e o "l" de uma perna so. E o recurso que faz o l
     minusculo parar de se confundir com o I maiusculo — importante num
     app cheio de codigo de cliente e de numero de contrato. */
  font-feature-settings: var(--ff-texto);
  font-optical-sizing: auto;
}

/* ss01 em titulo e numero grande, como pede a secao 6. */
h1, h2, h3, h4, h5, h6, .nx-cabecalho__titulo, [data-papel="destaque"] {
  font-feature-settings: var(--ff-titulo);
}

/* Algarismo de mesma largura onde numero precisa alinhar em coluna:
   numeros, tabelas e graficos. Sem isso o 1 e mais estreito que o 8, a
   coluna de valores fica serrilhada — e pior, o numero DANCA quando
   atualiza sozinho, porque a largura muda junto com o digito.

   `[data-papel]` e um gancho para adocao: os numeros de destaque do app
   sao estilo inline sem classe, entao nao ha como alcanca-los daqui. */
table, svg text, [data-papel="numero"], [data-papel="destaque"] {
  font-variant-numeric: tabular-nums;
}

/* A monoespaçada e a do sistema e nao tem cv11/ss01; pedi-los ali faz o
   navegador procurar um recurso que nao existe. */
code, pre, kbd, samp, [data-papel="tecnico"] {
  font-family: var(--font-mono);
  font-feature-settings: normal;
  font-variant-numeric: tabular-nums;
}

/* A coluna do app: fundo `ink` com a textura pontilhada do modelo.
   No celular ocupa tudo; no desktop a coluna se define com fio nas
   laterais, como no arquivo do Pedro. */
.app {
  width: min(100%, 26.875rem);
  margin-inline: auto;
  border-inline: 1px solid var(--line);
  background: var(--paper);
  background-image: radial-gradient(rgba(var(--txt-rgb),.06) 1px, transparent 1px);
  background-size: 16px 16px;
}

/* A coluna do app. No fonte do Pedro ela tem largura de celular com
   fio nas laterais; aqui vale ate o desktop, onde vira trilho+conteudo. */
@media (max-width: 63.99rem) {
  .app {
    max-width: 26.875rem; margin-inline: auto;
    border-inline: 1px solid var(--line);
  }
  /* Centrar por MARGEM, nao por translate: assim a largura vem do
     inset e nunca ultrapassa a janela (o `width:100%` de um elemento
     fixo resolve contra a janela, nao contra a coluna). */
  .sheet { left: 0; right: 0; margin-inline: auto; max-width: 26.875rem; }
  .fab { right: max(var(--s4), calc((100% - 26.875rem) / 2 + var(--s4))); }
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }

/* Numeros sempre alinham em coluna */
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* Foco visivel — acessibilidade nao e opcional */
:focus-visible {
  outline: 2.5px solid var(--lime);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* Alvo de toque minimo 44px — regra de mobile */
.tap { min-height: var(--alvo-min); min-width: var(--alvo-min); }

.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;
}

/* ---------- 3. Esqueleto do aplicativo ---------- */
.app {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.screen {
  padding: var(--s4) var(--s4) var(--s8);
  max-width: 100%;
  animation: screen-in var(--mid) var(--ease);
}
@keyframes screen-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* Barra de topo */
.topbar {
  position: sticky; top: 0; z-index: var(--z-appbar);
  display: flex; align-items: center; gap: var(--s3);
  padding: calc(var(--s3) + var(--safe-topo)) var(--s4) var(--s3);
  min-height: var(--topbar-h);
  background: rgba(var(--bg2-rgb), .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar__title {
  font-family: var(--font-display);
  font-size: var(--t-lg); font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* O ponto lime que fecha os titulos — assinatura da marca. */
.ponto { color: var(--verde-claro); }
.topbar__action {
  display: grid; place-items: center;
  width: 40px; height: 40px; flex: none;
  border: 1px solid var(--line); border-radius: 50%;
  background: rgba(var(--txt-rgb),.05); color: var(--ink);
  transition: border-color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.topbar__action:hover { border-color: var(--lilas); }
.topbar__action:active { transform: scale(.94); }

/* Abas inferiores — navegacao de polegar (licao Adidas) */
.tabbar {
  position: sticky; bottom: 0; z-index: var(--z-tabbar);
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: rgba(var(--bg2-rgb), .94);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: var(--s2) var(--s1) calc(var(--s2) + var(--safe-base));
}
.tabbar__item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; padding: 0;
  min-height: 56px;
  border: none; background: none;
  color: var(--ink-60);
  transition: color var(--fast) var(--ease), transform var(--fast) var(--ease);
  position: relative;
}
.tabbar__item:active { transform: scale(.94); }
/* O icone mora num CIRCULO. Ativo: anel lime, brilho por fora e por
   dentro, traco mais grosso e preenchimento translucido — a
   especificacao exata do fonte do Pedro. Inativo: sem anel, traco
   fino, apagado. */
.tabbar__icone {
  position: relative;
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border: 1.5px solid transparent; border-radius: 50%;
  transition: border-color var(--mid) var(--ease), box-shadow var(--mid) var(--ease);
}
.tabbar__item svg { width: 19px; height: 19px; stroke-width: 1.7; fill: none; }
.tabbar__rotulo {
  font-family: var(--font-ui);
  font-size: var(--t-xxs); font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
}
.tabbar__item[aria-current="page"] { color: var(--lime); }
.tabbar__item[aria-current="page"] .tabbar__icone {
  border-color: var(--lime);
  box-shadow: var(--glow-lime);
}
.tabbar__item[aria-current="page"] svg {
  stroke-width: 2.2; fill: rgba(var(--acento-rgb), .22);
}
/* Bolinha vermelha com a contagem — o sinal de "chegou coisa nova".
   Fica sobre o icone, com anel da cor do fundo para destacar. */
.tabbar__badge {
  position: absolute; top: -3px; right: -3px;
  min-width: 17px; height: 17px; padding: 0 4px;
  display: grid; place-items: center;
  background: var(--lime); color: var(--paper);
  font-family: var(--font-ui);
  font-size: 12px; font-weight: 700; line-height: 1;
  font-variant-numeric: tabular-nums;
  border-radius: var(--r-pill);
}
/* Pulsa uma vez quando o numero SOBE — chamada de atencao, nao enfeite
   piscando sem parar. */
.tabbar__badge--novo { animation: badge-pulsa 620ms var(--ease) 1; }
@keyframes badge-pulsa {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.32); }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) { .tabbar__badge--novo { animation: none; } }

/* Botao flutuante — licao TickTick */
.fab {
  position: fixed; right: var(--s4);
  bottom: calc(var(--tabbar-h) + var(--s4) + env(safe-area-inset-bottom, 0px));
  z-index: 45;
  width: 3.5rem; height: 3.5rem;
  display: grid; place-items: center;
  border: none; border-radius: var(--r-pill);
  background: var(--lime); color: var(--paper);
  box-shadow: var(--sh-3);
  transition: transform var(--fast) var(--ease), background var(--fast) var(--ease);
}
.fab:hover { transform: translateY(-2px); }
.fab:active { transform: scale(.94); }
.fab svg { width: 24px; height: 24px; stroke-width: 2.2; }

/* ---------- 4. Cartao ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: none;
}
.card--flat { box-shadow: none; }
.card--pad { padding: var(--s3) var(--s4); }
/* Cartao que se toca. Se parece com botao, TEM que responder — e o
   toque precisa ser sentido (afunda de leve e ganha sombra). */
button.card, a.card, .card--clicavel {
  display: block; width: 100%; text-align: left;
  font: inherit; color: inherit; cursor: pointer;
  transition: box-shadow var(--fast) var(--ease), transform var(--fast) var(--ease);
}
button.card:hover, a.card:hover, .card--clicavel:hover { box-shadow: var(--sh-2); }
button.card:active, a.card:active, .card--clicavel:active { transform: scale(.98); }
.card__head {
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s4) var(--s5) 0;
}
.card__title {
  font-family: var(--font-ui);
  font-size: var(--t-rotulo); font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-60);
}
.stack { display: grid; gap: var(--s4); }
.stack--sm { gap: var(--s2); }
.stack--lg { gap: var(--s6); }

/* Titulo de secao */
/* Titulo de secao: no fonte do Pedro e um rotulo micro em caixa alta
   com tracking bem aberto — nao um titulo grande. */
.section-title {
  font-family: var(--font-ui);
  font-size: var(--t-xxs); font-weight: 600;
  letter-spacing: var(--ls-caixa); text-transform: uppercase;
  color: var(--ink-60);
  margin-bottom: var(--s3);
}
/* O heroi: Archivo 900, caixa alta, entrelinha curta. */
.heroi {
  font-family: var(--font-display);
  font-size: var(--t-xxl); font-weight: 600;
  line-height: 1.05; letter-spacing: var(--ls-hero);
  text-transform: uppercase;
  margin: var(--s2) 0 0;
}
.sauda {
  font-family: var(--font-ui);
  font-size: var(--t-xxs); font-weight: 600;
  letter-spacing: var(--ls-sauda); text-transform: uppercase;
  color: var(--lilas);
}
.resumo {
  font-size: var(--t-xs); line-height: 1.6;
  color: var(--ink-60); margin-top: var(--s2);
}
.micro {
  font-family: var(--font-ui);
  font-size: var(--t-micro); font-weight: 600;
  letter-spacing: var(--ls-tag); text-transform: uppercase;
  color: var(--ink-60);
}

/* Trinca de indicadores: numero Archivo 900 20px colorido e rotulo
   micro de 8px com tracking .16em. */
.trinca { display: flex; gap: var(--s2); margin-top: var(--s4); }
.ind {
  flex: 1; min-width: 0; text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--s3);
}
.ind__n {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 700; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.ind__r {
  font-family: var(--font-ui);
  font-size: var(--t-micro); font-weight: 600;
  letter-spacing: var(--ls-tag); text-transform: uppercase;
  color: var(--ink-60); margin-top: 2px;
}

/* ---------- 5. Mostrador em arco (licao Monzo) ---------- */
/* Um indicador NUNCA aparece sozinho: faixa, significado em palavra,
   variacao, quando atualiza e o que causou. */
.gauge { display: grid; justify-items: center; gap: var(--s2); padding: var(--s5) 0 0; }
.gauge__svg { width: min(72vw, 17rem); height: auto; overflow: visible; }
.gauge__track { fill: none; stroke: var(--line); stroke-linecap: round; }
.gauge__fill  { fill: none; stroke-linecap: round;
  transition: stroke-dashoffset var(--slow) var(--ease); }
.gauge__knob  { transition: transform var(--slow) var(--ease); }
.gauge__center { display: grid; justify-items: center; margin-top: -4.5rem; }
.gauge__value {
  font-size: var(--t-mega); font-weight: 700; line-height: .95;
  letter-spacing: -0.04em;
}
.gauge__value--nodata {
  font-family: var(--font-display); font-size: var(--t-xxl);
  font-weight: 600; color: var(--ink-60); letter-spacing: -0.01em;
}
.gauge__meaning {
  display: inline-flex; align-items: center; gap: var(--s2);
  font-size: var(--t-md); font-weight: 700; margin-top: var(--s1);
}
.gauge__ends {
  display: flex; justify-content: space-between;
  width: min(72vw, 17rem); margin-top: calc(-1 * var(--s5));
  font-size: var(--t-xs); color: var(--ink-60); font-weight: 600;
}
.gauge__note { font-size: var(--t-xs); color: var(--ink-60); margin-top: var(--s2); }

/* Chip de variacao — o numero ganha direcao e tempo */
.delta {
  display: inline-flex; align-items: center; gap: var(--s2);
  padding: var(--s2) var(--s3);
  border-radius: var(--r-pill);
  font-size: var(--t-xs); font-weight: 700;
  background: var(--mute-soft); color: var(--ink-60);
}
.delta--up   { background: var(--go-soft);  color: var(--go-ink); }
.delta--down { background: var(--stop-soft); color: var(--stop-ink); }
.delta--warn { background: var(--run-soft); color: var(--run-ink); }
.delta svg { width: 14px; height: 14px; stroke-width: 2.4; }

/* ---------- 6. Pilula de estado (estado e COR — licao Monday) ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 9px;
  border-radius: var(--r-pill);
  font-family: var(--font-ui);
  font-size: var(--t-micro); font-weight: 600;
  letter-spacing: var(--ls-tag); text-transform: uppercase;
  white-space: nowrap;
  background: var(--mute-soft); color: var(--ink-60);
}
.pill--go   { background: var(--go-soft);   color: var(--go-ink); }
.pill--run  { background: var(--run-soft);  color: var(--run-ink); }
.pill--wait { background: var(--wait-soft); color: var(--wait-ink); }
/* PARA NO SEU OK. Contorno alem do fundo: e o unico estado que nao
   anda sem alguem, entao ele se destaca dos outros quatro. */
.pill--gate {
  background: var(--gate-soft); color: var(--gate-ink);
  border: 1px solid rgba(var(--lima-rgb), .38);
}
.pill--stop { background: var(--stop-soft); color: var(--stop-ink); }
.pill--solid { color: #fff; }
.pill--solid.pill--go   { background: var(--go-ink); }
.pill--solid.pill--run  { background: var(--run-ink); }
.pill--solid.pill--wait { background: var(--wait-ink); }
/* Lima e claro demais para texto branco por cima. */
.pill--solid.pill--gate { background: var(--gate); color: var(--paper); }
.pill--solid.pill--stop { background: var(--stop-ink); }
.pill__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Celula de estado que preenche — o Monday preenche a celula inteira */
.state-cell {
  display: grid; place-items: center;
  padding: var(--s2) var(--s3);
  border-radius: var(--r-sm);
  font-size: var(--t-xs); font-weight: 700;
  background: var(--mute-soft); color: var(--ink-60);
}
/* `.state-cell--wait` estava declarada DUAS vezes, e a de baixo vencia. A de
   cima usava `color: var(--bg2)` — cor de FUNDO como cor de TEXTO, que no tema
   claro vira creme sobre creme. Nunca chegou a aparecer porque a duplicata a
   sobrescrevia, mas ficou ali esperando alguem apagar a linha vencedora.

   Achado em 24/08/2026: o teste que proibe esse padrao procurava
   `color:var(--bg2)` sem espaco, e as duas ocorrencias do projeto tinham
   espaco. O guarda existia para isto e nao via. */
.state-cell--go   { background: var(--go);   color: #06301f; }
.state-cell--run  { background: var(--run);  color: #4a2f02; }
.state-cell--wait { background: var(--wait); color: #fff; }
.state-cell--stop { background: var(--stop); color: #fff; }

/* ---------- 7. Pessoa e AVATAR ---------- */
.avatar {
  position: relative; flex: none;
  width: 2.25rem; height: 2.25rem;
  border-radius: var(--r-pill);
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--lilas), var(--roxo));
  color: var(--ink);
  font-size: var(--t-xs); font-weight: 700; letter-spacing: -0.02em;
  overflow: visible;
}
.avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.avatar--sm { width: 1.75rem; height: 1.75rem; font-size: var(--t-xxs); }
.avatar--lg { width: 3.25rem; height: 3.25rem; font-size: var(--t-md); }
.avatar--xl { width: 4.5rem; height: 4.5rem; font-size: var(--t-xl); }
/* Vazio honesto: ha lugar para a pessoa, e ele diz que esta vazio */
.avatar--empty {
  background: transparent; color: var(--ink-60);
  border: 1.5px dashed var(--ink-20);
}
.avatar__presence {
  position: absolute; right: -1px; bottom: -1px;
  width: 11px; height: 11px; border-radius: 50%;
  border: 2px solid var(--surface); background: var(--mute);
}
.avatar__presence--on { background: var(--go); }
.avatar__channel {
  position: absolute; right: -3px; bottom: -3px;
  width: 15px; height: 15px; border-radius: 50%;
  display: grid; place-items: center;
  border: 2px solid var(--surface); background: var(--surface);
}
.avatar__channel svg { width: 11px; height: 11px; }
.avatar-stack { display: flex; }
.avatar-stack .avatar { margin-left: -0.5rem; border: 2px solid var(--surface); }
.avatar-stack .avatar:first-child { margin-left: 0; }

/* ---------- 8. Periodo e BARRA (licao Monday) ---------- */
/* Duracao vira comprimento, com o intervalo escrito dentro. */
.period {
  position: relative;
  display: inline-flex; align-items: center;
  padding: var(--s1) var(--s3);
  border-radius: var(--r-pill);
  background: var(--mute-soft);
  font-size: var(--t-xs); font-weight: 700; color: var(--ink-80);
  overflow: hidden; white-space: nowrap;
}
.period__done {
  position: absolute; inset: 0 auto 0 0;
  background: var(--wait); opacity: .22;
}
.period__label { position: relative; }
.period--go   { background: var(--go-soft); }
.period--run  { background: var(--run-soft); }
.period--late { background: var(--stop-soft); color: var(--stop-ink); }
.period--late .period__done { background: var(--stop); opacity: .25; }

/* Barra de progresso simples */
.bar {
  height: 6px; border-radius: var(--r-pill);
  background: var(--line); overflow: hidden;
}
.bar__fill {
  height: 100%; border-radius: inherit; background: var(--lime);
  transition: width var(--slow) var(--ease);
}

/* Barra empilhada — a linha de resumo do grupo */
.stackbar { display: flex; height: 8px; border-radius: var(--r-pill); overflow: hidden; background: var(--line); }
.stackbar__seg { height: 100%; }

/* ---------- 9. Arquivo e MINIATURA ---------- */
.thumb {
  width: 2.25rem; height: 2.25rem; flex: none;
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--line-soft);
  font-size: var(--t-xxs); font-weight: 700; color: var(--ink-60);
  overflow: hidden;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-row { display: flex; gap: var(--s1); }
.thumb-row .thumb { margin-left: -6px; box-shadow: 0 0 0 2px var(--surface); }
.thumb-row .thumb:first-child { margin-left: 0; }

/* ---------- 10. Grupo com RESUMO (a peca que vira painel) ---------- */
.group { margin-bottom: var(--s6); }
.group__head {
  display: flex; align-items: center; gap: var(--s3);
  width: 100%; padding: var(--s3) var(--s1);
  border: none; background: none; text-align: left;
}
.group__caret {
  width: 1.25rem; height: 1.25rem; flex: none; color: var(--ink-60);
  transition: transform var(--fast) var(--ease);
}
.group[data-open="false"] .group__caret { transform: rotate(-90deg); }
.group__name {
  font-size: var(--t-lg); font-weight: 700; letter-spacing: -0.02em;
  flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.group__count {
  font-size: var(--t-xs); font-weight: 700; color: var(--ink-60);
  padding: 2px var(--s2); border-radius: var(--r-pill); background: var(--surface-2);
}
.group__bar { width: 4px; border-radius: var(--r-pill); align-self: stretch; flex: none; }
.group__body { display: grid; gap: var(--s2); }
.group[data-open="false"] .group__body { display: none; }
.group[data-open="false"] .group__summary { display: none; }

/* A linha que agrega — o grupo se explica sem abrir item nenhum */
.summary {
  display: grid; gap: var(--s3);
  margin-top: var(--s2); padding: var(--s3) var(--s4);
  background: var(--surface-2);
  border: 1px dashed var(--line);
  border-radius: var(--r-md);
}
.summary__row { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.summary__label {
  font-size: var(--t-xxs); font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-60);
  min-width: 4.5rem;
}
.summary__val { font-size: var(--t-xs); font-weight: 700; color: var(--ink-80); }

/* ---------- 10b. Kanban — as fases lado a lado ---------- */
/* No celular as colunas deslizam com encaixe; no desktop cabem juntas. */
.kanban {
  display: flex; gap: var(--s3);
  overflow-x: auto; overflow-y: hidden;
  overscroll-behavior-x: contain;   /* o gesto nao vaza para a pagina */
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding-bottom: var(--s4);
  /* sangra ate a borda da tela, como um Kanban de verdade */
  margin-inline: calc(-1 * var(--s4));
  padding-inline: var(--s4);
}
.kanban::-webkit-scrollbar { height: 6px; }
.kanban::-webkit-scrollbar-thumb { background: var(--ink-20); border-radius: var(--r-pill); }

.col {
  flex: none;
  width: min(82vw, 20rem);
  scroll-snap-align: start;
  display: flex; flex-direction: column;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  max-height: 72dvh;
}
.col__head {
  display: flex; align-items: center; gap: var(--s2);
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--line-soft);
  position: sticky; top: 0; z-index: 1;
  background: var(--surface-2);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.col__dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.col__name {
  font-size: var(--t-sm); font-weight: 700; letter-spacing: -0.01em;
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.col__count {
  font-size: var(--t-xs); font-weight: 700; color: var(--ink-60);
  background: var(--surface); border-radius: var(--r-pill);
  padding: 1px var(--s2); flex: none;
}
.col__body {
  display: grid; gap: var(--s2); align-content: start;
  padding: var(--s3); overflow-y: auto; flex: 1;
}
.col__empty {
  padding: var(--s5) var(--s3); text-align: center;
  font-size: var(--t-xs); color: var(--ink-60);
}

/* Cartao do Kanban — mais alto que a linha, com as marcas visiveis */
.kcard {
  display: grid; gap: var(--s2); align-content: start;
  min-height: 72px; text-align: left; width: 100%;
  padding: var(--s3);
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-1);
  transition: box-shadow var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.kcard:hover { box-shadow: var(--sh-2); transform: translateY(-1px); }
.kcard:active { transform: scale(.985); }
.kcard__title {
  font-family: var(--font-display);
  font-size: var(--t-sm); font-weight: 700; line-height: 1.35;
  max-height: calc(1.35em * 3);   /* ate 3 linhas, sem truque que colapsa */
  overflow: hidden;
  overflow-wrap: anywhere;
}
.kcard__marks { display: flex; gap: 4px; flex-wrap: wrap; }
.kcard__mark { height: 5px; width: 26px; border-radius: var(--r-pill); }
.kcard__foot { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }

@media (min-width: 64rem) {
  .kanban { margin-inline: 0; padding-inline: 0; }
  .col { width: 19rem; }
}

/* ---------- 10c. Calendario de mes ---------- */
.mes {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: var(--s3);
  box-shadow: var(--sh-1);
}
.mes__topo {
  display: flex; align-items: center; gap: var(--s2);
  padding: var(--s1) var(--s2) var(--s3);
}
.mes__nome {
  flex: 1; text-align: center;
  font-family: var(--font-display);
  font-size: var(--t-lg); font-weight: 600; letter-spacing: -0.01em;
}
.mes__nav {
  width: 2.25rem; height: 2.25rem; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: var(--r-pill);
  background: var(--surface); color: var(--ink-60);
}
.mes__nav:hover { background: var(--surface-2); color: var(--ink); }
.mes__semana, .mes__grade {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px;
}
.mes__dia-nome {
  text-align: center; padding: var(--s1) 0;
  font-size: var(--t-xxs); font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-60);
}
.dia {
  aspect-ratio: 1; min-height: 2.5rem;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  gap: 2px; padding: 4px 2px;
  border: none; background: transparent;
  border-radius: var(--r-sm);
  font-size: var(--t-xs); font-weight: 600; color: var(--ink-80);
  font-variant-numeric: tabular-nums;
  transition: background var(--fast) var(--ease);
}
.dia:hover { background: var(--surface-2); }
.dia--fora { color: var(--ink-60); }
.dia--hoje { background: var(--go-soft); color: var(--lime); font-weight: 700; }
.dia--sel  { background: var(--ink); color: var(--paper); }
.dia--sel .dia__ponto { background: var(--lime) !important; }
.dia__pontos { display: flex; gap: 2px; height: 5px; align-items: center; }
.dia__ponto { width: 5px; height: 5px; border-radius: 50%; background: var(--wait); }
.dia__ponto--stop { background: var(--stop); }
.dia__mais { font-size: 12px; font-weight: 700; color: var(--ink-60); line-height: 1; }

/* ---------- 11. Item de lista = CARTAO, nao linha de tabela ---------- */
.row {
  display: flex; align-items: center; gap: var(--s3);
  width: 100%; text-align: left;
  padding: var(--s3); min-height: 64px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.row:hover { border-color: rgba(var(--txt-rgb),.28); }
.row:active { transform: scale(.985); }
.row__main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.row__title {
  font-family: var(--font-display);
  font-size: var(--t-sm); font-weight: 600;
  text-transform: uppercase;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.row__sub {
  font-family: var(--font-ui);
  font-size: var(--t-xxs); font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-60);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.row__meta { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.row__end { display: flex; align-items: center; gap: var(--s2); flex: none; }
.row--accent { border-left: 3px solid var(--lime); }

/* ---------- 12. Linha do tempo (processo e LINHA DO TEMPO, nao campo) ---------- */
.timeline { display: grid; gap: 0; padding-left: var(--s1); }
.tl {
  display: grid; grid-template-columns: 1.25rem 1fr; gap: var(--s3);
  position: relative; padding-bottom: var(--s5);
}
.tl:last-child { padding-bottom: 0; }
.tl__mark { display: grid; justify-items: center; }
.tl__dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--line); border: 2.5px solid var(--line);
  margin-top: 4px; flex: none;
}
.tl__line { width: 2px; flex: 1; background: var(--line); margin-top: 3px; border-radius: 2px; }
.tl:last-child .tl__line { display: none; }
.tl__body { display: grid; gap: 2px; padding-bottom: var(--s1); }
.tl__name { font-size: var(--t-sm); font-weight: 700; }
.tl__when { font-size: var(--t-xs); color: var(--ink-60); }
/* Concluido */
.tl--done .tl__dot { background: var(--go); border-color: var(--go); }
.tl--done .tl__line { background: var(--go); }
/* Atual — vazado e destacado */
.tl--now .tl__dot { background: var(--surface); border-color: var(--go); }
.tl--now .tl__name { color: var(--ink); }
/* Futuro — apagado */
.tl--todo .tl__name, .tl--todo .tl__when { color: var(--ink-60); }
/* Travado */
.tl--stop .tl__dot { background: var(--stop); border-color: var(--stop); }
.tl--stop .tl__name { color: var(--stop-ink); }

/* ---------- 13. Estado vazio honesto (ilustracao + o que fazer) ---------- */
/* ------------------------------------------------------------
   O VAZIO — medidas do pacote de design, literais de proposito.

   Nao troquei por token de espaco porque o pacote especifica
   valor exato (24px 20px, 19px, 460px) e arredondar para a grade
   de 4pt mudaria o desenho. Onde o valor coincide com token, uso
   o token; onde nao coincide, fica o numero e este comentario
   explica por que.
   ------------------------------------------------------------ */
.vazio {
  border: 1px dashed rgba(var(--txt-rgb), .14);
  border-radius: var(--r-vazio);
  padding: 24px 20px;
  text-align: center;
}
.vazio__palavra {
  font-family: var(--font-ui);
  font-size: 18px;
  color: var(--cinza-vazio);          /* cinza do vazio: nao e texto nem borda */
  line-height: 1.2;
}
.vazio__razao {
  margin: 8px auto 0;
  max-width: 460px;        /* medida de leitura de uma frase */
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-60);
}

/* Grafico sem medicao: reta pontilhada, sem escala. */
.semlinha { display: grid; gap: var(--s2); }
.semlinha svg { width: 100%; height: 40px; display: block; }
.semlinha line {
  stroke: rgba(var(--txt-rgb), .22);
  stroke-width: 1.5;
  stroke-dasharray: 3 5;
  vector-effect: non-scaling-stroke;
}
.semlinha__r {
  font-family: var(--font-ui);
  font-size: var(--t-micro);
  color: var(--ink-60);
}
.semlinha__l {
  font-size: 13px;
  color: var(--ink-60);
}

/* Legado: sai quando as 30 chamadas antigas migrarem. */
.empty {
  display: grid; justify-items: center; text-align: center;
  gap: var(--s3); padding: var(--s8) var(--s4);
  border: 1px dashed var(--line);
  border-radius: var(--r-lg);
}
.empty__art {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px dashed rgba(var(--txt-rgb),.3);
  display: grid; place-items: center;
  color: var(--ink-60);
}
.blocked svg { width: 20px; height: 20px; flex: none; color: var(--stop-ink); margin-top: 1px; }
.blocked__body { display: grid; gap: var(--s1); }
.blocked__title { font-size: var(--t-sm); font-weight: 700; color: var(--stop-ink); }
.blocked__text { font-size: var(--t-xs); color: var(--stop-ink); }

/* Sem dado declarado — nunca zero, nunca estimativa */
.nodata {
  display: inline-flex; align-items: center; gap: var(--s2);
  font-size: var(--t-xs); font-weight: 600; color: var(--ink-60);
  font-style: italic;
}

/* ---------- 14. Acoes ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  padding: 0 var(--s5); min-height: 52px;
  border: 1px solid transparent; border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-size: var(--t-sm); font-weight: 600;
  letter-spacing: var(--ls-acao); text-transform: uppercase;
  transition: transform var(--fast) var(--ease), background var(--fast) var(--ease);
}
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; stroke-width: 2.2; }
/* A acao primaria e LIME com texto ink — o CTA do fonte. */
.btn--primary { background: var(--lime); color: var(--paper); }
.btn--primary:hover { filter: brightness(1.06); }
.btn--mint { background: var(--lime); color: var(--paper); box-shadow: var(--sh-2); }
.btn--lilas { background: var(--lilas); color: var(--bege); }
.btn--ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { background: var(--surface-2); }
.btn--quiet { background: transparent; color: var(--ink-60); }
/* Acao destrutiva: TEXTO em vermelho, nunca com o peso da primaria */
.btn--danger { background: transparent; color: var(--stop-ink); font-weight: 700; }
.btn--danger:hover { background: var(--stop-soft); }
.btn--block { width: 100%; }
.btn--sm { padding: 0 var(--s4); min-height: 36px; font-size: var(--t-xxs); }

/* Barra de ferramentas em VERBOS */
.toolbar {
  display: flex; gap: var(--s2); overflow-x: auto;
  padding-bottom: var(--s2); margin-bottom: var(--s2);
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.toolbar::-webkit-scrollbar { display: none; }
.tool {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  height: 36px; padding: 0 var(--s3);
  border: 1px solid var(--line); border-radius: var(--r-pill);
  background: var(--surface); color: var(--ink-60);
  font-family: var(--font-ui);
  font-size: var(--t-xxs); font-weight: 600;
  letter-spacing: var(--ls-micro); text-transform: uppercase;
  white-space: nowrap;
  /* Nao selecionado, medida do pacote: borda .14, sem sombra,
     texto .62. Transicao so no que muda — `all` anima layout junto
     e engasga em lista longa. */
  border-color: rgba(var(--txt-rgb), .14);
  color: var(--ink-60);
  transition: box-shadow .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease);
}
.tool:active { transform: scale(.95); }
.tool__dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
/* Escolhido: CONTORNO + BRILHO, nunca preenchimento — regra do
   pacote. Preencher e o gesto mais forte da interface; fica para
   acao, nao para "este filtro esta ligado". */
.tool[aria-pressed="true"] {
  background: transparent;
  border-color: var(--lilas);
  box-shadow: var(--glow-lilas);
  color: var(--lilas);
}
.tool svg { width: 15px; height: 15px; stroke-width: 2.1; }

/* Adicionar inline — sem modal, sem formulario (licao Monday/TickTick) */
.add-inline {
  display: flex; align-items: center; gap: var(--s3);
  width: 100%; padding: var(--s3) var(--s4);
  border: 1px dashed var(--line); border-radius: var(--r-md);
  background: transparent; color: var(--ink-60);
  font-size: var(--t-sm); font-weight: 600;
  transition: border-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.add-inline:hover { border-color: var(--lime); color: var(--lime); }

/* ---------- 15. Contador (licao TickTick) ---------- */
.count-item {
  display: flex; align-items: center; gap: var(--s3);
  width: 100%; padding: var(--s3) var(--s4);
  border: none; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line-soft);
}
.count-item__icon { width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: var(--r-sm); flex: none; }
.count-item__name { flex: 1; font-size: var(--t-sm); font-weight: 700; text-align: left; }
.count-item__n { font-size: var(--t-sm); font-weight: 700; color: var(--ink-60); }
.count-item__n--hot { color: var(--stop-ink); }

/* ---------- 16. Cartao editorial (licao Adidas) ---------- */
.editorial {
  position: relative; overflow: hidden;
  border-radius: var(--r-xl);
  background: linear-gradient(160deg, var(--roxo) 0%, var(--paper) 68%);
  color: var(--ink);
  border: 1px solid var(--line);
  min-height: 9.5rem;
  display: grid; align-items: end;
  padding: var(--s5);
  box-shadow: var(--sh-2);
}
.editorial__bg { position: absolute; inset: 0; opacity: .5; object-fit: cover; width: 100%; height: 100%; }
.editorial__glow {
  position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 85% 0%, rgba(var(--lilas-rgb),.30), transparent 62%);
}
.editorial__body { position: relative; display: grid; gap: var(--s2); }
.editorial__kicker {
  font-size: var(--t-xxs); font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--lime);
}
.editorial__title {
  font-family: var(--font-display);
  font-size: var(--t-xxl); font-weight: 600; line-height: 1.05;
}
.editorial__text { font-size: var(--t-sm); opacity: .82; }

/* ---------- 17. Abas ---------- */
.tabs {
  display: flex; gap: var(--s1); padding: var(--s1);
  background: var(--surface-2); border-radius: var(--r-pill);
  overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs__item {
  flex: 1; min-width: max-content;
  padding: var(--s2) var(--s4); min-height: 38px;
  border: none; border-radius: var(--r-pill); background: transparent;
  font-size: var(--t-xs); font-weight: 700; color: var(--ink-60);
  white-space: nowrap;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}
/* Aba escolhida segue a mesma regra do chip: aro e brilho. */
.tabs__item[aria-selected="true"] {
  background: transparent; color: var(--lime);
  border: 1px solid var(--lime); box-shadow: var(--glow-lime);
}

/* ---------- 18. Folha inferior ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(10,14,13,.42);
  backdrop-filter: blur(3px);
  animation: fade-in var(--fast) var(--ease);
}
@keyframes fade-in { from { opacity: 0 } to { opacity: 1 } }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 61;
  max-height: 88dvh; overflow-y: auto;
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: var(--s3) var(--s5) calc(var(--s8) + env(safe-area-inset-bottom, 0px));
  box-shadow: var(--sh-3);
  animation: sheet-up var(--mid) var(--ease);
}
@keyframes sheet-up { from { transform: translateY(100%) } to { transform: none } }
.sheet__grip {
  width: 2.5rem; height: 4px; border-radius: var(--r-pill);
  background: var(--ink-20); margin: 0 auto var(--s4);
}
.sheet__title {
  font-family: var(--font-display);
  font-size: var(--t-xl); font-weight: 600;
  text-transform: uppercase;
  margin-bottom: var(--s4);
}
.msg--in .msg__bubble  { background: var(--surface); border-bottom-left-radius: var(--s2); }
/* `--sobre-claro`, e nao `--bg2`. O balao e lilas nos dois temas; `--bg2` vira
   creme no claro, e creme sobre lilas nao se le. `--sobre-claro` existe
   justamente por NAO ter variante de tema: e o preto que serve sobre qualquer
   superficie clara ou colorida. Era a mensagem enviada — o texto que a pessoa
   acabou de escrever — que sumia. */
.msg--out .msg__bubble { background: var(--lilas); color: var(--sobre-claro); border-bottom-right-radius: var(--s2); }
.msg__meta { font-size: var(--t-xxs); color: var(--ink-60); }
.msg--out .msg__meta { text-align: right; }
.msg__sys {
  justify-self: center; text-align: center;
  font-size: var(--t-xxs); color: var(--ink-60);
  padding: var(--s1) var(--s3); background: var(--surface-2); border-radius: var(--r-pill);
}
/* Audio com forma de onda + duracao + transcricao */
.wave { display: flex; align-items: center; gap: 2px; height: 26px; }
.wave__b { width: 2.5px; border-radius: var(--r-pill); background: currentColor; opacity: .5; }
.transcript {
  font-size: var(--t-xs); font-style: italic; opacity: .85; margin-top: var(--s2);
  padding-top: var(--s2); border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent);
}

/* Composer com abas */
.composer {
  position: sticky; bottom: 0;
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  padding: var(--s3) var(--s4) calc(var(--s3) + env(safe-area-inset-bottom, 0px));
  display: grid; gap: var(--s3);
}
.composer__field {
  display: flex; align-items: flex-end; gap: var(--s2);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: var(--s2);
}
.composer__input {
  flex: 1; border: none; background: none; resize: none;
  font: inherit; font-size: var(--t-sm); padding: var(--s2);
  max-height: 7rem; outline: none;
}
.composer__icon {
  width: 2.25rem; height: 2.25rem; flex: none;
  display: grid; place-items: center;
  border: none; border-radius: var(--r-pill); background: transparent; color: var(--ink-60);
}
.composer__send { background: var(--ink); color: var(--lime); }

/* ---------- 20. Utilitarios ---------- */
.flex { display: flex; align-items: center; gap: var(--s3); }
.flex--between { justify-content: space-between; }
.flex--wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--ink-60); }
.small { font-size: var(--t-xs); }
.tiny  { font-size: var(--t-xxs); }
.bold  { font-weight: 700; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mono { font-family: var(--font-mono); }
.hide { display: none !important; }
.scroll-x {
  display: flex; gap: var(--s3); overflow-x: auto;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; padding-bottom: var(--s2);
}
.scroll-x::-webkit-scrollbar { display: none; }
.scroll-x > * { scroll-snap-align: start; flex: none; }

/* Carregando — esqueleto, nao spinner solto */
.skel {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--line-soft) 37%, var(--surface-2) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: var(--r-md);
}
@keyframes shimmer { from { background-position: 100% 0 } to { background-position: 0 0 } }

/* ============================================================
   CRESCIMENTO — mobile first de verdade: so min-width daqui
   ============================================================ */

/* Tablet */
@media (min-width: 40rem) {
  .screen { padding: var(--s6) var(--s6) calc(var(--tabbar-h) + var(--s8)); }
  .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
}

/* Desktop: as abas viram trilho lateral */
@media (min-width: 64rem) {
  .app {
    width: 100%; margin-inline: 0; border-inline: none;
    grid-template-columns: 16rem 1fr;
    grid-template-rows: auto 1fr;
    grid-template-areas: "rail topbar" "rail main";
  }
  .topbar { grid-area: topbar; }
  .app__main { grid-area: main; }
  .screen { padding: var(--s8); max-width: 78rem; margin: 0 auto; width: 100%;
            padding-bottom: var(--s10); }
  .tabbar {
    grid-area: rail;
    position: sticky; top: 0; left: auto; right: auto; bottom: auto;
    height: 100dvh;
    grid-auto-flow: row; grid-auto-columns: none;
    align-content: start; gap: var(--s1);
    padding: var(--s5) var(--s3);
    border-top: none; border-right: 1px solid var(--line-soft);
    box-shadow: none; background: var(--paper-2);
  }
  .tabbar__item {
    flex-direction: row; justify-content: flex-start; gap: var(--s3);
    padding: var(--s3) var(--s4); min-height: 46px;
    border-radius: var(--r-md); font-size: var(--t-sm);
  }
  .tabbar__item[aria-current="page"] { background: var(--surface); }
  .tabbar__item[aria-current="page"]::before {
    top: 50%; left: 0; translate: 0 -50%;
    width: 3px; height: 22px; border-radius: 0 3px 3px 0;
  }
  .tabbar__badge { position: static; margin-left: auto; border: none; }
  .fab { display: none; }
  .grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4); }
  /* Atendimento em colunas — so no desktop */
  .three-col {
    display: grid; grid-template-columns: 20rem 1fr 18rem; gap: var(--s4);
    align-items: start;
  }
}

@media (min-width: 90rem) {
  .grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s4); }
}


/* ---------- Pulso: quem esta em tarefa respira ----------
   Do fonte do Pedro: a bolinha de status pulsa enquanto o agente
   trabalha. Estado parado nao pulsa — o movimento SIGNIFICA. */
@keyframes pulso { 0%, 100% { opacity: 1 } 50% { opacity: .3 } }
.pulsa { animation: pulso 1.6s ease infinite; }
@media (prefers-reduced-motion: reduce) { .pulsa { animation: none; } }

/* Barra de progresso fina da linha (3px, caramelo) */
.prog {
  height: 3px; margin-top: 2px;
  background: rgba(var(--txt-rgb), .10);
  border-radius: var(--r-pill); overflow: hidden;
}
.prog__f { height: 100%; background: var(--caramelo); border-radius: var(--r-pill); }

/* ============================================================
   TABELA RESPONSIVA — o padrao para dado denso.
   Celular: cada linha e um cartao e cada celula mostra o proprio
   rotulo. Computador: tabela de verdade, todas as colunas.
   Nenhum dado some entre as duas leituras.
   ============================================================ */
.tab-rolo { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tab { width: 100%; border-collapse: collapse; font-size: var(--t-xs); }
.tab thead { display: none; }
.tab tbody { display: grid; gap: var(--s2); }
.tab tr {
  display: grid; gap: 2px;
  padding: var(--s3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.tab tr.tab__tr--stop { border-left: 3px solid var(--stop); }
.tab tr.tab__tr--run  { border-left: 3px solid var(--caramelo); }
.tab tr.tab__tr--go   { border-left: 3px solid var(--lime); }
.tab td { display: flex; align-items: baseline; gap: var(--s3); padding: 2px 0; }
/* No celular a celula carrega o proprio rotulo */
.tab td::before {
  content: attr(data-r);
  flex: none; min-width: 7.5rem;
  font-family: var(--font-ui);
  font-size: var(--t-micro); font-weight: 600;
  letter-spacing: var(--ls-tag); text-transform: uppercase;
  color: var(--ink-60);
}
/* A primeira celula e o titulo do cartao */
.tab td:first-child {
  font-family: var(--font-display);
  font-size: var(--t-sm); font-weight: 600;
  text-transform: uppercase;
  padding-bottom: var(--s2);
}
.tab td:first-child::before { display: none; }

@media (min-width: 64rem) {
  .tab thead { display: table-header-group; }
  .tab tbody { display: table-row-group; }
  .tab tr {
    display: table-row;
    background: none; border: none; border-radius: 0;
    border-bottom: 1px solid var(--line);
  }
  .tab tr:hover { background: var(--surface); }
  .tab tr.tab__tr--stop, .tab tr.tab__tr--run, .tab tr.tab__tr--go { border-left: none; }
  .tab th {
    text-align: left; padding: var(--s2) var(--s3);
    font-family: var(--font-ui);
    font-size: var(--t-micro); font-weight: 600;
    letter-spacing: var(--ls-tag); text-transform: uppercase;
    color: var(--ink-60);
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
  }
  .tab td {
    display: table-cell; padding: var(--s2) var(--s3);
    vertical-align: middle; line-height: 1.35;
  }
  /* Tabela densa: a linha precisa caber no olho de quem varre 20 de
     uma vez. A segunda linha da celula (projeto, cargo) fica menor e
     mais apagada em vez de ocupar altura cheia. */
  .tab td .micro { display: block; margin-top: 1px; }
  .tab th { padding: var(--s2) var(--s3); }
  .tab td::before { display: none; }
  .tab td:first-child { font-size: var(--t-xs); padding: var(--s3); }
  .tab th.num, .tab td.num { text-align: right; font-variant-numeric: tabular-nums; }
}

/* Faixa do modo vazio. Caramelo, nao vermelho: nao e falha, e um
   modo de conferencia. Mas precisa gritar, senao a tela zerada
   passa por estado real da operacao. */
.modovazio {
  position: sticky; top: 0; z-index: calc(var(--z-appbar) + 1);
  padding: var(--s2) var(--s4);
  background: var(--caramelo); color: #1a1206;
  font-family: var(--font-ui);
  font-size: var(--t-micro); line-height: 1.5;
  text-align: center;
}
.modovazio a { color: inherit; }

/* ------------------------------------------------------------
   CAMPO DE FORMULARIO

   O sistema nao tinha: cada tela repetia o mesmo estilo inline, e
   por isso os formularios nunca ficaram iguais. Medidas do pacote —
   raio de input 12px, borda .12, alvo tocavel 44px.
   ------------------------------------------------------------ */
.campo { display: grid; gap: var(--s2); }
.campo__r {
  font-family: var(--font-ui);
  font-size: var(--t-rotulo); font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-60);
}
.campo__i {
  width: 100%;
  min-height: var(--alvo-min);
  padding: var(--s3) var(--s4);
  border: 1px solid rgba(var(--txt-rgb), .12);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.campo__i:focus {
  outline: none;
  border-color: var(--lime);
  box-shadow: var(--glow-lime);
}
.campo__i::placeholder { color: var(--ink-60); }
textarea.campo__i { min-height: 6rem; resize: vertical; line-height: 1.6; }

/* ── EXECUÇÃO HUMANA (tela Travas) ───────────────────────────────────────────
   As travas que só uma pessoa destrava. Tudo aqui sai de token: cor literal
   em JS de tela é o que o guarda de tema recusa, e com razão — foi assim que
   um creme sobre branco passou despercebido nos dois temas. */
.th-chip {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  padding: 11px 13px; border-radius: 12px; text-align: left; cursor: pointer;
  border: 1px solid rgba(var(--txt-rgb), .12); background: transparent;
  color: inherit; font-family: inherit; transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.th-chip:hover { border-color: rgba(var(--txt-rgb), .28); }
.th-chip.escolhido { border-color: rgba(var(--txt-rgb), .45); background: rgba(var(--txt-rgb), .05); }
.th-chip-n { font-family:var(--font-display); font-size: 23px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.th-chip-t { font-size: 13px; font-weight: 600; }
.th-chip-e { font-size: 12px; line-height: 1.45; color: var(--ink-60); }

.th-trava { border: 1px solid rgba(var(--txt-rgb), .12); border-radius: 13px; overflow: hidden; }
.th-trava.aberto { border-color: rgba(var(--txt-rgb), .3); }
.th-cabeca { display: flex; gap: 12px; align-items: flex-start; padding: 12px 15px; cursor: pointer; }
.th-cabeca:hover { background: rgba(var(--txt-rgb), .03); }
.th-id {
  font-family:var(--font-mono); font-size: 12px; font-weight: 700;
  color: var(--ink-60); min-width: 42px; padding-top: 2px;
}
.th-corpo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.th-titulo { font-size: 13px; font-weight: 600; line-height: 1.4; }
.th-falta { font-size: 12px; line-height: 1.55; color: var(--ink-60); }
.th-destrava { font-size: 12px; line-height: 1.5; color: var(--ink-60); font-family:var(--font-ui); }
.th-decidida { font-size: 12px; line-height: 1.55; color: var(--ink-80); margin-top: 3px; }
.th-retomar { font-size: 12px; line-height: 1.55; color: rgba(var(--aviso-forte-rgb), 1); }
.th-diverge { font-size: 12px; line-height: 1.5; color: var(--aviso-forte); margin-top: 2px; }
.th-nat {
  font-family:var(--font-ui); font-size: 12px; letter-spacing: .06em;
  text-transform: uppercase; white-space: nowrap; padding: 4px 9px; border-radius: 999px;
  border: 1px solid currentColor; opacity: .85; align-self: flex-start;
}
/* O ponto de interrogação: a classificação empatou entre duas naturezas e a
   tela pede confirmação em vez de afirmar. */
.th-duvida { margin-left: 4px; font-weight: 700; opacity: .75; cursor: help; }

.th-acoes { padding: 0 15px 14px; display: flex; flex-direction: column; gap: 6px; border-top: 1px solid rgba(var(--txt-rgb), .08); padding-top: 12px; }
.th-rot { font-family:var(--font-ui); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-60); }
.th-campo {
  width: 100%; padding: 8px 11px; border-radius: 9px; font-family: inherit; font-size: 13px;
  line-height: 1.5; border: 1px solid rgba(var(--txt-rgb), .18); background: transparent; color: inherit;
}
.th-campo:focus-visible { outline: 2px solid rgba(var(--txt-rgb), .4); outline-offset: 1px; }
.th-botoes { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }

@media (max-width: 640px) {
  .th-cabeca { flex-wrap: wrap; }
  .th-nat { order: 3; }
}

/* Filtro de estado da tela Travas. Botão em vez de <select> porque
   `selected="{{ }}"` interpolado seleciona sempre — a presença do atributo
   booleano é o que vale em HTML, não o valor. */
.th-filtro {
  padding: 6px 13px; border-radius: 999px; font-size: 13px; font-family: inherit;
  border: 1px solid rgba(var(--txt-rgb), .16); background: transparent; color: inherit; cursor: pointer;
  transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.th-filtro:hover { border-color: rgba(var(--txt-rgb), .34); }
.th-filtro.ativo { background: rgba(var(--txt-rgb), .1); border-color: rgba(var(--txt-rgb), .42); font-weight: 600; }
.th-botoes [aria-disabled="true"] { opacity: .5; pointer-events: none; }

/* As ações de um clique de cada trava. Ficam SEMPRE visíveis no cartão, e não
   atrás do clique que abre a gaveta de decisão: o ponto de existirem é a
   pessoa não ter de procurar. */
.th-acoes-rapidas { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 15px 12px 69px; }
.th-acao {
  font-size: 12px; font-family: inherit; padding: 5px 11px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(var(--txt-rgb), .2); background: transparent; color: inherit;
  transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.th-acao:hover { border-color: rgba(var(--txt-rgb), .45); background: rgba(var(--txt-rgb), .05); }
.th-acao:focus-visible { outline: 2px solid rgba(var(--txt-rgb), .45); outline-offset: 1px; }
.th-sem-acao {
  padding: 0 15px 12px 69px; margin: 0; font-size: 12px; line-height: 1.5;
  color: var(--ink-60);
}
@media (max-width: 640px) {
  .th-acoes-rapidas, .th-sem-acao { padding-left: 15px; }
}

/* A entrega do segredo à mão, quando o navegador não deixa copiar sozinho.
   Fora do fluxo da página de propósito: é uma coisa só, que se resolve e
   fecha. O valor nunca entra no estado da tela. */
.th-segredo {
  position: fixed; inset: auto 0 0 0; z-index: 50;
  display: flex; flex-direction: column; gap: 9px;
  padding: 18px 22px; background: var(--surface, var(--bg));
  border-top: 2px solid var(--aviso-forte);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, .28);
}
.th-segredo-rot { font-size: 13px; line-height: 1.55; color: var(--ink-80); }
.th-segredo-campo {
  width: 100%; padding: 10px 13px; border-radius: 9px; font-size: 15px;
  font-family:var(--font-mono); letter-spacing: .02em;
  border: 1px solid rgba(var(--txt-rgb), .3); background: transparent; color: inherit;
}
.th-segredo button { align-self: flex-start; }

/* Arranjos de logotipo propostos (item 3). O motor existia com rota e teste;
   nenhuma tela o chamava, e quem quisesse a proposta precisava saber a URL. */
.logo-arranjo {
  margin-top: 8px; padding: 9px 11px;
  border: 1px solid rgba(var(--txt-rgb), .12); border-radius: 11px;
}
.logo-arranjo-nome { font-size: 13px; font-weight: 600; }
.logo-arranjo p { margin: 3px 0 0; }
