/* GERADO por montar-frontend.js a partir de frontend/js/pacotes.js (grupo "nucleo"). NÃO EDITE: edite os css/ originais. */
/* ── fontes.css ── */
/* Fontes BKon v2.0 servidas pelo próprio app (antes vinham do Google Fonts).
   Bricolage Grotesque (títulos) · Geist (interface) · Geist Mono (números). Licença SIL OFL 1.1 (fontes/LICENCA.txt).
   Arquivos variáveis: um woff2 cobre a faixa de pesos. latin-ext só baixa se a página tiver caractere fora do latin. */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url(../fontes/bricolage-grotesque-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url(../fontes/bricolage-grotesque-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(../fontes/geist-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(../fontes/geist-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(../fontes/geist-mono-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(../fontes/geist-mono-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── portal.css ── */
/* =====================================================
   BKon OS: portal. Marca oficial BKon v2.0
   Cobalto #3C53DD (marca) + cobalto claro #7C93FF (só em fundo escuro)
   Ink #0B1120 · Panel #F7F8FB · Linha #E4E7F0 · Muted #626B82
   Sem gradiente, sem ciano, sem roxo. Estados nunca usam a cor da marca.
   Fontes: Bricolage Grotesque (títulos) · Geist (interface) · Geist Mono (números/código)
   ===================================================== */

/* ─── Tokens: Dark Mode (base, ink #0B1120) ────────── */
:root {
  color-scheme: dark;
  --bg-primary:     #0B1120;   /* ink */
  --bg-card:        #131A2C;   /* camada 1 */
  --bg-card-hover:  #182036;
  --bg-subtle:      #0E1526;
  --bg-raised:      #172036;   /* input, card interno */

  --border:         rgba(255,255,255,0.08);
  --border-strong:  rgba(255,255,255,0.14);
  --border-focus:   rgba(124,147,255,0.70);
  --input-border:   #5B6585;   /* 3:1 sobre o card, limite do campo */

  --text-primary:   #F7F8FB;
  --text-secondary: #B4BBCC;
  --text-muted:     #9AA2B4;
  --text-disabled:  #4A5370;
  --text-placeholder: #7F889F;

  /* Marca: botão é cobalto cheio com texto branco; texto/links no escuro usam o cobalto claro */
  --accent:         #3C53DD;
  --accent-2:       #7C93FF;   /* sólido, igual ao texto de destaque (antes ciano) */
  --accent-hover:   #2F44C4;
  --accent-active:  #283AA6;
  --accent-soft:    rgba(124,147,255,0.12);
  --accent-border:  rgba(124,147,255,0.30);
  --accent-text-on: #FFFFFF;
  --accent-text:    #7C93FF;   /* 6,17:1 sobre card */
  --focus-ring:     #7C93FF;

  /* Sem gradiente: nomes mantidos para quem já usa, valores sólidos */
  --gradient-sinal: #3C53DD;
  --btn-primary-bg: #3C53DD;
  --btn-primary-color: #FFFFFF;

  /* Estados oficiais (preenchimentos, pontos, barras) */
  --state-running:  #0E9E9E;
  --state-waiting:  #E0952A;
  --state-done:     #1FA971;
  --state-idle:     #9AA2B4;

  /* Semânticas (uso como texto): no escuro o hex oficial já passa AA */
  --success:        #1FA971;
  --success-soft:   rgba(31,169,113,0.14);
  --warning:        #E0952A;
  --warning-soft:   rgba(224,149,42,0.14);
  --danger:         #F47067;
  --danger-soft:    rgba(244,112,103,0.14);
  --info:           #14B0B0;   /* texto info no escuro: teal um pouco mais claro que o oficial (4,3:1 sobre a base do badge) */
  --info-soft:      rgba(14,158,158,0.16);

  --shadow-card:    0 1px 2px rgba(0,0,0,0.30), 0 0 0 1px rgba(255,255,255,0.04);
  --shadow-card-hover: 0 6px 20px rgba(0,0,0,0.40), 0 0 0 1px rgba(255,255,255,0.07);
  --shadow-glow:    0 4px 14px rgba(0,0,0,0.35);

  --radius-sm:   6px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-2xl:  20px;
  --radius-full: 999px;

  --duration-fast:   120ms;
  --duration-normal: 200ms;
  --duration-slow:   320ms;
  --easing:          cubic-bezier(0.4, 0, 0.2, 1);
  --easing-out:      cubic-bezier(0, 0, 0.2, 1);

  --font-display: 'Bricolage Grotesque', 'Geist', system-ui, sans-serif;
  --font-ui:      'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:    'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --sidebar-width: 220px;
  --topbar-height: 52px;
}

/* ─── Tokens: Light Mode (panel #F7F8FB, cards brancos) */
[data-theme="light"] {
  color-scheme: light;
  --bg-primary:     #F7F8FB;   /* panel */
  --bg-card:        #FFFFFF;
  --bg-card-hover:  #F2F4FA;
  --bg-subtle:      #EEF0F6;
  --bg-raised:      #F7F8FB;

  --border:         #E4E7F0;   /* linha oficial */
  --border-strong:  #CBD0DE;
  --border-focus:   rgba(60,83,221,0.65);
  --input-border:   #7C849A;   /* 3,7:1 sobre branco */

  --text-primary:   #0B1120;
  --text-secondary: #3E465C;
  --text-muted:     #626B82;
  --text-disabled:  #A5ADBF;
  --text-placeholder: #667088;

  --accent:         #3C53DD;
  --accent-2:       #3C53DD;
  --accent-hover:   #3347C2;
  --accent-active:  #283AA6;
  --accent-soft:    rgba(60,83,221,0.08);
  --accent-border:  rgba(60,83,221,0.26);
  --accent-text-on: #FFFFFF;
  --accent-text:    #3C53DD;
  --focus-ring:     #3C53DD;

  --gradient-sinal: #3C53DD;
  --btn-primary-bg: #3C53DD;
  --btn-primary-color: #FFFFFF;

  --state-running:  #0E9E9E;
  --state-waiting:  #E0952A;
  --state-done:     #1FA971;
  --state-idle:     #9AA2B4;

  /* No claro os hex oficiais não passam AA como texto: versões escurecidas da mesma família */
  --success:        #0F7652;
  --success-soft:   rgba(31,169,113,0.12);
  --warning:        #8F5400;
  --warning-soft:   rgba(224,149,42,0.16);
  --danger:         #B42318;
  --danger-soft:    rgba(180,35,24,0.09);
  --info:           #0A7070;
  --info-soft:      rgba(14,158,158,0.12);

  --shadow-card:    0 1px 2px rgba(11,17,32,0.05), 0 0 0 1px #E4E7F0;
  --shadow-card-hover: 0 6px 20px rgba(11,17,32,0.09), 0 0 0 1px #CBD0DE;
  --shadow-glow:    0 4px 14px rgba(11,17,32,0.14);
}

/* ─── Reset & Base ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; -moz-text-size-adjust: 100%; }

body {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color var(--duration-slow) var(--easing),
              color var(--duration-slow) var(--easing);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.02em; }
code, kbd, samp, pre { font-family: var(--font-mono); }
.num, .tabular { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
textarea { font-family: inherit; }

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: inherit;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ─── Marca BKon v2: wordmark vem do arquivo SVG oficial (brand/), nunca digitado ───
   Duas versões, trocadas por tema como no site institucional.
   O SVG já traz respiro embutido (30 unidades de cada lado). Visível mínimo 90px:
   altura 52px => largura visível ~95px. Abaixo disso, só a versão duas-cores (já é a usada). */
.brand-wordmark { display: block; height: 52px; width: auto; flex-shrink: 0; }
.brand-wordmark--dark  { display: block; }
.brand-wordmark--light { display: none; }
[data-theme="light"] .brand-wordmark--dark  { display: none; }
[data-theme="light"] .brand-wordmark--light { display: block; }

/* Rótulo "OS": discreto, separado do wordmark por filete, nunca dentro do wordmark */
.brand-os {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-left: 10px;
  margin-left: 2px;
  border-left: 1px solid var(--border-strong);
}

.login-logo .brand-wordmark { height: 96px; }

/* ─── Badges ────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: var(--radius-full);
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
/* Dot antes de badge de status */
.badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}
.badge--accent  { background: var(--accent-soft);  color: var(--accent-text);   border: 1px solid var(--accent-border); }
.badge--accent::before { background: var(--accent-text); }
.badge--success { background: var(--success-soft); color: var(--success); border: 1px solid color-mix(in srgb, var(--success) 28%, transparent); }
.badge--success::before { background: var(--state-done); }
.badge--warning { background: var(--warning-soft); color: var(--warning); border: 1px solid color-mix(in srgb, var(--warning) 30%, transparent); }
.badge--warning::before { background: var(--state-waiting); }
.badge--danger  { background: var(--danger-soft);  color: var(--danger);  border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent); }
.badge--danger::before { background: var(--danger); }
.badge--info    { background: var(--info-soft);    color: var(--info);    border: 1px solid color-mix(in srgb, var(--info) 30%, transparent); }
.badge--info::before { background: var(--state-running); }
.badge--muted   { background: var(--bg-raised);    color: var(--text-muted); border: 1px solid var(--border-strong); }
.badge--muted::before { background: var(--state-idle); }

/* ─── Buttons ───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: var(--radius-md);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  border: none;
  transition: transform var(--duration-fast) var(--easing),
              box-shadow var(--duration-fast) var(--easing),
              background-color var(--duration-fast) var(--easing),
              opacity var(--duration-fast) var(--easing);
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.btn svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  stroke-width: 1.75;
  fill: none;
  flex-shrink: 0;
}
.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.btn:disabled, .btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

/* Primário: cobalto chapado, texto branco (6,05:1 no escuro, 6,05:1 no claro) */
.btn--primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-color);
}
.btn--primary:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}
.btn--primary:active:not(:disabled) { background: var(--accent-active); transform: scale(0.98); box-shadow: none; }

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-strong);
}
.btn--ghost:hover:not(:disabled) {
  background: var(--bg-raised);
  border-color: var(--text-muted);
  color: var(--text-primary);
}
.btn--ghost:active:not(:disabled) { background: var(--bg-subtle); }

.btn--sm {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.w-full { width: 100%; }

/* ─── Form inputs ───────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 5px; }

.form-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.form-input {
  width: 100%;
  background: var(--bg-raised);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 13px;
  font-family: var(--font-ui);
  color: var(--text-primary);
  transition: border-color var(--duration-fast) var(--easing),
              box-shadow var(--duration-fast) var(--easing);
  outline: none;
}
.form-input::placeholder { color: var(--text-placeholder); }
.form-input:hover:not(:focus):not(:disabled) { border-color: var(--text-muted); }
.form-input:focus {
  border-color: var(--focus-ring);
  box-shadow: 0 0 0 3px var(--accent-soft), 0 0 0 1px var(--focus-ring);
}
.form-input:disabled { opacity: 0.55; cursor: not-allowed; background: var(--bg-subtle); }

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23626B82' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

[data-theme="dark"] .form-select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%239AA2B4' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); }

/* ─── Theme Toggle ──────────────────────────────────── */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--duration-fast) var(--easing),
              color var(--duration-fast) var(--easing),
              border-color var(--duration-fast) var(--easing);
  flex-shrink: 0;
}
.theme-toggle:hover { color: var(--text-primary); background: var(--bg-raised); border-color: var(--border-strong); }
.theme-toggle svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}
.theme-toggle .theme-label { display: none; }

.icon-moon, .icon-sun { display: none; }
[data-theme="dark"]  .icon-moon { display: block; }
[data-theme="light"] .icon-sun  { display: block; }

/* ─── Google badge ──────────────────────────────────── */
.google-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.google-badge svg { flex-shrink: 0; }
.google-badge--lg { padding: 5px 12px; font-size: 11px; }

/* ─── Reveal animation ──────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* Login: só o deslocamento, sem partir de opacidade 0. Elemento invisível na primeira pintura não
   conta como LCP no Chrome, e o LCP da tela de login caía no aviso "Instalar o app" (6 s). */
@keyframes subirLogin {
  from { transform: translateY(8px); }
  to   { transform: translateY(0); }
}
.reveal { animation: fadeUp var(--duration-slow) var(--easing-out) both; }
.reveal-d1 { animation-delay: 60ms; }
.reveal-d2 { animation-delay: 120ms; }
.reveal-d3 { animation-delay: 180ms; }
.reveal-d4 { animation-delay: 240ms; }

/* ════════════════════════════════════════════════════
   TELA DE LOGIN: segue o tema (escuro ink / claro panel)
════════════════════════════════════════════════════ */
.screen--login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

/* Farol aposentado com a marca v2: formas decorativas do fundo não são mais exibidas */
.login-bg { display: none; }

.login-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 400px;
  padding: 24px;
}

.login-logo {
  display: flex;
  align-items: center;
  position: relative;
  animation: subirLogin var(--duration-slow) var(--easing-out) both;
}
/* "OS" fica ao lado sem deslocar o wordmark do centro */
.login-logo .brand-os { position: absolute; left: 100%; top: 50%; transform: translateY(-50%); white-space: nowrap; }

.login-card {
  position: relative;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-2xl);
  padding: 36px;
  box-shadow: var(--shadow-card);
  animation: subirLogin var(--duration-slow) var(--easing-out) 60ms both;
}

.login-card__header { margin-bottom: 24px; }
.login-card__title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.login-card__sub {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.login-form { display: flex; flex-direction: column; gap: 14px; }

.form-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-forgot {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-text);
  transition: color var(--duration-fast) var(--easing);
}
.form-forgot:hover { text-decoration: underline; text-underline-offset: 3px; }

.password-wrap { position: relative; }
.password-wrap .form-input { padding-right: 40px; }

.password-eye {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: color var(--duration-fast) var(--easing);
}
.password-eye:hover { color: var(--text-primary); }
.password-eye svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 1.5; fill: none; }

.login-btn { margin-top: 4px; }

.login-note {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
  margin-top: 20px;
}
.login-note a { color: var(--accent-text); font-weight: 600; }
.login-note a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Toggle de tema no login: canto superior direito */
.login-theme-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 5;
  width: 36px; height: 36px;
  background: var(--bg-card);
  border-color: var(--border-strong);
  color: var(--text-secondary);
}
.login-theme-toggle:hover { color: var(--text-primary); background: var(--bg-raised); }

/* ════════════════════════════════════════════════════
   APP SHELL
════════════════════════════════════════════════════ */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  grid-template-rows: 1fr;
  min-height: 100vh;
}

/* ─── SIDEBAR — Linear-style ────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 50;
  transition: transform var(--duration-slow) var(--easing);
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar__top {
  padding: 16px 12px;
  border-bottom: 1px solid var(--border);
}
.sidebar__logo {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: -8px 0 4px;
  text-decoration: none;
  padding: 0;
  border-radius: var(--radius-md);
}

/* Card de cliente — mais compacto, menos "fofo" */
.sidebar__client {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.client-avatar {
  width: 30px; height: 30px;
  border-radius: var(--radius-full);
  background: var(--gradient-sinal);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; letter-spacing: 0.02em;
}
.client-avatar--sm { width: 28px; height: 28px; font-size: 11px; }

.client-info { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.client-name {
  font-size: 12px; font-weight: 600; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  letter-spacing: -0.01em;
}
.client-user {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* Nav — Linear-style: item ativo tem barra esquerda sutil */
.sidebar__nav {
  flex: 1;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: var(--radius-md);
  font-size: 13px; font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  position: relative;
  transition: background var(--duration-fast) var(--easing),
              color var(--duration-fast) var(--easing);
  letter-spacing: -0.01em;
}
.sidebar__link svg {
  width: 15px; height: 15px;
  stroke: currentColor; stroke-width: 1.5; fill: none; flex-shrink: 0;
}
.sidebar__link:hover { background: var(--bg-raised); color: var(--text-secondary); }
.sidebar__link:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.sidebar__link--active {
  background: var(--accent-soft);
  color: var(--text-primary);
  font-weight: 600;
}
.sidebar__link--active svg { color: var(--accent-text); }
/* Indicador barra lateral — assinatura Linear */
.sidebar__link--active::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 2px;
  background: var(--accent-text);
  border-radius: 1px;
}
.sidebar__link--active:hover { background: var(--accent-soft); color: var(--text-primary); }
.sidebar__link--logout { color: var(--text-muted); margin-top: 4px; }
.sidebar__link--logout:hover { background: var(--danger-soft); color: var(--danger); }

.nav-badge {
  margin-left: auto;
  background: var(--state-waiting);
  color: #0B1120;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 700;
  border-radius: var(--radius-full);
  padding: 1px 5px; line-height: 1.6;
}

.sidebar__bottom {
  padding: 8px;
  border-top: 1px solid var(--border);
}
.sidebar__bottom .theme-toggle {
  width: 100%;
  justify-content: flex-start;
  gap: 9px; padding: 7px 10px;
  border-radius: var(--radius-md);
  border: none; background: transparent;
  font-size: 13px; font-weight: 500;
  color: var(--text-muted); height: auto;
}
.sidebar__bottom .theme-toggle .theme-label { display: block; font-size: 13px; }
.sidebar__bottom .theme-toggle:hover { background: var(--bg-raised); color: var(--text-secondary); }

/* ─── TOPBAR (mobile) ───────────────────────────────── */
.topbar {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-height);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  z-index: 40;
  padding: 0 14px;
  align-items: center;
  justify-content: space-between;
}
.topbar__menu {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: background var(--duration-fast) var(--easing);
}
.topbar__menu:hover { background: var(--bg-raised); }
.topbar__menu svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.5; fill: none; }
.topbar .sidebar__logo { margin-bottom: 0; }
.topbar__sidebar-logo { margin: 0; gap: 4px; }
.topbar__sidebar-logo .brand-wordmark { height: 52px; }
.topbar__right { display: flex; align-items: center; gap: 8px; }

/* ─── SIDEBAR OVERLAY (mobile) ──────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 49;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

/* ─── MAIN CONTENT ──────────────────────────────────── */
.main-content {
  grid-column: 2;
  min-height: 100vh;
  background: var(--bg-primary);
  padding: 28px 32px;
  overflow-y: auto;
}

/* ─── PAGE / SCREEN ─────────────────────────────────── */
.screen { display: none; }
.screen--active { display: flex; }
.page { display: none; }
.page--active { display: block; }
#screen-chat.page--active { display: flex; flex-direction: column; }

/* ─── PAGE HEADER ───────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.page-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.12em;
  margin-bottom: 3px;
}
.page-title {
  font-family: var(--font-display);
  font-size: 28px; font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.025em; line-height: 1.1;
}
.page-header__actions { display: flex; align-items: center; gap: 8px; }

/* ─── SECTION LABEL ─────────────────────────────────── */
.section-label {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.12em;
  margin-bottom: 10px;
}

/* ════════════════════════════════════════════════════
   TELA 2: DASHBOARD
════════════════════════════════════════════════════ */

/* Reuniões card — lista limpa sem card "fofo" */
.meetings-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 14px;
}
.meetings-card__header {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
}
.meetings-card__title-row {
  display: flex;
  align-items: center;
  gap: 9px;
}
.meetings-card__icon {
  width: 26px; height: 26px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-text); flex-shrink: 0;
}
.meetings-card__icon svg { width: 12px; height: 12px; stroke: currentColor; stroke-width: 1.5; fill: none; }
.meetings-card__title { font-size: 13px; font-weight: 600; color: var(--text-primary); flex: 1; letter-spacing: -0.01em; }

.meetings-list { padding: 2px 0; }
.meeting-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 18px;
  cursor: pointer;
  transition: background var(--duration-fast) var(--easing);
}
.meeting-item:hover { background: var(--bg-raised); }
.meeting-item:not(:last-child) { border-bottom: 1px solid var(--border); }

.meeting-item__dot {
  width: 6px; height: 6px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}
.meeting-item__dot--upcoming { background: var(--accent); }
.meeting-item__dot--far      { background: var(--accent-2); }

.meeting-item__info { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.meeting-item__name { font-size: 13px; font-weight: 500; color: var(--text-primary); letter-spacing: -0.01em; }
.meeting-item__meta {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--text-muted);
  letter-spacing: 0.02em;
}
.meeting-item__link svg { width: 12px; height: 12px; }

/* Alerta pendente — mais sutil, só borda lateral */
.alert-pending {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--warning);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 28px;
  cursor: pointer;
  transition: background var(--duration-fast) var(--easing),
              transform var(--duration-normal) var(--easing);
}
.alert-pending:hover { background: var(--bg-raised); transform: translateY(-1px); }

.alert-pending__icon {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  background: var(--warning-soft);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  color: var(--warning);
}
.alert-pending__icon svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 1.75; fill: none; }

.alert-pending__content { flex: 1; min-width: 0; }
.alert-pending__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  color: var(--warning);
  text-transform: uppercase; letter-spacing: 0.10em; margin-bottom: 2px;
}
.alert-pending__text { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.alert-pending__arrow { color: var(--text-muted); flex-shrink: 0; }
.alert-pending__arrow svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2; fill: none; }

/* Project grid — cards como linhas de lista (Linear-style) */
.project-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.project-card {
  padding: 16px 20px;
  cursor: pointer;
  transition: background var(--duration-fast) var(--easing);
  display: flex;
  align-items: center;
  gap: 14px;
  border-left: 2px solid transparent;
}
.project-card:not(:last-child) { border-bottom: 1px solid var(--border); }
.project-card:hover {
  background: var(--bg-raised);
}
/* Primeiro card (principal) tem destaque de borda */
.project-card:first-child {
  border-left-color: var(--accent);
}

.project-card__header { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.project-card__icon {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-raised); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; color: var(--text-muted);
  flex-shrink: 0;
}
.project-card__icon svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 1.5; fill: none; }
.project-card__icon--success { background: var(--success-soft); border-color: color-mix(in srgb, var(--success) 15%, transparent); color: var(--success); }

.project-card__body { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; }
.project-card__texts { flex: 1; min-width: 0; }
.project-card__name {
  font-family: var(--font-display);
  font-size: 14px; font-weight: 600; color: var(--text-primary);
  line-height: 1.3; letter-spacing: -0.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.project-card__desc { font-size: 12px; color: var(--text-muted); line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Progress inline */
.project-card__progress-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  min-width: 80px;
  flex-shrink: 0;
}
.project-card__progress-val {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500; color: var(--text-secondary);
  letter-spacing: 0.02em;
}
.project-card__progress-bar {
  width: 80px; height: 3px;
  background: var(--bg-raised);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.project-card__progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width var(--duration-slow) var(--easing-out);
}
.project-card__progress-fill--warning { background: var(--state-waiting); }
.project-card__progress-fill--success { background: var(--success); }
.project-card__progress-fill--info    { background: var(--state-running); }

.project-card__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
  min-width: 90px;
}
.project-card__updated {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--text-disabled); letter-spacing: 0.02em;
}
.project-card__arrow {
  color: var(--text-disabled);
  transition: color var(--duration-fast) var(--easing), transform var(--duration-fast) var(--easing);
}
.project-card:hover .project-card__arrow { color: var(--text-muted); transform: translateX(2px); }
.project-card__arrow svg { width: 13px; height: 13px; stroke: currentColor; stroke-width: 2; fill: none; }

/* Removendo antigos - mantido para compat com JS que não re-renderiza este */
.project-progress { margin-top: 4px; }
.project-progress__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.project-progress__label { font-family: var(--font-mono); font-size: 11px; font-weight: 500; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.project-progress__value { font-family: var(--font-display); font-size: 12px; font-weight: 700; color: var(--text-primary); }
.project-progress__bar { height: 3px; background: var(--bg-raised); border-radius: var(--radius-full); overflow: hidden; }
.project-progress__fill { height: 100%; border-radius: var(--radius-full); transition: width var(--duration-slow) var(--easing-out); }
.project-progress__fill--warning { background: var(--state-waiting); }
.project-progress__fill--success { background: var(--success); }
.project-progress__fill--info    { background: var(--state-running); }

/* Project card footer (compat) */
.project-card__footer { display: flex; align-items: center; justify-content: space-between; padding-top: 6px; border-top: 1px solid var(--border); margin-top: 4px; }

/* Dashboard summary — números grandes e respiro */
.dashboard-summary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px 28px;
  display: flex; align-items: center; gap: 28px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}
/* Farol sutil no fundo do summary */
.dashboard-summary::after {
  content: '';
  position: absolute;
  bottom: -40px; right: -40px;
  width: 160px; height: 160px;
  background: none;
  pointer-events: none;
}
.summary-stat { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 90px; }
.summary-stat__value {
  font-family: var(--font-display);
  font-size: 36px; font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em; line-height: 1;
}
/* Primeiro stat em ciano — único accent desta linha */
.summary-stat:first-child .summary-stat__value { color: var(--accent-text); }
.summary-stat__label {
  font-size: 11px; color: var(--text-muted); line-height: 1.4;
  letter-spacing: -0.01em;
}
.summary-sep { width: 1px; height: 36px; background: var(--border-strong); flex-shrink: 0; }

/* ════════════════════════════════════════════════════
   TELA 3: PROJETO DETALHE
════════════════════════════════════════════════════ */
.proj-back {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500; color: var(--text-muted);
  cursor: pointer; margin-bottom: 14px;
  text-transform: uppercase; letter-spacing: 0.06em;
  transition: color var(--duration-fast) var(--easing);
}
.proj-back:hover { color: var(--text-secondary); }
.proj-back svg { width: 12px; height: 12px; stroke: currentColor; stroke-width: 2; fill: none; }

.proj-hero {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: 28px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.proj-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--accent-border);
  opacity: 0.6;
}
.proj-hero__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.proj-hero__title {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 700; color: var(--text-primary);
  letter-spacing: -0.02em; margin-bottom: 6px;
}
.proj-hero__percent {
  font-family: var(--font-display);
  font-size: 48px; font-weight: 700;
  color: var(--accent-text);
  letter-spacing: -0.04em; line-height: 1; text-align: right;
}
.proj-hero__percent span {
  font-size: 20px; font-weight: 500;
  background: none;
  -webkit-text-fill-color: var(--text-muted);
}

/* Tabs — mais compacto e limpo */
.proj-tabs {
  display: flex; gap: 0;
  background: transparent;
  border-bottom: 1px solid var(--border);
  padding: 0; margin-bottom: 20px;
  overflow-x: auto; scrollbar-width: none; /* Firefox */
}
.proj-tabs::-webkit-scrollbar { display: none; }
.proj-tabs::-webkit-scrollbar { display: none; }

.proj-tab {
  padding: 9px 16px;
  font-size: 13px; font-weight: 500; color: var(--text-muted);
  cursor: pointer; white-space: nowrap;
  transition: color var(--duration-fast) var(--easing);
  border: none; background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  letter-spacing: -0.01em;
}
.proj-tab.active { color: var(--text-primary); border-bottom-color: var(--accent); }
.proj-tab:hover:not(.active) { color: var(--text-secondary); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.overview-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 700px) { .overview-grid { grid-template-columns: 1fr 1fr; } }

.overview-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 20px;
}
.overview-card__label {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.10em; margin-bottom: 10px;
}
.overview-card__text { font-size: 13px; color: var(--text-secondary); line-height: 1.65; }

.milestones {
  display: flex; flex-direction: column;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 20px;
}
.milestone { display: flex; gap: 14px; padding-bottom: 18px; position: relative; }
.milestone:last-child { padding-bottom: 0; }
.milestone:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 13px; top: 28px; bottom: 0;
  width: 1px; background: var(--border);
}

.milestone__dot {
  width: 28px; height: 28px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  background: var(--bg-primary); z-index: 1;
}
.milestone__dot svg { width: 12px; height: 12px; stroke: currentColor; stroke-width: 2; fill: none; }
.milestone--done .milestone__dot { background: var(--success-soft); border-color: color-mix(in srgb, var(--success) 30%, transparent); color: var(--success); }
.milestone--active .milestone__dot { background: var(--accent-soft); border-color: var(--accent-border); color: var(--accent-text); }
.milestone--pending .milestone__dot { color: var(--text-disabled); }

.milestone__content { flex: 1; padding-top: 4px; }
.milestone__name { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 1px; letter-spacing: -0.01em; }
.milestone--pending .milestone__name { color: var(--text-muted); }
.milestone__date {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--text-muted); letter-spacing: 0.02em;
}

/* ════════════════════════════════════════════════════
   TELA 4: CHAT / CONVERSAS
════════════════════════════════════════════════════ */
.chat-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  height: calc(100vh - 56px - 28px);
  min-height: 500px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  flex: 1;
}

.chat-shell.files-open {
  grid-template-columns: 240px 1fr 240px;
}

/* Chat Rail */
.chat-rail {
  background: var(--bg-primary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.chat-rail__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.chat-rail__title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.10em;
}

.chat-group { border-bottom: 1px solid var(--border); }

.chat-group__toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  transition: background var(--duration-fast) var(--easing);
}
.chat-group__toggle:hover { background: var(--bg-raised); color: var(--text-secondary); }
.chat-group__toggle span:first-of-type { flex: 1; }

.chat-group__chevron {
  width: 12px; height: 12px;
  stroke: currentColor; stroke-width: 2; fill: none;
  transition: transform var(--duration-normal) var(--easing);
}
.chat-group.collapsed .chat-group__chevron { transform: rotate(-90deg); }
.chat-group.collapsed .chat-group__list { display: none; }

.chat-thread {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 14px;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  transition: background var(--duration-fast) var(--easing);
  border-left: 2px solid transparent;
}
.chat-thread:hover { background: var(--bg-raised); }
.chat-thread--active {
  background: var(--bg-raised);
  border-left-color: var(--accent);
}

.chat-thread__icon {
  width: 26px; height: 26px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); flex-shrink: 0;
}
.chat-thread__icon svg { width: 11px; height: 11px; stroke: currentColor; stroke-width: 1.5; fill: none; }
.chat-thread--pending .chat-thread__icon { background: var(--warning-soft); border-color: color-mix(in srgb, var(--warning) 20%, transparent); color: var(--warning); }

.chat-thread__info { flex: 1; min-width: 0; }
.chat-thread__name {
  display: block; font-size: 12px; font-weight: 500; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.01em;
}
.chat-thread__preview {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px;
}

.chat-thread__badge {
  width: 6px; height: 6px;
  border-radius: var(--radius-full);
  background: var(--warning);
  flex-shrink: 0;
}
.chat-thread:not(.chat-thread--pending) .chat-thread__badge { display: none; }

/* Chat Main */
.chat-main {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-primary);
}

.chat-main__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.chat-back-btn {
  width: 28px; height: 28px;
  display: none;
  align-items: center; justify-content: center;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: background var(--duration-fast) var(--easing);
  flex-shrink: 0;
}
.chat-back-btn:hover { background: var(--bg-raised); color: var(--text-primary); }
.chat-back-btn svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2; fill: none; }

.chat-main__title-wrap { flex: 1; min-width: 0; }
.chat-main__title { display: block; font-size: 13px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.01em; }
.chat-main__project {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px; color: var(--text-muted); letter-spacing: 0.04em;
}

.chat-main__actions { flex-shrink: 0; }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-behavior: smooth;
}

/* Mensagens — Linear-style: sem "balão" pesado, quase flat */
.chat-msg { display: flex; gap: 10px; max-width: 78%; }
.chat-msg--bkon { align-self: flex-start; }
.chat-msg--marina { align-self: flex-end; flex-direction: row-reverse; }

.chat-msg__avatar {
  width: 26px; height: 26px;
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 11px; font-weight: 700; flex-shrink: 0;
  letter-spacing: 0.02em;
}
.chat-msg--bkon .chat-msg__avatar {
  background: var(--gradient-sinal);
  color: #FFFFFF;
}
.chat-msg--marina .chat-msg__avatar {
  background: var(--accent-soft);
  color: var(--accent-text);
  border: 1px solid var(--accent-border);
}

.chat-msg__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.chat-msg--marina .chat-msg__body { align-items: flex-end; }

.chat-msg__sender {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500; color: var(--text-muted);
  letter-spacing: 0.04em; text-transform: uppercase;
}
.chat-msg--bkon .chat-msg__sender { color: var(--accent-2); }

/* Bubble — fine borders, não filled */
.chat-msg__bubble {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.55;
  word-break: break-word;
}
.chat-msg--bkon .chat-msg__bubble { border-bottom-left-radius: var(--radius-sm); }
.chat-msg--marina .chat-msg__bubble {
  border-bottom-right-radius: var(--radius-sm);
  background: var(--accent-soft);
  border-color: var(--accent-border);
}
.chat-msg--pending .chat-msg__bubble {
  border-color: color-mix(in srgb, var(--warning) 25%, transparent);
  background: var(--warning-soft);
}

.chat-pending-label {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  color: var(--warning);
  display: flex; align-items: center; gap: 4px;
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 5px;
}
.chat-pending-label svg { width: 10px; height: 10px; stroke: currentColor; stroke-width: 2; fill: none; }

.chat-msg__time {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--text-disabled); margin-top: 1px;
  letter-spacing: 0.02em;
}

.chat-attachment {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 9px 12px;
  margin-top: 6px;
  max-width: 220px;
  cursor: pointer;
  transition: background var(--duration-fast) var(--easing);
}
.chat-attachment:hover { background: var(--bg-raised); }
.chat-attachment__icon {
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.chat-attachment__icon svg { width: 13px; height: 13px; stroke: currentColor; stroke-width: 1.5; fill: none; }
.chat-attachment__icon--pdf { background: var(--danger-soft); color: var(--danger); }
.chat-attachment__icon--img { background: var(--info-soft); color: var(--info); }

.chat-attachment__info { flex: 1; min-width: 0; }
.chat-attachment__name { font-size: 11px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-attachment__size { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }

.chat-date-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  align-self: center;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.10em;
}
.chat-date-divider::before, .chat-date-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
  min-width: 40px;
}

/* Chat input — sofisticado */
.chat-input-area {
  padding: 12px 16px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.chat-input-wrap {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 7px 7px 7px 10px;
  transition: border-color var(--duration-fast) var(--easing),
              box-shadow var(--duration-fast) var(--easing);
}
.chat-input-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.chat-attach-btn {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); border-radius: var(--radius-sm);
  flex-shrink: 0;
  transition: color var(--duration-fast) var(--easing);
}
.chat-attach-btn:hover { color: var(--text-primary); }
.chat-attach-btn svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 1.5; fill: none; }

.chat-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  resize: none;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.5;
  max-height: 120px;
  overflow-y: auto;
  padding: 3px 0;
}
.chat-input::placeholder { color: var(--text-disabled); }

.chat-send-btn {
  width: 32px; height: 32px;
  padding: 0;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}
.chat-send-btn svg { width: 13px; height: 13px; }

.chat-input-hint {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--text-muted); margin-top: 7px;
  letter-spacing: 0.02em;
}

/* Chat files panel */
.chat-files-panel {
  background: var(--bg-primary);
  border-left: 1px solid var(--border);
  display: none;
  flex-direction: column;
  overflow-y: auto;
}
.chat-files-panel.open { display: flex; }

.chat-files-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  flex-shrink: 0;
  background: var(--bg-card);
}

.chat-files-panel__list { padding: 6px; display: flex; flex-direction: column; gap: 3px; }

.chat-file-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--duration-fast) var(--easing);
}
.chat-file-item:hover { background: var(--bg-raised); }
.chat-file-item .file-item__icon { width: 26px; height: 26px; border-radius: var(--radius-sm); }
.chat-file-item .file-item__icon svg { width: 12px; height: 12px; }
.chat-file-item .file-item__name { font-size: 11px; }
.chat-file-item .file-item__meta { font-size: 11px; }

/* ════════════════════════════════════════════════════
   TELA 5: ARQUIVOS
════════════════════════════════════════════════════ */
.files-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 12px;
}
.files-section__header { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.files-section__icon {
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  background: var(--bg-raised); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); flex-shrink: 0;
}
.files-section__icon svg { width: 13px; height: 13px; stroke: currentColor; stroke-width: 1.5; fill: none; }
.files-section__icon--brand { background: var(--accent-soft); border-color: var(--accent-border); color: var(--accent-text); }
.files-section__icon--success { background: var(--success-soft); border-color: color-mix(in srgb, var(--success) 15%, transparent); color: var(--success); }
.files-section__title { font-size: 13px; font-weight: 600; color: var(--text-primary); flex: 1; letter-spacing: -0.01em; }
.files-section__count {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--text-muted);
  letter-spacing: 0.04em;
}

.files-list { padding: 4px 0; }
.file-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 20px;
  transition: background var(--duration-fast) var(--easing);
}
.file-item:hover { background: var(--bg-raised); }
.file-item:not(:last-child) { border-bottom: 1px solid var(--border); }

.file-item__icon {
  width: 30px; height: 30px;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.file-item__icon svg { width: 13px; height: 13px; stroke: currentColor; stroke-width: 1.5; fill: none; }
.file-item__icon--pdf    { background: var(--danger-soft);  color: var(--danger); }
.file-item__icon--img    { background: var(--info-soft);    color: var(--info); }
.file-item__icon--link   { background: var(--accent-soft);  color: var(--accent-text); }
.file-item__icon--doc    { background: var(--info-soft);    color: var(--info); }
.file-item__icon--sheet  { background: var(--success-soft); color: var(--success); }

.file-item__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.file-item__name { font-size: 13px; font-weight: 500; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.01em; }
.file-item__meta {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--text-muted);
  letter-spacing: 0.02em;
}
.file-item__action { flex-shrink: 0; white-space: nowrap; }
.file-item__action svg { width: 12px; height: 12px; }

/* ════════════════════════════════════════════════════
   TELA 6: RELATÓRIOS
════════════════════════════════════════════════════ */
.reports-list { display: flex; flex-direction: column; gap: 0; margin-bottom: 20px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-xl); overflow: hidden; }
.report-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 18px;
  cursor: pointer;
  transition: background var(--duration-fast) var(--easing);
  border-left: 2px solid transparent;
}
.report-item:not(:last-child) { border-bottom: 1px solid var(--border); }
.report-item:hover { background: var(--bg-raised); }
.report-item--active { border-left-color: var(--accent); background: var(--accent-soft); }
.report-item__icon {
  width: 30px; height: 30px;
  border-radius: var(--radius-sm); background: var(--bg-raised); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; color: var(--text-muted); flex-shrink: 0;
}
.report-item--active .report-item__icon {
  background: var(--gradient-sinal);
  border: none;
  color: #FFFFFF;
}
.report-item__icon svg { width: 13px; height: 13px; stroke: currentColor; stroke-width: 1.5; fill: none; }
.report-item__info { flex: 1; min-width: 0; }
.report-item__name { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 1px; letter-spacing: -0.01em; }
.report-item__meta {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--text-muted); letter-spacing: 0.02em;
}

.report-detail { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 28px; margin-top: 12px; }
.report-detail__header { margin-bottom: 20px; }
.report-detail__title {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 700; color: var(--text-primary);
  letter-spacing: -0.02em; margin-bottom: 4px;
}
.report-detail__period {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--text-muted); letter-spacing: 0.04em;
}

/* Métricas — números grandes, sem fundo pesado */
.report-metrics {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1px; margin-bottom: 24px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.report-metric {
  background: var(--bg-raised);
  padding: 18px 16px;
  display: flex; flex-direction: column; gap: 3px;
}
.report-metric__value {
  font-family: var(--font-display);
  font-size: 32px; font-weight: 700; color: var(--text-primary);
  letter-spacing: -0.03em; line-height: 1;
}
.report-metric:first-child .report-metric__value { color: var(--accent-text); }
.report-metric__label { font-size: 11px; color: var(--text-muted); line-height: 1.4; }
.report-metric__trend { display: flex; align-items: center; gap: 3px; font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--success); margin-top: 3px; letter-spacing: 0.02em; }
.report-metric__trend svg { width: 10px; height: 10px; stroke: currentColor; stroke-width: 2; fill: none; }

.report-chart-wrap { margin-bottom: 20px; }
.report-chart__title {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500; color: var(--text-muted);
  margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.10em;
}
.report-chart { background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; overflow: hidden; }
.bar-chart { width: 100%; height: 140px; display: block; }
.bar-chart__labels { display: flex; justify-content: space-around; padding: 0 8px; margin-top: 6px; }
.bar-chart__labels span {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--text-muted); font-weight: 500;
  letter-spacing: 0.04em;
}

.report-notes { background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; }
.report-notes__title {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.10em; margin-bottom: 7px;
}
.report-notes__text { font-size: 13px; color: var(--text-secondary); line-height: 1.65; }

/* ════════════════════════════════════════════════════
   TELA 7: AGENDAR REUNIÃO
════════════════════════════════════════════════════ */
.booking-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 900px) {
  .booking-grid { grid-template-columns: 1fr 300px; align-items: start; }
}

.booking-section-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}

.booking-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: 28px;
}

/* Segmented control — mais limpo */
.segmented-control {
  display: flex;
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}
.seg-option {
  flex: 1;
  border-radius: var(--radius-sm);
  padding: 6px;
  font-size: 12px; font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--duration-fast) var(--easing);
  background: none; border: none;
  text-align: center;
  letter-spacing: -0.01em;
}
.seg-option--active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.10);
}

/* Mini calendário */
.mini-calendar {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.mini-cal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}
.mini-cal-month {
  font-family: var(--font-display);
  font-size: 12px; font-weight: 600; color: var(--text-primary); letter-spacing: -0.01em;
}
.mini-cal-nav {
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); border-radius: var(--radius-sm);
  transition: background var(--duration-fast) var(--easing);
}
.mini-cal-nav:hover { background: var(--bg-raised); color: var(--text-primary); }
.mini-cal-nav svg { width: 12px; height: 12px; stroke: currentColor; stroke-width: 2; fill: none; }

.mini-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  padding: 10px;
}
.cal-dow {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.06em;
  text-align: center;
  padding: 3px 0;
}
.cal-day {
  font-size: 12px; font-weight: 500;
  text-align: center;
  padding: 6px 3px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  transition: background var(--duration-fast) var(--easing), color var(--duration-fast) var(--easing);
}
.cal-day:hover:not(.cal-day--past):not(.cal-day--busy):not(.cal-day--empty) {
  background: var(--bg-card);
  color: var(--text-primary);
}
.cal-day--empty { cursor: default; }
.cal-day--past { color: var(--text-disabled); cursor: default; }
.cal-day--today { color: var(--text-primary); font-weight: 700; }
.cal-day--busy { color: var(--text-disabled); cursor: default; text-decoration: line-through; }
.cal-day--selected {
  background: var(--gradient-sinal);
  color: #FFFFFF; font-weight: 700;
  box-shadow: var(--shadow-card);
}

.cal-legend {
  display: flex; gap: 12px;
  padding: 7px 14px 10px;
  border-top: 1px solid var(--border);
}
.cal-legend__item {
  display: flex; align-items: center; gap: 5px;
  font-family: var(--font-mono);
  font-size: 11px; color: var(--text-muted);
  letter-spacing: 0.02em;
}
.cal-legend__dot { width: 6px; height: 6px; border-radius: var(--radius-full); flex-shrink: 0; }
.cal-legend__dot--busy { background: var(--text-disabled); }
.cal-legend__dot--free { background: var(--success); }

/* Time slots — grid de pills */
.time-slots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.time-slot {
  padding: 8px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  cursor: pointer;
  transition: all var(--duration-fast) var(--easing);
  text-align: center;
  letter-spacing: 0.02em;
}
.time-slot:hover:not(.time-slot--busy) { border-color: var(--accent-border); color: var(--text-primary); background: var(--accent-soft); }
.time-slot--busy { color: var(--text-disabled); cursor: default; text-decoration: line-through; }
.time-slot--selected {
  background: var(--gradient-sinal);
  border-color: transparent;
  color: #FFFFFF;
  box-shadow: var(--shadow-card);
}

/* Card de confirmação */
.booking-confirm-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 2px solid var(--success);
  border-radius: var(--radius-2xl);
  padding: 28px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.booking-confirm__icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-full);
  background: var(--success-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--success);
}
.booking-confirm__icon svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2.5; fill: none; }
.booking-confirm__title {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.02em;
}
.booking-confirm__desc { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }

.booking-confirm__details {
  width: 100%;
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 14px;
  display: flex; flex-direction: column; gap: 8px;
  text-align: left;
}
.booking-confirm__row {
  display: flex; align-items: center; gap: 9px;
  font-size: 12px; color: var(--text-secondary);
}
.booking-confirm__row svg { width: 13px; height: 13px; stroke: var(--text-muted); stroke-width: 1.5; fill: none; flex-shrink: 0; }

.booking-confirm__actions { width: 100%; display: flex; flex-direction: column; gap: 6px; }

/* Reuniões agendadas */
.booking-upcoming {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: 24px;
}

.booking-meetings-list { display: flex; flex-direction: column; gap: 8px; }

.booking-meeting-item {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--duration-fast) var(--easing);
}
.booking-meeting-item:hover { border-color: var(--border-strong); }

.booking-meeting__date {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 38px; padding: 6px;
  background: var(--gradient-sinal);
  border-radius: var(--radius-sm);
  color: #FFFFFF;
  flex-shrink: 0;
}
.booking-meeting__day {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 700; line-height: 1;
}
.booking-meeting__month {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; line-height: 1; margin-top: 2px;
}

.booking-meeting__info { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.booking-meeting__title { font-size: 12px; font-weight: 600; color: var(--text-primary); line-height: 1.3; letter-spacing: -0.01em; }
.booking-meeting__meta {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--text-muted); letter-spacing: 0.02em;
}
.booking-meeting__meet {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 600; color: var(--accent-text);
  margin-top: 3px; letter-spacing: 0.02em;
}
.booking-meeting__meet svg { width: 10px; height: 10px; stroke: currentColor; stroke-width: 1.5; fill: none; }
.booking-meeting__meet:hover { text-decoration: underline; }

/* ─── Toast ─────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 20px; right: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  display: flex; align-items: flex-start; gap: 10px;
  z-index: 300;
  max-width: 320px;
  transform: translateY(120%); opacity: 0;
  transition: transform var(--duration-slow) var(--easing), opacity var(--duration-slow) var(--easing);
  pointer-events: none;
  box-shadow: var(--shadow-card-hover);
}
.toast.visible { transform: translateY(0); opacity: 1; pointer-events: auto; }
.toast__icon {
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  background: var(--success-soft); color: var(--success);
}
.toast__icon svg { width: 13px; height: 13px; stroke: currentColor; stroke-width: 2.5; fill: none; }
.toast__title { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 1px; letter-spacing: -0.01em; }
.toast__desc {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--text-muted); line-height: 1.5; letter-spacing: 0.02em;
}

/* ════════════════════════════════════════════════════
   Q&A (mantido)
════════════════════════════════════════════════════ */
.qa-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-xl); overflow: hidden; margin-bottom: 12px; }
.qa-card--pending { border-color: color-mix(in srgb, var(--warning) 25%, transparent); border-left: 2px solid var(--warning); }
.qa-card__header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.qa-card__meta { display: flex; align-items: center; gap: 7px; }
.qa-card__from { font-size: 13px; font-weight: 600; color: var(--text-primary); letter-spacing: -0.01em; }
.qa-card__date { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); letter-spacing: 0.02em; }
.qa-card__question { display: flex; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.qa-card__question svg { width: 16px; height: 16px; stroke: var(--text-muted); stroke-width: 1.5; fill: none; flex-shrink: 0; margin-top: 1px; }
.qa-card__question p { font-size: 13px; color: var(--text-primary); line-height: 1.6; }
.qa-reply-area { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.qa-reply-hint { font-size: 12px; color: var(--text-muted); }
.qa-textarea { resize: vertical; min-height: 72px; line-height: 1.5; }
.qa-reply-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.qa-reply-or { font-size: 12px; color: var(--text-muted); }
.qa-channel-link { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--accent-text); }
.qa-channel-link:hover { opacity: 0.75; }
.qa-channel-link svg { width: 12px; height: 12px; stroke: currentColor; stroke-width: 1.5; fill: none; }
.qa-card__answer { padding: 12px 18px; background: var(--success-soft); border-top: 1px solid var(--border); }
.qa-answer__label { display: flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-size: 11px; font-weight: 500; color: var(--success); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 7px; }
.qa-answer__label svg { width: 12px; height: 12px; stroke: currentColor; stroke-width: 2; fill: none; }
.qa-card__answer p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }

/* ════════════════════════════════════════════════════
   RESPONSIVO — MOBILE
════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .topbar { display: flex; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: 0 0 48px rgba(0,0,0,0.5); }
  .sidebar-overlay.open { display: block; }

  .main-content {
    grid-column: 1;
    padding: 14px;
    padding-top: calc(var(--topbar-height) + 14px);
  }

  .page-title { font-size: 22px; }
  .dashboard-summary { padding: 14px 18px; gap: 14px; }
  .summary-sep { display: none; }
  .login-card { padding: 24px 20px; }
  .proj-hero { padding: 18px; }
  .proj-hero__percent { font-size: 36px; }
  .report-detail { padding: 18px; }
  .file-item { padding: 10px 14px; }
  .file-item__action { display: none; }
  .qa-card__header { padding: 11px 14px; }
  .qa-card__question { padding: 13px 14px; }
  .qa-reply-area { padding: 13px 14px; }
  .files-section__header { padding: 12px 14px; }
  .toast { right: 12px; bottom: 12px; max-width: calc(100vw - 24px); }
  .booking-form-card { padding: 18px; }
  .time-slots { grid-template-columns: repeat(3, 1fr); }

  /* Chat mobile: rail vira drawer */
  .chat-shell {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--topbar-height) - 28px);
    position: relative;
  }

  .chat-rail {
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 260px;
    z-index: 20;
    transform: translateX(-100%);
    transition: transform var(--duration-slow) var(--easing);
    box-shadow: 0 0 32px rgba(0,0,0,0.40);
  }
  .chat-rail.open { transform: translateX(0); }

  .chat-main { flex: 1; }
  .chat-back-btn { display: flex; }

  .chat-files-panel { display: none !important; }
  .chat-shell.files-open { grid-template-columns: 1fr; }

  .meetings-card { margin-bottom: 10px; }
  .login-logo .brand-wordmark { height: 80px; }

  /* Project grid: mobile volta a cards verticais menores */
  .project-card { flex-wrap: wrap; }
  .project-card__body { flex-wrap: wrap; }
  .project-card__progress-wrap { min-width: 60px; }
  .project-card__meta { min-width: auto; }
}

/* ════════════════════════════════════════════════════
   LOGIN: BOTÃO GOOGLE + DIVISOR
════════════════════════════════════════════════════ */
.btn--google {
  background: #FFFFFF;
  color: #3C4043;
  border: 1px solid #DADCE0;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  gap: 10px;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  transition: background var(--duration-fast) var(--easing),
              box-shadow var(--duration-fast) var(--easing);
}
.btn--google:hover {
  background: #F8F9FA;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.btn--google:active { transform: scale(0.99); }
.btn--google:disabled { opacity: 0.6; cursor: default; }

.google-btn__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke: none !important;
  fill: inherit;
}
.btn--google .google-btn__icon path { stroke: none; }

.google-btn__text { flex: 1; text-align: center; }

/* Botão Google: segue as diretrizes do Google (claro #FFF, escuro #131314) */
[data-theme=dark] .btn--google {
  background: #131314;
  color: #E3E3E3;
  border-color: #8E918F;
}
[data-theme=dark] .btn--google:hover {
  background: #1E1F20;
  box-shadow: 0 2px 10px rgba(0,0,0,0.35);
}
.btn--google:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

.login-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0;
}
.login-divider__line {
  flex: 1;
  height: 1px;
  background: var(--border-strong);
}
.login-divider__text {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ════════════════════════════════════════════════════
   CHAT: LISTA DE PROJETOS
════════════════════════════════════════════════════ */
.chat-projects-list {
  display: flex;
  flex-direction: column;
}

.chat-project-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  text-align: left;
  background: none;
  border: none;
  border-left: 2px solid transparent;
  cursor: pointer;
  transition: background var(--duration-fast) var(--easing),
              border-color var(--duration-fast) var(--easing);
}
.chat-project-item:hover { background: var(--bg-raised); }
.chat-project-item:not(:last-child) { border-bottom: 1px solid var(--border); }
.chat-project-item--active {
  background: var(--bg-raised);
  border-left-color: var(--accent);
}
.chat-project-item--pending { }
.chat-project-item--pending.chat-project-item--active {
  border-left-color: var(--warning);
}

.chat-project-item__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.chat-project-item__name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.chat-project-item__preview {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-project-item--pending .chat-project-item__preview { color: var(--warning); }

.chat-project-item__badge {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--warning);
  flex-shrink: 0;
}

/* ════════════════════════════════════════════════════
   UTILITÁRIOS — form-group spacing (booking)
════════════════════════════════════════════════════ */
.fg-mb-sm  { margin-bottom: 14px; }
.fg-mb-md  { margin-bottom: 18px; }
.fg-mb-lg  { margin-bottom: 22px; }

/* Confirm-card meet link */
.confirm-meet-link {
  color: var(--accent-text);
  font-weight: 600;
  font-size: 12px;
}

/* Report download button top margin */
.report-dl-btn { margin-top: 14px; }

/* inline-style overrides migrados */

/* ════════════════════════════════════════════════════
   POLIMENTOS — animações (countUp + scaleX)
   Adicionado em 2026-07-28
════════════════════════════════════════════════════ */

/*
 * Barras de progresso animadas via transform:scaleX (GPU-friendly).
 * Os elementos com [data-pct] partem de scaleX(0) e animam até o valor.
 * A transição é aplicada via JS (animateProgressBars) para garantir
 * que o browser registre o estado inicial antes de animar.
 * Não usamos transition: width — apenas transform/opacity são permitidos.
 */
.project-card__progress-fill[data-pct],
.project-progress__fill[data-pct] {
  transform-origin: left center;
  /* transition é injetada pelo JS — não definir aqui para evitar conflito */
}

/* Remove a transition: width das barras que usam scaleX */
.project-card__progress-fill[data-pct] {
  width: 100% !important; /* ocupa o trilho inteiro — scaleX faz o clipping */
}

.project-progress__fill[data-pct] {
  width: 100% !important;
}

/* No modo reduced-motion, o JS seta scaleX final direto (sem transição).
   A regra global de prefers-reduced-motion já zera transition-duration,
   o que serve como fallback adicional. */
.text-accent  { color: var(--accent-text); }
.text-muted-c { color: var(--text-muted); }

/* ══════════════════════════════════════════════════════
   Andamento vindo da Bancada
   Um cartao dentro da visao geral do projeto. Vocabulario de cliente:
   "entregue", "em andamento", "parado". Nada de nome de agente, nome de
   responsavel ou motivo interno de bloqueio.
══════════════════════════════════════════════════════ */
.bancada-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 20px;
}
.bancada-card__topo { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.bancada-card__rotulo {
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px;
}
.bancada-card__conta { font-size: 14px; color: var(--text-primary); }
.bancada-card__pct {
  font-size: 28px; font-weight: 700; line-height: 1; color: var(--accent-text); white-space: nowrap;
}
.bancada-card__pct span { font-size: 15px; margin-left: 2px; }

.bancada-barra {
  height: 8px; border-radius: 999px; background: var(--accent-soft);
  overflow: hidden; margin: 14px 0 16px;
}
.bancada-barra > span {
  display: block; height: 100%; border-radius: 999px;
  background: var(--accent-text); transition: width 520ms cubic-bezier(.4,0,.2,1);
}

.bancada-lista { display: flex; flex-direction: column; }
.bancada-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-top: 1px solid var(--border); font-size: 13px;
}
.bancada-item:first-child { border-top: none; }
.bancada-item__fase {
  flex: none; min-width: 104px; font-size: 11px; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em;
}
.bancada-item__titulo {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--text-primary);
}
.bancada-item__aviso {
  flex: none; font-size: 11px; font-weight: 600; color: var(--warning);
}
.bancada-vazio { color: var(--text-muted); font-size: 13px; padding: 8px 0 0; }

@media (max-width: 640px) {
  .bancada-item { flex-wrap: wrap; gap: 4px 10px; }
  .bancada-item__fase { min-width: 0; }
  .bancada-item__titulo { flex-basis: 100%; white-space: normal; }
}

/* ─── Tela sob demanda baixando (js/pacotes.js) ─────── */
.bk-tela-carregando { padding: 32px 24px; max-width: 720px; }
.bk-tela-carregando[hidden] { display: none; }

/* ── ds.css ── */
/* ══════════════════════════════════════════════════════════════════════
   BKon OS  ·  ds.css  ·  linguagem única de interface (rev. 2026-10-07)
   Carregar DEPOIS de portal.css e ANTES dos CSS de módulo.
   Marca BKon v2 intacta: só tokens do portal.css (cobalto #3C53DD, ink #0B1120,
   Geist na interface, Bricolage só no título de página). Sem gradiente, sem ciano.

   COMO LER ESTE ARQUIVO
   Parte 1  Tokens --ds-*          (escala de espaço, raios, tipografia, alturas)
   Parte 2  Componentes .ds-*      (usar em tela nova; nomes estáveis)
   Parte 3  Casca: topbar, busca rápida, sino, menu de perfil
   Parte 4  Adaptadores            (dão o visual .ds-* às classes antigas dos módulos,
                                    para não precisar mexer em cada tela)

   COMPONENTES (.ds-*)
     Página        .ds-page-header  > __eyebrow? __title __desc? __actions
                   .ds-tabs > .ds-tab (aria-selected="true" | .is-active)  · .ds-tab__count
     Card          .ds-card > .ds-card__header (__title __desc __actions) .ds-card__body .ds-card__footer
                   modificadores: .ds-card--flush (corpo sem padding, para tabela) .ds-card--quiet
     KPI           .ds-kpis > .ds-kpi > __label __value __hint   (--danger --warn --ok)
     Tabela        .ds-table-wrap > table.ds-table  (th sticky, .ds-num à direita, .ds-actions no fim)
                   .ds-table--cards vira lista de cartões no celular (td com data-label)
     Barra filtros .ds-toolbar > .ds-search  .ds-select  .ds-toolbar__spacer
     Botões        .ds-btn  --primary --secondary --ghost --danger --danger-solid
                   --sm  .ds-btn--icon (só ícone, exige aria-label)  .is-loading / aria-busy="true"
     Badges        .ds-badge  --ok --warn --err --neutral --info --brand   (um mapa de cor por significado)
     Avisos        .ds-alert --ok --warn --err --info
     Estados       .ds-empty (__icon __title __desc + botão)  .ds-skeleton (+ __line __block)  .ds-error
     Modal/Gaveta  .ds-overlay > .ds-modal (__header __title __body __footer) · .ds-drawer
     Toast         usa o .toast do portal.css (já unificado aqui)
     Formulário    .ds-field > .ds-label  .ds-input/.ds-select  .ds-help  .ds-field-error  (.is-invalid)
     Avatar        .ds-avatar  --sm --lg
     Utilitários   .ds-num (número tabular)  .ds-muted  .ds-stack  .ds-row  .ds-sr
   ══════════════════════════════════════════════════════════════════════ */

/* ═══════════ PARTE 1 · TOKENS ═══════════ */
:root {
  --ds-s1: 4px;  --ds-s2: 8px;  --ds-s3: 12px; --ds-s4: 16px;
  --ds-s5: 20px; --ds-s6: 24px; --ds-s8: 32px; --ds-s10: 40px;

  --ds-r-sm: 6px;   /* chips, botões pequenos */
  --ds-r-md: 8px;   /* botões, campos */
  --ds-r-lg: 12px;  /* cards, tabelas */
  --ds-r-xl: 16px;  /* modal, gaveta */

  --ds-fs-label: 12px;   /* rótulo, cabeçalho de tabela, ajuda */
  --ds-fs-small: 13px;   /* texto de apoio, botão */
  --ds-fs-body: 14px;    /* texto corrido */
  --ds-fs-section: 16px; /* título de seção e de card grande */
  --ds-fs-kpi: 24px;     /* número de destaque */
  --ds-fs-title: 24px;   /* título de página */

  --ds-h-sm: 30px;       /* botão e campo pequenos */
  --ds-h-md: 36px;       /* botão padrão */
  --ds-h-field: 40px;    /* campo de formulário */
  --ds-topbar-h: 52px;

  --ds-pop-shadow: 0 12px 32px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.08);
  --ds-overlay: rgba(5, 8, 16, 0.62);
  --ds-hover: rgba(255,255,255,0.05);
  /* Mono só em código real (code, pre, kbd). Rótulo e número usam Geist com algarismos tabulares. */
  --font-mono: var(--font-ui);
}
[data-theme="light"] {
  --ds-pop-shadow: 0 12px 32px rgba(11,17,32,0.14), 0 0 0 1px #E4E7F0;
  --ds-overlay: rgba(11, 17, 32, 0.42);
  --ds-hover: rgba(11,17,32,0.045);
}
@media (pointer: coarse) { :root { --ds-h-md: 44px; --ds-h-sm: 38px; --ds-h-field: 44px; } }

body { font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }

/* ═══════════ PARTE 2 · COMPONENTES ═══════════ */
.ds-num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.ds-muted { color: var(--text-muted); }
.ds-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ds-stack { display: flex; flex-direction: column; gap: var(--ds-s4); }
.ds-row { display: flex; align-items: center; gap: var(--ds-s2); flex-wrap: wrap; }

/* ── Cabeçalho de página ── */
.ds-page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--ds-s4); flex-wrap: wrap; margin: 0 0 var(--ds-s5); }
.ds-page-header__eyebrow { font: 500 var(--ds-fs-label)/1.3 var(--font-ui); color: var(--text-muted); margin: 0 0 var(--ds-s1); }
.ds-page-header__title { font: 600 var(--ds-fs-title)/1.2 var(--font-display); letter-spacing: -0.02em; color: var(--text-primary); margin: 0; text-wrap: balance; }
.ds-page-header__desc { font: 400 var(--ds-fs-body)/1.5 var(--font-ui); color: var(--text-secondary); margin: var(--ds-s1) 0 0; max-width: 64ch; }
.ds-page-header__actions { display: flex; align-items: center; gap: var(--ds-s2); flex-wrap: wrap; }

/* ── Abas (uma só barra para o sistema todo) ── */
.ds-tabs { display: flex; gap: var(--ds-s1); border-bottom: 1px solid var(--border); margin: 0 0 var(--ds-s5); overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.ds-tabs::-webkit-scrollbar { display: none; }
.ds-tab { appearance: none; background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 0 var(--ds-s3); min-height: 40px; display: inline-flex; align-items: center; gap: var(--ds-s2); font: 500 var(--ds-fs-small)/1 var(--font-ui); color: var(--text-muted); white-space: nowrap; cursor: pointer; border-radius: var(--ds-r-sm) var(--ds-r-sm) 0 0; transition: color 120ms var(--easing), background-color 120ms var(--easing); }
.ds-tab:hover { color: var(--text-primary); background: var(--ds-hover); }
.ds-tab[aria-selected="true"], .ds-tab.is-active { color: var(--text-primary); font-weight: 600; border-bottom-color: var(--accent); }
.ds-tab:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.ds-tab__count { font-variant-numeric: tabular-nums; font-size: var(--ds-fs-label); font-weight: 500; color: var(--text-secondary); background: var(--bg-subtle); border-radius: 999px; padding: 2px 7px; }

/* ── Card ── */
.ds-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--ds-r-lg); min-width: 0; }
.ds-card__header { display: flex; align-items: center; justify-content: space-between; gap: var(--ds-s3); flex-wrap: wrap; padding: var(--ds-s4) var(--ds-s5); border-bottom: 1px solid var(--border); }
.ds-card__title { font: 600 var(--ds-fs-section)/1.3 var(--font-ui); letter-spacing: -0.01em; color: var(--text-primary); margin: 0; }
.ds-card__desc { font: 400 var(--ds-fs-small)/1.4 var(--font-ui); color: var(--text-muted); margin: 2px 0 0; }
.ds-card__actions { display: flex; gap: var(--ds-s2); align-items: center; }
.ds-card__body { padding: var(--ds-s5); }
.ds-card--flush > .ds-card__body { padding: 0; }
.ds-card__footer { display: flex; align-items: center; justify-content: flex-end; gap: var(--ds-s2); padding: var(--ds-s3) var(--ds-s5); border-top: 1px solid var(--border); background: var(--bg-subtle); border-radius: 0 0 var(--ds-r-lg) var(--ds-r-lg); }
.ds-card--quiet { background: var(--bg-subtle); }

/* ── KPI ── */
.ds-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--ds-s3); margin: 0 0 var(--ds-s5); }
.ds-kpi { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--ds-r-lg); padding: var(--ds-s4); min-width: 0; display: flex; flex-direction: column; gap: var(--ds-s1); }
.ds-kpi__label { font: 500 var(--ds-fs-small)/1.3 var(--font-ui); color: var(--text-muted); }
.ds-kpi__value { font: 600 var(--ds-fs-kpi)/1.15 var(--font-ui); letter-spacing: -0.02em; color: var(--text-primary); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ds-kpi__hint { font: 400 var(--ds-fs-label)/1.4 var(--font-ui); color: var(--text-muted); }
.ds-kpi--danger .ds-kpi__value { color: var(--danger); }
.ds-kpi--warn .ds-kpi__value { color: var(--warning); }
.ds-kpi--ok .ds-kpi__value { color: var(--success); }
.ds-kpi--danger { border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }

/* ── Tabela de dados ── */
.ds-table-wrap { overflow: auto; border: 1px solid var(--border); border-radius: var(--ds-r-lg); background: var(--bg-card); max-height: 70vh; }
.ds-card--flush .ds-table-wrap { border: 0; border-radius: 0; }
.ds-table { width: 100%; border-collapse: separate; border-spacing: 0; font: 400 var(--ds-fs-body)/1.4 var(--font-ui); color: var(--text-secondary); }
.ds-table thead th { position: sticky; top: 0; z-index: 1; background: var(--bg-card); text-align: left; font: 500 var(--ds-fs-label)/1.3 var(--font-ui); color: var(--text-muted); padding: var(--ds-s3) var(--ds-s4); border-bottom: 1px solid var(--border-strong); white-space: nowrap; }
.ds-table td { padding: var(--ds-s3) var(--ds-s4); border-bottom: 1px solid var(--border); vertical-align: middle; }
.ds-table tbody tr:last-child td { border-bottom: 0; }
.ds-table tbody tr:hover td { background: var(--ds-hover); }
.ds-table .ds-num, .ds-table th.ds-num { text-align: right; font-variant-numeric: tabular-nums; }
.ds-table td.ds-strong { color: var(--text-primary); font-weight: 500; }
.ds-table .ds-actions { text-align: right; white-space: nowrap; width: 1%; }
.ds-table .ds-actions > * + * { margin-left: var(--ds-s1); }
@media (max-width: 700px) {
  .ds-table--cards thead { display: none; }
  .ds-table--cards, .ds-table--cards tbody, .ds-table--cards tr, .ds-table--cards td { display: block; width: 100%; }
  .ds-table--cards tr { border-bottom: 1px solid var(--border); padding: var(--ds-s3) var(--ds-s4); }
  .ds-table--cards td { border: 0; padding: var(--ds-s1) 0; display: flex; justify-content: space-between; gap: var(--ds-s3); text-align: right; }
  .ds-table--cards td::before { content: attr(data-label); color: var(--text-muted); font-size: var(--ds-fs-label); text-align: left; flex: none; }
  .ds-table--cards td.ds-actions { justify-content: flex-start; width: auto; }
  .ds-table--cards td.ds-actions::before { content: none; }
}

/* ── Barra de filtros e busca ── */
.ds-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ds-s2); margin: 0 0 var(--ds-s4); }
.ds-toolbar__spacer { flex: 1 1 auto; }
.ds-search { position: relative; flex: 1 1 260px; max-width: 420px; }
.ds-search > svg { position: absolute; left: 11px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); fill: none; stroke: var(--text-muted); stroke-width: 1.75; stroke-linecap: round; pointer-events: none; }
.ds-search > input { padding-left: 34px; }

/* ── Botões ── */
.ds-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--ds-h-md); padding: 0 14px; border-radius: var(--ds-r-md); border: 1px solid transparent; background: transparent; color: var(--text-primary); font: 600 var(--ds-fs-small)/1 var(--font-ui); letter-spacing: -0.005em; white-space: nowrap; cursor: pointer; text-decoration: none; position: relative; transition: background-color 120ms var(--easing), border-color 120ms var(--easing), color 120ms var(--easing), transform 120ms var(--easing); touch-action: manipulation; }
.ds-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ds-btn--sm { min-height: var(--ds-h-sm); padding: 0 10px; font-size: 12.5px; border-radius: var(--ds-r-sm); }
.ds-btn--primary { background: var(--btn-primary-bg); color: var(--btn-primary-color); }
.ds-btn--secondary { background: var(--bg-card); border-color: var(--border-strong); color: var(--text-primary); }
.ds-btn--ghost { color: var(--text-secondary); }
.ds-btn--danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.ds-btn--danger-solid { background: var(--danger); color: #fff; }
.ds-btn--icon { width: var(--ds-h-md); padding: 0; }
.ds-btn--icon.ds-btn--sm { width: var(--ds-h-sm); }
@media (hover: hover) {
  .ds-btn--primary:hover { background: var(--accent-hover); }
  .ds-btn--secondary:hover { background: var(--bg-raised); border-color: var(--text-muted); }
  .ds-btn--ghost:hover { background: var(--ds-hover); color: var(--text-primary); }
  .ds-btn--danger:hover { background: var(--danger-soft); }
  .ds-btn--danger-solid:hover { filter: brightness(0.92); }
}
.ds-btn:active { transform: scale(0.98); }
.ds-btn--primary:active { background: var(--accent-active); }
.ds-btn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.ds-btn:disabled, .ds-btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; transform: none; }
.ds-btn.is-loading, .ds-btn[aria-busy="true"] { color: transparent !important; pointer-events: none; }
.ds-btn.is-loading::after, .ds-btn[aria-busy="true"]::after { content: ''; position: absolute; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--btn-primary-color); border-right-color: transparent; animation: ds-gira 700ms linear infinite; }
.ds-btn--secondary.is-loading::after, .ds-btn--ghost.is-loading::after, .ds-btn--danger.is-loading::after { border-color: var(--text-primary); border-right-color: transparent; }
@keyframes ds-gira { to { transform: rotate(360deg); } }

/* ── Badges de status: UM mapa de cor por significado ── */
.ds-badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px; font: 500 var(--ds-fs-label)/1 var(--font-ui); white-space: nowrap; border: 1px solid transparent; background: var(--bg-raised); color: var(--text-secondary); }
.ds-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.ds-badge--ok { background: var(--success-soft); color: var(--success); border-color: color-mix(in srgb, var(--success) 26%, transparent); }
.ds-badge--warn { background: var(--warning-soft); color: var(--warning); border-color: color-mix(in srgb, var(--warning) 28%, transparent); }
.ds-badge--err { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 28%, transparent); }
.ds-badge--info { background: var(--info-soft); color: var(--info); border-color: color-mix(in srgb, var(--info) 28%, transparent); }
.ds-badge--brand { background: var(--accent-soft); color: var(--accent-text); border-color: var(--accent-border); }
.ds-badge--neutral { background: var(--bg-raised); color: var(--text-secondary); border-color: var(--border-strong); }

/* ── Aviso ── */
.ds-alert { display: flex; align-items: flex-start; gap: var(--ds-s3); padding: var(--ds-s3) var(--ds-s4); border-radius: var(--ds-r-md); border: 1px solid var(--border-strong); background: var(--bg-subtle); color: var(--text-primary); font: 400 var(--ds-fs-body)/1.5 var(--font-ui); margin: 0 0 var(--ds-s4); }
.ds-alert--warn { background: var(--warning-soft); border-color: color-mix(in srgb, var(--warning) 35%, transparent); }
.ds-alert--err { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.ds-alert--ok { background: var(--success-soft); border-color: color-mix(in srgb, var(--success) 35%, transparent); }
.ds-alert--info { background: var(--info-soft); border-color: color-mix(in srgb, var(--info) 35%, transparent); }
.ds-alert > :last-child { margin-left: auto; }

/* ── Estados: vazio, carregando, erro ── */
.ds-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--ds-s2); padding: var(--ds-s10) var(--ds-s5); border: 1px dashed var(--border-strong); border-radius: var(--ds-r-lg); background: var(--bg-subtle); color: var(--text-secondary); }
.ds-empty__icon { width: 40px; height: 40px; fill: none; stroke: var(--text-muted); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ds-empty__title { font: 600 var(--ds-fs-section)/1.3 var(--font-ui); color: var(--text-primary); margin: 0; }
.ds-empty__desc { font: 400 var(--ds-fs-body)/1.5 var(--font-ui); max-width: 44ch; margin: 0 0 var(--ds-s2); }
.ds-skeleton { display: flex; flex-direction: column; gap: var(--ds-s2); }
.ds-skeleton__line, .ds-skeleton__block { background: var(--bg-raised); border-radius: var(--ds-r-sm); animation: ds-pulso 1.4s ease-in-out infinite; }
.ds-skeleton__line { height: 14px; }
.ds-skeleton__block { height: 72px; border-radius: var(--ds-r-lg); }
@keyframes ds-pulso { 50% { opacity: 0.5; } }
.ds-error { display: flex; align-items: center; justify-content: space-between; gap: var(--ds-s3); flex-wrap: wrap; padding: var(--ds-s4) var(--ds-s5); border-radius: var(--ds-r-lg); border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent); background: var(--danger-soft); color: var(--text-primary); font: 400 var(--ds-fs-body)/1.5 var(--font-ui); }

/* ── Modal e gaveta ── */
.ds-overlay { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: var(--ds-s4); background: var(--ds-overlay); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.ds-modal { background: var(--bg-card); border: 1px solid var(--border-strong); border-radius: var(--ds-r-xl); box-shadow: var(--ds-pop-shadow); width: 100%; max-width: 520px; max-height: calc(100dvh - 32px); display: flex; flex-direction: column; overflow: hidden; }
.ds-modal__header { display: flex; align-items: center; justify-content: space-between; gap: var(--ds-s3); padding: var(--ds-s5) var(--ds-s6) var(--ds-s3); }
.ds-modal__title { font: 600 18px/1.3 var(--font-ui); letter-spacing: -0.01em; color: var(--text-primary); margin: 0; }
.ds-modal__body { padding: var(--ds-s2) var(--ds-s6) var(--ds-s5); overflow-y: auto; overscroll-behavior: contain; }
.ds-modal__footer { display: flex; justify-content: flex-end; gap: var(--ds-s2); padding: var(--ds-s3) var(--ds-s6); border-top: 1px solid var(--border); background: var(--bg-subtle); }
.ds-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); background: var(--bg-card); border-left: 1px solid var(--border-strong); box-shadow: var(--ds-pop-shadow); display: flex; flex-direction: column; z-index: 1001; }

/* ── Formulário ── */
.ds-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ds-label { font: 500 var(--ds-fs-small)/1.3 var(--font-ui); color: var(--text-primary); }
.ds-help { font: 400 var(--ds-fs-label)/1.4 var(--font-ui); color: var(--text-muted); }
.ds-field-error { font: 500 var(--ds-fs-label)/1.4 var(--font-ui); color: var(--danger); }
.ds-input, .ds-select { width: 100%; min-height: var(--ds-h-field); padding: 0 12px; background: var(--bg-raised); border: 1px solid var(--input-border); border-radius: var(--ds-r-md); color: var(--text-primary); font: 400 var(--ds-fs-body)/1.3 var(--font-ui); }
.ds-select { appearance: none; padding-right: 32px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%239AA2B4' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.ds-input:focus, .ds-select:focus { outline: none; border-color: var(--focus-ring); box-shadow: 0 0 0 3px var(--accent-soft); }
.is-invalid, .ds-input.is-invalid { border-color: var(--danger); }

/* ── Avatar ── */
.ds-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; display: inline-grid; place-items: center; font: 600 12px/1 var(--font-ui); letter-spacing: 0.02em; flex: none; user-select: none; }
.ds-avatar--sm { width: 24px; height: 24px; font-size: 10px; }
.ds-avatar--lg { width: 40px; height: 40px; font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  .ds-btn, .ds-tab { transition: none; }
  .ds-skeleton__line, .ds-skeleton__block, .ds-btn.is-loading::after { animation-duration: 2.4s; }
}

/* ═══════════ PARTE 3 · CASCA (topbar, busca, sino, perfil) ═══════════ */
.ds-topbar { display: none; }
@media (min-width: 901px) {
  .ds-topbar { position: fixed; z-index: 45; top: 0; left: var(--sidebar-width); right: 0; height: var(--ds-topbar-h); display: flex; align-items: center; justify-content: space-between; gap: var(--ds-s4); padding: 0 var(--ds-s8); background: var(--bg-primary); border-bottom: 1px solid var(--border); transition: left var(--duration-slow) var(--easing); }
  html.bk-app .ds-topbar { display: none; }
  html:not(.bk-app) .main-content { padding-top: calc(var(--ds-topbar-h) + 24px); }
}
.ds-crumbs { display: flex; align-items: center; gap: var(--ds-s2); min-width: 0; font: 500 var(--ds-fs-small)/1 var(--font-ui); color: var(--text-muted); }
.ds-crumbs__sep { color: var(--text-disabled); }
.ds-crumbs__now { color: var(--text-primary); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-crumbs__up { white-space: nowrap; }
.ds-topbar__right { display: flex; align-items: center; gap: var(--ds-s2); flex: none; }

.ds-quick { position: relative; }
.ds-quick__field { display: flex; align-items: center; gap: var(--ds-s2); width: 280px; height: var(--ds-h-md); padding: 0 var(--ds-s3); background: var(--bg-card); border: 1px solid var(--border-strong); border-radius: var(--ds-r-md); color: var(--text-muted); transition: border-color 120ms var(--easing), box-shadow 120ms var(--easing); }
.ds-quick__field:focus-within { border-color: var(--focus-ring); box-shadow: 0 0 0 3px var(--accent-soft); }
.ds-quick__field svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; flex: none; }
.ds-quick__field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text-primary); font: 400 var(--ds-fs-small)/1 var(--font-ui); }
.ds-quick__field input::placeholder { color: var(--text-placeholder); }
.ds-quick__field kbd { font: 500 11px/1 var(--font-ui); color: var(--text-muted); border: 1px solid var(--border-strong); border-radius: 4px; padding: 2px 5px; }
.ds-quick__field:focus-within kbd { display: none; }
.ds-quick__list { position: absolute; top: calc(100% + 6px); right: 0; width: 360px; max-height: 60vh; overflow-y: auto; padding: var(--ds-s1); margin: 0; list-style: none; background: var(--bg-card); border-radius: var(--ds-r-lg); box-shadow: var(--ds-pop-shadow); }
.ds-quick__item { display: flex; align-items: center; gap: var(--ds-s3); padding: 0 var(--ds-s3); min-height: 38px; border-radius: var(--ds-r-md); color: var(--text-primary); font: 500 var(--ds-fs-small)/1.2 var(--font-ui); cursor: pointer; }
.ds-quick__item small { margin-left: auto; color: var(--text-muted); font-weight: 400; font-size: var(--ds-fs-label); }
.ds-quick__item[aria-selected="true"] { background: var(--accent-soft); }
.ds-quick__empty { padding: var(--ds-s4); color: var(--text-muted); font-size: var(--ds-fs-small); }

.ds-iconbtn { position: relative; width: var(--ds-h-md); height: var(--ds-h-md); display: inline-grid; place-items: center; border-radius: var(--ds-r-md); border: 1px solid transparent; background: transparent; color: var(--text-secondary); cursor: pointer; transition: background-color 120ms var(--easing), color 120ms var(--easing); }
.ds-iconbtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) { .ds-iconbtn:hover { background: var(--ds-hover); color: var(--text-primary); } }
.ds-iconbtn:active { transform: scale(0.96); }
.ds-iconbtn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.ds-iconbtn__dot { position: absolute; top: 3px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box; border-radius: 999px; background: var(--danger); color: #fff; font: 600 10px/16px var(--font-ui); text-align: center; font-variant-numeric: tabular-nums; }
.ds-iconbtn__dot[hidden] { display: none; }
[data-theme="dark"] .ds-iconbtn__dot { color: #0B1120; }

.ds-pop { position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; min-width: 260px; max-width: calc(100vw - 16px); padding: var(--ds-s1); background: var(--bg-card); border-radius: var(--ds-r-lg); box-shadow: var(--ds-pop-shadow); animation: ds-pop-in 140ms var(--easing-out) both; }
.ds-pop[hidden] { display: none; }
.ds-pop--fixed { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 56px); right: 8px; }
@keyframes ds-pop-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ds-pop { animation: none; } }
.ds-pop__head { display: flex; align-items: center; gap: var(--ds-s3); padding: var(--ds-s3); border-bottom: 1px solid var(--border); margin-bottom: var(--ds-s1); }
.ds-pop__name { font: 600 var(--ds-fs-body)/1.3 var(--font-ui); color: var(--text-primary); overflow-wrap: anywhere; }
.ds-pop__sub { font: 400 var(--ds-fs-label)/1.4 var(--font-ui); color: var(--text-muted); overflow-wrap: anywhere; }
.ds-pop__title { padding: var(--ds-s2) var(--ds-s3); font: 600 var(--ds-fs-label)/1.3 var(--font-ui); color: var(--text-muted); }
.ds-pop__item { display: flex; align-items: center; gap: var(--ds-s3); width: 100%; min-height: 40px; padding: 0 var(--ds-s3); border: 0; border-radius: var(--ds-r-md); background: transparent; color: var(--text-primary); font: 500 var(--ds-fs-small)/1.2 var(--font-ui); text-align: left; cursor: pointer; text-decoration: none; }
.ds-pop__item svg { width: 16px; height: 16px; fill: none; stroke: var(--text-muted); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ds-pop__item em { margin-left: auto; font-style: normal; font-variant-numeric: tabular-nums; font-size: var(--ds-fs-label); color: var(--danger); font-weight: 600; }
@media (hover: hover) { .ds-pop__item:hover { background: var(--ds-hover); } }
.ds-pop__item:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; background: var(--ds-hover); }
.ds-pop__item--danger { color: var(--danger); }
.ds-pop__item--danger svg { stroke: var(--danger); }
.ds-pop__sep { height: 1px; background: var(--border); margin: var(--ds-s1) 0; }
.ds-pop__empty { padding: var(--ds-s4) var(--ds-s3); color: var(--text-muted); font-size: var(--ds-fs-small); }
.ds-profile { position: relative; }
.ds-profile__btn { display: inline-flex; align-items: center; gap: var(--ds-s2); padding: 3px 8px 3px 3px; height: var(--ds-h-md); border-radius: 999px; border: 1px solid var(--border-strong); background: var(--bg-card); color: var(--text-secondary); cursor: pointer; transition: border-color 120ms var(--easing), background-color 120ms var(--easing); }
.ds-profile__btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
@media (hover: hover) { .ds-profile__btn:hover { border-color: var(--text-muted); background: var(--bg-raised); } }
.ds-profile__btn:focus-visible, .ds-profile__btn[aria-expanded="true"] { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

/* Trocar / definir senha (menu do perfil → modal, js/perfil.js) */
.ds-senha .modal { max-width: 420px; }
.ds-senha__intro { margin: 0 0 var(--ds-s4); color: var(--text-secondary); font: 400 var(--ds-fs-small)/1.5 var(--font-ui); }
.ds-senha__intro strong { color: var(--text-primary); font-weight: 600; overflow-wrap: anywhere; }
.ds-senha form { display: flex; flex-direction: column; gap: var(--ds-s4); }
.ds-senha__regras { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; font: 400 var(--ds-fs-label)/1.4 var(--font-ui); color: var(--text-muted); }
.ds-senha__regras li { display: flex; align-items: center; gap: 6px; }
.ds-senha__regras li::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: var(--border-strong); flex: none; transition: background-color 120ms var(--easing); }
.ds-senha__regras li[data-ok="true"] { color: var(--success); }
.ds-senha__regras li[data-ok="true"]::before { background: var(--success); }
.ds-senha .form-error[hidden], .ds-senha [hidden] { display: none !important; }
.ds-senha .form-actions { margin-top: var(--ds-s1); }
.ds-senha__codigo { letter-spacing: .3em; font-variant-numeric: tabular-nums; }
@media (max-width: 480px) {
  .ds-senha .form-actions { flex-direction: column-reverse; }
  .ds-senha .form-actions .btn { width: 100%; justify-content: center; min-height: 44px; }
}

/* Menu lateral: Tema e Sair saíram do rodapé (vivem no menu de perfil); busca vira a do topo */
@media (min-width: 901px) {
  html:not(.bk-app) .menu-busca, html:not(.bk-app) .menu-busca__vazio { display: none !important; }
}

/* Celular (modo app): o título da tela já está no cabeçalho do app, então o h1 fica só para leitor de tela */
html.bk-app .page-header { justify-content: flex-end; margin-bottom: var(--ds-s4); }
html.bk-app .page-header .page-title { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html.bk-app #screen-dashboard .page-header { justify-content: space-between; }
html.bk-app #screen-dashboard .page-header .page-title { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; white-space: normal; }

/* ═══════════ PARTE 4 · ADAPTADORES (classes antigas → visual .ds) ═══════════
   Prefixados por html:root:not(#ds) no build (ver nota do topo) para vencer o CSS dos módulos. */

  /* Tipografia base: sem rótulo em caixa alta monoespaçada */
  html:root:not(#ds) .form-label,
html:root:not(#ds) .modal__section-label,
html:root:not(#ds) .section-label,
html:root:not(#ds) .page-eyebrow,
html:root:not(#ds) .qa-answer__label,
html:root:not(#ds) .filter-bar__label{ font-family: var(--font-ui); text-transform: none; letter-spacing: 0; font-size: var(--ds-fs-label); font-weight: 500; }
html:root:not(#ds) .form-label{ font-size: var(--ds-fs-small); color: var(--text-primary); }
html:root:not(#ds) .section-label{ font-size: var(--ds-fs-section); font-weight: 600; color: var(--text-primary); margin-bottom: var(--ds-s3); }


  /* Cabeçalho de página */
  html:root:not(#ds) .page-header{ align-items: flex-end; margin-bottom: var(--ds-s5); gap: var(--ds-s4); }
html:root:not(#ds) .page-header .page-eyebrow{ display: none; }
html:root:not(#ds) #screen-dashboard .page-header .page-eyebrow{ display: block; margin-bottom: var(--ds-s1); }
html:root:not(#ds) .page-title{ font-family: var(--font-display); font-size: var(--ds-fs-title); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; text-wrap: balance; }
html:root:not(#ds) .page-header__actions,
html:root:not(#ds) .fin-header-acoes{ gap: var(--ds-s2); flex-wrap: wrap; }


  /* Abas: uma barra só (sublinhado) */
  html:root:not(#ds) .fin-abas,
html:root:not(#ds) .proj-tabs,
html:root:not(#ds) .ce-abas,
html:root:not(#ds) .au-abas,
html:root:not(#ds) .us-abas,
html:root:not(#ds) .nf-abas,
html:root:not(#ds) .files-tabs{ display: flex; flex-wrap: nowrap; gap: var(--ds-s1); padding: 0; margin: 0 0 var(--ds-s5); width: auto; max-width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; overflow-x: auto; scrollbar-width: none; }
html:root:not(#ds) .fin-abas::-webkit-scrollbar,
html:root:not(#ds) .proj-tabs::-webkit-scrollbar,
html:root:not(#ds) .ce-abas::-webkit-scrollbar,
html:root:not(#ds) .au-abas::-webkit-scrollbar,
html:root:not(#ds) .us-abas::-webkit-scrollbar,
html:root:not(#ds) .nf-abas::-webkit-scrollbar{ display: none; }
html:root:not(#ds) .fin-aba,
html:root:not(#ds) .proj-tab,
html:root:not(#ds) .ce-aba,
html:root:not(#ds) .au-abas button,
html:root:not(#ds) .us-abas button,
html:root:not(#ds) .nf-abas button{
    all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: var(--ds-s2); min-height: 40px; padding: 0 var(--ds-s3); margin-bottom: -1px;
    font: 500 var(--ds-fs-small)/1 var(--font-ui); color: var(--text-muted); white-space: nowrap; border: 0; border-bottom: 2px solid transparent; border-radius: var(--ds-r-sm) var(--ds-r-sm) 0 0; background: transparent; box-shadow: none;
    transition: color 120ms var(--easing), background-color 120ms var(--easing);
  }
html:root:not(#ds) .fin-aba:hover,
html:root:not(#ds) .proj-tab:hover:not(.active),
html:root:not(#ds) .ce-aba:hover,
html:root:not(#ds) .au-abas button:hover,
html:root:not(#ds) .us-abas button:hover,
html:root:not(#ds) .nf-abas button:hover{ color: var(--text-primary); background: var(--ds-hover); }
html:root:not(#ds) .fin-aba--ativa,
html:root:not(#ds) .proj-tab.active,
html:root:not(#ds) .ce-aba[aria-pressed="true"],
html:root:not(#ds) .au-abas button.is-ativo,
html:root:not(#ds) .us-abas button.is-ativo,
html:root:not(#ds) .nf-abas button.is-ativo{
    color: var(--text-primary); font-weight: 600; background: transparent; border-bottom-color: var(--accent); box-shadow: none;
  }
html:root:not(#ds) .fin-aba:focus-visible,
html:root:not(#ds) .proj-tab:focus-visible,
html:root:not(#ds) .ce-aba:focus-visible,
html:root:not(#ds) .au-abas button:focus-visible,
html:root:not(#ds) .us-abas button:focus-visible,
html:root:not(#ds) .nf-abas button:focus-visible{ outline: 2px solid var(--focus-ring); outline-offset: -2px; }


  /* Botões */
  html:root:not(#ds) .btn{ min-height: var(--ds-h-md); border-radius: var(--ds-r-md); font-family: var(--font-ui); font-size: var(--ds-fs-small); font-weight: 600; letter-spacing: -0.005em; line-height: 1; gap: 6px; border: 1px solid transparent; touch-action: manipulation; }
html:root:not(#ds) .btn svg{ width: 16px; height: 16px; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
html:root:not(#ds) .btn--sm{ min-height: var(--ds-h-sm); font-size: 12.5px; border-radius: var(--ds-r-sm); }
html:root:not(#ds) .chat-send-btn{ min-height: 32px; width: 32px; padding: 0; }
html:root:not(#ds) .btn--sm svg{ width: 14px; height: 14px; }
html:root:not(#ds) .btn--primary:hover:not(:disabled){ transform: none; box-shadow: none; background: var(--accent-hover); }
html:root:not(#ds) .btn--ghost{ background: var(--bg-card); border-color: var(--border-strong); color: var(--text-primary); }
html:root:not(#ds) .btn--ghost:hover:not(:disabled){ background: var(--bg-raised); border-color: var(--text-muted); color: var(--text-primary); }
html:root:not(#ds) .btn:disabled,
html:root:not(#ds) .btn[disabled],
html:root:not(#ds) .btn[aria-disabled="true"]{ opacity: 0.45; }
html:root:not(#ds) .btn:focus-visible{ outline: 2px solid var(--focus-ring); outline-offset: 2px; }
html:root:not(#ds) .btn.is-loading,
html:root:not(#ds) .btn[aria-busy="true"]{ color: transparent; pointer-events: none; position: relative; }
html:root:not(#ds) .btn.is-loading::after,
html:root:not(#ds) .btn[aria-busy="true"]::after{ content: ''; position: absolute; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--btn-primary-color); border-right-color: transparent; animation: ds-gira 700ms linear infinite; }
html:root:not(#ds) .btn--ghost.is-loading::after{ border-color: var(--text-primary); border-right-color: transparent; }

  /* perigo: texto vermelho, sem caixa até passar o mouse */
  html:root:not(#ds) .btn--danger-ghost,
html:root:not(#ds) .fin-btn--perigo,
html:root:not(#ds) .fin-btn--texto-perigo,
html:root:not(#ds) .au-btn-perigo{ background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
html:root:not(#ds) .btn--danger-ghost:hover:not(:disabled),
html:root:not(#ds) .fin-btn--perigo:hover:not(:disabled),
html:root:not(#ds) .fin-btn--texto-perigo:hover:not(:disabled),
html:root:not(#ds) .au-btn-perigo:hover:not(:disabled){ background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
html:root:not(#ds) .btn--danger-solid{ background: var(--danger); color: #fff; border-color: transparent; }

  /* ações de linha: botões calmos, a caixa só aparece ao passar o mouse */
  html:root:not(#ds) .admin-client-card__actions .btn:not(.btn--primary):not(.btn--danger-ghost):not(.btn--danger-solid),
html:root:not(#ds) .fin-acoes .btn--ghost,
html:root:not(#ds) .fin-table td .btn--ghost,
html:root:not(#ds) .crm-tabela .btn--ghost,
html:root:not(#ds) .ce-tabela .btn--ghost,
html:root:not(#ds) .au-tabela .btn--ghost,
html:root:not(#ds) .contract-actions .btn--ghost,
html:root:not(#ds) .invoice-actions .btn--ghost,
html:root:not(#ds) .product-actions .btn--ghost,
html:root:not(#ds) .us-item .btn--ghost,
html:root:not(#ds) .nf-item .btn--ghost{ background: transparent; border-color: transparent; color: var(--text-secondary); }
html:root:not(#ds) .admin-client-card__actions .btn:not(.btn--primary):not(.btn--danger-ghost):not(.btn--danger-solid):hover:not(:disabled),
html:root:not(#ds) .fin-acoes .btn--ghost:hover:not(:disabled),
html:root:not(#ds) .fin-table td .btn--ghost:hover:not(:disabled),
html:root:not(#ds) .crm-tabela .btn--ghost:hover:not(:disabled),
html:root:not(#ds) .ce-tabela .btn--ghost:hover:not(:disabled),
html:root:not(#ds) .au-tabela .btn--ghost:hover:not(:disabled),
html:root:not(#ds) .contract-actions .btn--ghost:hover:not(:disabled),
html:root:not(#ds) .invoice-actions .btn--ghost:hover:not(:disabled),
html:root:not(#ds) .product-actions .btn--ghost:hover:not(:disabled),
html:root:not(#ds) .us-item .btn--ghost:hover:not(:disabled),
html:root:not(#ds) .nf-item .btn--ghost:hover:not(:disabled){ background: var(--ds-hover); border-color: var(--border-strong); color: var(--text-primary); }
html:root:not(#ds) .admin-client-card__actions .btn--danger-ghost,
html:root:not(#ds) .fin-acoes .btn--danger-ghost,
html:root:not(#ds) .contract-actions .btn--danger-ghost,
html:root:not(#ds) .invoice-actions .btn--danger-ghost,
html:root:not(#ds) .product-actions .btn--danger-ghost{ border-color: transparent; }


  /* Campos */
  html:root:not(#ds) .form-input,
html:root:not(#ds) .form-select,
html:root:not(#ds) .form-textarea{ min-height: var(--ds-h-field); font-size: var(--ds-fs-body); line-height: 1.3; border-radius: var(--ds-r-md); }
html:root:not(#ds) textarea.form-input,
html:root:not(#ds) .form-textarea{ min-height: 80px; line-height: 1.5; }
html:root:not(#ds) .form-input:focus{ box-shadow: 0 0 0 3px var(--accent-soft); }
@media (max-width: 900px){html:root:not(#ds) .form-input,
html:root:not(#ds) .form-select,
html:root:not(#ds) .form-textarea{ font-size: 16px; }
 }
html:root:not(#ds) .form-group{ gap: 6px; }
html:root:not(#ds) .filter-bar{ gap: var(--ds-s2); margin-bottom: var(--ds-s4); }
html:root:not(#ds) .filter-bar .form-select{ min-width: 180px; }


  /* Cards: um raio, uma borda, sem sombra */
  html:root:not(#ds) .fin-card,
html:root:not(#ds) .crm-card,
html:root:not(#ds) .au-card,
html:root:not(#ds) .admin-form-card,
html:root:not(#ds) .admin-client-card,
html:root:not(#ds) .project-card,
html:root:not(#ds) .meetings-card,
html:root:not(#ds) .qa-card,
html:root:not(#ds) .op-card,
html:root:not(#ds) .us-item,
html:root:not(#ds) .nf-item,
html:root:not(#ds) .bancada-card,
html:root:not(#ds) .c6-status-tile,
html:root:not(#ds) .crm-metas__card,
html:root:not(#ds) .ce-grafico,
html:root:not(#ds) .ce-cartao,
html:root:not(#ds) .overview-card{
    border-radius: var(--ds-r-lg); border-color: var(--border); box-shadow: none;
  }
html:root:not(#ds) .fin-card,
html:root:not(#ds) .au-card,
html:root:not(#ds) .ce-grafico{ padding: var(--ds-s5); }
html:root:not(#ds) .fin-card__titulo,
html:root:not(#ds) .au-card__titulo,
html:root:not(#ds) .ce-secao__titulo,
html:root:not(#ds) .crm-secao__titulo,
html:root:not(#ds) .op-lista-titulo{ font-family: var(--font-ui); font-size: var(--ds-fs-section); font-weight: 600; letter-spacing: -0.01em; }
@media (hover: hover){html:root:not(#ds) .project-card:hover,
html:root:not(#ds) .admin-client-card:hover,
html:root:not(#ds) .ce-cartao:hover{ box-shadow: none; border-color: var(--border-strong); }
 }


  /* KPIs: rótulo em frase, número tabular, mesma caixa */
  html:root:not(#ds) .fin-kpi,
html:root:not(#ds) .crm-kpi,
html:root:not(#ds) .ce-cartao,
html:root:not(#ds) .c6-status-tile{ padding: var(--ds-s4); border-radius: var(--ds-r-lg); background: var(--bg-card); border: 1px solid var(--border); box-shadow: none; }
html:root:not(#ds) .fin-kpi__rotulo,
html:root:not(#ds) .crm-kpi__rotulo,
html:root:not(#ds) .crm-metas__nome,
html:root:not(#ds) .ce-cartao__rotulo,
html:root:not(#ds) .ce-numero__rot,
html:root:not(#ds) .fin-tile__rotulo{ font-family: var(--font-ui); font-size: var(--ds-fs-small); font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--text-muted); }
html:root:not(#ds) .fin-kpi__valor,
html:root:not(#ds) .crm-kpi__valor,
html:root:not(#ds) .ce-cartao__valor{ font-family: var(--font-ui); font-size: var(--ds-fs-kpi); font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.15; }
html:root:not(#ds) .fin-kpi__sub,
html:root:not(#ds) .crm-kpi__sub,
html:root:not(#ds) .ce-cartao__sub{ font-size: var(--ds-fs-label); color: var(--text-muted); }
html:root:not(#ds) .fin-kpis{ gap: var(--ds-s3); }
html:root:not(#ds) .crm-kpis{ gap: var(--ds-s3); margin-bottom: var(--ds-s4); }


  /* Tabelas: cabeçalho em frase, números tabulares, linha com hover */
  html:root:not(#ds) .fin-table th,
html:root:not(#ds) .ce-tabela th,
html:root:not(#ds) .au-tabela th,
html:root:not(#ds) .crm-tabela__cab,
html:root:not(#ds) .crm-doc__tabela th{ font-family: var(--font-ui); font-size: var(--ds-fs-label); font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--text-muted); }
html:root:not(#ds) .fin-table td,
html:root:not(#ds) .ce-tabela td,
html:root:not(#ds) .au-tabela td{ font-variant-numeric: tabular-nums; }
html:root:not(#ds) .fin-table th,
html:root:not(#ds) .ce-tabela th,
html:root:not(#ds) .au-tabela th{ padding: var(--ds-s3) var(--ds-s3); }
html:root:not(#ds) .fin-table td,
html:root:not(#ds) .ce-tabela td,
html:root:not(#ds) .au-tabela td{ padding: var(--ds-s3) var(--ds-s3); }
html:root:not(#ds) .crm-tabela__linha:hover,
html:root:not(#ds) .ce-tabela tbody tr:hover td,
html:root:not(#ds) .au-tabela tbody tr:hover td{ background: var(--ds-hover); }


  /* Badges e etiquetas: frase, sem monoespaçada */
  html:root:not(#ds) .badge,
html:root:not(#ds) .client-badge,
html:root:not(#ds) .nf-selo,
html:root:not(#ds) .fin-tag,
html:root:not(#ds) .crm-tag,
html:root:not(#ds) .cat-pill,
html:root:not(#ds) .ce-chip,
html:root:not(#ds) .fase-pill,
html:root:not(#ds) .op-fase-pill,
html:root:not(#ds) .viewer-badge,
html:root:not(#ds) .proj-status,
html:root:not(#ds) .invoice-status,
html:root:not(#ds) .contract-status,
html:root:not(#ds) .p-status,
html:root:not(#ds) .f-status,
html:root:not(#ds) .billing-status,
html:root:not(#ds) .receber-status,
html:root:not(#ds) .pagar-status,
html:root:not(#ds) .conc-status,
html:root:not(#ds) .kb-status{
    font-family: var(--font-ui); font-size: var(--ds-fs-label); font-weight: 500; letter-spacing: 0; text-transform: none; line-height: 1;
  }
html:root:not(#ds) .badge{ height: 22px; padding: 0 9px; gap: 6px; }
html:root:not(#ds) .badge::before{ width: 6px; height: 6px; }


  /* Avisos */
  html:root:not(#ds) .fin-aviso,
html:root:not(#ds) .ce-alerta,
html:root:not(#ds) .alert-pending,
html:root:not(#ds) .ce-vazio--aviso{ border-radius: var(--ds-r-md); }


  /* Estados vazios e de erro */
  html:root:not(#ds) .empty-state,
html:root:not(#ds) .fin-empty,
html:root:not(#ds) .ce-vazio,
html:root:not(#ds) .us-vazio,
html:root:not(#ds) .nf-vazio,
html:root:not(#ds) .op-vazio,
html:root:not(#ds) .au-vazio,
html:root:not(#ds) .rg-vazio,
html:root:not(#ds) .ct-vazio,
html:root:not(#ds) .meetings-empty{ border-radius: var(--ds-r-lg); font-size: var(--ds-fs-body); line-height: 1.5; }
html:root:not(#ds) .empty-state__title{ font-family: var(--font-ui); font-size: var(--ds-fs-section); font-weight: 600; }


  /* Modais */
  html:root:not(#ds) .modal-overlay{ background: var(--ds-overlay); }
html:root:not(#ds) .modal,
html:root:not(#ds) .fin-modal,
html:root:not(#ds) .crm-modal,
html:root:not(#ds) .au-modal,
html:root:not(#ds) .client-drawer__panel{ border-radius: var(--ds-r-xl); box-shadow: var(--ds-pop-shadow); border-color: var(--border-strong); }
html:root:not(#ds) .modal__title,
html:root:not(#ds) .crm-drawer__titulo,
html:root:not(#ds) .crm-modal h2,
html:root:not(#ds) .au-modal h2{ font-family: var(--font-ui); font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
html:root:not(#ds) .modal__close{ width: 32px; height: 32px; border-radius: var(--ds-r-md); border-color: transparent; }


  /* Toast */
  html:root:not(#ds) .toast{ border-radius: var(--ds-r-lg); box-shadow: var(--ds-pop-shadow); border-color: var(--border-strong); }
html:root:not(#ds) .toast__desc{ font-family: var(--font-ui); font-size: var(--ds-fs-label); letter-spacing: 0; }
html:root:not(#ds) .sidebar__grupo-titulo,
html:root:not(#ds) .sidebar__section-label{ font-family: var(--font-ui); font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em; }
html:root:not(#ds) .client-user{ font-family: var(--font-ui); letter-spacing: 0; font-size: var(--ds-fs-label); }
html:root:not(#ds) .sidebar__client{ background: transparent; border-color: transparent; padding-left: 2px; }


  /* Rótulos que eram CAIXA ALTA espaçada nos módulos: viram frase (gerado a partir dos CSS dos módulos) */
  html:root:not(#ds) .form-label,
html:root:not(#ds) .page-eyebrow,
html:root:not(#ds) .section-label,
html:root:not(#ds) .alert-pending__label,
html:root:not(#ds) .project-progress__label,
html:root:not(#ds) .overview-card__label,
html:root:not(#ds) .chat-rail__title,
html:root:not(#ds) .chat-group__toggle,
html:root:not(#ds) .chat-msg__sender,
html:root:not(#ds) .chat-pending-label,
html:root:not(#ds) .report-chart__title,
html:root:not(#ds) .report-notes__title,
html:root:not(#ds) .qa-answer__label,
html:root:not(#ds) .bancada-card__rotulo,
html:root:not(#ds) .bancada-item__fase,
html:root:not(#ds) .modal__section-label,
html:root:not(#ds) .files-category__label,
html:root:not(#ds) .filter-bar__label,
html:root:not(#ds) .carteira-detail-field__label,
html:root:not(#ds) .c6-group__title,
html:root:not(#ds) .c6-pix__title,
html:root:not(#ds) .c6-run__title,
html:root:not(#ds) .client-badge,
html:root:not(#ds) .client-drawer__eyebrow,
html:root:not(#ds) .client-drawer__section-title,
html:root:not(#ds) .client-drawer__total-label,
html:root:not(#ds) .ct-drawer__titulo,
html:root:not(#ds) .op-lista-titulo,
html:root:not(#ds) .au-dia,
html:root:not(#ds) .ce-tabela thead th,
html:root:not(#ds) .fin-tag,
html:root:not(#ds) .fin-kpi__rotulo,
html:root:not(#ds) .fin-tile__rotulo,
html:root:not(#ds) .fin-table th,
html:root:not(#ds) .fin-table--responsiva td::before,
html:root:not(#ds) .fin-resumo dt,
html:root:not(#ds) .crm-kpi__rotulo,
html:root:not(#ds) .crm-metas__nome,
html:root:not(#ds) .crm-tabela__cab,
html:root:not(#ds) .crm-drawer__eyebrow,
html:root:not(#ds) .crm-secao__titulo,
html:root:not(#ds) .crm-assinatura__rot,
html:root:not(#ds) .crm-doc__rotulo,
html:root:not(#ds) .crm-doc__tabela th,
html:root:not(#ds) .crm-doc__bloco h3,
html:root:not(#ds) .crm-imp__linha--cab{ text-transform: none; letter-spacing: 0; }
html:root:not(#ds) code,
html:root:not(#ds) pre,
html:root:not(#ds) kbd,
html:root:not(#ds) samp{ font-family: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace; font-variant-numeric: tabular-nums; }
html:root:not(#ds) .fin-kpi__sep{ display: block; font-size: var(--ds-fs-label); font-weight: 500; color: var(--text-muted); letter-spacing: 0; margin-top: 2px; }
html:root:not(#ds) .fin-aviso,
html:root:not(#ds) .ce-alerta--aviso,
html:root:not(#ds) .ce-vazio--aviso{ background: color-mix(in srgb, var(--warning) 9%, var(--bg-card)); border-color: color-mix(in srgb, var(--warning) 32%, transparent); }
html:root:not(#ds) .fin-aviso--ok{ background: color-mix(in srgb, var(--success) 9%, var(--bg-card)); border-color: color-mix(in srgb, var(--success) 32%, transparent); }


  /* Linha de lista dos módulos (produto, contrato, fatura, projeto): um raio, ações calmas */
  html:root:not(#ds) .admin-proj-row,
html:root:not(#ds) .admin-client-card,
html:root:not(#ds) .report-item{ border-radius: var(--ds-r-lg); }
html:root:not(#ds) .admin-proj-row{ padding: var(--ds-s3) var(--ds-s4); gap: var(--ds-s4); }
html:root:not(#ds) .admin-proj-row__name{ font-size: var(--ds-fs-body); }
html:root:not(#ds) .admin-proj-row__meta{ font-size: var(--ds-fs-label); }
html:root:not(#ds) .admin-proj-row__actions{ flex-wrap: wrap; justify-content: flex-end; gap: var(--ds-s1); max-width: 520px; }
html:root:not(#ds) .admin-proj-row__actions .btn--ghost:not(.btn--primary){ background: transparent; border-color: transparent; color: var(--text-secondary); }
html:root:not(#ds) .admin-proj-row__actions .btn--ghost:hover:not(:disabled){ background: var(--ds-hover); border-color: var(--border-strong); color: var(--text-primary); }
html:root:not(#ds) .admin-proj-row__actions .btn--danger-ghost{ color: var(--danger); }
html:root:not(#ds) .admin-proj-row__actions .btn--danger-ghost:hover:not(:disabled){ background: var(--danger-soft); border-color: transparent; color: var(--danger); }
html:root:not(#ds) .money,
html:root:not(#ds) .admin-proj-row__value{ font-variant-numeric: tabular-nums; }


  /* Celular: número do KPI cabe sem quebrar; o título da tela já está no cabeçalho do app */
  @media (max-width: 600px){html:root:not(#ds) .fin-kpi__valor,
html:root:not(#ds) .crm-kpi__valor,
html:root:not(#ds) .ce-cartao__valor{ font-size: 19px; overflow-wrap: normal; }
html:root:not(#ds) .fin-kpi,
html:root:not(#ds) .crm-kpi,
html:root:not(#ds) .ce-cartao{ padding: var(--ds-s3); }

  }
@media (max-width: 600px){html:root:not(#ds) .project-card__texts{ flex: 1 1 100%; }
html:root:not(#ds) .project-card__name{ white-space: normal; overflow: visible; }

  }


  /* Contraste: hora de mensagem e "atualizado" usavam o cinza de campo desabilitado (2,1:1) */
  html:root:not(#ds) .chat-msg__time,
html:root:not(#ds) .project-card__updated,
html:root:not(#ds) .chat-date-divider,
html:root:not(#ds) .chat-input::placeholder{ color: var(--text-muted); }

  /* Painel do escritório: o MRR é a âncora da tela (2 colunas), os demais ficam do tamanho normal */
  html:root:not(#ds) .ce-grid > .ce-cartao:first-child{ grid-column: span 2; }
html:root:not(#ds) .ce-grid > .ce-cartao:first-child .ce-cartao__valor{ font-size: 32px; }
@media (max-width: 600px){html:root:not(#ds) .ce-grid > .ce-cartao:first-child{ grid-column: auto; }
html:root:not(#ds) .ce-grid > .ce-cartao:first-child .ce-cartao__valor{ font-size: 24px; }
 }



/* ── auth-ext.css ── */
/* ══════════════════════════════════════════════════════
   Portal BKon — Extensão de Auth
   Regras específicas do gate de autenticação real.
   Importado após portal.css
══════════════════════════════════════════════════════ */

/* Aviso de erro na tela de login */
.login-error {
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);
  border-radius: var(--radius-md);
  color: var(--danger);
  font-size: 13px;
  font-family: var(--font-ui);
  line-height: 1.5;
  padding: 10px 14px;
  margin-bottom: 16px;
  text-align: center;
}

[data-theme="light"] .login-error {
  background: color-mix(in srgb, var(--danger) 8%, transparent);
  border-color: color-mix(in srgb, var(--danger) 30%, transparent);
  color: var(--danger);
}

/* ── Fluxo de login com e-mail/senha ───────────────── */

.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-forgot {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--accent-text);
  letter-spacing: 0.04em;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: opacity var(--duration-fast) var(--easing),
              color var(--duration-fast) var(--easing);
}
.form-forgot:hover { text-decoration: underline; text-underline-offset: 3px; }
.form-forgot:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.password-wrap {
  position: relative;
}
.password-wrap .form-input {
  padding-right: 40px;
}

.password-eye {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--duration-fast) var(--easing);
  flex-shrink: 0;
}
.password-eye:hover { color: var(--text-primary); }
.password-eye:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.password-eye svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}

[data-theme="light"] .password-eye { color: var(--text-muted); }
[data-theme="light"] .password-eye:hover { color: var(--text-secondary); }

.login-btn { margin-top: 4px; }

.login-note {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
  margin-top: 20px;
}
.login-note a {
  color: var(--accent-text);
  font-weight: 500;
}
.login-note a:hover { text-decoration: underline; text-underline-offset: 3px; }

[data-theme="light"] .login-note { color: var(--text-muted); }
[data-theme="light"] .login-note a { color: var(--accent-text); }

/* ── Fluxo "Esqueci minha senha" ───────────────────── */

.forgot-panel {
  display: none;
  flex-direction: column;
  gap: 0;
  animation: fadeUp var(--duration-slow) var(--easing-out) both;
}
.forgot-panel.active { display: flex; }

.forgot-panel__back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 0 20px 0;
  transition: color var(--duration-fast) var(--easing);
}
.forgot-panel__back:hover { color: var(--text-primary); }
.forgot-panel__back:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}
.forgot-panel__back svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

[data-theme="light"] .forgot-panel__back { color: var(--text-muted); }
[data-theme="light"] .forgot-panel__back:hover { color: var(--text-secondary); }

.forgot-panel__title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.forgot-panel__sub {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 22px;
}

[data-theme="light"] .forgot-panel__title { color: var(--text-primary); }
[data-theme="light"] .forgot-panel__sub   { color: var(--text-muted); }

.forgot-step {
  display: none;
  flex-direction: column;
  gap: 14px;
}
.forgot-step.active { display: flex; }

.forgot-sent-msg {
  background: color-mix(in srgb, var(--success) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--success) 22%, transparent);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 12px;
  color: var(--success);
  line-height: 1.5;
  margin-bottom: 4px;
}
[data-theme="light"] .forgot-sent-msg {
  background: color-mix(in srgb, var(--success) 7%, transparent);
  border-color: color-mix(in srgb, var(--success) 22%, transparent);
  color: var(--success);
}

.forgot-email-notice {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.6;
  letter-spacing: 0.02em;
  padding: 8px 10px;
  border-left: 2px solid color-mix(in srgb, var(--warning) 30%, transparent);
  background: color-mix(in srgb, var(--warning) 5%, transparent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-top: 4px;
}
[data-theme="light"] .forgot-email-notice {
  color: var(--text-muted);
  border-left-color: color-mix(in srgb, var(--warning) 35%, transparent);
  background: color-mix(in srgb, var(--warning) 4%, transparent);
}

.forgot-resend-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--accent-text);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  letter-spacing: 0.04em;
  transition: color var(--duration-fast) var(--easing);
  align-self: flex-start;
}
.forgot-resend-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.forgot-resend-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.forgot-error {
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);
  border-radius: var(--radius-md);
  color: var(--danger);
  font-size: 12px;
  line-height: 1.5;
  padding: 9px 12px;
}
[data-theme="light"] .forgot-error {
  background: color-mix(in srgb, var(--danger) 8%, transparent);
  border-color: color-mix(in srgb, var(--danger) 30%, transparent);
  color: var(--danger);
}

/* ── Badge "Somente leitura" para viewer ───────────── */

.viewer-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: color-mix(in srgb, var(--warning) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--warning) 25%, transparent);
  border-radius: var(--radius-full);
  padding: 3px 9px 3px 7px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--warning);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.viewer-badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--warning);
  opacity: 0.7;
  flex-shrink: 0;
}

.sidebar__client .viewer-badge {
  margin-top: 4px;
  align-self: flex-start;
}

/* ── Bloco de link de convite ──────────────────────── */

.invite-link-block {
  background: color-mix(in srgb, var(--success) 7%, transparent);
  border: 1px solid color-mix(in srgb, var(--success) 22%, transparent);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: fadeUp var(--duration-slow) var(--easing-out) both;
}

.invite-link-block__label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--success);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.invite-link-block__label svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.invite-link-block__hint {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

[data-theme="light"] .invite-link-block__hint { color: var(--text-secondary); }

.invite-link-block__url-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.invite-link-block__url {
  flex: 1;
  background: color-mix(in srgb, var(--text-primary) 5%, transparent);
  border: 1px solid color-mix(in srgb, var(--text-primary) 8%, transparent);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.01em;
  -webkit-user-select: all;
  user-select: all;
}

[data-theme="light"] .invite-link-block__url {
  background: var(--bg-raised);
  border-color: var(--border-strong);
  color: var(--text-secondary);
}

.invite-link-block__copy-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--success) 30%, transparent);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--success);
  cursor: pointer;
  transition: background var(--duration-fast) var(--easing),
              border-color var(--duration-fast) var(--easing);
  white-space: nowrap;
}
.invite-link-block__copy-btn:hover {
  background: color-mix(in srgb, var(--success) 10%, transparent);
  border-color: color-mix(in srgb, var(--success) 45%, transparent);
}
.invite-link-block__copy-btn:focus-visible {
  outline: 2px solid var(--success);
  outline-offset: 2px;
}
.invite-link-block__copy-btn svg {
  width: 11px;
  height: 11px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* ── Modal "Convidar amigo viewer" ─────────────────── */

.viewer-invite-notice {
  background: color-mix(in srgb, var(--warning) 7%, transparent);
  border: 1px solid color-mix(in srgb, var(--warning) 22%, transparent);
  border-radius: var(--radius-md);
  padding: 9px 12px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 4px;
}
[data-theme="light"] .viewer-invite-notice {
  color: var(--text-secondary);
}

/* ── Oculta controles de escrita em modo viewer ────── */

/* Escopado ao modo viewer: sem isto, o !important esconde os botões p/ o ADMIN também
   (o JS só consegue setar display inline, que não vence !important). Fix 2026-10-06. */
.is-viewer .readonly-hidden { display: none !important; }

/* ── Chip viewer na topbar (mobile) ────────────────── */

.topbar__viewer-badge {
  display: none;
}
.is-viewer .topbar__viewer-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--warning);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: color-mix(in srgb, var(--warning) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--warning) 22%, transparent);
  border-radius: var(--radius-full);
  padding: 2px 7px;
}

/* Botão regenerar link por usuário */
.admin-user-row__actions {
  margin-left: auto;
  flex-shrink: 0;
}

/* Login: fonte de 16px no campo (sem o zoom automático do iPhone). A mesma regra existe em
   fase5-carteira.css, que agora só chega depois do login (js/pacotes.js). */
.login-card .form-input { font-size: max(16px, 1rem); }
