/* meeting-agent — sistema visual completo (port do Claude Design)
   Tokens em OKLCH, dark default, density configurável, atoms reutilizáveis.
   ─────────────────────────────────────────────────────────────── */

:root {
  /* Accent (indigo/violet) — pode ser sobrescrito por usuário */
  --acc-h: 280;
  --acc-c: 0.16;
  --acc-l: 0.68;
  --accent: oklch(var(--acc-l) var(--acc-c) var(--acc-h));
  --accent-soft: oklch(var(--acc-l) var(--acc-c) var(--acc-h) / 0.14);
  --accent-line: oklch(var(--acc-l) var(--acc-c) var(--acc-h) / 0.32);
  --accent-text: oklch(0.82 0.1 var(--acc-h));

  /* Status (constante entre temas) */
  --ok:        oklch(0.74 0.13 155);
  --ok-soft:   oklch(0.74 0.13 155 / 0.14);
  --warn:      oklch(0.8 0.14 75);
  --warn-soft: oklch(0.8 0.14 75 / 0.14);
  --bad:       oklch(0.68 0.18 22);
  --bad-soft:  oklch(0.68 0.18 22 / 0.14);
  --info:      oklch(0.74 0.13 230);
  --info-soft: oklch(0.74 0.13 230 / 0.14);

  --u: 4px;

  --font-sans: "Geist", "Manrope", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
}

/* ── Dark (default) ─────────────────────────────── */
:root,
[data-theme="dark"] {
  color-scheme: dark; /* pinta picker nativo do <input type="datetime-local"> etc. em dark */
  --bg: oklch(0.16 0.006 280);
  --bg-2: oklch(0.19 0.007 280);
  --surface: oklch(0.21 0.008 280);
  --surface-2: oklch(0.24 0.009 280);
  --surface-hi: oklch(0.27 0.01 280);
  --border: oklch(0.31 0.01 280);
  --border-soft: oklch(0.26 0.009 280);
  --text: oklch(0.97 0.005 280);
  --text-dim: oklch(0.72 0.008 280);
  --text-mute: oklch(0.55 0.008 280);
  --text-faint: oklch(0.42 0.008 280);
  --shadow-1: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.25);
  --shadow-card: 0 0 0 1px var(--border-soft), 0 1px 0 rgba(255,255,255,.03) inset;
  --grid-line: rgba(255,255,255,.03);
  --accent-fg: oklch(0.15 0.02 280);
}

/* ── Light ───────────────────────────── */
[data-theme="light"] {
  color-scheme: light;
  --bg: oklch(0.985 0.003 280);
  --bg-2: oklch(0.97 0.004 280);
  --surface: oklch(1 0 0);
  --surface-2: oklch(0.975 0.004 280);
  --surface-hi: oklch(0.955 0.005 280);
  --border: oklch(0.9 0.006 280);
  --border-soft: oklch(0.93 0.005 280);
  --text: oklch(0.22 0.012 280);
  --text-dim: oklch(0.42 0.012 280);
  --text-mute: oklch(0.58 0.01 280);
  --text-faint: oklch(0.72 0.008 280);
  --shadow-1: 0 1px 2px rgba(15,15,40,.06), 0 8px 24px rgba(15,15,40,.06);
  --shadow-card: 0 0 0 1px var(--border-soft), 0 1px 0 rgba(255,255,255,.6) inset;
  --grid-line: rgba(0,0,0,.04);
  --accent-fg: white;
}

/* ── Density ─────────────────────────── */
[data-density="compact"]  { --u: 3px; }
[data-density="regular"]  { --u: 4px; }
[data-density="spacious"] { --u: 5px; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  font-feature-settings: "ss01", "cv11";
  letter-spacing: -0.005em;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.5;
}
button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  letter-spacing: inherit;
}
input, textarea, select {
  font-family: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  outline: 0;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }

/* ── App shell ─────────────────────────────────── */
/* #app é o root onde os views são montados; precisa ser flex column de
   altura total pra que o .app-body (flex:1) preencha o restante após o
   appbar e a nav-rail vá até o fim da tela mesmo com conteúdo curto. */
#app, .app {
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Top app bar */
.appbar {
  height: 52px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 3);
  padding: 0 calc(var(--u) * 4);
  border-bottom: 1px solid var(--border-soft);
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  position: relative;
  z-index: 10;
}
.brand {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 2);
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
}
/* Logo Ehwaz como mask: o glyph herda o accent (responde a tema/acento),
   sem fundo. drop-shadow respeita o alpha → halo só ao redor do traço. */
.brand-glyph {
  width: 21px; height: 21px;
  /* Runa Algiz como <svg> inline (stroke=currentColor herda o accent).
     Sem mask/arquivo externo — renderização garantida e escalável. */
  color: var(--accent);
  filter: drop-shadow(0 0 6px oklch(var(--acc-l) var(--acc-c) var(--acc-h) / 0.45));
  flex: 0 0 auto;
}

.nav-tabs {
  display: flex;
  gap: 2px;
  background: var(--surface-2);
  border-radius: 8px;
  padding: 3px;
  box-shadow: inset 0 0 0 1px var(--border-soft);
}
.nav-tab {
  height: 26px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nav-tab:hover { color: var(--text); }
.nav-tab.is-active {
  background: var(--surface-hi);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--border);
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 10px;
  background: var(--surface-2);
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px var(--border-soft);
  flex: 1 1 auto;
  max-width: 420px;
  color: var(--text-mute);
}
.search input {
  flex: 1;
  font-size: 13px;
  color: var(--text);
  min-width: 0;
}
.search input::placeholder { color: var(--text-mute); }
.kbd {
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--surface-hi);
  color: var(--text-mute);
  box-shadow: inset 0 0 0 1px var(--border);
}

/* Bandeira de troca de idioma — botão sutil que mostra só a flag SVG. */
.lang-flag {
  width: 30px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 5px;
  padding: 0;
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--border-soft);
  transition: box-shadow .12s, transform .1s;
  cursor: pointer;
}
.lang-flag:hover { box-shadow: inset 0 0 0 1px var(--border); transform: translateY(-0.5px); }
.lang-flag:active { transform: translateY(0); }
.lang-flag svg { display: block; }

/* Botão de perfil (avatar com inicial) ao lado da bandeira. Mesma altura
   da .lang-flag pra ficarem alinhados; circular pra distinguir. */
.profile-btn {
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  padding: 0;
  background: var(--surface-2);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--border-soft);
  transition: box-shadow .12s, transform .1s, background .12s;
  cursor: pointer;
}
.profile-btn:hover { box-shadow: inset 0 0 0 1px var(--border); transform: translateY(-0.5px); }
.profile-btn:active { transform: translateY(0); }
.profile-btn-initial {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
}

/* ── Atoms ─────────────────────────────────────── */
.mono { font-family: var(--font-mono); font-feature-settings: "ss01"; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: calc(var(--u) * 1.5);
  height: 22px;
  padding: 0 calc(var(--u) * 2);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
  font-family: var(--font-mono);
  white-space: nowrap;
}
.chip-ok    { background: var(--ok-soft);   color: oklch(0.85 0.11 155); }
.chip-warn  { background: var(--warn-soft); color: oklch(0.88 0.12 75); }
.chip-bad   { background: var(--bad-soft);  color: oklch(0.78 0.16 22); }
.chip-info  { background: var(--info-soft); color: oklch(0.85 0.11 230); }
.chip-mute  { background: var(--surface-hi); color: var(--text-dim); }
.chip-acc   { background: var(--accent-soft); color: var(--accent-text); cursor: pointer; }
.chip-dot   { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; flex: 0 0 auto; }
/* Variante que aceita texto multi-linha (ex.: campo "Tom" pode ter
   adjetivo longo). Altura passa a "auto" + line-height confortável. */
.chip-wrap  {
  white-space: normal;
  height: auto;
  min-height: 22px;
  padding-top: 3px;
  padding-bottom: 3px;
  line-height: 1.4;
  max-width: 180px;
  text-align: left;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: calc(var(--u) * 1.5);
  height: 32px;
  padding: 0 calc(var(--u) * 3);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  background: var(--surface-2);
  color: var(--text);
  transition: background .15s ease, transform .1s ease;
  box-shadow: inset 0 0 0 1px var(--border-soft);
  white-space: nowrap;
}
.btn:hover { background: var(--surface-hi); }
.btn:active { transform: translateY(0.5px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost { background: transparent; box-shadow: none; color: var(--text-dim); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-primary {
  background: var(--accent);
  color: var(--accent-fg);
  box-shadow: 0 0 0 1px oklch(var(--acc-l) var(--acc-c) var(--acc-h) / 0.5),
              0 6px 18px oklch(var(--acc-l) var(--acc-c) var(--acc-h) / 0.25);
  font-weight: 600;
}
.btn-primary:hover { background: oklch(calc(var(--acc-l) + 0.04) var(--acc-c) var(--acc-h)); }
.btn-danger { color: oklch(0.78 0.16 22); }
.btn-danger:hover { background: var(--bad-soft); color: oklch(0.85 0.16 22); }
.btn-icon { width: 32px; padding: 0; justify-content: center; }
.btn-sm { height: 26px; padding: 0 calc(var(--u) * 2); font-size: 12px; border-radius: 6px; }
.btn-lg { height: 38px; padding: 0 calc(var(--u) * 4); font-size: 14px; }

.card {
  background: var(--surface);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
}

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

.divider { height: 1px; background: var(--border-soft); }

/* Scrollbars */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--surface-hi);
  border-radius: 4px;
  border: 2px solid var(--surface);
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--border);
  background-clip: content-box;
  border: 2px solid var(--surface);
}

/* Avatars */
.avatar {
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: oklch(0.99 0 0);
  flex: 0 0 auto;
  letter-spacing: 0;
}
.avatar-stack {
  display: inline-flex;
  align-items: center;
}
.avatar-stack .avatar:not(:first-child) { margin-left: -7px; box-shadow: 0 0 0 2px var(--surface); }
.avatar-stack .avatar-extra {
  background: var(--surface-hi);
  color: var(--text-dim);
  box-shadow: 0 0 0 2px var(--surface), inset 0 0 0 1px var(--border);
}

/* Icons */
.ico {
  width: 16px; height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}
.ico-sm { width: 12px; height: 12px; stroke-width: 1.8; }
.ico-xs { width: 11px; height: 11px; stroke-width: 1.9; }
.ico-lg { width: 20px; height: 20px; }
.ico-rot-180 { transform: rotate(180deg); }
.ico-spin { animation: spin-cw 1.1s linear infinite; transform-origin: 50% 50%; }
/* Espelha horizontalmente — usado pra reusar o `chevron` (que aponta
   pra direita) como seta de "semana anterior". */
.ico-flip-x { transform: scaleX(-1); }
@keyframes spin-cw { to { transform: rotate(360deg); } }

/* Status dot */
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.status-scheduled  { background: var(--info); box-shadow: 0 0 0 3px var(--info-soft); }
.status-bot_scheduled { background: var(--info); box-shadow: 0 0 0 3px var(--info-soft); }
.status-processing { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.status-media_ready { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.status-processed  { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.status-distributed { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.status-bot_in_call { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); animation: pulse 1.6s ease-out infinite; }
.status-live       { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); animation: pulse 1.6s ease-out infinite; }
.status-failed     { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.status-skipped    { background: var(--text-faint); box-shadow: 0 0 0 3px var(--surface-2); }
.status-cancelled  { background: var(--text-faint); box-shadow: 0 0 0 3px var(--surface-2); }
.status-notrec     { background: var(--text-faint); box-shadow: 0 0 0 3px var(--surface-2); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--bad-soft); }
  70% { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
@keyframes blink { 50% { opacity: 0; } }

/* Form atoms */
.input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  background: var(--surface);
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px var(--border-soft);
  font-size: 13.5px;
  color: var(--text);
  outline: none;
  transition: box-shadow .15s;
}
.input:focus { box-shadow: inset 0 0 0 1.5px var(--accent); }
.input-mono { font-family: var(--font-mono); font-size: 12px; }
.textarea {
  min-height: 80px;
  padding: 10px 12px;
  line-height: 1.5;
}
.field-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-dim);
  display: block;
  margin-bottom: 6px;
}
.field-hint {
  font-size: 11px;
  color: var(--text-mute);
}

/* Edição do resumo — textarea cresce conforme rows; itens de
   tópico/decisão = corpo (inputs) + botão remover ao lado. */
.se-textarea {
  width: 100%;
  height: auto;
  padding: 10px 12px;
  line-height: 1.5;
  font-family: inherit;
  resize: vertical;
  display: block;
}
.se-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  background: var(--surface-2);
  border-radius: 10px;
  padding: 10px;
  box-shadow: inset 0 0 0 1px var(--border-soft);
}
.se-item-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.se-item .btn-danger { flex: 0 0 auto; }

/* ── Insights (aba de dicas de inglês) ──────────────── */
.insight-card {
  background: var(--surface-2);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: inset 0 0 0 1px var(--border-soft);
}
.insight-line {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
  font-size: 13.5px;
}
.insight-line .ico { color: var(--text-mute); flex: 0 0 auto; }
.insight-bad {
  color: var(--bad);
  text-decoration: line-through;
  text-decoration-color: oklch(0.68 0.18 22 / 0.5);
}
.insight-good { color: var(--ok); font-weight: 600; }
.insight-note {
  font-size: 12.5px;
  color: var(--text-dim);
  margin-top: 6px;
  line-height: 1.5;
  text-wrap: pretty;
}
.insight-said {
  display: flex; align-items: baseline; gap: 6px;
  font-size: 13px;
  color: var(--text-dim);
  font-style: italic;
}
.insight-said .ico { color: var(--text-faint); }
.insight-alts {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex; flex-direction: column; gap: 4px;
}
.insight-alts li {
  font-size: 13.5px;
  color: var(--text);
  font-weight: 500;
  padding-left: 16px;
  position: relative;
}
.insight-alts li::before {
  content: "→";
  position: absolute; left: 0;
  color: var(--accent);
}
.insight-term {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--accent-text);
}
.insight-example {
  font-size: 12.5px;
  color: var(--text-mute);
  font-style: italic;
  margin-top: 5px;
}

/* Toggle */
.toggle {
  width: 34px; height: 20px; border-radius: 11px;
  padding: 0; position: relative;
  transition: background .15s;
  flex: 0 0 auto;
}
.toggle::after {
  content: "";
  position: absolute; top: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  transition: left .15s;
  box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.toggle.off { background: var(--surface-hi); box-shadow: inset 0 0 0 1px var(--border); }
.toggle.off::after { background: var(--text-dim); left: 2px; }
.toggle.on { background: var(--accent); }
.toggle.on::after { background: var(--accent-fg); left: 16px; }

/* ── Layout: nav-rail + content ────────────────── */
.app-body {
  flex: 1;
  display: flex;
  min-height: 0;
}

/* Menu lateral esquerdo — fixo, só ícones centralizados.
   Hover/selected mudam só a cor do ícone (sem stripe, sem bg). */
.nav-rail {
  width: 56px;
  flex: 0 0 56px;
  background: var(--bg-2);
  border-right: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
}
.nav-rail-items {
  padding: 12px 0;
  display: flex; flex-direction: column; align-items: center;
  gap: 4px;
  flex: 1;
}
.nav-rail-item {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  color: var(--text-mute);
  transition: color .12s;
}
.nav-rail-item:hover { color: var(--text); }
.nav-rail-item.is-active { color: var(--accent); }
.nav-rail-item .ico { width: 20px; height: 20px; stroke-width: 1.7; }

/* O .view antigo (sidebar de reuniões + main) — continua,
   mas agora vive dentro de .app-body, depois do nav-rail */
.view {
  flex: 1;
  display: flex;
  min-height: 0;
  min-width: 0;
}
.sidebar {
  width: 320px;
  flex: 0 0 320px;
  background: var(--bg-2);
  border-right: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sidebar-head {
  padding: calc(var(--u) * 3) calc(var(--u) * 4);
  display: flex;
  flex-direction: column;
  gap: calc(var(--u) * 2);
  border-bottom: 1px solid var(--border-soft);
}
.sidebar-list {
  flex: 1;
  overflow-y: auto;
  padding: calc(var(--u) * 2);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.main {
  flex: 1;
  overflow-y: auto;
  background: var(--bg);
  min-width: 0;
}

/* ── Meeting list row (sidebar) ────────────────── */
.row {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  background: transparent;
  position: relative;
  transition: background .12s;
  cursor: pointer;
}
.row:hover { background: var(--surface-2); }
.row.is-active {
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border);
}
.row.is-active::before {
  content: "";
  position: absolute; left: -10px; top: 14px; bottom: 14px;
  width: 3px; border-radius: 2px;
  background: var(--accent);
}
/* Reunião cancelada: row inteiro fica dimmed e o título com strikethrough
   pra dar pista visual rápida que ela não vai acontecer. Hover/active
   continuam funcionando (user pode abrir pra ler/reativar). */
.row.is-cancelled .row-title { text-decoration: line-through; color: var(--text-mute); }
.row.is-cancelled .row-meta,
.row.is-cancelled .row-footer { opacity: .55; }
.row-title-line {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 6px;
}
.row-title {
  font-weight: 600; font-size: 13.5px; flex: 1;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.row-meta {
  display: flex; align-items: center; gap: 10px;
  font-size: 11.5px; color: var(--text-mute); font-family: var(--font-mono);
}
.row-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 8px;
  /* Altura fixa pra cards com / sem chips/avatares terem mesma altura */
  min-height: 20px;
}

/* ── Detail header ─────────────────────────────── */
.detail-head {
  padding: 24px 32px 0;
  border-bottom: 1px solid var(--border-soft);
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
}
.detail-head-top {
  display: flex; align-items: flex-start; gap: 16px;
}
.detail-title {
  font-size: 26px; font-weight: 600; margin: 6px 0 12px;
  letter-spacing: -0.02em;
}
.tabs-bar {
  display: flex; gap: 2px; margin-top: 20px;
}
.tab {
  height: 36px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-mute);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
}
.tab.is-active {
  color: var(--text);
  border-bottom-color: var(--accent);
}
.tab-badge {
  font-size: 10.5px; padding: 1px 6px; border-radius: 10px;
  background: var(--surface-hi); color: var(--text-dim);
  font-family: var(--font-mono);
}

/* ── Detail content panes ──────────────────────── */
.pane { padding: 24px 32px 40px; }
.pane-grid { display: grid; grid-template-columns: 1fr 280px; gap: 24px; }
.pane-col { display: flex; flex-direction: column; gap: 20px; }

.tldr {
  padding: 20px; position: relative; overflow: hidden;
}
.tldr-bg {
  position: absolute; inset: 0;
  background: radial-gradient(800px 200px at 0% 0%, var(--accent-soft), transparent 60%);
  pointer-events: none;
}
.tldr p { font-size: 15.5px; line-height: 1.55; margin: 0; color: var(--text); position: relative; text-wrap: pretty; }

.bullets { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.bullet {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px; border-radius: 10px;
  background: var(--surface); box-shadow: var(--shadow-card);
}
.bullet-dot {
  flex: 0 0 auto; margin-top: 4px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
}

.task-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; background: var(--surface); border-radius: 10px;
  box-shadow: var(--shadow-card);
}
.task-row.dense { padding: 10px 14px; }
.task-check {
  width: 18px; height: 18px; border-radius: 5px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  padding: 0;
  cursor: pointer;
  color: var(--accent-fg);
  transition: box-shadow .12s, background .12s, transform .08s;
}
.task-check:hover { transform: scale(1.12); }
.task-check:active { transform: scale(0.95); }
.task-check.is-done { background: var(--ok); }
.task-check.is-todo { box-shadow: inset 0 0 0 1.5px var(--border); }
.task-check.is-todo:hover { box-shadow: inset 0 0 0 1.5px var(--accent); }
.task-text { flex: 1; font-size: 14px; }
.task-text.is-done { text-decoration: line-through; color: var(--text-mute); }

/* Right rail */
.rail { display: flex; flex-direction: column; gap: 16px; }
.rail-card { padding: 16px; }
.kv {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 0;
  font-size: 12.5px;
  gap: 12px;
}
.kv + .kv { border-top: 1px solid var(--border-soft); }
.kv-k { color: var(--text-mute); flex: 0 0 auto; }
.kv > :last-child { min-width: 0; }
/* Quando o valor é um chip multi-linha (chip-wrap), alinha pelo topo
   pra label e chip não brigarem por centro vertical. */
.kv:has(.chip-wrap) { align-items: flex-start; }

/* ── Greeting + LiveCard (dashboard) ───────────── */
.greet-grid {
  display: grid; grid-template-columns: 1fr 360px; gap: 24px;
  align-items: stretch; margin-bottom: 28px;
}
@media (max-width: 1080px) {
  .greet-grid { grid-template-columns: 1fr; }
  .pane-grid { grid-template-columns: 1fr; }
}
.greet-eyebrow {
  font-size: 13px; color: var(--text-mute); font-family: var(--font-mono);
  margin-bottom: 6px;
}
.greet-title {
  font-size: 30px; font-weight: 600; margin: 0; letter-spacing: -0.025em;
}
.greet-sub {
  font-size: 15px; color: var(--text-dim); margin: 8px 0 0; max-width: 600px; text-wrap: pretty;
}

.live-card {
  padding: 18px;
  position: relative;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-card), 0 0 0 1px oklch(0.68 0.18 22 / 0.4);
  border-radius: var(--r-md);
}
.live-card::before {
  content: "";
  position: absolute; inset: 0; opacity: 0.6;
  background: radial-gradient(400px 200px at 90% 0%, oklch(0.68 0.18 22 / 0.18), transparent 60%);
  pointer-events: none;
}
.live-card > * { position: relative; }
.live-quote {
  padding: 10px 12px; border-radius: 8px; background: var(--bg-2);
  font-size: 12.5px; line-height: 1.5; color: var(--text-dim);
  margin: 12px 0;
  box-shadow: inset 0 0 0 1px var(--border-soft);
}
.live-quote .blink {
  display: inline-block; width: 8px; height: 14px; margin-left: 3px;
  background: var(--accent); vertical-align: text-bottom;
  animation: blink 1s steps(1) infinite;
}

/* KPI cards */
.kpi-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 14px; margin-bottom: 32px;
}
@media (max-width: 980px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
.kpi { padding: 16px; position: relative; overflow: hidden; }
.kpi-value { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.kpi-trend { font-family: var(--font-mono); font-size: 11.5px; }

/* Barra de score (eficiência da reunião). Track neutro, fill colorido inline. */
.eff-bar {
  height: 6px; border-radius: 999px; background: var(--surface-2);
  overflow: hidden; position: relative;
}
.eff-bar-fill { height: 100%; border-radius: 999px; transition: width .25s ease; }

/* ── Login screen ─────────────────────────────────────────────────
   Layout 2 colunas: esquerda com brand+form, direita com preview.
   No mobile, vira 1 coluna (preview some). */
.login-screen {
  position: fixed; inset: 0;
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--bg);
  --grid-line: oklch(0.25 0.015 var(--acc-h) / .4);
}
@media (max-width: 900px) { .login-screen { grid-template-columns: 1fr; } }

.login-left {
  display: flex; flex-direction: column;
  padding: 32px 40px;
  min-width: 0;
}
.login-left .brand { font-size: 14px; font-weight: 600; }

.login-form-wrap {
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  max-width: 420px; width: 100%; margin: 0 auto;
  padding: 24px 0;
}
.login-eyebrow { color: var(--accent); font-size: 12px; font-weight: 600; letter-spacing: .04em; margin-bottom: 14px; }
.login-title {
  font-size: 32px; line-height: 1.15; font-weight: 600;
  letter-spacing: -0.02em; margin: 0 0 14px;
  color: var(--text);
}
.login-desc {
  color: var(--text-dim); font-size: 13.5px; line-height: 1.6;
  margin: 0 0 24px; max-width: 380px; text-wrap: pretty;
}

/* CTA grande Google */
.btn-google {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 14px 16px;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 14px; font-weight: 500;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .08s ease;
}
.btn-google:hover { background: var(--surface); border-color: color-mix(in oklch, var(--accent) 30%, var(--border)); }
.btn-google:active { transform: translateY(1px); }
.btn-google svg.google-mark { flex: 0 0 18px; }
.btn-google .btn-google-label { flex: 1; text-align: left; }

/* Divisor "or with email" */
.login-divider {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 12px; margin: 22px 0;
}
.login-divider::before, .login-divider::after { content: ''; height: 1px; background: var(--border-soft); }
.login-divider span { color: var(--text-mute); font-size: 11.5px; text-transform: lowercase; letter-spacing: .04em; }

/* Form email */
.login-form { display: flex; flex-direction: column; gap: 14px; }
.login-field { display: flex; flex-direction: column; gap: 6px; }
.login-field-label { font-size: 11.5px; color: var(--text-mute); font-weight: 500; letter-spacing: .03em; }
.login-input-wrap {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 0 12px;
  transition: border-color .15s ease;
}
.login-input-wrap:focus-within { border-color: color-mix(in oklch, var(--accent) 50%, var(--border)); }
.login-input-wrap svg { color: var(--text-mute); flex: 0 0 auto; }
.login-input-wrap input {
  flex: 1; min-width: 0; height: 44px;
  background: transparent; border: 0; color: var(--text); font: inherit; font-size: 14px;
  outline: none;
}
.login-input-wrap input::placeholder { color: var(--text-mute); }
.btn-lg { padding: 12px 16px; font-size: 14px; height: 46px; }
.login-magic { text-align: center; color: var(--text-dim); font-size: 12.5px; margin-top: 2px; text-decoration: none; }
.login-magic:hover { color: var(--text); }

.login-foot {
  color: var(--text-mute); font-size: 11px; padding-top: 24px;
  border-top: 1px solid var(--border-soft); margin-top: 32px;
}

/* ── Coluna direita (preview/decorativo) ── */
.login-right {
  position: relative; overflow: hidden;
  background: var(--bg-2);
  border-left: 1px solid var(--border-soft);
  display: flex; flex-direction: column;
  padding: 48px 40px;
}
@media (max-width: 900px) { .login-right { display: none; } }

.login-grid-bg { position: absolute; inset: 0; pointer-events: none; opacity: .5; }

/* Eyebrow no topo */
.lp-eyebrow {
  position: relative; z-index: 1; text-align: center;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--text-mute);
}

/* Cascata de 3 cards (Teams / Discord / GitHub) sobrepostos */
.lp-cascade {
  position: relative; z-index: 1;
  flex: 0 0 auto;
  width: min(680px, 100%); min-height: 440px;
  /* Encostado na borda ESQUERDA do painel direito = perto do centro da
     tela (em vez de centralizado no painel, que joga os cards pra direita). */
  align-self: flex-start;
  /* margin vertical auto = centraliza os cards no eixo vertical entre o
     eyebrow (topo) e o depoimento (base), que ficam nas posições atuais. */
  margin: auto 0;
}

/* Todos os cards: MESMA largura e altura. Layout em coluna + pílula
   ancorada no rodapé (margin-top:auto) → alinhamento uniforme mesmo
   com quantidades de conteúdo diferentes. Altura dimensionada pelo card
   mais alto (Teams, que tem a waveform); 1 comentário por card. */
.lp-card {
  position: absolute; width: 300px; height: 282px;
  display: flex; flex-direction: column;
  background: color-mix(in oklch, var(--surface) 92%, transparent);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 26px 50px -18px rgba(0,0,0,.6), var(--shadow-card);
  backdrop-filter: blur(8px);
}
.lp-card.is-teams   { left: 0;     top: 24px;  transform: rotate(-1.5deg); z-index: 2; }
.lp-card.is-discord { left: 188px; top: 150px; transform: rotate(.5deg);   z-index: 1; }
.lp-card.is-github  { left: 372px; top: 70px;  transform: rotate(1.5deg);  z-index: 3; }

.lp-head { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--text-mute); margin-bottom: 12px; }
.lp-badge { height: 18px; font-size: 10px; gap: 5px; }
.lp-src { display: inline-flex; align-items: center; gap: 5px; color: var(--text-dim); font-weight: 500; }
.lp-time { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--text-mute); }
.lp-glyph { width: 14px; height: 14px; flex: 0 0 auto; }

.lp-title { font-size: 14px; font-weight: 600; color: var(--text); margin: 0 0 9px; letter-spacing: -.01em; }
.lp-meta { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--text-mute); margin-bottom: 12px; }

.lp-wave { display: flex; align-items: flex-end; gap: 2px; height: 30px; margin-bottom: 12px; }
.lp-wave span { flex: 1; border-radius: 2px; opacity: .5; background: linear-gradient(180deg, var(--accent), color-mix(in oklch, var(--accent) 25%, transparent)); }

/* Mensagens (sub-card escuro dentro do card) */
.lp-msg { background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 10px; padding: 9px 11px; margin-bottom: 9px; }
.lp-msg-head { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; }
.lp-msg-name { font-size: 11.5px; font-weight: 600; color: var(--text-dim); }
.lp-msg-text {
  margin: 0; font-size: 12px; line-height: 1.45; color: var(--text-dim);
  /* Clamp em 2 linhas → altura de mensagem previsível, cards uniformes */
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Pílula de insight (action item / recurring topic / linked) */
.lp-pill { display: flex; align-items: center; gap: 7px; margin-top: auto; background: var(--accent-soft); border-radius: 9px; padding: 8px 10px; font-size: 11.5px; color: var(--accent-text); }
.lp-pill .ico { color: var(--accent); flex: 0 0 auto; }
.lp-pill-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-pill-label b { font-weight: 600; }
.lp-pill-meta { margin-left: auto; font-size: 10.5px; opacity: .8; flex: 0 0 auto; }

/* Tags do GitHub (bug / p1) */
.lp-tag { height: 16px; padding: 0 6px; border-radius: 5px; font-size: 9.5px; font-weight: 600; display: inline-flex; align-items: center; }
.lp-tag-bug { background: var(--bad-soft); color: oklch(0.78 0.16 22); }
.lp-tag-p1  { background: var(--accent-soft); color: var(--accent-text); }

/* Depoimento (rodapé da coluna) */
.lp-testimonial { position: relative; z-index: 1; max-width: 460px; margin-top: 24px; align-self: center; }
.lp-testimonial p { font-size: 16px; line-height: 1.5; font-weight: 500; color: var(--text); margin: 0 0 16px; text-wrap: pretty; text-align: center; }
.lp-author { display: flex; align-items: center; gap: 11px; }
.lp-author-name { font-weight: 600; font-size: 13px; color: var(--text); }
.lp-author-role { font-family: var(--font-mono); font-size: 11px; color: var(--text-mute); }

/* ── Picker de insights (estado vazio do paneInsights) ─────────────
   Card hero no topo + grid de cards recomendados (3 grandes) + barra
   de ação + grid de outras análises (compactos 3x2). */

.ins-picker { padding: 20px 24px 40px; }

.ins-hero {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 20px 22px; margin-bottom: 18px;
  background: linear-gradient(135deg,
    color-mix(in oklch, var(--accent) 10%, var(--surface)),
    var(--surface));
  border: 1px solid color-mix(in oklch, var(--accent) 30%, var(--border));
}
.ins-hero-ico {
  width: 36px; height: 36px; border-radius: 10px;
  background: color-mix(in oklch, var(--accent) 18%, var(--surface-2));
  color: var(--accent);
  display: inline-grid; place-items: center; flex: 0 0 auto;
}
.ins-hero-title { font-size: 15px; font-weight: 600; margin: 0 0 4px; color: var(--text); }
.ins-hero-desc { font-size: 13px; color: var(--text-dim); margin: 0; line-height: 1.5; text-wrap: pretty; }

.ins-pick-grid { display: grid; gap: 12px; }
.ins-pick-grid-big { grid-template-columns: repeat(3, 1fr); }
.ins-pick-grid-small { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1100px) {
  .ins-pick-grid-big, .ins-pick-grid-small { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .ins-pick-grid-big, .ins-pick-grid-small { grid-template-columns: 1fr; }
}

.ins-pick {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  cursor: pointer; user-select: none;
  transition: border-color .15s ease, background .15s ease, transform .08s ease;
}
.ins-pick:hover { border-color: color-mix(in oklch, var(--accent) 40%, var(--border)); }
.ins-pick:active { transform: translateY(1px); }
.ins-pick.is-busy { opacity: .7; pointer-events: none; }
.ins-pick.is-disabled { opacity: .55; cursor: not-allowed; }

.ins-pick-big { display: flex; flex-direction: column; gap: 12px; }
.ins-pick-head { display: flex; align-items: flex-start; gap: 10px; }
.ins-pick-ico {
  width: 28px; height: 28px; border-radius: 8px; flex: 0 0 auto;
  background: var(--surface-2); color: var(--text-dim);
  display: inline-grid; place-items: center;
}
.ins-pick-title { font-size: 13.5px; font-weight: 600; color: var(--text); line-height: 1.3; }
.ins-pick-est { font-size: 11px; color: var(--text-mute); margin-top: 3px; letter-spacing: .02em; }
.ins-pick-desc { font-size: 12.5px; color: var(--text-dim); line-height: 1.5; margin: 0; text-wrap: pretty; }
.ins-pick-preview {
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 10px 12px;
}
.ins-pick-preview-label {
  font-size: 9.5px; text-transform: uppercase;
  color: var(--text-mute); letter-spacing: .08em;
  margin-bottom: 6px; display: flex; align-items: center; gap: 4px;
}
.ins-pick-preview-label::before {
  content: '👁'; font-size: 10px; filter: grayscale(1) opacity(.6);
}
.ins-pick-preview ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 3px;
}
.ins-pick-preview li {
  font-size: 11.5px; color: var(--text-dim); line-height: 1.4;
}
.ins-pick-foot {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--accent);
  padding-top: 2px;
}

.ins-pick-small {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  min-height: 76px;  /* uniformidade visual: linha 1 do título + 1-2 linhas
                        de descrição cabem; títulos curtos não encolhem o card */
}
.ins-pick-desc-sm {
  font-size: 12px; color: var(--text-mute); margin-top: 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;  /* descrições longas viram "..."; mantém altura previsível */
}
/* Grid de cards small como auto-rows iguais — equalize com o maior. */
.ins-pick-grid-small { grid-auto-rows: 1fr; }

.ins-pick-checkbox {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--text-dim); cursor: pointer;
}
.ins-pick-checkbox input[type="checkbox"] { accent-color: var(--accent); width: 14px; height: 14px; cursor: pointer; }

/* Modal de criar/editar template custom */
.tpl-field { display: flex; flex-direction: column; gap: 5px; }
.tpl-field-label { font-size: 12px; color: var(--text-dim); font-weight: 500; }
.tpl-field .input {
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); border-radius: 8px; padding: 8px 10px;
  font: inherit; font-size: 13px; outline: none;
  transition: border-color .15s ease;
}
.tpl-field .input:focus { border-color: color-mix(in oklch, var(--accent) 50%, var(--border)); }
textarea.input { font-family: inherit; }

/* Render genérico de insight (kinds sem renderer dedicado) */
.ins-generic-section { margin-top: 16px; }
.ins-generic-section h3 {
  font-size: 11px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-mute); margin: 0 0 8px;
}
.ins-generic-item {
  background: var(--surface-2); border: 1px solid var(--border-soft);
  border-radius: 8px; padding: 10px 12px; margin-bottom: 6px;
}
.ins-generic-item-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 13px; font-weight: 500; color: var(--text);
}
.ins-generic-item-body {
  font-size: 12.5px; color: var(--text-dim); margin-top: 4px; line-height: 1.5;
}
.ins-generic-item-meta {
  font-size: 11.5px; color: var(--text-mute); margin-top: 4px;
  display: flex; gap: 8px; flex-wrap: wrap;
}

/* Checkboxes de kind de insight — chips toggleáveis na aba Insights. */
.insight-kinds-bar {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 10px 16px 16px; border-bottom: 1px solid var(--border-soft);
  margin-bottom: 16px;
}
.insight-kind-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border);
  cursor: pointer; user-select: none;
  font-size: 13px; font-weight: 500; color: var(--text-dim);
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.insight-kind-chip:hover { background: var(--surface); }
.insight-kind-chip input[type="checkbox"] {
  width: 14px; height: 14px; accent-color: var(--accent);
  margin: 0; cursor: pointer;
}
.insight-kind-chip.is-on {
  background: color-mix(in oklch, var(--accent) 12%, var(--surface));
  border-color: color-mix(in oklch, var(--accent) 45%, var(--border));
  color: var(--text);
}
.insight-kind-chip.is-disabled {
  opacity: .5; cursor: not-allowed;
}
.insight-kind-chip.is-disabled input { cursor: not-allowed; }

.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.section-head h2 { font-size: 14px; font-weight: 600; letter-spacing: -0.005em; }

.recent-row {
  display: grid; grid-template-columns: auto 1fr auto auto;
  gap: 14px; align-items: center;
  width: 100%; text-align: left;
  padding: 14px 18px;
  background: transparent;
  transition: background .12s;
  cursor: pointer;
}
.recent-row:hover { background: var(--surface-2); }
.recent-icon-tile {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent-text);
  display: inline-flex; align-items: center; justify-content: center;
}
.recent-title { font-weight: 600; font-size: 13.5px; margin-bottom: 3px; }
.recent-sub {
  font-size: 12px; color: var(--text-dim);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.upcoming-row {
  display: grid; grid-template-columns: 44px 1fr auto;
  gap: 12px; align-items: center;
  padding: 10px 8px; border-radius: 8px;
  cursor: pointer;
}
.upcoming-row:hover { background: var(--surface-2); }
/* Variante usada na lista de reuniões da série (paneFollowup): mostra
   "QUA., 20 DE MAI." + "02:09 PM" no tile, que não cabem em 44px. */
.upcoming-row.is-series { grid-template-columns: 96px 1fr auto; }
.day-tile {
  background: var(--surface-2); color: var(--text);
  border-radius: 8px; padding: 6px 0; text-align: center;
  box-shadow: inset 0 0 0 1px var(--border-soft);
}
.day-tile.is-live { background: var(--bad-soft); color: var(--bad); }
.day-tile-label { font-size: 9.5px; font-family: var(--font-mono); text-transform: uppercase; opacity: .7; white-space: nowrap; }
.day-tile-n { font-size: 15px; font-weight: 600; white-space: nowrap; }

/* ── Agenda (week view) ────────────────────────── */
.agenda-sub {
  padding: 18px 28px 14px;
  border-bottom: 1px solid var(--border-soft);
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-2);
}
.agenda-title { font-size: 22px; letter-spacing: -0.02em; margin: 0; }
.agenda-week-head {
  position: sticky; top: 0; z-index: 5;
  display: grid; grid-template-columns: 64px repeat(7, 1fr);
  background: var(--bg-2);
  border-bottom: 1px solid var(--border-soft);
}
.agenda-day-col {
  padding: 12px 14px;
  border-left: 1px solid var(--border-soft);
  display: flex; align-items: center; gap: 8px;
}
.agenda-day-label {
  font-size: 11.5px; font-family: var(--font-mono);
  text-transform: uppercase; color: var(--text-mute); letter-spacing: 0.05em;
}
.agenda-day-num {
  width: 28px; height: 28px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 13px;
}
.agenda-day-num.is-today {
  background: var(--accent); color: var(--accent-fg);
}
.agenda-grid {
  display: grid; grid-template-columns: 64px repeat(7, 1fr);
  position: relative;
}
.agenda-hour-cell {
  height: 56px; padding: 4px 8px 0 0;
  font-size: 10.5px; font-family: var(--font-mono); color: var(--text-mute);
  text-align: right; border-top: 1px solid var(--border-soft);
}
.agenda-day {
  position: relative;
  border-left: 1px solid var(--border-soft);
}
.agenda-day.is-today { background: oklch(0.7 0.18 var(--acc-h) / 0.025); }
.agenda-hour-row {
  height: 56px;
  border-top: 1px solid var(--border-soft);
  background-image: linear-gradient(to bottom, transparent 49.5%, var(--grid-line) 50%, transparent 50.5%);
}
.now-line {
  position: absolute; left: 0; right: 0;
  border-top: 1.5px solid var(--bad);
  z-index: 4; pointer-events: none;
}
.now-line-dot {
  position: absolute; left: -5px; top: -5px;
  width: 9px; height: 9px; border-radius: 50%; background: var(--bad);
}
.now-line-label {
  position: absolute; right: 4px; top: -8px;
  font-size: 10px; font-family: var(--font-mono); color: var(--bad);
  background: var(--bg-2); padding: 0 4px; border-radius: 3px;
}
.cal-block {
  position: absolute; left: 4px; right: 4px;
  border-radius: 8px; padding: 6px 8px;
  overflow: hidden;
  display: flex; flex-direction: column; gap: 2px;
  font-size: 11.5px;
  cursor: pointer;
  transition: transform .12s, box-shadow .12s;
}
.cal-block:hover { transform: translateY(-1px); z-index: 3; }
.cal-block-title {
  font-weight: 600; font-size: 12px; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cal-block-meta {
  display: flex; align-items: center; gap: 6px;
  color: var(--text-mute); font-family: var(--font-mono); font-size: 10.5px;
}
.cal-block-foot {
  margin-top: auto;
  display: flex; align-items: center; justify-content: space-between;
}

/* Evento cancelado na semana view. O fundo + stripe + hatching diagonal
   já vêm inline do JS (cal-block.is-cancelled tem cores específicas);
   aqui só refinamos a tipografia e o hover discreto. */
.cal-block.is-cancelled .cal-block-title {
  text-decoration: line-through;
  text-decoration-color: var(--text-mute);
  text-decoration-thickness: 1.5px;
  color: var(--text-mute);
}
.cal-block.is-cancelled .cal-block-meta,
.cal-block.is-cancelled .cal-block-foot { opacity: .55; }
/* Hover não levanta canceladas tanto quanto ativas — sinaliza que
   é "consulta", não algo que vai acontecer. */
.cal-block.is-cancelled:hover { transform: none; }

/* ── Tasks board (visão centralizada de tarefas) ── */
/* Cabeçalho clicável de cada grupo (uma reunião) na página #/tasks. */
.task-group-head {
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left;
  padding: 11px 14px;
  border-radius: 10px;
  background: var(--bg-2);
  box-shadow: inset 0 0 0 1px var(--border-soft);
  transition: background .12s;
  cursor: pointer;
}
.task-group-head:hover { background: var(--surface-2); }

/* ── Transcript screen ─────────────────────────── */
.chap-rail {
  width: 240px; flex: 0 0 240px;
  background: var(--bg-2); border-right: 1px solid var(--border-soft);
  padding: 20px 16px; overflow-y: auto;
}
.chap-item {
  display: flex; gap: 10px; align-items: flex-start; width: 100%;
  padding: 10px 10px 10px 12px; border-radius: 8px; text-align: left;
  background: transparent; position: relative; cursor: pointer;
}
.chap-item:hover { background: var(--surface-2); }
.chap-item.is-active { background: var(--surface-2); }
.chap-item.is-active::before {
  content: "";
  position: absolute; left: 0; top: 12px; bottom: 12px;
  width: 2.5px; border-radius: 2px; background: var(--accent);
}
.chap-time {
  flex: 0 0 38px; font-family: var(--font-mono);
  font-size: 11px; color: var(--text-mute); padding-top: 1px;
}
.chap-item.is-active .chap-time { color: var(--accent-text); }
.chap-label {
  font-size: 12.5px; line-height: 1.4; flex: 1; color: var(--text-dim);
}
.chap-item.is-active .chap-label { color: var(--text); }

.speaker-row { margin-bottom: 10px; }
.speaker-name {
  display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
}
.speaker-name span:nth-child(2) {
  font-size: 12px; font-weight: 500; flex: 1;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.speaker-bar {
  height: 4px; border-radius: 2px;
  background: var(--surface-2); overflow: hidden;
}
.speaker-bar > div {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), oklch(0.78 0.14 230));
}

.player-bar {
  padding: 20px 32px 16px;
  border-bottom: 1px solid var(--border-soft);
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
}
.player-controls {
  display: flex; align-items: center; gap: 16px; margin-bottom: 14px;
}
.player-play {
  width: 42px; height: 42px; border-radius: 12px; padding: 0;
  justify-content: center;
}
.waveform {
  position: relative; height: 44px; cursor: pointer;
  display: flex; align-items: center; gap: 2px;
}
.waveform-bar {
  flex: 1; border-radius: 1.5px;
  background: var(--surface-hi);
}
.waveform-bar.is-played { background: var(--accent); }
.waveform-playhead {
  position: absolute; top: -6px; bottom: -6px;
  width: 2px; background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  pointer-events: none;
}
.waveform-marker {
  position: absolute; top: -4px; bottom: -4px;
  width: 1.5px; background: var(--text-mute); opacity: 0.5;
  pointer-events: none;
}

.tx-line {
  display: grid; grid-template-columns: 78px 1fr;
  gap: 18px; padding: 14px 12px; border-radius: 10px;
  cursor: pointer;
  transition: background .15s;
  margin-bottom: 2px;
}
.tx-line:hover { background: var(--surface-2); }
.tx-line.is-active {
  background: var(--accent-soft);
  box-shadow: inset 2px 0 0 var(--accent);
}
.tx-line.is-past { opacity: 0.6; }
.tx-time {
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  color: var(--text-mute);
}
.tx-line.is-active .tx-time { color: var(--accent-text); }
.tx-speaker {
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
}
.tx-speaker-name { font-size: 12.5px; font-weight: 600; }
.tx-text {
  margin: 0; font-size: 14.5px; line-height: 1.6; text-wrap: pretty;
}

mark.hl {
  background: var(--accent-soft);
  color: var(--accent-text);
  padding: 0 3px;
  border-radius: 3px;
}

/* Ask-the-meeting panel */
.ask-panel {
  width: 340px; flex: 0 0 340px;
  background: var(--bg-2); border-left: 1px solid var(--border-soft);
  display: flex; flex-direction: column;
}
.ask-head {
  padding: 14px 18px; border-bottom: 1px solid var(--border-soft);
  display: flex; align-items: center; gap: 10px;
}
.ask-glyph {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent-text);
  display: inline-flex; align-items: center; justify-content: center;
}
.ask-body {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.bubble-user, .bubble-ai {
  padding: 10px 14px; font-size: 13.5px; line-height: 1.5; max-width: 92%;
}
.bubble-user {
  align-self: flex-end;
  background: var(--accent-soft); color: var(--accent-text);
  border-radius: 14px 14px 4px 14px;
}
.bubble-ai {
  background: var(--surface); color: var(--text);
  border-radius: 14px 14px 14px 4px;
  box-shadow: var(--shadow-card);
}
.bubble-cite {
  margin-top: 8px; padding: 6px 10px; border-radius: 8px;
  background: var(--bg-2); display: inline-flex; align-items: center; gap: 8px;
  font-size: 11.5px; color: var(--text-mute); font-family: var(--font-mono);
}
.ask-input-wrap {
  padding: 14px; border-top: 1px solid var(--border-soft);
}
.ask-input {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border-radius: 10px; padding: 8px 10px;
  box-shadow: inset 0 0 0 1px var(--border-soft);
}
.ask-input input { flex: 1; font-size: 13px; padding: 4px 0; }

/* ── NewMeeting ────────────────────────────────── */
.new-bg {
  position: absolute; inset: 0;
  background: radial-gradient(800px 400px at 50% 0%, var(--accent-soft), transparent 60%);
  pointer-events: none;
}
.new-main {
  flex: 1; overflow-y: auto;
  display: flex; justify-content: center;
  padding: 32px 24px 60px;
  position: relative;
}
.new-form { width: 100%; max-width: 720px; }

/* ── Welcome / Onboarding ─────────────────────────── */
.welcome-wrap { width: 100%; max-width: 920px; }
.welcome-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: stretch;
}
@media (max-width: 880px) { .welcome-grid { grid-template-columns: 1fr; } }
.welcome-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 22px 22px 18px;
  box-shadow: var(--shadow-card);
  display: flex; flex-direction: column;
  gap: 12px;
  position: relative;
  transition: box-shadow .15s, transform .15s, background .15s;
  cursor: pointer;
  text-align: left;
  width: 100%;
  font: inherit;
  color: inherit;
  border: 0;
}
.welcome-card:hover { box-shadow: 0 0 0 1px var(--border), 0 10px 28px rgba(0,0,0,.22); transform: translateY(-1px); }
.welcome-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.welcome-card.is-recommended {
  box-shadow: inset 0 0 0 1px var(--accent-line), 0 8px 24px rgba(0,0,0,.18);
}
.welcome-card.is-recommended:hover {
  box-shadow: inset 0 0 0 1px var(--accent), 0 12px 32px rgba(0,0,0,.25);
}
.welcome-card.is-expanded { box-shadow: inset 0 0 0 1px var(--accent-line); }
.welcome-card.is-accent .welcome-card-ico {
  background: var(--accent);
  color: var(--accent-fg);
}
/* Linha CTA no rodapé do card — sinaliza clicabilidade */
.welcome-cta-row {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; font-weight: 600;
  color: var(--accent-text);
}
.welcome-card:hover .welcome-cta-row { color: var(--text); }
.welcome-cta-row .ico { transition: transform .15s; }
.welcome-card:hover .welcome-cta-row .ico { transform: translateX(2px); }
.welcome-card.is-recommended .welcome-cta-row { color: var(--accent-text); }
.welcome-card-head { display: flex; align-items: flex-start; gap: 12px; }
.welcome-card-ico {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-text);
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.welcome-card-title { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.welcome-card-brief { font-size: 13px; color: var(--text-dim); margin-top: 4px; line-height: 1.45; text-wrap: pretty; }
.welcome-toggle-detail {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 500;
  color: var(--text-mute);
  padding: 4px 0;
}
.welcome-toggle-detail:hover { color: var(--text); }
.welcome-card-detail {
  font-size: 13px; color: var(--text-dim);
  line-height: 1.6;
  padding-top: 4px;
  border-top: 1px solid var(--border-soft);
}
.welcome-cta { width: 100%; justify-content: center; margin-top: auto; }
.welcome-form { display: flex; flex-direction: column; margin-top: 4px; }
.welcome-sso-actions {
  display: flex; flex-direction: column; gap: 8px;
  margin-top: 4px;
}
.new-h1 { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.new-sub {
  font-size: 14px; color: var(--text-dim); margin: 6px 0 28px;
  text-wrap: pretty;
}
.new-form-grid { display: flex; flex-direction: column; gap: 20px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .row-2 { grid-template-columns: 1fr; } }

.source-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.source-pick {
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border-soft);
  display: flex; align-items: center; gap: 10px;
  text-align: left; font-size: 13px; font-weight: 500;
  color: var(--text);
  transition: all .15s;
  cursor: pointer;
}
.source-pick:hover { background: var(--surface-2); }
.source-pick.is-active {
  background: var(--accent-soft); color: var(--accent-text);
  box-shadow: inset 0 0 0 1.5px var(--accent);
}

.toggle-row {
  display: flex; align-items: center; gap: 14px;
  padding: 9px 0;
}
.toggle-row + .toggle-row { border-top: 1px solid var(--border-soft); }
.toggle-row .text { flex: 1; }
.toggle-row .label { font-size: 13px; font-weight: 500; }
.toggle-row .desc { font-size: 11.5px; color: var(--text-mute); margin-top: 2px; text-wrap: pretty; }

.new-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 24px; padding-top: 20px;
  border-top: 1px solid var(--border-soft);
}

/* ── Misc utilities ────────────────────────────── */
.flex { display: flex; }
.flex-1 { flex: 1; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.ml-auto { margin-left: auto; }
.text-mute { color: var(--text-mute); }
.text-dim { color: var(--text-dim); }
.text-faint { color: var(--text-faint); }
.text-ok { color: var(--ok); }
.text-bad { color: var(--bad); }
.text-warn { color: var(--warn); }
.text-acc { color: var(--accent); }
.w-full { width: 100%; }
.relative { position: relative; }
.center { display: grid; place-items: center; }
.center-msg {
  display: grid; place-items: center; padding: 40px;
  color: var(--text-mute); font-style: italic; text-align: center;
}
.errbox {
  border-radius: 10px; padding: 16px 20px; margin-bottom: 18px;
  background: oklch(0.68 0.18 22 / 0.06);
  box-shadow: 0 0 0 1px oklch(0.68 0.18 22 / 0.4);
  color: oklch(0.85 0.16 22);
}
.errbox h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 6px; color: oklch(0.78 0.16 22); }
.errbox pre { white-space: pre-wrap; word-break: break-word; margin: 0; font: 12px/1.5 var(--font-mono); }

audio { width: 100%; }
video { width: 100%; max-height: 60vh; background: #000; border-radius: 10px; }

/* Modal (vincular reunião à série) */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  display: grid; place-items: center;
  padding: 24px;
  animation: fadeIn .15s ease;
}
.modal {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1), 0 0 0 1px var(--border);
  width: 100%; max-width: 520px;
  max-height: 80vh;
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: modalIn .18s cubic-bezier(.2, .7, .3, 1);
}
.modal-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-soft);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-body {
  padding: 18px;
  overflow-y: auto;
  flex: 1;
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes modalIn { from { opacity: 0; transform: translateY(8px) scale(.98) } to { opacity: 1; transform: none } }

/* Toast */
.toast-wrap {
  position: fixed; bottom: 18px; right: 18px; z-index: 100;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast {
  padding: 10px 14px; border-radius: 10px;
  background: var(--surface); box-shadow: var(--shadow-1), var(--shadow-card);
  font-size: 13px; max-width: 340px; pointer-events: auto;
  animation: slideIn .2s ease;
}
.toast.is-bad { box-shadow: var(--shadow-1), 0 0 0 1px oklch(0.68 0.18 22 / 0.4); color: oklch(0.85 0.16 22); }
.toast.is-ok  { box-shadow: var(--shadow-1), 0 0 0 1px oklch(0.74 0.13 155 / 0.4); color: oklch(0.85 0.11 155); }
@keyframes slideIn { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ──────────────────────────────────────────────────────────────────
 * Telas /people e /memory
 * ────────────────────────────────────────────────────────────────── */

.ppl-avatar {
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-weight: 600;
  flex: 0 0 auto;
}

.ppl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.ppl-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: border-color .15s ease, transform .08s ease;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ppl-card:hover { border-color: color-mix(in oklch, var(--accent) 40%, var(--border)); }
.ppl-card:active { transform: translateY(1px); }

.ppl-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border-soft);
}
.ppl-stat { text-align: center; }
.ppl-stat-n { font-size: 16px; font-weight: 600; color: var(--text); }
.ppl-stat-l { font-size: 10px; text-transform: uppercase; color: var(--text-mute); letter-spacing: .06em; margin-top: 2px; }

.grid-2col {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
}
@media (max-width: 900px) {
  .grid-2col { grid-template-columns: 1fr; }
}

.ppl-meet-row,
.ppl-action-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s ease;
}
.ppl-meet-row:hover { background: var(--surface-2); }
.ppl-meet-row + .ppl-meet-row,
.ppl-action-row + .ppl-action-row { border-top: 1px solid var(--border-soft); }

.ppl-action-row { cursor: default; }
.ppl-action-row:hover { background: var(--surface-2); }
.ppl-action-dot {
  width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto;
}
.ppl-action-dot.is-pending { background: oklch(0.75 0.18 75); }
.ppl-action-dot.is-done { background: oklch(0.74 0.13 155); }

/* Card de perfil persistido (gerado pelo Claude via MCP) */
.profile-card {
  border: 1px solid var(--border);
  background: linear-gradient(
    180deg,
    color-mix(in oklch, var(--accent) 4%, var(--surface)) 0%,
    var(--surface) 60%
  );
}
.profile-exec {
  color: var(--text);
  font-weight: 500;
}
.profile-body { color: var(--text-dim); font-size: 13.5px; line-height: 1.65; }
.profile-meta {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
  font-size: 11.5px;
  color: var(--text-mute);
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.profile-stale { color: oklch(0.75 0.18 75); }

/* Mini renderer de markdown — H2/H3, listas, inline code */
.md-body p { margin: 0 0 12px 0; }
.md-body p:last-child { margin-bottom: 0; }
.md-body .md-h2 {
  font-size: 14px; font-weight: 600; color: var(--text);
  margin: 22px 0 10px; padding-top: 4px;
}
.md-body .md-h2:first-child { margin-top: 0; }
.md-body .md-h3 {
  font-size: 13px; font-weight: 600; color: var(--text);
  margin: 16px 0 6px;
}
.md-body ul, .md-body ol {
  margin: 0 0 12px 0;
  padding-left: 22px;
}
.md-body li { margin-bottom: 4px; line-height: 1.55; }
.md-body strong { color: var(--text); font-weight: 600; }
.md-body em { color: var(--text); font-style: italic; }
.md-body .md-inline-code {
  background: var(--surface-2);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11.5px;
  font-family: var(--font-mono);
  color: var(--text);
}

/* Aliases (merge de pessoas) */
.ppl-alias-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 4px 4px 12px;
  font-size: 12px; color: var(--text-dim);
}
.ppl-alias-email { font-family: var(--font-mono); font-size: 11.5px; }
.ppl-alias-x {
  width: 22px; height: 22px;
  display: inline-grid; place-items: center;
  border-radius: 50%; color: var(--text-mute); background: transparent;
  cursor: pointer; transition: background .12s, color .12s;
}
.ppl-alias-x:hover { background: oklch(0.68 0.18 22 / 0.15); color: oklch(0.85 0.16 22); }

.merge-results {
  max-height: 320px; overflow: auto;
  display: flex; flex-direction: column; gap: 4px;
}
.merge-result-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid transparent;
  cursor: pointer; transition: border-color .12s;
}
.merge-result-row:hover { border-color: color-mix(in oklch, var(--accent) 50%, var(--border)); }

/* ── Keyword mapping (visual) ──────────────────────────────────
   Cor de cada keyword vem de --kw-hue (matiz OKLCH setado inline).
   Helpers locais pra cor sólida / suave / texto. */
.kw-main {
  padding: 32px 40px 64px;
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
}
[style*="--kw-hue"] {
  --kw-solid: oklch(0.66 0.15 var(--kw-hue));
  --kw-soft:  oklch(0.66 0.15 var(--kw-hue) / 0.13);
  --kw-line:  oklch(0.66 0.15 var(--kw-hue) / 0.3);
  --kw-text:  oklch(0.82 0.1 var(--kw-hue));
}

/* Header — stats à direita do título (título usa o padrão .greet-title) */
.kw-head-stats { display: flex; gap: 28px; padding-top: 4px; }
.kw-hstat { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.kw-hstat-n { font-size: 26px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kw-hstat-l { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-mute); margin-top: 3px; }

/* Barra de registro */
.kw-register {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  margin-bottom: 22px;
}
.kw-register-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
/* Campo de busca/registro padrão — reutilizado em Keywords, Pessoas e
   Memory pra manter o mesmo visual de input (ícone + caixa arredondada). */
.kw-input {
  flex: 1 1 280px;
  display: flex; align-items: center; gap: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 14px;
  height: 42px;
  color: var(--text-mute);
  transition: border-color .15s;
}
.kw-input:focus-within { border-color: var(--accent-line); }
.kw-input input { flex: 1; height: 100%; font-size: 14px; color: var(--text); background: transparent; }
.kw-input .ico { color: var(--text-faint); }
.kw-type-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.kw-type-chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 30px; padding: 0 11px;
  border-radius: 8px;
  font-size: 12px; font-weight: 500;
  color: var(--text-mute);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border-soft);
  transition: color .12s, background .12s, box-shadow .12s;
}
.kw-type-chip .ico { color: var(--text-faint); transition: color .12s; }
.kw-type-chip:hover { color: var(--text-dim); }
.kw-type-chip.is-on {
  color: var(--kw-text);
  background: var(--kw-soft);
  box-shadow: inset 0 0 0 1px var(--kw-line);
}
.kw-type-chip.is-on .ico { color: var(--kw-solid); }
/* Cabeçalho do painel = CTA clicável. Foca o input (vazio) ou registra
   o termo digitado. Visual de eyebrow, mas interativo. */
.kw-register-cta {
  display: inline-flex; align-items: center; gap: 7px;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 10.5px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-mute);
  transition: color .12s;
}
.kw-register-cta .ico { color: var(--accent); transition: color .12s; }
.kw-register-cta:hover { color: var(--accent-text); }
/* Variante rótulo: só legenda (Pessoas / Memory), sem ação de clique. */
.kw-register-label { pointer-events: none; }
/* O campo de busca pode ser um <form> (Memory) — zera margem default. */
form.kw-input { margin: 0; }
.kw-register-cta:disabled { opacity: .55; cursor: default; }

/* Filtro por tipo */
/* Barra de busca + seletores (Pessoas, Memory) — mesmo padrão do Keywords */
.kw-toolbar {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.kw-chip-count {
  font-family: var(--font-mono); font-size: 10.5px;
  color: var(--text-faint);
  padding-left: 2px;
}
.kw-filter-chip.is-on .kw-chip-count { color: inherit; opacity: .7; }
.kw-filter-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.kw-filter-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 12px;
  border-radius: 999px;
  font-size: 12px; font-weight: 500;
  color: var(--text-mute);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border-soft);
  transition: color .12s, background .12s, box-shadow .12s;
}
.kw-filter-chip .ico { color: var(--kw-solid, var(--text-faint)); }
.kw-filter-chip:hover { color: var(--text-dim); }
.kw-filter-chip.is-on {
  color: var(--kw-text, var(--accent-text));
  background: var(--kw-soft, var(--accent-soft));
  box-shadow: inset 0 0 0 1px var(--kw-line, var(--accent-line));
}

/* Grade de cards */
.kw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.kw-card2 {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: 16px 18px 14px;
  cursor: pointer;
  transition: border-color .15s ease, transform .1s ease;
}
.kw-card2:hover { border-color: var(--kw-line); transform: translateY(-1px); }
.kw-card2-head { display: flex; align-items: center; gap: 11px; margin-bottom: 16px; }
.kw-icon {
  width: 34px; height: 34px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 9px;
  color: var(--kw-solid);
  background: var(--kw-soft);
  box-shadow: inset 0 0 0 1px var(--kw-line);
}
.kw-card2-id { flex: 1; min-width: 0; }
.kw-card2-term { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kw-cat-chip {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 5px;
  height: 18px; padding: 0 7px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 500; letter-spacing: 0.01em;
  color: var(--kw-text, var(--text-dim));
  background: var(--kw-soft, var(--surface-hi));
}
.kw-cat-chip .ico { color: var(--kw-solid, var(--text-mute)); }
.kw-card2-stats { display: flex; gap: 18px; margin-bottom: 12px; }
.kw-cstat { display: flex; flex-direction: column; line-height: 1.15; }
.kw-cstat-n { font-size: 19px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kw-cstat-l { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--text-mute); margin-top: 3px; }

.kw-trend.is-up { color: oklch(0.78 0.15 155); }
.kw-trend.is-down { color: oklch(0.72 0.17 22); }
.kw-trend.is-flat { color: var(--text-mute); }

/* Sparkline (cards) e chart (detalhe) */
.kw-spark, .kw-chart {
  display: flex; align-items: flex-end; gap: 3px;
  width: 100%;
}
.kw-spark { height: 30px; }
.kw-bar {
  flex: 1;
  min-height: 2px;
  border-radius: 2px 2px 0 0;
  background: oklch(0.66 0.15 var(--kw-hue) / 0.4);
  transition: background .15s;
}
.kw-bar.is-now { background: var(--kw-solid, oklch(0.66 0.15 var(--kw-hue))); }
.kw-card2:hover .kw-bar { background: oklch(0.66 0.15 var(--kw-hue) / 0.6); }
.kw-card2:hover .kw-bar.is-now { background: oklch(0.7 0.16 var(--kw-hue)); }

/* ── Detalhe ── */
.kw-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-mute);
  cursor: pointer; margin-bottom: 22px;
  transition: color .12s;
}
.kw-back:hover { color: var(--text); }
.kw-back-ico { transform: rotate(180deg); }
.kw-d-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.kw-d-icon {
  width: 56px; height: 56px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  color: var(--kw-solid);
  background: var(--kw-soft);
  box-shadow: inset 0 0 0 1px var(--kw-line);
}
.kw-d-icon .ico { width: 24px; height: 24px; }
.kw-d-avatar { flex: 0 0 auto; display: inline-flex; }
.kw-d-id { flex: 1; min-width: 0; padding-top: 2px; }
.kw-d-titlerow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.kw-d-title { font-size: 26px; font-weight: 650; letter-spacing: -0.02em; }
.kw-d-titlerow .kw-cat-chip { margin-top: 0; height: 20px; font-size: 10.5px; }
.kw-d-sub { font-size: 13px; color: var(--text-mute); margin-top: 7px; }
.kw-dot { margin: 0 8px; opacity: .5; }
.kw-d-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.kw-d-desc { font-size: 14.5px; line-height: 1.6; color: var(--text-dim); margin-bottom: 20px; max-width: 760px; text-wrap: pretty; }

.kw-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.kw-tile {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: 14px 16px;
}
.kw-tile-l { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-mute); margin-bottom: 8px; }
.kw-tile-n { font-size: 24px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 7px; }
.kw-tile-bar {
  margin-top: 9px; height: 5px; border-radius: 3px;
  background: var(--surface-hi); overflow: hidden;
}
.kw-tile-bar > span {
  display: block; height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), oklch(0.74 0.14 var(--acc-h)));
}

/* Barra de "contribuição" por reunião no histórico (detalhe da pessoa) */
.ppl-contrib { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: 0 0 auto; width: 90px; }
.ppl-contrib-l { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); }
.ppl-contrib-bar { width: 100%; height: 4px; border-radius: 2px; background: var(--surface-hi); overflow: hidden; }
.ppl-contrib-bar > span { display: block; height: 100%; border-radius: 2px; background: var(--accent); }
.ppl-meet-more {
  text-align: center; padding: 11px; cursor: default;
  font-size: 12.5px; color: var(--text-mute);
  border-top: 1px solid var(--border-soft);
}

.kw-syn {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: 16px 18px;
  margin-bottom: 18px;
}
.kw-syn-list { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.kw-syn-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 12px;
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--kw-text, var(--text-dim));
  background: var(--kw-soft, var(--surface-hi));
}
.kw-syn-chip::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--kw-solid, var(--text-mute));
}
.kw-syn-add {
  height: 26px; padding: 0 12px;
  font-size: 12.5px; color: var(--text-mute);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--border-soft);
  transition: color .12s, box-shadow .12s;
}
.kw-syn-add:hover { color: var(--accent-text); box-shadow: inset 0 0 0 1px var(--accent-line); }

.kw-chart-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: 18px 20px 14px;
  margin-bottom: 26px;
}
.kw-chart-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.kw-chart { height: 150px; gap: 6px; align-items: flex-end; }
.kw-chart .kw-bar { border-radius: 4px 4px 0 0; min-height: 4px; }
.kw-chart-axis {
  display: flex; justify-content: space-between;
  margin-top: 8px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em;
  color: var(--text-faint);
}

.kw-recent-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.kw-recent { display: flex; flex-direction: column; gap: 10px; }
.kw-mention {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: 14px 16px;
}
.kw-mention-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.kw-mention-meet { font-size: 13px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kw-mention-date { font-size: 11.5px; color: var(--text-mute); flex: 0 0 auto; font-family: var(--font-mono); }
.kw-mention-quote { font-size: 14px; line-height: 1.6; color: var(--text-dim); margin-bottom: 10px; text-wrap: pretty; }
.kw-hl {
  background: var(--accent-soft);
  color: var(--accent-text);
  border-radius: 4px;
  padding: 0 4px;
}
.kw-jump {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 500;
  color: var(--accent-text);
  transition: gap .12s;
}
.kw-jump .ico { color: var(--accent); }
.kw-jump:hover { gap: 9px; }
/* Speaker do trecho de transcrição (seção "Trechos da transcrição") */
.kw-speaker {
  color: var(--accent-text);
  font-weight: 600;
  margin-right: 6px;
}
/* Flash ao pular pra uma linha da transcrição vinda de uma keyword */
@keyframes tx-flash {
  0%   { background: var(--accent-soft); }
  100% { background: transparent; }
}
.tx-line-flash { animation: tx-flash 1.6s ease-out; }

/* ── Toggle segmentado (Lista / Kanban) ──────────────────────── */
.seg-toggle {
  display: inline-flex; gap: 2px;
  background: var(--surface-2);
  border-radius: 8px;
  padding: 2px;
  box-shadow: inset 0 0 0 1px var(--border-soft);
}
.seg-btn {
  display: inline-flex; align-items: center; gap: 5px;
  height: 26px; padding: 0 12px;
  border-radius: 6px;
  font-size: 12.5px; font-weight: 500;
  color: var(--text-mute);
  transition: color .12s, background .12s;
}
.seg-btn .ico { color: var(--text-faint); }
.seg-btn:hover { color: var(--text-dim); }
.seg-btn.is-on {
  background: var(--surface-hi);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.seg-btn.is-on .ico { color: var(--accent); }

/* ── Kanban ──────────────────────────────────────────────────── */
.kanban {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 16px;
  align-items: start;
}
@media (max-width: 920px) { .kanban { grid-template-columns: 1fr; } }
.kanban-col {
  background: var(--bg-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: 12px;
  min-height: 120px;
  transition: border-color .12s, background .12s;
}
.kanban-col.is-drop-target {
  border-color: var(--accent-line);
  background: color-mix(in oklch, var(--accent) 6%, var(--bg-2));
}
.kanban-col-head {
  display: flex; align-items: center; gap: 8px;
  padding: 2px 6px 12px;
}
.kanban-col-title {
  font-size: 12.5px; font-weight: 600; letter-spacing: .01em;
  color: var(--text-dim);
}
.kanban-col-head::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: var(--text-faint); flex: 0 0 auto;
}
.kanban-todo::before  { background: oklch(0.66 0.15 280); }
.kanban-doing::before { background: oklch(0.75 0.15 75); }
.kanban-done::before  { background: oklch(0.72 0.13 155); }
.kanban-col-count {
  margin-left: auto;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--text-mute);
  background: var(--surface-2);
  padding: 1px 7px; border-radius: 999px;
}
.kanban-col-body { display: flex; flex-direction: column; gap: 10px; min-height: 40px; }
.kanban-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: 12px 13px;
  cursor: grab;
  box-shadow: var(--shadow-card);
  transition: border-color .12s, transform .08s, box-shadow .12s;
}
.kanban-card:hover { border-color: color-mix(in oklch, var(--accent) 35%, var(--border)); }
.kanban-card:active { cursor: grabbing; }
.kanban-card.is-dragging { opacity: .45; }
.kanban-card-desc { font-size: 13.5px; line-height: 1.45; color: var(--text); margin-bottom: 10px; text-wrap: pretty; }
.kanban-card-meta {
  display: flex; align-items: center; gap: 5px;
  font-size: 11.5px; color: var(--text-mute);
  margin-bottom: 11px;
}
.kanban-card-meta .ico { color: var(--text-faint); }
.kanban-card-meeting { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kanban-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kanban-assignees { display: inline-flex; }
.kanban-assignees .avatar { box-shadow: 0 0 0 2px var(--surface); margin-left: -6px; }
.kanban-assignees .avatar:first-child { margin-left: 0; }
.kanban-unassigned {
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface-2); color: var(--text-faint);
  box-shadow: inset 0 0 0 1px var(--border-soft);
}
.kanban-card-chips { display: inline-flex; gap: 6px; }
.kanban-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-mono); font-size: 10.5px;
  color: var(--text-mute);
}
.kanban-chip .ico { color: var(--text-faint); }
.kanban-chip.is-overdue { color: oklch(0.72 0.17 22); }
.kanban-chip.is-overdue .ico { color: oklch(0.72 0.17 22); }

/* ── Card modal ──────────────────────────────────────────────── */
.modal-foot {
  padding: 12px 18px;
  border-top: 1px solid var(--border-soft);
  display: flex; align-items: center; justify-content: flex-start;
}
.task-card-modal .modal-body { display: flex; flex-direction: column; gap: 18px; }
.tc-title-input {
  width: 100%;
  font-size: 16px; font-weight: 600; color: var(--text);
  background: var(--surface-2);
  border-radius: 8px; padding: 10px 12px;
  box-shadow: inset 0 0 0 1px var(--border-soft);
}
.tc-title-input:focus { box-shadow: inset 0 0 0 1px var(--accent-line); }
.tc-field { display: flex; flex-direction: column; gap: 9px; }
.tc-input {
  width: 100%;
  font-size: 13px; color: var(--text);
  background: var(--surface-2);
  border-radius: 8px; padding: 8px 11px;
  box-shadow: inset 0 0 0 1px var(--border-soft);
}
.tc-input:focus { box-shadow: inset 0 0 0 1px var(--accent-line); }
.tc-assignees { display: flex; flex-wrap: wrap; gap: 6px; }
.tc-assignee {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface-2);
  border-radius: 999px;
  padding: 3px 4px 3px 4px;
  box-shadow: inset 0 0 0 1px var(--border-soft);
}
.tc-assignee-name { font-size: 12.5px; color: var(--text-dim); }
.tc-assignee-x {
  width: 18px; height: 18px; border-radius: 50%;
  display: grid; place-items: center; color: var(--text-mute);
}
.tc-assignee-x:hover { background: var(--bad-soft); color: oklch(0.8 0.16 22); }
.tc-meeting {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--accent-text); cursor: pointer;
}
.tc-meeting .ico { color: var(--accent); }
.tc-comments { display: flex; flex-direction: column; gap: 12px; }
.tc-comment { display: flex; gap: 9px; align-items: flex-start; }
.tc-comment-body { flex: 1; min-width: 0; }
.tc-comment-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.tc-comment-author { font-size: 12.5px; font-weight: 600; color: var(--text); }
.tc-comment-time { font-size: 10.5px; color: var(--text-mute); font-family: var(--font-mono); }
.tc-comment-text { font-size: 13px; line-height: 1.5; color: var(--text-dim); text-wrap: pretty; }
.tc-comment-x {
  width: 22px; height: 22px; border-radius: 6px; flex: 0 0 auto;
  display: grid; place-items: center; color: var(--text-faint);
  opacity: 0; transition: opacity .12s, color .12s, background .12s;
}
.tc-comment:hover .tc-comment-x { opacity: 1; }
.tc-comment-x:hover { background: var(--bad-soft); color: oklch(0.8 0.16 22); }
.tc-comment-add { display: flex; gap: 8px; align-items: center; }
.tc-comment-add .tc-input { flex: 1; }

/* Link de keyword no markdown — sutil mas legível */
.kw-link {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dashed color-mix(in oklch, var(--accent) 50%, transparent);
  cursor: pointer;
}
.kw-link:hover { border-bottom-style: solid; }

/* Chips de kind nos resultados da busca de memória — cor distinta
   pra cada tipo de chunk, ajudando o user a bater o olho e entender
   "essa hit é uma decisão" vs "essa é o summary global". */
.mem-kind-summary   { background: color-mix(in oklch, var(--accent) 14%, var(--surface-2)); color: var(--accent); }
.mem-kind-decision  { background: oklch(0.74 0.13 155 / 0.18); color: oklch(0.85 0.13 155); }
.mem-kind-blocker   { background: oklch(0.68 0.18 22 / 0.18); color: oklch(0.85 0.16 22); }
.mem-kind-loose_end { background: oklch(0.75 0.18 75 / 0.18); color: oklch(0.85 0.15 75); }
.mem-kind-action    { background: oklch(0.7 0.15 260 / 0.18); color: oklch(0.85 0.13 260); }

/* Picker de insights — feedback visual de cards já selecionados */
.ins-pick.is-selected {
  border-color: color-mix(in oklch, var(--accent) 70%, var(--border));
  background: color-mix(in oklch, var(--accent) 8%, var(--surface));
}
.ins-pick.is-selected .ins-pick-ico {
  background: color-mix(in oklch, var(--accent) 22%, var(--surface-2));
  color: var(--accent);
}
.ins-pick-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; color: var(--accent); font-weight: 500;
  background: color-mix(in oklch, var(--accent) 18%, transparent);
  border-radius: 999px;
  padding: 3px 8px;
  white-space: nowrap;
}

/* ═══ Team & access (gestão de usuários) ═══ */
.team-main { padding: 32px 40px 60px; }

.team-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 14px; margin-bottom: 22px;
}
.team-stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 16px 18px;
}
.team-stat.warn { border-color: color-mix(in oklch, var(--warn) 45%, var(--border)); }
.team-stat-value { font-size: 26px; font-weight: 650; color: var(--text); line-height: 1.1; }
.team-stat-label { font-size: 12.5px; color: var(--text-dim); margin-top: 4px; }
.team-stat-sub { font-size: 11px; color: var(--text-faint); margin-top: 2px; }

.team-tabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.team-tab {
  appearance: none; background: none; border: none; cursor: pointer;
  font: inherit; font-size: 13px; color: var(--text-mute);
  padding: 9px 14px; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.team-tab:hover { color: var(--text); }
.team-tab.is-on { color: var(--accent-text); border-bottom-color: var(--accent); font-weight: 550; }

/* Tabela sempre em largura cheia; o detalhe vira um drawer sobreposto. */
.team-layout { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start; }

.team-table-wrap {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
}
.team-table { width: 100%; border-collapse: collapse; }
.team-table thead th {
  text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em; color: var(--text-faint);
  padding: 11px 16px; border-bottom: 1px solid var(--border);
}
.team-table tbody td { padding: 12px 16px; border-bottom: 1px solid var(--border-soft); font-size: 13px; vertical-align: middle; }
.team-table tbody tr:last-child td { border-bottom: none; }
.team-row { cursor: pointer; transition: background .12s; }
.team-row:hover { background: var(--surface-hi); }
.team-row.is-sel { background: var(--accent-soft); }
.team-row.is-invite { cursor: default; background: color-mix(in oklch, var(--warn) 6%, transparent); }
.team-empty { padding: 36px 16px; text-align: center; color: var(--text-mute); font-size: 13px; }

.team-member { display: flex; align-items: center; gap: 11px; }
.team-member-name { font-weight: 550; color: var(--text); display: flex; align-items: center; gap: 6px; }
.team-member-email { font-size: 11.5px; color: var(--text-faint); margin-top: 1px; }
.team-pill {
  display: inline-block; font-size: 11.5px; color: var(--text-dim);
  background: var(--surface-hi); border-radius: 999px; padding: 2px 9px;
}
.team-foot {
  display: flex; align-items: center; gap: 6px;
  padding: 11px 16px; font-size: 11.5px; color: var(--text-faint);
  border-top: 1px solid var(--border-soft);
}

/* chips de papel e status */
.role-chip {
  display: inline-block; font-size: 11px; font-weight: 600; border-radius: 999px;
  padding: 2px 9px; white-space: nowrap;
}
.role-owner  { background: color-mix(in oklch, var(--accent) 20%, transparent); color: var(--accent-text); }
.role-admin  { background: var(--info-soft); color: oklch(0.85 0.11 230); }
.role-member { background: var(--surface-hi); color: var(--text-dim); }
.role-viewer { background: var(--warn-soft); color: oklch(0.88 0.12 75); }
.role-super  { background: oklch(0.55 0.2 300 / .22); color: oklch(0.85 0.13 300); }

.st-chip {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; border-radius: 999px; padding: 2px 8px;
}
.st-active   { background: var(--ok-soft); color: oklch(0.85 0.11 155); }
.st-suspended{ background: var(--bad-soft); color: oklch(0.78 0.16 22); }
.st-invited  { background: var(--warn-soft); color: oklch(0.88 0.12 75); }
.st-2fa-on   { background: var(--surface-hi); color: var(--text-dim); }
.st-2fa-off  { background: transparent; color: var(--text-faint); }

/* painel de detalhe */
.team-detail {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 20px; position: sticky; top: 20px;
  max-height: calc(100vh - 40px); overflow-y: auto;
}

/* Drawer de edição do membro: sobrepõe a lateral direita (backdrop + painel
 * fixo à direita, full-height), como no design de referência. */
.team-drawer-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
  animation: fadeIn .15s ease;
}
.team-detail.team-drawer {
  position: fixed; top: 0; right: 0; z-index: 201;
  width: min(460px, 100vw); height: 100vh; max-height: 100vh;
  border: none; border-left: 1px solid var(--border); border-radius: 0;
  box-shadow: var(--shadow-1);
  padding: 28px 28px 40px;
  overflow-y: auto;
  animation: slideInRight .2s ease;
}
@keyframes slideInRight { from { transform: translateX(100%); } to { transform: translateX(0); } }
.team-detail-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 18px; }
.team-detail-name { font-weight: 600; font-size: 15px; color: var(--text); }
.team-detail-email { font-size: 12px; color: var(--text-faint); margin-top: 1px; }
.team-detail-meta { font-size: 11px; color: var(--text-faint); margin-top: 6px; line-height: 1.5; }
.team-detail-head .btn-icon { margin-left: auto; }
.team-section-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-faint); margin: 18px 0 9px;
}
.team-section-label.danger { color: oklch(0.7 0.16 22); }

.role-cards { display: flex; flex-direction: column; gap: 7px; }
.role-card {
  display: flex; align-items: center; gap: 11px; text-align: left;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 10px 12px; cursor: pointer; font: inherit;
  color: var(--text); transition: border-color .12s, background .12s;
}
.role-card:hover { border-color: var(--accent-line); }
.role-card.is-on { border-color: var(--accent); background: var(--accent-soft); }
.role-card:disabled { opacity: .55; cursor: not-allowed; }
.role-card .ico { color: var(--text-mute); flex: 0 0 auto; }
.role-card.is-on .ico { color: var(--accent-text); }
.role-card-name { font-size: 13px; font-weight: 550; }
.role-card-desc { font-size: 11px; color: var(--text-faint); margin-top: 1px; }
.role-card-radio {
  margin-left: auto; width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid var(--border); flex: 0 0 auto;
}
.role-card.is-on .role-card-radio { border-color: var(--accent); background: radial-gradient(circle, var(--accent) 42%, transparent 46%); }

.perm-list { display: flex; flex-direction: column; }
.perm-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid var(--border-soft); font-size: 12.5px; color: var(--text-dim);
}
.perm-row:last-child { border-bottom: none; }
.perm-allowed { color: oklch(0.8 0.12 155); font-weight: 550; font-size: 11.5px; }
.perm-no { color: var(--text-faint); font-size: 11.5px; }

.sess-list { display: flex; flex-direction: column; gap: 8px; }
.sess-row { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--text-dim); }
.sess-row .ico { vertical-align: -1px; }
.danger-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn.danger { color: oklch(0.72 0.16 22); }
.btn.danger:hover { background: var(--bad-soft); }
.team-detail-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--border); }

/* tenants — gestão multi-org (reusa team-* no restante) */
.tenant-logo { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--r-md); background: var(--surface-2); color: var(--text-dim); flex: none; }
.tenant-logo.lg { width: 44px; height: 44px; }
.tenant-domains { display: flex; flex-direction: column; gap: 6px; }
.tenant-domain-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; padding: 7px 10px; background: var(--surface-2); border-radius: var(--r-md); }
.tenant-domain-add { display: flex; gap: 8px; align-items: center; margin-top: 2px; }
.tenant-domain-add .input { flex: 1; }
.tenant-users, .tenant-activity { display: flex; flex-direction: column; gap: 7px; }
.tenant-billing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* convite — resultados com link */
.invite-results { display: flex; flex-direction: column; gap: 6px; background: var(--surface-2); border-radius: var(--r-md); padding: 10px 12px; }
.invite-result-row { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--text-dim); }
.invite-link { color: var(--accent-text); cursor: pointer; font-size: 12px; }

/* gate de 2FA */
.login-shell { min-height: 100vh; display: grid; place-items: center; background: var(--bg); padding: 24px; }
.twofa-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 34px 30px; width: 360px; max-width: 90vw;
  text-align: center; box-shadow: var(--shadow-card);
}
.twofa-glyph {
  width: 52px; height: 52px; margin: 0 auto 16px; border-radius: 14px;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text);
}
.twofa-glyph.twofa-glyph-danger {
  background: color-mix(in oklch, var(--bad) 18%, transparent); color: var(--bad);
}
.twofa-card h1 { font-size: 19px; margin: 0 0 6px; color: var(--text); }
.twofa-card p { font-size: 13px; margin: 0 0 20px; }
.twofa-input {
  text-align: center; letter-spacing: .5em; font-size: 22px; font-family: var(--font-mono);
  padding: 12px; margin-bottom: 14px; width: 100%;
}
.twofa-error { color: oklch(0.72 0.16 22); font-size: 12.5px; margin-bottom: 12px; }

/* 2FA self-service no perfil */
.twofa-sec { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border-soft); }
.twofa-sec-head { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 550; color: var(--text); margin-bottom: 8px; }
.twofa-sec .input { margin-bottom: 8px; }
.twofa-qr { width: 150px; height: 150px; border-radius: var(--r-md); background: #fff; padding: 6px; display: block; margin: 0 auto 8px; }

/* Perfil: seções em cards (Signed in as / Security) — padrão do mockup. */
.prof-section { margin-top: 20px; }
.prof-sec-label { display: block; margin-bottom: 8px; }
.prof-box {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--r-md, 10px);
  padding: 12px 14px;
}
.prof-id { display: flex; align-items: center; gap: 12px; }
.prof-avatar { width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto; object-fit: cover; }
.prof-id-text { min-width: 0; flex: 1; }
.prof-id-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prof-id-mail { font-size: 12px; color: var(--text-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prof-sec-icon {
  width: 34px; height: 34px; border-radius: 9px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-hi); color: var(--text-dim);
  border: 1px solid var(--border-soft);
}
.twofa-panel { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-soft); }
.twofa-panel .input { margin-bottom: 0; }

/* Aba Áudio: cada trecho num card; a caixa de "adicionar áudio" tem a MESMA
 * altura dos players (min-height fixa + conteúdo centralizado). */
.audio-stack { display: flex; flex-direction: column; gap: 14px; }
.audio-card {
  padding: 16px 18px;
  display: flex; flex-direction: column; justify-content: center; gap: 9px;
  min-height: 140px;
}
.audio-card audio { width: 100%; display: block; height: 40px; }
.audio-add-row { display: flex; gap: 10px; align-items: center; }
.audio-add-row .input { flex: 1; min-width: 0; margin: 0; }
.audio-add-row .btn { flex: 0 0 auto; white-space: nowrap; }
.audio-add-hint {
  font-size: 11.5px; line-height: 1.4;
  /* limita a 2 linhas pra a altura ficar igual à dos players */
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}

@media (max-width: 1080px) {
  .team-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .team-detail.team-drawer { width: 100vw; border-left: none; }
}

.task-assignees { display: inline-flex; align-items: center; gap: 2px; }

/* Magic link — confirmação "confira seu e-mail" */
.login-magic-sent { display: flex; flex-direction: column; align-items: flex-start; gap: 11px; padding: 6px 0; }
.login-magic-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.login-magic-title { font-size: 16px; font-weight: 600; color: var(--text); }
.login-magic-desc { font-size: 13.5px; color: var(--text-mute); line-height: 1.5; margin: 0; }
.login-magic-devlink { font-size: 12.5px; color: var(--accent-text); word-break: break-all; }

.login-magic-icon-warn { background: var(--warn-soft); color: oklch(0.88 0.12 75); }

/* ── Caixa de e-mail do agente ───────────────────────────────── */
.inbox-list { display: flex; flex-direction: column; gap: 8px; }
.inbox-item { border: 1px solid var(--border-soft); border-radius: 12px; background: var(--surface); overflow: hidden; transition: border-color .12s; }
.inbox-item.is-open { border-color: var(--border); }
.inbox-head { display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left; padding: 14px 16px; background: none; border: 0; cursor: pointer; color: inherit; }
.inbox-head:hover { background: var(--surface-2); }
.inbox-meta { min-width: 0; flex: 1; }
.inbox-subject { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-from { font-size: 12.5px; color: var(--text-mute); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-snippet { font-size: 12.5px; color: var(--text-faint); margin-top: 5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.inbox-date { font-size: 11.5px; flex-shrink: 0; padding-top: 2px; white-space: nowrap; }
.inbox-body { padding: 0 16px 16px 62px; border-top: 1px solid var(--border-soft); }
.inbox-pre { font-family: inherit; font-size: 13.5px; line-height: 1.6; color: var(--text); white-space: pre-wrap; word-break: break-word; margin: 14px 0 0; }

/* ── Filtro de calendário (lista #/) ─────────────────────────────── */
.cal-chip { display: inline-flex; align-items: center; gap: 5px; }
.cal-chip.is-open { box-shadow: inset 0 0 0 1px var(--accent); }
.cal-chip-x { display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px; margin-left: 1px; border-radius: 4px; font-size: 14px; line-height: 1; opacity: .7; }
.cal-chip-x:hover { opacity: 1; background: oklch(1 0 0 / .14); }

.cal-pop-backdrop { position: fixed; inset: 0; z-index: 90; }
.cal-pop {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 91;
  width: 290px; padding: 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: 0 18px 44px -14px rgba(0, 0, 0, .65);
  animation: slideIn .12s ease;
}
.cal-pop-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-pop-title { font-weight: 600; font-size: 13px; letter-spacing: .01em; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-grid-head { margin-bottom: 4px; }
.cal-wd { text-align: center; font-size: 10px; font-weight: 600; letter-spacing: .03em; color: var(--text-mute); padding: 2px 0; }
.cal-cell {
  position: relative; aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; color: var(--text-dim); background: transparent; border: 0;
  border-radius: 8px; cursor: pointer; transition: background .1s, color .1s;
}
.cal-cell:hover { background: var(--surface-2); color: var(--text); }
.cal-cell.is-out { color: var(--text-faint); }
.cal-cell.is-range { background: var(--accent-soft); color: var(--text); border-radius: 0; }
.cal-cell.is-range.is-sel { border-radius: 8px; }
.cal-cell.is-sel { background: var(--accent); color: var(--accent-fg); font-weight: 600; }
.cal-cell.is-today:not(.is-sel) { box-shadow: inset 0 0 0 1px var(--accent); color: var(--text); }
.cal-dot { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); width: 4px; height: 4px; border-radius: 50%; background: var(--text-dim); }
.cal-dot.is-multi { background: oklch(0.8 0.14 80); }
.cal-cell.is-sel .cal-dot { background: var(--accent-fg); }
.cal-pop-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--border-soft); }
.cal-legend { display: flex; gap: 9px; }
.cal-leg { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; color: var(--text-mute); }
.cal-leg .cal-dot { position: static; transform: none; }
.cal-ring { width: 8px; height: 8px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--accent); }

/* ── Gravador de reunião presencial ──────────────────────────────── */
.rec-card { display: flex; flex-direction: column; align-items: center; padding: 34px 18px 26px; border: 1px solid var(--border-soft); border-radius: 14px; background: var(--surface); }
.rec-stage { display: flex; flex-direction: column; align-items: center; gap: 14px; min-height: 150px; justify-content: center; }
.rec-btn-start { width: 88px; height: 88px; border-radius: 50%; border: 0; cursor: pointer; background: var(--accent); color: var(--accent-fg); display: flex; align-items: center; justify-content: center; transition: transform .12s, box-shadow .15s; box-shadow: 0 10px 30px -8px var(--accent); }
.rec-btn-start:hover { transform: scale(1.05); }
.rec-btn-start:active { transform: scale(.98); }
.rec-btn-start .ico { width: 36px; height: 36px; }
.rec-label { font-size: 13.5px; color: var(--text-dim); font-weight: 500; }
.rec-err { font-size: 12px; color: var(--bad); margin-top: 2px; text-align: center; max-width: 320px; }
.rec-pulse { width: 64px; height: 64px; border-radius: 50%; background: var(--bad); animation: recPulse 1.5s ease-in-out infinite; }
@keyframes recPulse { 0%, 100% { box-shadow: 0 0 0 0 var(--bad-soft); opacity: 1; } 50% { box-shadow: 0 0 0 18px transparent; opacity: .82; } }
/* Pausado: indicador estático âmbar (sem pulsar). */
.rec-pulse.is-paused { background: oklch(0.8 0.14 80); animation: none; box-shadow: none; }
.rec-time { font-size: 34px; font-weight: 600; letter-spacing: .02em; color: var(--text); font-variant-numeric: tabular-nums; }
.rec-controls { display: flex; gap: 10px; margin-top: 4px; }
.rec-spin { width: 42px; height: 42px; border-radius: 50%; border: 3px solid var(--surface-hi); border-top-color: var(--accent); animation: recSpin .8s linear infinite; }
@keyframes recSpin { to { transform: rotate(360deg); } }

/* ── Compartilhar reunião ─────────────────────────────────────────── */
.share-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border-soft); background: var(--surface); }
.share-pick { width: 100%; cursor: pointer; color: inherit; transition: background .1s, border-color .1s; }
.share-pick:hover { background: var(--surface-2); border-color: var(--border); }
.share-avatar { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-hi); color: var(--text-mute); flex: 0 0 auto; }
.share-name { font-size: 13px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.share-email { font-size: 11.5px; color: var(--text-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── WhatsApp (#/whatsapp) ────────────────────────────────────────── */
.wa-main { display: flex; flex-direction: column; padding: 0; min-width: 0; }
.wa-chat-row { display: flex; align-items: center; gap: 11px; width: 100%; padding: 11px 14px; border: 0; border-bottom: 1px solid var(--border-soft); background: none; cursor: pointer; text-align: left; color: inherit; transition: background .1s; }
.wa-chat-row:hover { background: var(--surface-2); }
.wa-chat-row.is-active { background: var(--accent-soft); }
.wa-avatar { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: var(--surface-hi); color: var(--text-mute); flex: 0 0 auto; }
.wa-avatar.is-group { background: oklch(0.7 0.13 155 / 0.18); color: oklch(0.8 0.12 155); }
.wa-chat-meta { min-width: 0; flex: 1; }
.wa-chat-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.wa-chat-name { font-size: 13.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-chat-time { font-size: 11px; color: var(--text-mute); flex: 0 0 auto; }
.wa-chat-preview { font-size: 12.5px; color: var(--text-mute); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-thread-head { display: flex; align-items: center; gap: 11px; padding: 14px 24px; border-bottom: 1px solid var(--border-soft); flex: 0 0 auto; }
.wa-thread-name { font-size: 15px; font-weight: 600; color: var(--text); }
.wa-thread-sub { font-size: 12px; color: var(--text-mute); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-thread { flex: 1; overflow-y: auto; padding: 20px 24px 28px; display: flex; flex-direction: column; }
.wa-msg { display: flex; flex-direction: column; max-width: 74%; align-self: flex-start; margin-top: 2px; }
.wa-msg.is-me { align-self: flex-end; align-items: flex-end; }
.wa-msg-sender { font-size: 11px; font-weight: 600; color: var(--accent-text); margin: 9px 0 2px 11px; }
/* Número (dígitos) ao lado do nome do usuário registrado — secundário. */
.wa-sender-num { color: var(--text-mute); font-weight: 400; font-size: 10.5px; margin-left: 5px; }

/* ── Notas de voz (#/notes) — 2 painéis ───────────────────────────── */
.notes-screen { flex: 1; display: flex; min-width: 0; min-height: 0; }
.notes-rail { flex: 0 0 320px; width: 320px; display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--border-soft); background: var(--bg-2); }
.notes-rail-head { padding: 20px 18px 12px; }
.notes-rail-title { font-size: 22px; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.notes-rail-sub { font-size: 12.5px; color: var(--text-mute); margin-top: 5px; line-height: 1.4; }
.notes-wa { display: flex; align-items: center; gap: 11px; margin: 4px 14px 10px; padding: 11px 13px; border: 1px solid color-mix(in oklch, oklch(0.72 0.16 150) 35%, var(--border)); background: color-mix(in oklch, oklch(0.72 0.16 150) 9%, var(--surface)); border-radius: var(--r-md); }
.notes-wa-ico { display: inline-flex; color: oklch(0.78 0.16 150); }
.notes-wa-id { flex: 1; min-width: 0; }
.notes-wa-label { font-size: 12.5px; font-weight: 600; color: var(--text); }
.notes-wa-num { font-size: 12.5px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.notes-wa-copy { border: 0; background: none; color: var(--text-mute); cursor: pointer; padding: 6px; border-radius: var(--r-sm); display: inline-flex; }
.notes-wa-copy:hover { color: var(--text); background: var(--surface-2); }
.notes-list { flex: 1; overflow-y: auto; min-height: 0; padding: 4px 8px 16px; }
.notes-empty-rail { padding: 24px 16px; text-align: center; font-size: 13px; color: var(--text-mute); }
.note-row { display: flex; gap: 11px; padding: 11px 12px; border-radius: var(--r-md); cursor: pointer; transition: background .1s; }
.note-row:hover { background: var(--surface-2); }
.note-row.is-sel { background: var(--accent-soft); }
.note-row-play { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 8px; background: var(--surface-hi); color: var(--text-dim); display: inline-flex; align-items: center; justify-content: center; }
.note-row.is-sel .note-row-play { background: var(--accent); color: #fff; }
.note-row-body { flex: 1; min-width: 0; }
.note-row-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.note-row-title { font-size: 13.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-row-dur { font-size: 11.5px; color: var(--text-mute); font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.note-row-prev { font-size: 12.5px; color: var(--text-dim); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-row-meta { font-size: 11px; color: var(--text-mute); margin-top: 5px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.note-row-meta .ico { color: oklch(0.78 0.16 150); }
.note-row-proc { color: oklch(0.78 0.15 75); display: inline-flex; align-items: center; gap: 3px; }
.note-row-fail { color: var(--bad); }
.notes-detail { flex: 1; min-width: 0; min-height: 0; overflow-y: auto; padding: 28px 36px 60px; }
.notes-detail-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--text-mute); }
.notes-detail-empty .ico { opacity: .4; }
.note-detail-head { margin-bottom: 22px; }
.note-detail-title { font-size: 24px; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.note-detail-meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12.5px; color: var(--text-mute); flex-wrap: wrap; }
.note-via { display: inline-flex; align-items: center; gap: 5px; color: oklch(0.78 0.16 150); font-weight: 500; }
.note-sender { display: inline-flex; align-items: center; gap: 6px; color: var(--text-dim); }
.note-player { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--r-lg); padding: 14px 18px; box-shadow: var(--shadow-card); margin-bottom: 18px; }
.note-play-btn { flex: 0 0 48px; width: 48px; height: 48px; border: 0; border-radius: 12px; background: var(--accent); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: filter .1s; }
.note-play-btn:hover { filter: brightness(1.08); }
.note-wave-wrap { flex: 1; min-width: 0; }
.note-wave { position: relative; height: 40px; cursor: pointer; }
.note-wave-base, .note-wave-fill-inner { display: flex; align-items: center; gap: 2px; height: 100%; width: 100%; }
.note-wave-bar { flex: 1; min-width: 2px; border-radius: 2px; background: var(--border); }
.note-wave-fill { position: absolute; top: 0; left: 0; height: 100%; width: 0; overflow: hidden; }
.note-wave-fill-inner .note-wave-bar { background: var(--accent); }
.note-wave-times { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-mute); font-variant-numeric: tabular-nums; margin-top: 5px; }
.note-player-speed { flex: 0 0 auto; border: 1px solid var(--border-soft); background: var(--surface-2); color: var(--text-dim); font: inherit; font-size: 12px; font-weight: 600; padding: 5px 9px; border-radius: var(--r-sm); cursor: pointer; }
.note-player-speed:hover { background: var(--surface-hi); }
.note-player-dl { flex: 0 0 auto; color: var(--text-mute); display: inline-flex; padding: 6px; border-radius: var(--r-sm); }
.note-player-dl:hover { color: var(--text); background: var(--surface-2); }
.note-summary { border: 1px solid color-mix(in oklch, var(--accent) 30%, var(--border)); background: var(--accent-soft); border-radius: var(--r-md); padding: 14px 16px; margin-bottom: 20px; }
.note-summary-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: .07em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 6px; }
.note-summary-text { font-size: 14px; line-height: 1.55; color: var(--text); }
.note-transcript-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.note-transcript-label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text); }
.note-transcript-actions { display: flex; gap: 4px; }
.note-act { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; color: var(--text-mute); font: inherit; font-size: 12.5px; padding: 6px 9px; border-radius: var(--r-sm); cursor: pointer; transition: color .1s, background .1s; }
.note-act:hover { color: var(--text); background: var(--surface-2); }
.note-transcript { font-size: 14px; line-height: 1.7; color: var(--text-dim); white-space: pre-wrap; word-break: break-word; text-wrap: pretty; }
.note-error { font-size: 13px; color: var(--bad); background: var(--bad-soft); padding: 12px 14px; border-radius: var(--r-md); margin-bottom: 16px; }
.note-pending { font-size: 13px; color: var(--text-mute); display: inline-flex; align-items: center; gap: 7px; margin-bottom: 16px; }
.wa-bubble { padding: 7px 11px 6px; border-radius: 12px; border-top-left-radius: 4px; background: var(--surface-hi); color: var(--text); font-size: 13.5px; line-height: 1.42; word-break: break-word; }
.wa-msg.is-me .wa-bubble { background: var(--accent-soft); border-top-left-radius: 12px; border-top-right-radius: 4px; }
.wa-bubble .wa-media { font-style: italic; color: var(--text-dim); }
.wa-bubble a { color: inherit; text-decoration: underline; }
.wa-msg-time { font-size: 10px; color: var(--text-mute); margin: 2px 8px 0; }

/* ── Memória: layout de painéis (busca + agente) ─────────────────── */
.mem-screen { flex: 1; display: flex; min-width: 0; min-height: 0; }

/* Rail esquerdo — filtros (busca) ou conversas (agente) */
.mem-rail { flex: 0 0 320px; width: 320px; display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--border-soft); background: var(--bg-2); }
.mem-rail-head { padding: 18px 16px 12px; display: flex; flex-direction: column; gap: 12px; flex: 0 0 auto; }
.mem-rail-title { font-size: 20px; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.mem-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 3px; background: var(--surface-2); border-radius: var(--r-md); }
.mem-toggle-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: none; color: var(--text-mute); font: inherit; font-size: 12.5px; font-weight: 500; padding: 6px 8px; border-radius: var(--r-sm); cursor: pointer; transition: background .12s, color .12s; }
.mem-toggle-btn:hover { color: var(--text-dim); }
.mem-toggle-btn.is-on { background: var(--surface-hi); color: var(--text); box-shadow: var(--shadow-card); }
.mem-rail-body { display: flex; flex-direction: column; min-height: 0; padding: 0 12px 8px; flex: 1; }
.mem-rail-scroll { flex: 1; overflow-y: auto; min-height: 0; padding: 8px 12px 16px; display: flex; flex-direction: column; gap: 18px; }
.mem-rail-body .mem-rail-scroll { padding: 4px 0; gap: 2px; }
.mem-rail-foot { border-top: 1px solid var(--border-soft); padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; flex: 0 0 auto; }

/* Grupos de filtro */
.mem-filter-group { display: flex; flex-direction: column; gap: 6px; }
.mem-filter-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-mute); padding: 0 2px; }
.mem-check { display: flex; align-items: center; gap: 9px; border: 0; background: none; color: var(--text-dim); font: inherit; font-size: 13px; padding: 6px; border-radius: var(--r-sm); cursor: pointer; text-align: left; transition: background .1s; }
.mem-check:hover { background: var(--surface-2); }
.mem-check.is-on { color: var(--text); }
.mem-check-box { flex: 0 0 16px; width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid var(--border); display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.mem-check.is-on .mem-check-box { background: var(--accent); border-color: var(--accent); }
.mem-kind-dot { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; }
.mem-check-label { flex: 1; }
.mem-check-count { font-size: 11.5px; color: var(--text-mute); font-variant-numeric: tabular-nums; }
.mem-period-seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; padding: 3px; background: var(--surface-2); border-radius: var(--r-md); }
.mem-seg-btn { border: 0; background: none; color: var(--text-mute); font: inherit; font-size: 12px; padding: 6px 4px; border-radius: var(--r-sm); cursor: pointer; transition: background .1s, color .1s; }
.mem-seg-btn:hover { color: var(--text-dim); }
.mem-seg-btn.is-on { background: var(--surface-hi); color: var(--text); box-shadow: var(--shadow-card); }
.mem-select { width: 100%; font-size: 12.5px; padding: 8px 10px; }
.mem-people { display: flex; flex-wrap: wrap; gap: 6px; }
.mem-person { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border-soft); background: var(--surface-2); color: var(--text-dim); font: inherit; font-size: 12px; padding: 3px 9px 3px 3px; border-radius: 999px; cursor: pointer; transition: background .1s, border-color .1s; }
.mem-person:hover { background: var(--surface-hi); }
.mem-person.is-on { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.mem-new-btn { width: 100%; justify-content: center; margin: 12px 0 4px; }

/* Sessões do agente */
.mem-session-group { font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-mute); padding: 12px 8px 4px; }
.mem-session { position: relative; padding: 8px 30px 8px 10px; border-radius: var(--r-sm); cursor: pointer; transition: background .1s; }
.mem-session:hover { background: var(--surface-2); }
.mem-session.is-on { background: var(--accent-soft); }
.mem-session-title { font-size: 12.5px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mem-session-meta { font-size: 10.5px; color: var(--text-mute); margin-top: 2px; }
.mem-session-del { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); border: 0; background: none; color: var(--text-mute); cursor: pointer; padding: 4px; border-radius: var(--r-sm); opacity: 0; transition: opacity .1s, color .1s, background .1s; }
.mem-session:hover .mem-session-del { opacity: 1; }
.mem-session-del:hover { color: var(--bad); background: var(--surface-hi); }

/* Centro */
.mem-center { flex: 1; min-width: 0; min-height: 0; overflow-y: auto; padding: 24px 28px 60px; display: flex; flex-direction: column; }
.mem-screen.is-agent .mem-center { padding: 0; overflow: hidden; }
.mem-disabled { background: var(--surface-2); border-radius: var(--r-md); padding: 16px; text-align: center; font-size: 13px; color: var(--text-mute); margin: 0 0 16px; }

/* Barra de busca */
.mem-searchbar { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 8px 10px 8px 14px; box-shadow: var(--shadow-card); margin-bottom: 20px; }
.mem-searchbar > .ico { color: var(--text-mute); flex: 0 0 auto; }
.mem-searchbar input { flex: 1; border: 0; background: none; color: var(--text); font: inherit; font-size: 15px; outline: none; min-width: 0; }
.mem-search-clear { border: 0; background: none; color: var(--text-mute); cursor: pointer; padding: 4px; border-radius: var(--r-sm); display: inline-flex; }
.mem-search-clear:hover { color: var(--text); background: var(--surface-2); }
.mem-error { background: var(--bad-soft); color: var(--bad); font-size: 13px; padding: 12px 14px; border-radius: var(--r-md); margin-bottom: 14px; }
.mem-results-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.mem-results-count { font-size: 14px; color: var(--text-dim); }
.mem-results-count strong { color: var(--text); }
.mem-q { color: var(--accent-text); }
.mem-sort { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-mute); }
.mem-sort-sel { font-size: 12.5px; padding: 5px 8px; background: var(--surface-2); color: var(--text); border: 1px solid var(--border-soft); border-radius: var(--r-sm); cursor: pointer; }
.mem-browse-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-mute); margin: 6px 0 12px; }

/* Card de resultado */
.mem-result { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--r-lg); padding: 16px 18px; margin-bottom: 12px; transition: border-color .12s; }
.mem-result:hover { border-color: var(--border); }
.mem-result-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.mem-result-top .chip { height: 20px; font-size: 11px; }
.mem-score { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.mem-score .ico { color: var(--accent); }
.mem-result-text { font-size: 14px; line-height: 1.6; color: var(--text); text-wrap: pretty; white-space: pre-wrap; }
.mem-result-text mark { background: color-mix(in oklch, var(--accent) 30%, transparent); color: var(--text); border-radius: 3px; padding: 0 1px; }
.mem-result-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.mem-result-meeting { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-dim); text-decoration: none; min-width: 0; cursor: pointer; }
.mem-result-meeting:hover .mem-result-mname { color: var(--text); text-decoration: underline; }
.mem-result-meeting .ico { color: var(--text-mute); flex: 0 0 auto; }
.mem-result-mname { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; }
.mem-result-right { display: inline-flex; align-items: center; gap: 10px; }
.mem-icon-btn { border: 0; background: none; color: var(--text-mute); cursor: pointer; padding: 5px; border-radius: var(--r-sm); display: inline-flex; align-items: center; gap: 5px; font: inherit; font-size: 12.5px; transition: color .1s, background .1s; }
.mem-icon-btn:hover { color: var(--text); background: var(--surface-2); }
.mem-open { display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; font-weight: 500; color: var(--accent-text); text-decoration: none; cursor: pointer; white-space: nowrap; }
.mem-open:hover { text-decoration: underline; }

/* Agente — coluna central */
.mem-agent-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; flex: 1; }
.mem-agent-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 24px; border-bottom: 1px solid var(--border-soft); flex: 0 0 auto; }
.mem-agent-head-id { min-width: 0; }
.mem-agent-title { font-size: 15px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mem-agent-sub { font-family: var(--font-mono); font-size: 11px; color: var(--text-mute); margin-top: 3px; }
.mem-agent-head-actions { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.mem-thread { flex: 1; overflow-y: auto; padding: 22px 24px; display: flex; flex-direction: column; min-height: 0; }
.mem-msg { display: flex; flex-direction: column; margin-top: 16px; }
.mem-msg:first-child { margin-top: 0; }
.mem-msg-user { align-self: flex-end; align-items: flex-end; max-width: 78%; }
.mem-msg-assistant { align-self: stretch; }
.mem-user-bubble { padding: 10px 14px; border-radius: var(--r-md); border-bottom-right-radius: 4px; background: var(--accent-soft); color: var(--text); font-size: 13.5px; line-height: 1.5; word-break: break-word; }
.mem-recall { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--text-mute); margin-bottom: 8px; }
.mem-recall .ico { color: var(--accent); }
.mem-answer { font-size: 14px; line-height: 1.65; color: var(--text); }
.mem-answer :first-child { margin-top: 0; }
.mem-answer :last-child { margin-bottom: 0; }
.mem-answer-actions { display: flex; gap: 4px; margin-top: 12px; }
.mem-act { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; color: var(--text-mute); font: inherit; font-size: 12px; padding: 5px 8px; border-radius: var(--r-sm); cursor: pointer; transition: color .1s, background .1s; }
.mem-act:hover { color: var(--text); background: var(--surface-2); }
.mem-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; color: var(--text-mute); padding: 24px; }
.mem-empty .ico { color: var(--accent); opacity: .7; }
.mem-empty-title { font-size: 15px; font-weight: 600; color: var(--text-dim); }
.mem-empty-sub { font-size: 12.5px; max-width: 420px; line-height: 1.5; }
.mem-followups { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 24px 12px; flex: 0 0 auto; }
.mem-followup { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border-soft); background: var(--surface); color: var(--text-dim); font: inherit; font-size: 12.5px; padding: 7px 12px; border-radius: 999px; cursor: pointer; transition: background .1s, border-color .1s, color .1s; }
.mem-followup:hover { background: var(--surface-2); border-color: var(--border); color: var(--text); }
.mem-followup .ico { color: var(--accent); }
.mem-composer { display: flex; align-items: flex-end; gap: 8px; padding: 12px 24px 20px; flex: 0 0 auto; }
.mem-composer-ico { display: none; }
.mem-composer textarea { flex: 1; resize: none; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: var(--r-md); padding: 11px 14px; font: inherit; font-size: 13.5px; line-height: 1.5; max-height: 160px; min-height: 46px; outline: none; transition: border-color .12s; box-shadow: var(--shadow-card); }
.mem-composer textarea:focus { border-color: var(--accent); }
.mem-composer textarea:disabled { opacity: .6; }
.mem-composer .btn { flex: 0 0 auto; height: 46px; width: 46px; }

/* Painel direito — fontes da resposta */
.mem-cite-panel { flex: 0 0 320px; width: 320px; display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--border-soft); background: var(--bg-2); }
.mem-cite-head { padding: 16px 18px 12px; border-bottom: 1px solid var(--border-soft); flex: 0 0 auto; }
.mem-cite-title { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--text); }
.mem-cite-title .ico { color: var(--text-mute); }
.mem-cite-sub { font-size: 11.5px; color: var(--text-mute); margin-top: 4px; line-height: 1.4; }
.mem-cite-list { flex: 1; overflow-y: auto; min-height: 0; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.mem-cite { display: block; background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--r-md); padding: 12px; text-decoration: none; cursor: pointer; transition: border-color .12s, background .12s; }
.mem-cite:hover { border-color: var(--border); background: var(--surface-hi); }
.mem-cite-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.mem-cite-num { flex: 0 0 20px; width: 20px; height: 20px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-text); font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.mem-cite-row .chip { height: 18px; font-size: 10px; }
.mem-cite-text { font-size: 12.5px; line-height: 1.5; color: var(--text-dim); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mem-cite-foot { display: flex; align-items: center; gap: 5px; margin-top: 9px; font-size: 11px; color: var(--text-dim); }
.mem-cite-foot .ico { color: var(--text-mute); flex: 0 0 auto; }
.mem-cite-lib { margin: 12px; justify-content: center; flex: 0 0 auto; }

/* Pontinhos de cor por tipo (rail de filtros) */
.mem-kind-dot.mem-kind-summary   { background: var(--accent); }
.mem-kind-dot.mem-kind-decision  { background: oklch(0.78 0.13 155); }
.mem-kind-dot.mem-kind-blocker   { background: oklch(0.7 0.18 22); }
.mem-kind-dot.mem-kind-loose_end { background: oklch(0.78 0.16 75); }
.mem-kind-dot.mem-kind-action    { background: oklch(0.72 0.15 260); }

@media (max-width: 900px) { .mem-cite-panel { display: none; } }
