/* ==========================================================================
   FOCO — Implantação Comercial · Design System (CSS puro / vanilla)
   Paleta Cecconi / ProGrowth · Método ProGrowth · pt-BR
   --------------------------------------------------------------------------
   Sumário
   1.  Tokens (:root) — cores, tipografia, espaço, radius, sombra, motion
   2.  Dark theme ([data-theme="dark"])
   3.  Reset & base
   4.  Tipografia utilitária (eyebrow, muted, divider, empty)
   5.  Layout app (.app, .sidebar, .main, .topbar, .screen)
   6.  Cards & grid (.card, .grid, double-bezel)
   7.  KPI · progress · ring · stat-row
   8.  Badges · dots · pills · tags
   9.  Botões (.btn, .icon-btn, .btn__ico)
   10. Abas (.tabs / .tab / .tabpanel)
   11. Jornada / flow (.journey, .stage, .flow)
   12. Tabela (.table-wrap, .table)
   13. Timeline
   14. Kanban (.board)
   15. Docs (.folders, .doc-list)
   16. Reunião (.meeting, .ata, .ai-extract)
   17. Chat / IA (.chat, .msg, .suggest)
   18. Auth / Login (.auth)
   19. Misc (.avatar, .checklist, etc.)
   20. Modais / drawers (.modal)
   21. Responsivo (< 900px) + a11y / reduced-motion
   ========================================================================== */

/* ==========================================================================
   1. TOKENS — :root (tema claro = padrão)
   ========================================================================== */
:root {
  /* — Paleta base MannAI / Foco no Comercial (BRAND-005) — */
  --navy-900: #0B132B;   /* azul-noite */
  --navy-800: #12203f;
  --navy-700: #1c2f52;
  --red-500:  #0A84FF;   /* remapeado -> AZUL primário MannAI (identidade) */
  --red-400:  #4C9DFF;   /* azul claro (hover/realces) */
  --gold-500: #F59E0B;   /* dourado CTA */
  --gold-400: #FBBF24;
  --green-500:#22C55E;
  --amber-500:#F59E0B;
  --danger-500:#EF4444;
  --info-500: #3B82F6;   /* azul suave ("em andamento") */
  --cyan-500: #00E0FF;   /* ciano assinatura (glow/hover/IA) */
  --cyan-ink: #008FA5;   /* ciano legível sobre fundo claro */
  --violet-500:#8B5CF6;  /* IA / agente */
  --violet-soft:#A78BFA;

  /* — Tints derivados (uso em fundos suaves de status) — */
  --green-50:  rgba(34,197,94,.12);
  --gold-50:   rgba(245,158,11,.14);
  --amber-50:  rgba(245,158,11,.14);
  --danger-50: rgba(239,68,68,.12);
  --info-50:   rgba(59,130,246,.12);
  --red-50:    rgba(10,132,255,.12);

  /* — Superfícies (tema claro) — */
  --bg:        #F8FAFC;   /* fundo da app */
  --bg-soft:   #eef0f6;   /* faixas/subdivisões */
  --surface:   #ffffff;   /* cards */
  --surface-2: #fbfcfe;   /* casca externa do double-bezel */
  --surface-3: #f1f3f9;   /* hovers leves */
  --elevated:  #ffffff;   /* popovers / modais */

  /* — Texto — */
  --text:      #1b2233;
  --text-strong:#0f1629;
  --muted:     #66708a;
  --muted-2:   #5d6678;   /* >=4.5:1 sobre claro (placeholders/badges) */
  --on-navy:   #eef1f8;
  --on-navy-muted: #9aa6c4;

  /* — Linhas / hairlines (NUNCA cinza 1px sólido) — */
  --line:      rgba(15,22,41,.07);
  --line-2:    rgba(15,22,41,.12);
  --line-strong: rgba(15,22,41,.18);
  --line-navy: rgba(255,255,255,.08);

  /* — Acentos semânticos legíveis sobre fundo claro — */
  --accent:        var(--red-500);
  --accent-hover:  #0069d1;
  --gold:          var(--gold-500);
  --gold-ink:      #8a6000;   /* texto dourado legível no claro */
  --green-ink:     #0a7c63;
  --info-ink:      #2a52ad;
  --danger-ink:    #b32426;
  --amber-ink:     #8a6000;

  /* — Tipografia — */
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-ui:      "Inter", system-ui, -apple-system, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  --fs-xs:   .72rem;
  --fs-sm:   .8125rem;
  --fs-base: .9rem;
  --fs-md:   1rem;
  --fs-lg:   1.15rem;
  --fs-xl:   1.45rem;
  --fs-2xl:  1.9rem;
  --fs-3xl:  2.45rem;

  /* — Espaçamento (escala 4px) — */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-7: 32px;
  --sp-8: 40px;
  --sp-9: 56px;

  /* — Radius — */
  --r-xs: 7px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 24px;
  --r-pill: 999px;

  /* — Sombras difusas (nunca duras) — */
  --sh-1:  0 1px 2px rgba(16,24,40,.04);
  --sh-2:  0 1px 2px rgba(16,24,40,.04), 0 10px 30px -16px rgba(16,24,40,.18);
  --sh-3:  0 2px 4px rgba(16,24,40,.05), 0 24px 48px -22px rgba(16,24,40,.30);
  --sh-pop:0 6px 14px rgba(16,24,40,.10), 0 28px 60px -24px rgba(16,24,40,.40);
  --sh-accent: 0 8px 22px -10px rgba(10,132,255,.45);

  /* — Layout — */
  --sidebar-w: 256px;
  --topbar-h:  64px;

  /* — Motion (sempre cubic custom, nunca linear) — */
  --ease:     cubic-bezier(0.32,0.72,0,1);
  --ease-out: cubic-bezier(0.16,1,0.3,1);
  --t-fast:   .16s;
  --t-base:   .26s;
  --t-slow:   .42s;
}

/* ==========================================================================
   2. DARK THEME
   ========================================================================== */
[data-theme="dark"] {
  --bg:        #0B132B;
  --bg-soft:   #101d3a;
  --surface:   #1E293B;
  --surface-2: #22304a;
  --surface-3: #283751;
  --elevated:  #1E293B;

  --text:      #e9edf7;
  --text-strong:#ffffff;
  --muted:     #9aa6c4;
  --muted-2:   #7a87a8;

  --line:      rgba(255,255,255,.08);
  --line-2:    rgba(255,255,255,.12);
  --line-strong: rgba(255,255,255,.18);

  --accent-hover: #4C9DFF;
  --gold-ink:  #FBBF24;
  --green-ink: #4ADE80;
  --info-ink:  #7aa3f5;
  --danger-ink:#ff7a7c;
  --amber-ink: #FBBF24;

  --green-50:  rgba(34,197,94,.18);
  --gold-50:   rgba(245,158,11,.18);
  --amber-50:  rgba(245,158,11,.18);
  --danger-50: rgba(239,68,68,.20);
  --info-50:   rgba(59,130,246,.20);
  --red-50:    rgba(10,132,255,.20);

  --sh-1:  0 1px 2px rgba(0,0,0,.35);
  --sh-2:  0 1px 2px rgba(0,0,0,.35), 0 12px 32px -16px rgba(0,0,0,.65);
  --sh-3:  0 2px 6px rgba(0,0,0,.45), 0 26px 52px -22px rgba(0,0,0,.75);
  --sh-pop:0 8px 20px rgba(0,0,0,.5), 0 30px 64px -24px rgba(0,0,0,.85);
}

/* ==========================================================================
   3. RESET & BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

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

body {
  font-family: var(--font-ui);
  font-size: var(--fs-base);
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background var(--t-base) var(--ease), color var(--t-base) var(--ease);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.01em;
  color: var(--text-strong);
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
svg { display: block; }

::selection { background: rgba(10,132,255,.22); }

/* Foco de teclado visível e consistente */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}
:focus:not(:focus-visible) { outline: none; }

/* Scrollbar discreta */
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: var(--r-pill);
  border: 3px solid transparent;
  background-clip: content-box;
}

/* Alternância de visão: auth vs app */
.auth { display: none; }
.app  { display: none; }
body[data-view="auth"] .auth { display: grid; }
body[data-view="app"]  .app  { display: grid; }

/* ==========================================================================
   4. TIPOGRAFIA UTILITÁRIA
   ========================================================================== */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--red-50);
}
.eyebrow--gold { color: var(--gold-ink); background: var(--gold-50); }
.eyebrow--info { color: var(--info-ink); background: var(--info-50); }

.muted   { color: var(--muted); }

/* Numeral mono (data-grade): JetBrains Mono com algarismos tabulares */
.mono {
  font-family: var(--font-mono);
  font-feature-settings: 'tnum' 1, 'zero' 1;
  letter-spacing: -.01em;
}

.divider { height: 1px; background: var(--line); border: 0; margin: var(--sp-5) 0; }

/* Divisor com rótulo central (linhas dos dois lados via pseudo-elementos) */
.divider--label {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  height: auto;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
}
.divider--label::before,
.divider--label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.divider--label span { flex: 0 0 auto; }

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  text-align: center;
  padding: var(--sp-8) var(--sp-5);
  color: var(--muted);
  border: 1.5px dashed var(--line-2);
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.empty strong { color: var(--text); font-family: var(--font-display); }

/* ==========================================================================
   5. LAYOUT APP
   ========================================================================== */
.app {
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: 100vh;
  min-height: 100vh;
}

/* — Sidebar — */
.sidebar {
  display: flex;
  flex-direction: column;
  background: var(--navy-900);
  color: var(--on-navy);
  border-right: 1px solid var(--line-navy);
  padding: var(--sp-5) var(--sp-4);
  overflow-y: auto;
}
[data-theme="dark"] .sidebar { background: #0c1322; }

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 0 var(--sp-2) var(--sp-5);
  margin-bottom: var(--sp-4);
  border-bottom: 1px solid var(--line-navy);
}
.sidebar__brand .brand-mark {
  flex: 0 0 auto;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, var(--red-500), var(--red-400));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  box-shadow: var(--sh-accent);
}
.sidebar__brand .brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.sidebar__brand .brand-text strong {
  font-family: var(--font-display);
  font-size: 1.05rem; font-weight: 700; color: #fff; letter-spacing: -.01em;
}
.sidebar__brand .brand-text span {
  font-size: var(--fs-xs); color: var(--on-navy-muted);
  text-transform: uppercase; letter-spacing: .12em;
}

.sidebar__nav { display: flex; flex-direction: column; gap: var(--sp-5); flex: 1; }

.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-group__label {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--on-navy-muted);
  padding: 0 var(--sp-3);
  margin-bottom: var(--sp-2);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  width: 100%;
  padding: 10px var(--sp-3);
  border-radius: var(--r-sm);
  color: var(--on-navy-muted);
  font-size: var(--fs-base);
  font-weight: 500;
  text-align: left;
  position: relative;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.nav-item__icon {
  flex: 0 0 auto;
  width: 20px; height: 20px;
  display: grid; place-items: center;
  color: currentColor;
  opacity: .85;
}
.nav-item__icon svg { width: 18px; height: 18px; }
.nav-item .nav-item__badge {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  background: rgba(255,255,255,.08);
  color: var(--on-navy);
  padding: 1px 8px;
  border-radius: var(--r-pill);
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item:active { transform: scale(.985); }
.nav-item.is-active {
  background: linear-gradient(90deg, rgba(10,132,255,.20), rgba(10,132,255,.04));
  color: #fff;
}
.nav-item.is-active::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--sp-4));
  top: 50%; transform: translateY(-50%);
  width: 3px; height: 60%;
  border-radius: var(--r-pill);
  background: var(--accent);
  box-shadow: var(--sh-accent);
}
.nav-item.is-active .nav-item__icon { opacity: 1; color: var(--red-400); }

.sidebar__footer {
  margin-top: var(--sp-5);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line-navy);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.sidebar__footer .footer-meta { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.sidebar__footer .footer-meta strong { font-size: var(--fs-sm); color: #fff; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar__footer .footer-meta span { font-size: var(--fs-xs); color: var(--on-navy-muted); }
.sidebar__footer .icon-btn { margin-left: auto; color: var(--on-navy-muted); }
.sidebar__footer .icon-btn:hover { color: #fff; background: rgba(255,255,255,.08); }

/* — Main — */
.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
  overflow: hidden;
}

.topbar {
  flex: 0 0 auto;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: 0 var(--sp-7);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.topbar__title {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--text-strong);
  letter-spacing: -.01em;
}
.topbar__search {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex: 1;
  max-width: 420px;
  margin-left: var(--sp-4);
  padding: 9px var(--sp-3);
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-1);
  color: var(--muted);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.topbar__search:focus-within { border-color: var(--line-2); box-shadow: var(--sh-2); }
.topbar__search svg { width: 16px; height: 16px; flex: 0 0 auto; }
.topbar__search input {
  border: none; background: none; outline: none;
  flex: 1; color: var(--text); font-size: var(--fs-base);
}
.topbar__search input::placeholder { color: var(--muted-2); }
.topbar__search kbd {
  font-family: var(--font-mono); font-size: var(--fs-xs);
  color: var(--muted-2); border: 1px solid var(--line-2);
  border-radius: var(--r-xs); padding: 1px 6px;
}
.topbar__actions { display: flex; align-items: center; gap: var(--sp-2); margin-left: auto; }

/* — Screen container — */
.main > .screen-host,
.screen { }
.screen {
  display: none;
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-7);
  animation: screenIn var(--t-base) var(--ease) both;
}
.screen.is-active { display: block; }

@keyframes screenIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page-head { margin-bottom: var(--sp-6); }
.page-head__title {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 700;
  letter-spacing: -.02em;
  margin-top: var(--sp-2);
}
.page-head__subtitle {
  color: var(--muted);
  font-size: var(--fs-md);
  margin-top: var(--sp-2);
  max-width: 68ch;
}

/* ==========================================================================
   6. CARDS & GRID
   ========================================================================== */
.grid { display: grid; gap: var(--sp-5); }
.grid--2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid--bento {
  grid-template-columns: repeat(4, minmax(0,1fr));
  grid-auto-rows: minmax(120px, auto);
}
.grid--bento > .span-2 { grid-column: span 2; }
.grid--bento > .span-3 { grid-column: span 3; }
.grid--bento > .row-2  { grid-row: span 2; }

/* Double-bezel: casca externa sutil + núcleo */
.card {
  position: relative;
  background: var(--surface);
  border-radius: var(--r-md);
  padding: var(--sp-5);
  box-shadow:
    0 0 0 1px var(--line),
    var(--sh-2);
  transition: box-shadow var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}
/* casca externa do double-bezel */
.card::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: calc(var(--r-md) + 4px);
  background: var(--surface-2);
  box-shadow: 0 0 0 1px var(--line);
  z-index: -1;
  opacity: .9;
  pointer-events: none;
}
.card:hover { box-shadow: 0 0 0 1px var(--line-2), var(--sh-3); }

.card--accent {
  background: linear-gradient(160deg, var(--surface) 60%, color-mix(in srgb, var(--red-500) 7%, var(--surface)));
  box-shadow: 0 0 0 1px var(--line), var(--sh-2);
}
.card--accent::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  border-top: 3px solid var(--accent);
  border-radius: var(--r-md) var(--r-md) 0 0;
  pointer-events: none;
  -webkit-mask: linear-gradient(#000 0 0) top / 100% 3px no-repeat;
          mask: linear-gradient(#000 0 0) top / 100% 3px no-repeat;
}

.card--navy {
  background: linear-gradient(160deg, var(--navy-800), var(--navy-900));
  color: var(--on-navy);
  box-shadow: var(--sh-3);
}
.card--navy::before { display: none; }
.card--navy .card__title,
.card--navy h1, .card--navy h2, .card--navy h3 { color: #fff; }
.card--navy .muted { color: var(--on-navy-muted); }

.card--ghost {
  background: transparent;
  box-shadow: none;
  border: 1.5px dashed var(--line-2);
}
.card--ghost::before { display: none; }
.card--ghost:hover { border-color: var(--line-strong); box-shadow: none; }

.card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
.card__title {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 600;
  letter-spacing: -.01em;
}
.card__tools { display: flex; align-items: center; gap: var(--sp-2); flex: 0 0 auto; }
.card__body { color: var(--text); }
.card__body > * + * { margin-top: var(--sp-3); }

.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
}
.stat-row + .stat-row { border-top: 1px solid var(--line); }
.stat-row__label { color: var(--muted); font-size: var(--fs-sm); }
.stat-row__value { font-family: var(--font-mono); font-weight: 600; color: var(--text-strong); }

/* ==========================================================================
   7. KPI · PROGRESS · RING
   ========================================================================== */
.kpi { display: flex; flex-direction: column; gap: var(--sp-2); }
.kpi__label {
  font-size: var(--fs-sm);
  color: var(--muted);
  font-weight: 500;
  letter-spacing: .01em;
}
.kpi__value {
  font-family: var(--font-mono);
  font-size: var(--fs-3xl);
  font-weight: 700;
  line-height: 1;
  color: var(--text-strong);
  letter-spacing: -.02em;
}
.kpi__value .unit { font-size: .5em; color: var(--muted); font-weight: 600; margin-left: 2px; }
.kpi__meta { font-size: var(--fs-sm); color: var(--muted); }

.kpi__trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  width: fit-content;
}
.kpi__trend.is-up   { color: var(--green-ink);  background: var(--green-50); }
.kpi__trend.is-down { color: var(--danger-ink); background: var(--danger-50); }
.kpi__trend svg { width: 13px; height: 13px; }

/* Progress bar */
.progress { display: flex; flex-direction: column; gap: var(--sp-2); }
.progress__track {
  height: 9px;
  border-radius: var(--r-pill);
  background: var(--bg-soft);
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(15,22,41,.06);
}
[data-theme="dark"] .progress__track { box-shadow: inset 0 1px 2px rgba(0,0,0,.4); }
.progress__fill {
  height: 100%;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--red-500), var(--red-400));
  transition: width var(--t-slow) var(--ease);
  position: relative;
}
.progress__fill.is-gold  { background: linear-gradient(90deg, var(--gold-500), var(--gold-400)); }
.progress__fill.is-green { background: linear-gradient(90deg, var(--green-500), #2fe0bb); }
.progress__fill.is-info  { background: linear-gradient(90deg, var(--info-500), #6f97ee); }
.progress__meta {
  display: flex; justify-content: space-between;
  font-size: var(--fs-xs); color: var(--muted);
  font-family: var(--font-mono);
}

/* Ring (SVG donut) */
.ring { position: relative; width: 132px; height: 132px; display: grid; place-items: center; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring__track { fill: none; stroke: var(--bg-soft); stroke-width: 12; }
.ring__fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 12;
  stroke-linecap: round;
  transition: stroke-dashoffset var(--t-slow) var(--ease);
}
.ring__fill.is-gold  { stroke: var(--gold-500); }
.ring__fill.is-green { stroke: var(--green-500); }
.ring__fill.is-info  { stroke: var(--info-500); }
.ring__label {
  position: absolute;
  display: flex; flex-direction: column; align-items: center; line-height: 1.05;
}
.ring__label .pct {
  font-family: var(--font-mono); font-size: 1.6rem; font-weight: 700; color: var(--text-strong);
}
.ring__label .cap { font-size: var(--fs-xs); color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }

/* ==========================================================================
   8. BADGES · DOTS · PILLS · TAGS
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .01em;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: var(--bg-soft);
  color: var(--muted);
  white-space: nowrap;
}
.badge::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; flex: 0 0 auto;
}
.badge--done        { color: var(--green-ink);  background: var(--green-50); }
.badge--doing       { color: var(--info-ink);   background: var(--info-50); }
.badge--wait-client { color: var(--amber-ink);  background: var(--amber-50); }
.badge--wait-foco   { color: var(--gold-ink);   background: var(--gold-50); }
.badge--late        { color: var(--danger-ink); background: var(--danger-50); }
.badge--gold {
  color: #6b4a00;
  background: linear-gradient(120deg, var(--gold-400), var(--gold-500));
  box-shadow: 0 4px 12px -6px rgba(245,158,11,.7);
}
[data-theme="dark"] .badge--gold { color: #2b1d00; }
.badge--gold::before { background: #6b4a00; }
[data-theme="dark"] .badge--gold::before { background: #2b1d00; }

/* Dot (sem texto / inline) */
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--muted-2); flex: 0 0 auto; }
.dot--done        { background: var(--green-500); }
.dot--doing       { background: var(--info-500); }
.dot--wait-client { background: var(--amber-500); }
.dot--wait-foco   { background: var(--gold-500); }
.dot--late        { background: var(--danger-500); }
.dot--gold        { background: var(--gold-500); box-shadow: 0 0 0 3px var(--gold-50); }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-xs); font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  border: 1px solid var(--line);
  color: var(--text);
}

.tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--fs-xs); font-weight: 500;
  padding: 2px 8px;
  border-radius: var(--r-xs);
  background: var(--bg-soft);
  color: var(--muted);
}

/* Pills/tags interativos (filtros): hover + estado selecionado */
.pill[data-filter], .tag[data-filter] {
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease),
              box-shadow var(--t-base) var(--ease);
}
.pill[data-filter]:hover, .tag[data-filter]:hover { background: var(--surface-3); color: var(--text); }
.pill.is-active {
  background: linear-gradient(135deg, var(--red-500), var(--red-400));
  border-color: transparent;
  color: #fff;
  box-shadow: var(--sh-accent);
}
.tag.is-active {
  background: var(--red-50);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--red-500) 28%, transparent);
}
[data-theme="dark"] .tag.is-active { color: var(--red-400); }

/* ==========================================================================
   9. BOTÕES
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font-family: var(--font-ui);
  font-size: var(--fs-base);
  font-weight: 600;
  padding: 11px var(--sp-5);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 0 0 1px var(--line), var(--sh-1);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-base) var(--ease),
              background var(--t-base) var(--ease), color var(--t-base) var(--ease);
  white-space: nowrap;
}
.btn:hover { box-shadow: 0 0 0 1px var(--line-2), var(--sh-2); }
.btn:active { transform: scale(.98); }

.btn--primary {
  background: linear-gradient(135deg, var(--red-500), var(--red-400));
  color: #fff;
  box-shadow: var(--sh-accent);
}
.btn--primary:hover {
  background: linear-gradient(135deg, var(--accent-hover), var(--red-500));
  box-shadow: 0 12px 28px -10px rgba(10,132,255,.65);
}

.btn--gold {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
  color: #4a3200;
  box-shadow: 0 8px 22px -10px rgba(245,158,11,.6);
}
.btn--gold:hover { box-shadow: 0 12px 28px -10px rgba(245,158,11,.7); }

.btn--soft {
  background: var(--red-50);
  color: var(--accent);
  box-shadow: none;
}
[data-theme="dark"] .btn--soft { color: var(--red-400); }
.btn--soft:hover { background: color-mix(in srgb, var(--red-500) 16%, transparent); box-shadow: none; }

.btn--ghost {
  background: transparent;
  box-shadow: none;
  color: var(--muted);
}
.btn--ghost:hover { background: var(--surface-3); color: var(--text); box-shadow: none; }

.btn--sm { padding: 7px var(--sp-3); font-size: var(--fs-sm); }

.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }

/* "Botão dentro do botão": círculo da seta */
.btn__ico {
  display: inline-grid;
  place-items: center;
  width: 22px; height: 22px;
  margin-right: -6px; margin-left: 2px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,.22);
  transition: transform var(--t-base) var(--ease), background var(--t-base) var(--ease);
}
.btn__ico svg { width: 13px; height: 13px; }
.btn:hover .btn__ico { transform: translateX(2px); background: rgba(255,255,255,.32); }
.btn--soft .btn__ico, .btn--ghost .btn__ico { background: var(--red-50); }
.btn--gold .btn__ico { background: rgba(74,50,0,.18); }

/* Icon-only */
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: var(--r-sm);
  color: var(--muted);
  background: transparent;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn.has-dot { position: relative; }
.icon-btn.has-dot::after {
  content: ""; position: absolute; top: 8px; right: 9px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 2px var(--bg);
}

/* ==========================================================================
   10. ABAS
   ========================================================================== */
.tabs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: var(--r-pill);
  background: var(--bg-soft);
  box-shadow: inset 0 1px 2px rgba(15,22,41,.05);
  margin-bottom: var(--sp-5);
}
[data-theme="dark"] .tabs { box-shadow: inset 0 1px 2px rgba(0,0,0,.4); }
.tab {
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--muted);
  padding: 8px var(--sp-4);
  border-radius: var(--r-pill);
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), box-shadow var(--t-base) var(--ease);
}
.tab:hover { color: var(--text); }
.tab.is-active {
  color: var(--text-strong);
  background: var(--surface);
  box-shadow: var(--sh-1), 0 0 0 1px var(--line);
}
.tabpanel { display: none; animation: screenIn var(--t-base) var(--ease) both; }
.tabpanel.is-active { display: block; }

/* ==========================================================================
   11. JORNADA / FLOW
   ========================================================================== */
.journey {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.journey__step {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line), var(--sh-1);
  transition: box-shadow var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}
.journey__step:hover { box-shadow: 0 0 0 1px var(--line-2), var(--sh-2); transform: translateX(2px); }
.journey__num {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-weight: 700;
  background: var(--bg-soft);
  color: var(--muted);
}
.journey__name { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.journey__name strong { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-md); }
.journey__name span { font-size: var(--fs-sm); color: var(--muted); }
.journey__bar { width: 120px; }

.journey__step.is-done .journey__num  { background: var(--green-50); color: var(--green-ink); }
.journey__step.is-doing .journey__num { background: var(--info-50); color: var(--info-ink); }
.journey__step.is-wait .journey__num  { background: var(--amber-50); color: var(--amber-ink); }
.journey__step.is-doing { box-shadow: 0 0 0 1px color-mix(in srgb,var(--info-500) 30%, var(--line)), var(--sh-2); }

/* Stage (etapa expandida com subitens) */
.stage {
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line), var(--sh-2);
  overflow: hidden;
}
.stage + .stage { margin-top: var(--sp-4); }
.stage__head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.stage__head h3 { font-size: var(--fs-md); flex: 1; }
.subitems { padding: var(--sp-3) var(--sp-5) var(--sp-4); display: flex; flex-direction: column; }
.subitem {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
}
.subitem + .subitem { border-top: 1px solid var(--line); }
.subitem__name { flex: 1; font-size: var(--fs-base); }
.subitem__name .muted { display: block; font-size: var(--fs-xs); margin-top: 2px; }

.deliverables {
  display: flex; flex-wrap: wrap; gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-5);
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
}

/* Flow horizontal */
.flow {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  padding: var(--sp-3) 0;
}
.flow__step {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  text-align: center;
  position: relative;
  padding: 0 var(--sp-5);
  min-width: 120px;
}
.flow__step::after {
  content: "";
  position: absolute;
  top: 18px; left: 50%;
  width: 100%; height: 2px;
  background: var(--line-2);
  z-index: 0;
}
.flow__step:last-child::after { display: none; }
.flow__step .flow__dot {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 0 0 2px var(--line-2);
  color: var(--muted);
  font-family: var(--font-mono); font-weight: 700;
  position: relative; z-index: 1;
  transition: box-shadow var(--t-base) var(--ease), color var(--t-base) var(--ease);
}
.flow__step .flow__name { font-size: var(--fs-sm); color: var(--muted); font-weight: 500; }
.flow__step.is-done .flow__dot {
  background: var(--green-500); color: #fff; box-shadow: 0 0 0 2px var(--green-500);
}
.flow__step.is-done::after { background: var(--green-500); }
.flow__step.is-current .flow__dot {
  background: var(--accent); color: #fff;
  box-shadow: 0 0 0 3px var(--red-50), 0 0 0 2px var(--accent);
}
.flow__step.is-current .flow__name,
.flow__step.is-done .flow__name { color: var(--text); }

/* ==========================================================================
   12. TABELA
   ========================================================================== */
.table-wrap {
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line), var(--sh-2);
  overflow: hidden;
  overflow-x: auto;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-base);
}
.table thead th {
  text-align: left;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table tbody td {
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table__row, .table tbody tr { transition: background var(--t-fast) var(--ease); }
.table__row:hover, .table tbody tr:hover { background: var(--surface-3); }
.table td.num, .table th.num { text-align: right; font-family: var(--font-mono); }
.table td .muted { font-size: var(--fs-sm); }

/* ==========================================================================
   13. TIMELINE
   ========================================================================== */
.timeline {
  position: relative;
  padding-left: var(--sp-6);
  display: flex; flex-direction: column; gap: var(--sp-5);
}
.timeline::before {
  content: "";
  position: absolute;
  left: 7px; top: 6px; bottom: 6px;
  width: 2px;
  background: var(--line-2);
  border-radius: var(--r-pill);
}
.timeline__item { position: relative; }
.timeline__dot {
  position: absolute;
  left: calc(-1 * var(--sp-6) + 2px);
  top: 4px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--bg);
}
.timeline__dot.is-done  { background: var(--green-500); }
.timeline__dot.is-doing { background: var(--info-500); }
.timeline__time {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--muted);
  margin-bottom: 4px;
}
.timeline__card {
  background: var(--surface);
  border-radius: var(--r-sm);
  padding: var(--sp-3) var(--sp-4);
  box-shadow: 0 0 0 1px var(--line), var(--sh-1);
}
.timeline__card strong { font-family: var(--font-display); font-weight: 600; display: block; margin-bottom: 2px; }
.timeline__card p { font-size: var(--fs-sm); color: var(--muted); }

/* ==========================================================================
   14. KANBAN
   ========================================================================== */
.board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 1fr);
  gap: var(--sp-4);
  overflow-x: auto;
  padding-bottom: var(--sp-3);
}
.board__col {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  background: var(--bg-soft);
  border-radius: var(--r-md);
  padding: var(--sp-3);
  min-height: 120px;
}
.board__col-head {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-2) 0;
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}
.board__col-head .count {
  margin-left: auto;
  font-family: var(--font-mono);
  background: var(--surface);
  color: var(--text);
  padding: 1px 9px;
  border-radius: var(--r-pill);
  box-shadow: 0 0 0 1px var(--line);
}
.task-card {
  background: var(--surface);
  border-radius: var(--r-sm);
  padding: var(--sp-3) var(--sp-4);
  box-shadow: 0 0 0 1px var(--line), var(--sh-1);
  cursor: grab;
  transition: box-shadow var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}
.task-card:hover { box-shadow: 0 0 0 1px var(--line-2), var(--sh-2); transform: translateY(-2px); }
.task-card:active { cursor: grabbing; transform: scale(.99); }
.task-card strong { font-size: var(--fs-base); font-weight: 600; display: block; margin-bottom: var(--sp-2); }
.task-card__meta {
  display: flex; align-items: center; gap: var(--sp-2);
  margin-top: var(--sp-3);
  font-size: var(--fs-xs); color: var(--muted);
}
.task-card__meta .avatar-stack { margin-left: auto; }

.prio {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: var(--fs-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
  padding: 2px 8px; border-radius: var(--r-xs);
}
.prio::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.prio--alta  { color: var(--danger-ink); background: var(--danger-50); }
.prio--media { color: var(--amber-ink);  background: var(--amber-50); }
.prio--baixa { color: var(--info-ink);   background: var(--info-50); }

/* ==========================================================================
   15. DOCS
   ========================================================================== */
.folders {
  display: flex; flex-wrap: wrap; gap: var(--sp-2);
  margin-bottom: var(--sp-5);
}
.folder {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  padding: 9px var(--sp-4);
  border-radius: var(--r-sm);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line);
  color: var(--muted);
  font-weight: 500; font-size: var(--fs-base);
  transition: color var(--t-fast) var(--ease), box-shadow var(--t-base) var(--ease), background var(--t-fast) var(--ease);
}
.folder svg { width: 17px; height: 17px; }
.folder:hover { color: var(--text); background: var(--surface-3); }
.folder .count { font-family: var(--font-mono); font-size: var(--fs-xs); opacity: .7; }
.folder.is-active {
  color: var(--accent);
  background: var(--red-50);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--red-500) 28%, transparent);
}
[data-theme="dark"] .folder.is-active { color: var(--red-400); }

.doc-list {
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line), var(--sh-2);
  overflow: hidden;
}
.doc-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  transition: background var(--t-fast) var(--ease);
}
.doc-row + .doc-row { border-top: 1px solid var(--line); }
.doc-row:hover { background: var(--surface-3); }
.doc-row__icon {
  width: 36px; height: 36px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: var(--r-sm);
  background: var(--bg-soft);
  color: var(--muted);
}
.doc-row__name { flex: 1; min-width: 0; }
.doc-row__name strong { font-weight: 600; font-size: var(--fs-base); display: block;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-row__meta {
  display: flex; align-items: center; gap: var(--sp-3);
  font-size: var(--fs-xs); color: var(--muted);
  font-family: var(--font-mono);
}
.version {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 600;
  padding: 1px 8px;
  border-radius: var(--r-pill);
  background: var(--bg-soft);
  color: var(--muted);
}
.version.is-latest { background: var(--green-50); color: var(--green-ink); }

/* ==========================================================================
   16. REUNIÃO
   ========================================================================== */
.meeting {
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line), var(--sh-2);
  overflow: hidden;
}
.meeting__head {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.meeting__head h3 { flex: 1; font-size: var(--fs-md); }
.attendees { display: flex; flex-direction: column; gap: var(--sp-3); padding: var(--sp-4) var(--sp-5); }
.attendees > strong, .ata > strong, .ai-extract > strong {
  font-family: var(--font-display); font-size: var(--fs-sm);
  text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
}
.ata {
  padding: var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: var(--sp-3);
}
.ata p { font-size: var(--fs-base); line-height: 1.65; }

.ai-extract {
  margin: var(--sp-4) var(--sp-5) var(--sp-5);
  padding: var(--sp-4);
  border-radius: var(--r-sm);
  background: linear-gradient(150deg, color-mix(in srgb,var(--info-500) 7%, var(--surface)), var(--surface));
  box-shadow: 0 0 0 1px color-mix(in srgb,var(--info-500) 22%, transparent);
  display: flex; flex-direction: column; gap: var(--sp-3);
}
.ai-extract > strong { color: var(--info-ink); display: flex; align-items: center; gap: var(--sp-2); }

/* ==========================================================================
   17. CHAT / IA
   ========================================================================== */
.chat {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 420px;
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line), var(--sh-2);
  overflow: hidden;
}
.chat__thread {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-5);
  display: flex; flex-direction: column; gap: var(--sp-4);
}
.msg { display: flex; gap: var(--sp-3); max-width: 82%; }
.msg__bubble {
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  font-size: var(--fs-base);
  line-height: 1.55;
  box-shadow: var(--sh-1);
}
.msg--ai .msg__bubble {
  background: var(--bg-soft);
  border-bottom-left-radius: var(--r-xs);
}
.msg--me {
  margin-left: auto;
  flex-direction: row-reverse;
}
.msg--me .msg__bubble {
  background: linear-gradient(135deg, var(--red-500), var(--red-400));
  color: #fff;
  border-bottom-right-radius: var(--r-xs);
  box-shadow: var(--sh-accent);
}
.msg__bubble .ts {
  display: block; margin-top: 4px;
  font-family: var(--font-mono); font-size: var(--fs-xs); opacity: .65;
}

.chat__composer {
  display: flex;
  align-items: flex-end;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
.chat__composer textarea {
  flex: 1;
  resize: none;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-base);
  max-height: 120px;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.chat__composer textarea:focus { outline: none; border-color: var(--line-2); box-shadow: var(--sh-2); }

.suggest { display: flex; flex-wrap: wrap; gap: var(--sp-2); padding: 0 var(--sp-4) var(--sp-3); background: var(--surface-2); }
.suggest__chip {
  font-size: var(--fs-sm);
  font-weight: 500;
  padding: 6px var(--sp-3);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--muted);
  box-shadow: 0 0 0 1px var(--line);
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.suggest__chip:hover { color: var(--accent); background: var(--red-50); transform: translateY(-1px); }
.suggest__chip:active { transform: scale(.97); }

/* ==========================================================================
   18. AUTH / LOGIN (sempre navy escuro)
   ========================================================================== */
.auth {
  grid-template-columns: 1.15fr .85fr;
  min-height: 100vh;
  position: relative;
  isolation: isolate;
  color: var(--on-navy);
  background:
    radial-gradient(1100px 620px at -5% -12%, rgba(0,224,255,.16), transparent 60%),
    radial-gradient(900px 620px at 106% 112%, rgba(10,132,255,.30), transparent 55%),
    linear-gradient(160deg, #0B132B 0%, #0e2a5e 55%, #0A84FF 130%);
}
/* textura de grade sutil sobre toda a tela de login */
.auth::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask: radial-gradient(120% 100% at 18% 0%, #000, transparent 72%);
          mask: radial-gradient(120% 100% at 18% 0%, #000, transparent 72%);
  pointer-events: none;
}

/* ----- HERO (coluna esquerda) ----- */
.auth__aside {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; justify-content: space-between; gap: var(--sp-7);
  padding: clamp(40px, 6vh, 72px) clamp(32px, 4.5vw, 76px);
}
.auth__brand { display: flex; align-items: center; gap: var(--sp-3); }
.auth__brand .brand-mark,
.auth__mobilebrand .brand-mark {
  width: 46px; height: 46px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 13px;
  background: linear-gradient(135deg, #0A84FF, #00E0FF);
  color: #fff;
  box-shadow: var(--sh-accent), inset 0 1px 0 rgba(255,255,255,.28);
}
.auth__brand .brand-text { display: flex; flex-direction: column; line-height: 1.12; }
.auth__brand .brand-text strong { font-family: var(--font-display); font-size: 1.25rem; color: #fff; letter-spacing: -.01em; }
.auth__brand .brand-text span { font-size: var(--fs-xs); color: var(--on-navy-muted); text-transform: uppercase; letter-spacing: .16em; }

.auth__hero { max-width: 34ch; }
.auth__hero .eyebrow { color: var(--gold-400); background: rgba(245,158,11,.14); }
.auth__hero h2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2rem, 3.2vw, 2.9rem); line-height: 1.07; letter-spacing: -.03em;
  color: #fff; margin: var(--sp-4) 0;
}
.auth__hero h2 .accent { color: #00E0FF; }
.auth__hero > p { color: var(--on-navy-muted); font-size: var(--fs-md); line-height: 1.55; max-width: 42ch; }

.auth__quote { border-left: 2px solid var(--gold-500); padding-left: var(--sp-4); margin-top: var(--sp-6); }
.auth__quote p { font-family: var(--font-display); font-size: var(--fs-lg); color: #fff; font-style: italic; line-height: 1.3; }
.auth__quote cite { display: block; margin-top: 6px; font-style: normal; color: var(--on-navy-muted); font-size: var(--fs-sm); }

.auth__bottom { display: flex; flex-direction: column; gap: var(--sp-5); }
.auth__proof { display: flex; flex-wrap: wrap; gap: var(--sp-8); }
.auth__proof .stat__value { font-family: var(--font-mono); font-size: var(--fs-xl); font-weight: 700; color: #fff; }
.auth__proof .stat__value .gold { color: var(--gold-400); }
.auth__proof .stat__label { font-size: var(--fs-xs); color: var(--on-navy-muted); text-transform: uppercase; letter-spacing: .1em; margin-top: 3px; }

.auth__goal { width: min(320px, 100%); }
.auth__goal .stat-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-2); }
.auth__goal .lbl { font-size: var(--fs-xs); color: var(--on-navy-muted); text-transform: uppercase; letter-spacing: .1em; }
.auth__goal .val { font-family: var(--font-mono); font-weight: 700; color: #fff; }
.auth__goal .bar { height: 8px; border-radius: 999px; background: rgba(255,255,255,.1); overflow: hidden; }
.auth__goal .bar > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--red-500), var(--gold-500)); }

/* ----- PAINEL DE ACESSO (coluna direita) ----- */
.auth__panel {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-6);
  padding: clamp(28px, 5vh, 56px) clamp(20px, 4vw, 56px);
}
.auth__mobilebrand { display: none; }

.auth__card {
  width: 100%; max-width: 424px;
  background: var(--surface);
  border-radius: var(--r-xl);
  border: 1px solid rgba(255,255,255,.6);
  box-shadow: var(--sh-pop);
  padding: clamp(24px, 2.6vw, 38px);
  color: var(--text);
}
.auth__card .eyebrow { color: var(--accent); background: var(--red-50); }
.auth__card h1 { font-family: var(--font-display); font-size: var(--fs-2xl); color: var(--text-strong); letter-spacing: -.02em; margin: var(--sp-3) 0 6px; }
.auth__card .sub { color: var(--muted); font-size: var(--fs-base); margin-bottom: var(--sp-6); }
.auth__card form { display: flex; flex-direction: column; gap: var(--sp-4); }

/* ----- CAMPOS (claros, com ícone) ----- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: var(--fs-sm); font-weight: 600; color: var(--text); }
.field__control { position: relative; display: flex; align-items: center; }
.field__control > svg { position: absolute; left: 13px; color: var(--muted-2); pointer-events: none; }
.field input {
  width: 100%;
  padding: 12px var(--sp-4) 12px 40px;
  border-radius: var(--r-sm);
  background: var(--bg);
  border: 1px solid var(--line-2);
  color: var(--text); font-family: var(--font-ui); font-size: var(--fs-md);
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.field input::placeholder { color: var(--muted-2); }
.field input:focus {
  outline: none; border-color: var(--accent); background: var(--surface);
  box-shadow: 0 0 0 4px rgba(10,132,255,.14);
}
/* campo sem wrapper de ícone (ex.: modais) volta ao padding normal */
.field > input { padding-left: var(--sp-4); }

.auth__row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; }
.auth__remember { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--muted); cursor: pointer; }
.auth__remember input { width: 16px; height: 16px; accent-color: var(--accent); }

.auth__card .btn--primary { width: 100%; justify-content: center; padding: 13px; margin-top: 2px; }
.auth__card .grid--2 { gap: var(--sp-3); }
.auth__card .btn--soft { width: 100%; justify-content: center; }
.auth__secure { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: var(--sp-5); color: var(--muted); font-size: var(--fs-xs); }
.auth__secure svg { color: var(--green-ink); }

/* ----- responsivo do login: mantém a identidade no mobile ----- */
@media (max-width: 920px) {
  .auth { grid-template-columns: 1fr; }
  .auth__aside { display: none; }
  .auth__panel { min-height: 100vh; justify-content: flex-start; padding-top: clamp(40px, 9vh, 88px); }
  .auth__mobilebrand {
    display: flex; flex-direction: column; align-items: center; gap: var(--sp-3); text-align: center;
  }
  .auth__mobilebrand strong { font-family: var(--font-display); font-size: 1.4rem; color: #fff; }
  .auth__mobilebrand > span:last-child { color: var(--on-navy-muted); font-size: var(--fs-sm); }
}

/* ==========================================================================
   19. MISC
   ========================================================================== */
.avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 600; font-size: var(--fs-sm);
  color: #fff;
  background: linear-gradient(135deg, var(--navy-700), var(--info-500));
  box-shadow: 0 0 0 2px var(--surface);
  flex: 0 0 auto;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--sm { width: 28px; height: 28px; font-size: var(--fs-xs); }
.avatar.is-gold { background: linear-gradient(135deg, var(--gold-500), var(--gold-400)); color: #4a3200; }
.avatar.is-red  { background: linear-gradient(135deg, var(--red-500), var(--red-400)); }

.avatar-stack { display: inline-flex; }
.avatar-stack > .avatar { margin-left: -10px; }
.avatar-stack > .avatar:first-child { margin-left: 0; }
.avatar-stack > .more {
  width: 28px; height: 28px; margin-left: -10px;
  border-radius: 50%; display: grid; place-items: center;
  background: var(--bg-soft); color: var(--muted);
  font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 600;
  box-shadow: 0 0 0 2px var(--surface);
}

.checklist { display: flex; flex-direction: column; gap: var(--sp-2); }
.check-item {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-2) 0;
  font-size: var(--fs-base);
  transition: color var(--t-fast) var(--ease);
}
.check-item .box {
  width: 20px; height: 20px; flex: 0 0 auto;
  border-radius: 6px;
  display: grid; place-items: center;
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  color: transparent;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.check-item .box svg { width: 12px; height: 12px; }
.check-item.is-done .box {
  background: var(--green-500);
  border-color: var(--green-500);
  color: #fff;
}
.check-item.is-done { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-strong); }

/* Ícone de status do subitem (variante de marcador do check-item) */
.check-item__ico {
  width: 20px; height: 20px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 6px;
  color: var(--muted-2);
  background: var(--surface-3);
}
.check-item__ico svg { width: 14px; height: 14px; }

/* ==========================================================================
   20. MODAIS / DRAWERS
   ========================================================================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: var(--sp-5);
  visibility: hidden;
  opacity: 0;
  transition: opacity var(--t-base) var(--ease), visibility var(--t-base) var(--ease);
}
.modal.is-open { visibility: visible; opacity: 1; }

.modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(15,22,41,.5);
  backdrop-filter: blur(3px);
}
.modal__panel {
  position: relative;
  width: min(560px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--elevated);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-pop), 0 0 0 1px var(--line);
  padding: var(--sp-6);
  transform: translateY(14px) scale(.98);
  opacity: 0;
  transition: transform var(--t-base) var(--ease-out), opacity var(--t-base) var(--ease);
}
.modal.is-open .modal__panel { transform: translateY(0) scale(1); opacity: 1; }

.modal__panel .modal__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--sp-3); margin-bottom: var(--sp-4);
}
.modal__panel .modal__head h2 { font-size: var(--fs-xl); }
.modal__panel .modal__head p { color: var(--muted); font-size: var(--fs-sm); margin-top: 2px; }
.modal__panel .modal__foot {
  display: flex; justify-content: flex-end; gap: var(--sp-3);
  margin-top: var(--sp-6);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
}

/* Corpo rolável do modal (quando o conteúdo é denso) */
.modal__body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

/* Variante drawer (desliza da direita) */
.modal--drawer { place-items: stretch; justify-content: flex-end; padding: 0; }
.modal--drawer .modal__panel {
  width: min(440px, 100%);
  height: 100vh; max-height: 100vh;
  border-radius: 0;
  transform: translateX(24px);
}
.modal--drawer.is-open .modal__panel { transform: translateX(0); }

/* ==========================================================================
   21. RESPONSIVO + A11Y
   ========================================================================== */
@media (max-width: 1180px) {
  .grid--4, .grid--bento { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid--bento > .span-3 { grid-column: span 2; }
}

@media (max-width: 900px) {
  :root { --topbar-h: 58px; }

  /* Sidebar colapsa para topo / drawer */
  .app { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: min(284px, 84vw);
    z-index: 90;
    transform: translateX(-102%);
    transition: transform var(--t-base) var(--ease-out);
    box-shadow: var(--sh-pop);
  }
  body.nav-open .sidebar { transform: translateX(0); }
  body.nav-open::after {
    content: ""; position: fixed; inset: 0; z-index: 80;
    background: rgba(15,22,41,.5);
  }
  .main { height: auto; min-height: 100vh; }
  .topbar { padding: 0 var(--sp-4); }
  .topbar__search { display: none; }
  .topbar .nav-toggle { display: inline-grid; }
  .screen { padding: var(--sp-5) var(--sp-4); }

  .grid--2, .grid--3, .grid--4, .grid--bento { grid-template-columns: 1fr; }
  .grid--bento > .span-2, .grid--bento > .span-3 { grid-column: auto; }

  .page-head__title { font-size: var(--fs-xl); }
  .journey__step { grid-template-columns: 40px 1fr; }
  .journey__bar { display: none; }
  .modal__panel { padding: var(--sp-5); }
}

/* botão de menu mobile escondido por padrão (some no desktop) */
.nav-toggle { display: none; }

@media (max-width: 560px) {
  .kpi__value { font-size: var(--fs-2xl); }
  .tabs { width: 100%; overflow-x: auto; }
  .auth__panel { padding: var(--sp-7) var(--sp-4); }
}

/* Alvos de toque >= 44px em dispositivos de toque (sem inflar o desktop) */
@media (pointer: coarse) {
  .icon-btn { width: 44px; height: 44px; }
  .btn--sm { min-height: 44px; padding: 9px var(--sp-4); }
  .tab { min-height: 44px; padding: 10px var(--sp-4); }
  .pill, .tag { min-height: 36px; }
  .pill[data-filter], .tag[data-filter] { min-height: 44px; padding-block: 10px; }
  .suggest__chip { min-height: 44px; }
}

/* Respeitar quem prefere menos movimento */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .nav-item:active, .btn:active, .task-card:hover,
  .journey__step:hover, .card:hover { transform: none !important; }
}

/* Impressão básica */
@media print {
  .sidebar, .topbar, .modal { display: none !important; }
  .app { grid-template-columns: 1fr; }
  .screen { display: block !important; overflow: visible; }
}
