/* ==========================================================================
   Backlog — design system
   Baseado no sistema visual Cal.com: canvas branco, ação monocromática,
   cards cinza-claro, rodapé escuro, tipografia display com tracking negativo.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  color-scheme: light;

  /* Marca & ação */
  --primary: #111111;
  --primary-active: #242424;
  --on-primary: #ffffff;
  --brand-accent: #2563eb;

  /* Superfícies */
  --canvas: #ffffff;
  --surface-soft: #f8f9fa;
  --surface-card: #f5f5f5;
  --surface-strong: #e5e7eb;
  --surface-dark: #101010;
  --surface-dark-elevated: #1a1a1a;
  --surface-raised: #ffffff;
  --hairline: #e5e7eb;
  --hairline-soft: #f3f4f6;

  /* Texto */
  --ink: #111111;
  --body: #374151;
  --muted: #6b7280;
  --muted-soft: #898989;
  --on-dark: #ffffff;
  --on-dark-soft: #a1a1aa;

  /* Semântico */
  --success: #059669;
  --success-soft: #ecfdf5;
  --warning: #b45309;
  --warning-soft: #fffbeb;
  --error: #dc2626;
  --error-soft: #fef2f2;
  --info-soft: #eff6ff;

  /* Série de dados — validada (superfície #ffffff) */
  --series-1: #2563eb;
  --series-2: #ea580c;
  --series-3: #059669;
  --series-4: #7c3aed;
  --series-5: #db2777;
  --grid: #e5e7eb;
  --axis: #d1d5db;
  --chart-surface: #ffffff;

  /* Prioridades */
  --prio-baixa: #6b7280;
  --prio-media: #2563eb;
  --prio-alta: #ea580c;
  --prio-critica: #dc2626;

  /* Status */
  --st-backlog: #6b7280;
  --st-afazer: #2563eb;
  --st-fazendo: #ea580c;
  --st-revisao: #7c3aed;
  --st-concluido: #059669;

  /* Espaçamento */
  --sp-xxs: 4px;  --sp-xs: 8px;  --sp-sm: 12px; --sp-md: 16px;
  --sp-lg: 24px;  --sp-xl: 32px; --sp-xxl: 48px; --sp-section: 96px;

  /* Raio */
  --r-xs: 4px; --r-sm: 6px; --r-md: 8px; --r-lg: 12px; --r-xl: 16px;
  --r-pill: 9999px; --r-full: 9999px;

  /* Elevação */
  --sh-1: 0 1px 2px rgba(0, 0, 0, .05);
  --sh-2: 0 4px 12px rgba(0, 0, 0, .08);
  --sh-3: 0 12px 32px rgba(0, 0, 0, .12);
  --sh-4: 0 24px 60px rgba(0, 0, 0, .18);
  --ring: 0 0 0 3px rgba(17, 17, 17, .10);

  /* Tipografia */
  --font-display: "Cal Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Movimento */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.4, 0, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --t-fast: 130ms;
  --t: 220ms;
  --t-slow: 420ms;

  --topnav-h: 64px;
}

[data-theme="escuro"] {
  color-scheme: dark;

  --primary: #f5f5f6;
  --primary-active: #ffffff;
  --on-primary: #111111;
  --brand-accent: #60a5fa;

  --canvas: #0c0c0e;
  --surface-soft: #131316;
  --surface-card: #151518;
  --surface-strong: #26262b;
  --surface-dark: #08080a;
  --surface-dark-elevated: #17171a;
  --surface-raised: #151518;
  --hairline: #26262b;
  --hairline-soft: #1c1c20;

  --ink: #f4f4f5;
  --body: #c9c9d1;
  --muted: #9294a0;
  --muted-soft: #74757f;
  --on-dark: #ffffff;
  --on-dark-soft: #a1a1aa;

  --success: #10b981;
  --success-soft: #06251c;
  --warning: #fbbf24;
  --warning-soft: #2a1e05;
  --error: #f87171;
  --error-soft: #2a0f0f;
  --info-soft: #0f1a2e;

  /* Série de dados — validada (superfície #141414) */
  --series-1: #3b82f6;
  --series-2: #dd7011;
  --series-3: #0fa974;
  --series-4: #8b5cf6;
  --series-5: #ec4899;
  --grid: #26262b;
  --axis: #35353d;
  --chart-surface: #151518;

  --prio-baixa: #9294a0;
  --prio-media: #3b82f6;
  --prio-alta: #dd7011;
  --prio-critica: #f87171;

  --st-backlog: #9294a0;
  --st-afazer: #3b82f6;
  --st-fazendo: #dd7011;
  --st-revisao: #8b5cf6;
  --st-concluido: #0fa974;

  --sh-1: 0 1px 2px rgba(0, 0, 0, .5);
  --sh-2: 0 4px 12px rgba(0, 0, 0, .55);
  --sh-3: 0 12px 32px rgba(0, 0, 0, .6);
  --sh-4: 0 24px 60px rgba(0, 0, 0, .7);
  --ring: 0 0 0 3px rgba(245, 245, 246, .14);
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

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

body {
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  color: var(--body);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background var(--t) var(--ease-in-out), color var(--t) var(--ease-in-out);
}

img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; color: var(--ink); }
h1 { font-size: 36px; line-height: 1.15; letter-spacing: -1px; }
h2 { font-size: 28px; line-height: 1.2;  letter-spacing: -.5px; }
h3 { font-size: 22px; line-height: 1.3;  letter-spacing: -.3px; }
h4 { font-family: var(--font-ui); font-size: 16px; line-height: 1.4; letter-spacing: 0; }

::selection { background: var(--ink); color: var(--canvas); }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* Scrollbars discretas */
* { scrollbar-width: thin; scrollbar-color: var(--surface-strong) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: var(--surface-strong); border-radius: var(--r-pill);
  border: 3px solid var(--canvas);
}
*::-webkit-scrollbar-thumb:hover { background: var(--muted-soft); }

/* o atributo hidden precisa ganhar de .btn { display: inline-flex } e afins */
[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------------------
   3. Tipografia utilitária
   -------------------------------------------------------------------------- */
.display-xl { font-family: var(--font-display); font-size: 56px; font-weight: 600; line-height: 1.05; letter-spacing: -2px; color: var(--ink); }
.display-lg { font-family: var(--font-display); font-size: 44px; font-weight: 600; line-height: 1.1;  letter-spacing: -1.5px; color: var(--ink); }
.display-md { font-family: var(--font-display); font-size: 34px; font-weight: 600; line-height: 1.15; letter-spacing: -1px; color: var(--ink); }
.display-sm { font-family: var(--font-display); font-size: 26px; font-weight: 600; line-height: 1.2;  letter-spacing: -.5px; color: var(--ink); }
.title-md   { font-size: 18px; font-weight: 600; line-height: 1.4; color: var(--ink); }
.title-sm   { font-size: 16px; font-weight: 600; line-height: 1.4; color: var(--ink); }
.body-sm    { font-size: 14px; line-height: 1.5; }
.caption    { font-size: 13px; font-weight: 500; line-height: 1.4; }
.muted      { color: var(--muted); }
.muted-soft { color: var(--muted-soft); }
.tnum       { font-variant-numeric: tabular-nums; }
.truncate   { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* --------------------------------------------------------------------------
   4. Layout
   -------------------------------------------------------------------------- */
.container { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: var(--sp-lg); }
.container--wide { max-width: 1560px; }

main { flex: 1 0 auto; }

.page { padding-block: var(--sp-xl) var(--sp-xxl); }

.page__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--sp-lg); flex-wrap: wrap; margin-bottom: var(--sp-lg);
}
.page__head .eyebrow {
  font-size: 13px; font-weight: 500; color: var(--muted);
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
}
.page__actions { display: flex; gap: var(--sp-xs); align-items: center; flex-wrap: wrap; }

.grid { display: grid; gap: var(--sp-lg); }
.stack { display: flex; flex-direction: column; gap: var(--sp-md); }
.row { display: flex; align-items: center; gap: var(--sp-xs); }
.row--between { justify-content: space-between; }
.row--wrap { flex-wrap: wrap; }
.spacer { flex: 1; }

/* --------------------------------------------------------------------------
   5. Top nav
   -------------------------------------------------------------------------- */
.topnav {
  position: sticky; top: 0; z-index: 60;
  height: var(--topnav-h);
  background: color-mix(in srgb, var(--canvas) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--hairline);
  transition: box-shadow var(--t) var(--ease);
}
.topnav.is-scrolled { box-shadow: var(--sh-1); }
.topnav__inner {
  height: 100%; display: flex; align-items: center; gap: var(--sp-lg);
  max-width: 1560px; margin-inline: auto; padding-inline: var(--sp-lg);
}

.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand__mark {
  width: 32px; height: 32px; border-radius: var(--r-md);
  background: var(--primary); color: var(--on-primary);
  display: grid; place-items: center; flex-shrink: 0;
  transition: transform var(--t) var(--spring);
}
.brand:hover .brand__mark { transform: rotate(-8deg) scale(1.06); }
.brand__name {
  font-family: var(--font-display); font-size: 19px; font-weight: 600;
  letter-spacing: -.6px; color: var(--ink);
}

/* nav-pill-group — componente assinatura */
.nav-pills {
  display: flex; align-items: center; gap: 2px;
  background: var(--surface-soft); border-radius: var(--r-pill);
  padding: 5px; position: relative;
}
.nav-pill {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: var(--r-pill);
  font-size: 14px; font-weight: 500; color: var(--muted);
  white-space: nowrap;
  transition: color var(--t) var(--ease);
}
.nav-pill svg { width: 16px; height: 16px; }
.nav-pill:hover { color: var(--ink); }
.nav-pill.is-active { color: var(--ink); font-weight: 600; }
.nav-pills__glider {
  position: absolute; z-index: 0; top: 5px; left: 0; height: calc(100% - 10px);
  background: var(--canvas); border-radius: var(--r-pill); box-shadow: var(--sh-1);
  transition: transform var(--t-slow) var(--ease), width var(--t-slow) var(--ease);
  will-change: transform, width;
}

.topnav__search {
  display: flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 12px; min-width: 210px;
  border: 1px solid var(--hairline); border-radius: var(--r-md);
  background: var(--canvas); color: var(--muted); font-size: 14px;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), width var(--t) var(--ease);
}
.topnav__search:hover { border-color: var(--surface-strong); }
.topnav__search kbd {
  margin-left: auto; font-family: var(--font-ui); font-size: 11px; font-weight: 600;
  padding: 2px 6px; border-radius: var(--r-xs);
  background: var(--surface-card); color: var(--muted-soft); border: 1px solid var(--hairline);
}

.avatar-btn { border: 0; background: none; padding: 0; cursor: pointer; border-radius: var(--r-full); }

/* Menu do usuário */
.menu {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 232px;
  background: var(--surface-raised); border: 1px solid var(--hairline);
  border-radius: var(--r-lg); box-shadow: var(--sh-3); padding: 6px;
  opacity: 0; transform: translateY(-6px) scale(.97); pointer-events: none;
  transform-origin: top right; z-index: 80;
  transition: opacity var(--t-fast) var(--ease), transform var(--t) var(--spring);
}
.menu.is-open { opacity: 1; transform: none; pointer-events: auto; }
.menu__head { padding: 10px 12px 12px; border-bottom: 1px solid var(--hairline-soft); margin-bottom: 6px; }
.menu__item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 12px; border-radius: var(--r-sm); border: 0; background: none;
  font-size: 14px; color: var(--body); cursor: pointer; text-align: left;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.menu__item:hover { background: var(--surface-card); color: var(--ink); }
.menu__item svg { width: 16px; height: 16px; color: var(--muted); }
.menu-anchor { position: relative; }

/* --------------------------------------------------------------------------
   6. Botões
   -------------------------------------------------------------------------- */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px;
  border-radius: var(--r-md); border: 1px solid transparent;
  font-size: 14px; font-weight: 600; line-height: 1;
  cursor: pointer; white-space: nowrap; user-select: none;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease),
              box-shadow var(--t) var(--ease);
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn:active { transform: translateY(1px) scale(.985); }
.btn[disabled], .btn.is-loading { opacity: .55; pointer-events: none; }

.btn--primary { background: var(--primary); color: var(--on-primary); }
.btn--primary:hover { background: var(--primary-active); box-shadow: var(--sh-2); }

.btn--secondary { background: var(--canvas); color: var(--ink); border-color: var(--hairline); }
.btn--secondary:hover { border-color: var(--muted-soft); background: var(--surface-soft); }

.btn--ghost { background: transparent; color: var(--body); }
.btn--ghost:hover { background: var(--surface-card); color: var(--ink); }

.btn--danger { background: var(--error); color: #fff; }
.btn--danger:hover { filter: brightness(.93); }

.btn--sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: var(--r-sm); }
.btn--sm svg { width: 14px; height: 14px; }
.btn--lg { height: 46px; padding: 0 24px; font-size: 15px; }
.btn--block { width: 100%; }

.btn-icon {
  width: 36px; height: 36px; padding: 0; border-radius: var(--r-full);
  display: inline-grid; place-items: center; cursor: pointer;
  background: var(--canvas); border: 1px solid var(--hairline); color: var(--body);
  transition: all var(--t-fast) var(--ease);
}
.btn-icon svg { width: 16px; height: 16px; }
.btn-icon:hover { background: var(--surface-card); color: var(--ink); border-color: var(--surface-strong); transform: translateY(-1px); }
.btn-icon--sm { width: 28px; height: 28px; }
.btn-icon--sm svg { width: 14px; height: 14px; }
.btn-icon--plain { border-color: transparent; background: transparent; }

/* efeito ripple */
.ripple {
  position: absolute; border-radius: 50%; transform: scale(0);
  background: currentColor; opacity: .25; pointer-events: none;
  animation: ripple 620ms var(--ease) forwards;
}
@keyframes ripple { to { transform: scale(3.2); opacity: 0; } }

/* --------------------------------------------------------------------------
   7. Formulários
   -------------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-size: 13px; font-weight: 600; color: var(--ink); }
.field__hint { font-size: 12px; color: var(--muted); }

.input, .select, .textarea {
  width: 100%; min-height: 40px; padding: 9px 13px;
  background: var(--canvas); color: var(--ink);
  border: 1px solid var(--hairline); border-radius: var(--r-md);
  font-size: 14px; line-height: 1.5;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.input::placeholder, .textarea::placeholder { color: var(--muted-soft); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--surface-strong); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--ink); box-shadow: var(--ring);
}
.textarea { min-height: 92px; resize: vertical; }
.select {
  appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
[data-theme="escuro"] .select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239294a0' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}
.input--sm, .select--sm { min-height: 34px; height: 34px; padding-block: 0; font-size: 13px; }

.check {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 14px; color: var(--body); cursor: pointer; user-select: none;
}
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check__box {
  width: 18px; height: 18px; flex-shrink: 0;
  border: 1.5px solid var(--surface-strong); border-radius: var(--r-xs);
  background: var(--canvas); display: grid; place-items: center;
  transition: all var(--t-fast) var(--ease);
}
.check__box svg { width: 12px; height: 12px; color: var(--on-primary); opacity: 0; transform: scale(.4); transition: all var(--t-fast) var(--spring); }
.check input:checked + .check__box { background: var(--primary); border-color: var(--primary); }
.check input:checked + .check__box svg { opacity: 1; transform: scale(1); }
.check input:focus-visible + .check__box { box-shadow: var(--ring); }
.check:hover .check__box { border-color: var(--muted); }

/* Segmented control (radio em pílula) */
.segmented {
  display: inline-flex; padding: 4px; gap: 2px;
  background: var(--surface-soft); border-radius: var(--r-pill);
  border: 1px solid var(--hairline);
}
.segmented__opt {
  padding: 6px 13px; border-radius: var(--r-pill); border: 0; background: none;
  font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}
.segmented__opt.is-active { background: var(--canvas); color: var(--ink); font-weight: 600; box-shadow: var(--sh-1); }

/* --------------------------------------------------------------------------
   8. Cards
   -------------------------------------------------------------------------- */
.card {
  background: var(--canvas); border: 1px solid var(--hairline);
  border-radius: var(--r-lg); padding: var(--sp-lg);
  transition: box-shadow var(--t) var(--ease), transform var(--t) var(--ease), border-color var(--t) var(--ease);
}
.card--soft { background: var(--surface-card); border-color: transparent; }
.card--flush { padding: 0; overflow: hidden; }
.card--hover:hover { box-shadow: var(--sh-2); transform: translateY(-2px); }

.card__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--sp-md); margin-bottom: var(--sp-md);
}
.card__title { font-size: 16px; font-weight: 600; color: var(--ink); letter-spacing: -.2px; }
.card__sub { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* --------------------------------------------------------------------------
   9. Badges, chips, avatares
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: var(--r-pill);
  font-size: 12.5px; font-weight: 500; line-height: 1.4;
  background: var(--surface-card); color: var(--ink); white-space: nowrap;
}
.badge--outline { background: transparent; border: 1px solid var(--hairline); color: var(--body); }
.badge--danger  { background: var(--error-soft);   color: var(--error); }
.badge--warn    { background: var(--warning-soft); color: var(--warning); }
.badge--ok      { background: var(--success-soft); color: var(--success); }
.badge--info    { background: var(--info-soft);    color: var(--brand-accent); }
.badge--dark    { background: var(--surface-dark); color: var(--on-dark); }
.badge--sm { padding: 2px 8px; font-size: 11.5px; }

.dot { width: 8px; height: 8px; border-radius: var(--r-full); flex-shrink: 0; }
.dot--lg { width: 10px; height: 10px; }

.tag {
  display: inline-flex; align-items: center;
  padding: 2px 9px; border-radius: var(--r-xs);
  background: var(--surface-card); color: var(--muted);
  font-size: 11.5px; font-weight: 500;
  transition: all var(--t-fast) var(--ease);
}
.tag::before { content: "#"; opacity: .5; margin-right: 1px; }
button.tag { border: 0; cursor: pointer; }
button.tag:hover { background: var(--surface-strong); color: var(--ink); }

.avatar {
  width: 36px; height: 36px; border-radius: var(--r-full);
  display: inline-grid; place-items: center; flex-shrink: 0;
  font-size: 12.5px; font-weight: 600; color: #fff; letter-spacing: .2px;
  background: var(--muted); user-select: none;
}
.avatar--sm { width: 26px; height: 26px; font-size: 10.5px; }
.avatar--xs { width: 22px; height: 22px; font-size: 9.5px; }
.avatar--lg { width: 48px; height: 48px; font-size: 16px; }
.avatar--vazio { background: var(--surface-card); color: var(--muted-soft); border: 1px dashed var(--surface-strong); }
.avatar-stack { display: flex; }
.avatar-stack .avatar { margin-left: -8px; border: 2px solid var(--canvas); }
.avatar-stack .avatar:first-child { margin-left: 0; }

/* Barra de progresso */
.progress { height: 5px; background: var(--surface-card); border-radius: var(--r-pill); overflow: hidden; }
.progress__bar {
  height: 100%; border-radius: var(--r-pill); background: var(--ink);
  width: 0; transition: width var(--t-slow) var(--ease);
}
.progress--ok .progress__bar { background: var(--success); }
.progress--warn .progress__bar { background: var(--warning); }

/* --------------------------------------------------------------------------
   10. KPIs / stat tiles
   -------------------------------------------------------------------------- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--sp-md); }

.kpi {
  position: relative; overflow: hidden;
  background: var(--canvas); border: 1px solid var(--hairline);
  border-radius: var(--r-lg); padding: 18px 20px;
  transition: box-shadow var(--t) var(--ease), transform var(--t) var(--ease), border-color var(--t) var(--ease);
}
.kpi::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 2px;
  background: var(--accent, var(--ink)); transform: scaleX(0); transform-origin: left;
  transition: transform var(--t-slow) var(--ease);
}
.kpi:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--surface-strong); }
.kpi:hover::after { transform: scaleX(1); }
.kpi__label { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; color: var(--muted); }
.kpi__label svg { width: 15px; height: 15px; color: var(--accent, var(--muted)); }
.kpi__value {
  font-family: var(--font-display); font-size: 34px; font-weight: 600;
  letter-spacing: -1.2px; color: var(--ink); line-height: 1.1; margin-top: 10px;
}
.kpi__value small { font-size: 17px; letter-spacing: -.4px; color: var(--muted); font-weight: 600; }
.kpi__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; min-height: 20px; }
.kpi__delta { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; }
.kpi__delta svg { width: 13px; height: 13px; }
.kpi__delta--ok   { color: var(--success); }
.kpi__delta--bad  { color: var(--error); }
.kpi__delta--flat { color: var(--muted); }
.kpi__spark { width: 84px; height: 26px; }
.kpi--destaque { background: var(--surface-dark); border-color: transparent; }
.kpi--destaque .kpi__label { color: var(--on-dark-soft); }
.kpi--destaque .kpi__value { color: var(--on-dark); }
.kpi--destaque .kpi__value small { color: var(--on-dark-soft); }

/* --------------------------------------------------------------------------
   11. Gráficos
   -------------------------------------------------------------------------- */
.chart { width: 100%; overflow: visible; }
.chart text { font-family: var(--font-ui); }
.chart .axis-label { font-size: 11px; fill: var(--muted-soft); }
.chart .value-label { font-size: 11.5px; font-weight: 600; fill: var(--body); }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .baseline { stroke: var(--axis); stroke-width: 1; }
.chart .mark { transition: opacity var(--t-fast) var(--ease); }
.chart .mark:hover { opacity: .82; }
.chart .hover-band { fill: transparent; cursor: crosshair; }
.chart .crosshair { stroke: var(--axis); stroke-width: 1; opacity: 0; }

.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: var(--sp-md); }
.legend__item { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--body); }
.legend__swatch { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.legend__swatch--line { width: 14px; height: 3px; border-radius: 2px; }

.chart-tip {
  position: fixed; z-index: 200; pointer-events: none;
  background: var(--surface-dark); color: var(--on-dark);
  border-radius: var(--r-md); padding: 9px 12px; font-size: 12.5px; line-height: 1.5;
  box-shadow: var(--sh-3); opacity: 0; transform: translateY(4px);
  transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
  max-width: 240px;
}
.chart-tip.is-on { opacity: 1; transform: none; }
.chart-tip__t { font-weight: 600; margin-bottom: 3px; }
.chart-tip__r { display: flex; align-items: center; gap: 7px; color: var(--on-dark-soft); }
.chart-tip__r b { color: var(--on-dark); font-variant-numeric: tabular-nums; margin-left: auto; }

/* Lista horizontal (barras + rótulo) */
.hbars { display: flex; flex-direction: column; gap: 13px; }
.hbar__top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 5px; }
.hbar__label { font-size: 13.5px; color: var(--body); display: flex; align-items: center; gap: 8px; min-width: 0; }
.hbar__val { font-size: 13px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.hbar__track { height: 8px; background: var(--surface-card); border-radius: var(--r-pill); overflow: hidden; }
.hbar__fill { height: 100%; border-radius: var(--r-pill); width: 0; transition: width 800ms var(--ease); }

/* Donut central */
.donut-wrap { position: relative; display: grid; place-items: center; }
.donut-center { position: absolute; text-align: center; pointer-events: none; }
.donut-center strong {
  display: block; font-family: var(--font-display); font-size: 30px;
  font-weight: 600; letter-spacing: -1px; color: var(--ink); line-height: 1;
}
.donut-center span { font-size: 12px; color: var(--muted); }

/* --------------------------------------------------------------------------
   12. Barra de filtros
   -------------------------------------------------------------------------- */
/* barra de ferramentas: linha de ações em cima, linha de filtros embaixo */
.toolbar {
  display: flex; flex-direction: column; gap: 10px;
  padding: 10px 12px; margin-bottom: var(--sp-lg);
  background: var(--surface-soft); border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
}
.toolbar__linha { display: flex; align-items: center; gap: var(--sp-xs); flex-wrap: wrap; min-width: 0; }
.toolbar__sep { width: 1px; height: 22px; background: var(--hairline); flex-shrink: 0; }
.toolbar__risco { height: 1px; background: var(--hairline); margin: 0 -12px; }

.nav-pills--vista { background: var(--canvas); border: 1px solid var(--hairline); padding: 4px; }
.nav-pills--vista .nav-pill { padding: 6px 13px; font-size: 13px; }
.nav-pills--vista .nav-pill svg { width: 15px; height: 15px; }
.nav-pills--vista .nav-pills__glider { top: 4px; height: calc(100% - 8px); background: var(--surface-card); box-shadow: none; }
.nav-pills--vista .nav-pill:hover { color: var(--ink); }
.nav-pills--vista .nav-pill.is-active { color: var(--ink); }

/* intervalo de datas */
.faixa-datas {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 6px 0 10px;
  background: var(--canvas); border: 1px solid var(--hairline); border-radius: var(--r-md);
  transition: border-color var(--t-fast) var(--ease);
}
.faixa-datas:hover, .faixa-datas:focus-within { border-color: var(--muted-soft); }
.faixa-datas__ico { width: 14px; height: 14px; color: var(--muted-soft); flex-shrink: 0; }
.faixa-datas__seta { color: var(--muted-soft); font-size: 12px; }
.faixa-datas .input {
  width: 122px; height: 26px; min-height: 26px; padding: 0 2px; font-size: 12.5px;
  border: 0; background: none; border-radius: var(--r-xs);
}
.faixa-datas .input:focus { box-shadow: none; outline: none; }
.faixa-datas__limpar {
  border: 0; background: none; cursor: pointer; color: var(--muted);
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: var(--r-full);
}
.faixa-datas__limpar:hover { background: var(--surface-card); color: var(--ink); }
.faixa-datas__limpar svg { width: 12px; height: 12px; }

.filterbar {
  display: flex; align-items: center; gap: var(--sp-xs); flex-wrap: wrap;
  padding: 12px 14px; margin-bottom: var(--sp-lg);
  background: var(--surface-soft); border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
}
.filterbar__search {
  position: relative; flex: 1 1 240px; min-width: 190px;
}
.filterbar__search svg {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--muted-soft); pointer-events: none;
}
.filterbar__search .input { padding-left: 34px; height: 36px; min-height: 36px; background: var(--canvas); }
.filterbar .select { width: auto; min-width: 128px; height: 36px; min-height: 36px; padding-block: 0; font-size: 13px; background-color: var(--canvas); }
.filterbar__sep { width: 1px; height: 22px; background: var(--hairline); }

.chip-filtro {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 13px; border-radius: var(--r-md);
  border: 1px solid var(--hairline); background: var(--canvas);
  font-size: 13px; font-weight: 500; color: var(--body); cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}
.chip-filtro svg { width: 14px; height: 14px; }
.chip-filtro:hover { border-color: var(--muted-soft); color: var(--ink); }
.chip-filtro.is-active { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.chip-filtro__count {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-pill);
  background: var(--surface-card); color: var(--ink);
  font-size: 11px; font-weight: 600; display: grid; place-items: center;
}
.chip-filtro.is-active .chip-filtro__count { background: rgba(255, 255, 255, .22); color: var(--on-primary); }
[data-theme="escuro"] .chip-filtro.is-active .chip-filtro__count { background: rgba(0, 0, 0, .18); }

/* --------------------------------------------------------------------------
   13. Kanban
   -------------------------------------------------------------------------- */
.board-scroll { overflow-x: auto; overflow-y: visible; padding-bottom: var(--sp-md); margin-inline: calc(var(--sp-lg) * -1); padding-inline: var(--sp-lg); }
.board { display: flex; gap: var(--sp-md); align-items: flex-start; min-height: 60vh; }

.column {
  flex: 1 1 288px; min-width: 278px; max-width: 380px;
  background: var(--surface-soft); border: 1px solid var(--hairline);
  border-radius: var(--r-lg); display: flex; flex-direction: column;
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.column.is-over { background: var(--info-soft); border-color: var(--brand-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-accent) 16%, transparent); }
/* top: 0 — o scroller horizontal do board é o scrollport do sticky, não a página */
.column__head {
  display: flex; align-items: center; gap: 9px;
  padding: 14px 14px 10px; position: sticky; top: 0; z-index: 2;
  background: inherit; border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.column__title { font-size: 13.5px; font-weight: 600; color: var(--ink); letter-spacing: -.1px; }
.column__count {
  min-width: 22px; height: 20px; padding: 0 7px; border-radius: var(--r-pill);
  background: var(--canvas); border: 1px solid var(--hairline);
  font-size: 11.5px; font-weight: 600; color: var(--muted);
  display: grid; place-items: center; font-variant-numeric: tabular-nums;
}
.column__list {
  display: flex; flex-direction: column; gap: 9px;
  padding: 4px 10px 10px; min-height: 90px; flex: 1;
}
.column__foot { padding: 0 10px 10px; }
.column__add {
  width: 100%; height: 34px; border-radius: var(--r-md);
  border: 1px dashed var(--surface-strong); background: transparent;
  color: var(--muted); font-size: 13px; font-weight: 500; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: all var(--t-fast) var(--ease);
}
.column__add svg { width: 14px; height: 14px; }
.column__add:hover { border-color: var(--ink); color: var(--ink); background: var(--canvas); }

/* Card de demanda */
.task {
  position: relative;
  background: var(--canvas); border: 1px solid var(--hairline);
  border-radius: var(--r-md); padding: 12px 13px;
  cursor: grab; user-select: none;
  box-shadow: var(--sh-1);
  transition: box-shadow var(--t) var(--ease), transform var(--t) var(--ease),
              border-color var(--t) var(--ease), opacity var(--t) var(--ease);
  animation: cardIn var(--t-slow) var(--ease) backwards;
}
.task:hover { box-shadow: var(--sh-2); transform: translateY(-2px); border-color: var(--surface-strong); }
.task:active { cursor: grabbing; }
.task.is-dragging { opacity: .35; }
.task.is-ghost {
  position: fixed; z-index: 500; pointer-events: none; margin: 0;
  box-shadow: var(--sh-4); transform: rotate(2.5deg) scale(1.03);
  cursor: grabbing; opacity: 1; animation: none;
}
.task.is-atualizado { animation: flashCard 900ms var(--ease); }
.task__placeholder {
  border: 1.5px dashed var(--brand-accent); border-radius: var(--r-md);
  background: color-mix(in srgb, var(--brand-accent) 7%, transparent);
  animation: placeholderIn 180ms var(--ease);
}

.task::before {
  content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--prio, transparent);
  transition: top var(--t) var(--ease), bottom var(--t) var(--ease);
}
.task:hover::before { top: 4px; bottom: 4px; }

.task__top { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; }
.task__code { font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; color: var(--muted-soft); letter-spacing: .2px; }
.task__titulo { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.4; letter-spacing: -.15px; margin-bottom: 9px; }
.task__meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.task__tags { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 9px; }
.task__foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--hairline-soft); }
.task__prazo { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 500; color: var(--muted); }
.task__prazo svg { width: 12px; height: 12px; }
.task__prazo.is-atrasada { color: var(--error); font-weight: 600; }
.task__prazo.is-hoje { color: var(--warning); font-weight: 600; }
.task__mini { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.task__mini svg { width: 12px; height: 12px; }
.task__progresso { margin-top: 9px; }

@keyframes cardIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes placeholderIn { from { opacity: 0; transform: scaleY(.6); } to { opacity: 1; transform: none; } }
@keyframes flashCard {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand-accent) 55%, transparent); }
  100% { box-shadow: 0 0 0 12px transparent; }
}

/* --------------------------------------------------------------------------
   14. Tabela
   -------------------------------------------------------------------------- */
.table-wrap {
  background: var(--canvas); border: 1px solid var(--hairline);
  border-radius: var(--r-lg); overflow: hidden;
}
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.data-table thead th {
  position: sticky; top: 0; z-index: 3;
  background: var(--surface-soft); text-align: left; white-space: nowrap;
  padding: 11px 14px; font-size: 12px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .4px;
  border-bottom: 1px solid var(--hairline);
}
.data-table thead th.sortable { cursor: pointer; user-select: none; transition: color var(--t-fast) var(--ease); }
.data-table thead th.sortable:hover { color: var(--ink); }
.data-table thead th .sort-ind { display: inline-block; width: 12px; margin-left: 4px; opacity: .55; }
.data-table tbody td { padding: 11px 14px; border-bottom: 1px solid var(--hairline-soft); vertical-align: middle; }
.data-table tbody tr { transition: background var(--t-fast) var(--ease); }
.data-table tbody tr:hover { background: var(--surface-soft); }
.data-table tbody tr.is-selecionada { background: var(--info-soft); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr { animation: rowIn 320ms var(--ease) backwards; }
@keyframes rowIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.cel-titulo { min-width: 260px; max-width: 420px; }
.cel-titulo a { font-weight: 600; color: var(--ink); letter-spacing: -.1px; }
.cel-titulo a:hover { text-decoration: underline; text-underline-offset: 3px; }
.cel-codigo { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted-soft); white-space: nowrap; }
.cel-acoes { width: 46px; text-align: right; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }

.table-foot {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-md);
  padding: 12px 16px; border-top: 1px solid var(--hairline); background: var(--surface-soft);
  font-size: 13px; color: var(--muted); flex-wrap: wrap;
}

/* Barra de ações em lote */
.bulkbar {
  position: fixed; left: 50%; bottom: 26px; z-index: 90;
  transform: translate(-50%, calc(100% + 34px)); /* precisa limpar o bottom, não só a altura */
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  width: max-content; max-width: min(980px, calc(100vw - 24px));
  padding: 10px 14px 10px 18px; border-radius: var(--r-pill);
  background: var(--surface-dark); color: var(--on-dark);
  box-shadow: var(--sh-4);
  transition: transform var(--t-slow) var(--spring);
}
.bulkbar:has(> :nth-child(7)) { border-radius: var(--r-xl); }
.bulkbar.is-on { transform: translate(-50%, 0); }
.bulkbar__count { font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.bulkbar .select {
  width: auto; min-width: 136px; height: 34px; min-height: 34px; padding-block: 0; font-size: 13px;
  background-color: var(--surface-dark-elevated); border-color: #2e2e2e; color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}
.bulkbar .btn--secondary { background: var(--surface-dark-elevated); border-color: #2e2e2e; color: #fff; }
.bulkbar .btn--secondary:hover { background: #262626; }

/* --------------------------------------------------------------------------
   15. Modal / drawer
   -------------------------------------------------------------------------- */
.overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(10, 10, 10, .42);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-lg);
  opacity: 0; pointer-events: none;
  transition: opacity var(--t) var(--ease);
}
.overlay.is-open { opacity: 1; pointer-events: auto; }

.modal {
  width: 100%; max-width: 560px; max-height: min(88vh, 900px);
  background: var(--surface-raised); border-radius: var(--r-xl);
  box-shadow: var(--sh-4); display: flex; flex-direction: column;
  transform: translateY(14px) scale(.96); opacity: 0;
  transition: transform var(--t-slow) var(--spring), opacity var(--t) var(--ease);
  overflow: hidden;
}
.overlay.is-open .modal { transform: none; opacity: 1; }
.modal--lg { max-width: 760px; }

.modal__head {
  display: flex; align-items: flex-start; gap: var(--sp-md);
  padding: 20px 22px 16px; border-bottom: 1px solid var(--hairline-soft);
}
.modal__title { font-family: var(--font-display); font-size: 20px; font-weight: 600; letter-spacing: -.5px; color: var(--ink); }
.modal__sub { font-size: 13px; color: var(--muted); margin-top: 3px; }
.modal__body { padding: 20px 22px; overflow-y: auto; flex: 1; }
.modal__foot {
  display: flex; align-items: center; justify-content: flex-end; gap: var(--sp-xs);
  padding: 14px 22px; border-top: 1px solid var(--hairline-soft); background: var(--surface-soft);
}
.modal__foot .spacer { flex: 1; }

/* Drawer lateral (detalhe da demanda) */
.overlay--drawer { justify-content: flex-end; padding: 0; }
.drawer {
  width: 100%; max-width: 620px; height: 100%;
  background: var(--surface-raised); display: flex; flex-direction: column;
  box-shadow: var(--sh-4);
  transform: translateX(100%);
  transition: transform var(--t-slow) var(--ease);
}
.overlay.is-open .drawer { transform: none; }
.drawer__head { padding: 18px 22px 14px; border-bottom: 1px solid var(--hairline); }
.drawer__body { flex: 1; overflow-y: auto; padding: 20px 22px 40px; }
.drawer__foot { padding: 12px 22px; border-top: 1px solid var(--hairline); background: var(--surface-soft); display: flex; gap: 8px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-md); }
.form-grid .span-2 { grid-column: 1 / -1; }

.secao { margin-top: var(--sp-lg); }
.secao__titulo {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .5px; margin-bottom: 11px;
}
.secao__titulo svg { width: 14px; height: 14px; }

/* Checklist */
.checklist { display: flex; flex-direction: column; gap: 2px; }
.checklist__item {
  display: flex; align-items: center; gap: 10px; padding: 7px 8px;
  border-radius: var(--r-sm); transition: background var(--t-fast) var(--ease);
}
.checklist__item:hover { background: var(--surface-soft); }
.checklist__item.is-feita .checklist__texto { color: var(--muted-soft); text-decoration: line-through; }
.checklist__texto { flex: 1; font-size: 14px; color: var(--body); }
.checklist__item .btn-icon { opacity: 0; transition: opacity var(--t-fast) var(--ease); }
.checklist__item:hover .btn-icon { opacity: 1; }

/* Comentários & atividade */
.comentario { display: flex; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--hairline-soft); }
.comentario:last-child { border-bottom: 0; }
.comentario__corpo { flex: 1; min-width: 0; }
.comentario__topo { display: flex; align-items: baseline; gap: 8px; margin-bottom: 3px; }
.comentario__autor { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.comentario__data { font-size: 11.5px; color: var(--muted-soft); }
.comentario__texto { font-size: 14px; color: var(--body); white-space: pre-wrap; word-break: break-word; }

.timeline { position: relative; padding-left: 20px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px; background: var(--hairline); }
.timeline__item { position: relative; padding: 6px 0; font-size: 13px; color: var(--muted); }
.timeline__item::before {
  content: ""; position: absolute; left: -19px; top: 12px;
  width: 7px; height: 7px; border-radius: var(--r-full);
  background: var(--surface-strong); border: 2px solid var(--surface-raised);
  box-sizing: content-box;
}
.timeline__item b { color: var(--ink); font-weight: 600; }

/* --------------------------------------------------------------------------
   16. Toasts
   -------------------------------------------------------------------------- */
.toasts {
  position: fixed; right: 20px; bottom: 20px; z-index: 400;
  display: flex; flex-direction: column-reverse; gap: 10px; max-width: 380px;
}
.toast {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 13px 15px; border-radius: var(--r-lg);
  background: var(--surface-dark); color: var(--on-dark);
  box-shadow: var(--sh-3); font-size: 14px; line-height: 1.45;
  animation: toastIn var(--t-slow) var(--spring);
  border-left: 3px solid var(--acc, var(--on-dark));
}
.toast.is-saindo { animation: toastOut var(--t) var(--ease) forwards; }
.toast svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 1px; color: var(--acc, var(--on-dark)); }
.toast__fechar { margin-left: auto; background: none; border: 0; color: var(--on-dark-soft); cursor: pointer; padding: 0; }
.toast--ok   { --acc: #34d399; }
.toast--erro { --acc: #f87171; }
.toast--info { --acc: #60a5fa; }
@keyframes toastIn  { from { opacity: 0; transform: translateX(40px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(40px) scale(.94); } }

/* --------------------------------------------------------------------------
   17. Command palette
   -------------------------------------------------------------------------- */
.overlay--palette { align-items: flex-start; padding-top: 12vh; }
.palette {
  width: 100%; max-width: 600px; background: var(--surface-raised);
  border-radius: var(--r-xl); box-shadow: var(--sh-4); overflow: hidden;
  transform: translateY(-14px) scale(.97); opacity: 0;
  transition: transform var(--t-slow) var(--spring), opacity var(--t) var(--ease);
}
.overlay.is-open .palette { transform: none; opacity: 1; }
.palette__campo { display: flex; align-items: center; gap: 11px; padding: 16px 18px; border-bottom: 1px solid var(--hairline); }
.palette__campo svg { width: 18px; height: 18px; color: var(--muted); }
.palette__campo input { flex: 1; border: 0; outline: none; background: none; font-size: 16px; color: var(--ink); }
.palette__lista { max-height: 380px; overflow-y: auto; padding: 8px; }
.palette__grupo { font-size: 11px; font-weight: 600; color: var(--muted-soft); text-transform: uppercase; letter-spacing: .5px; padding: 9px 10px 5px; }
.palette__item {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  padding: 10px 11px; border: 0; border-radius: var(--r-md); background: none;
  font-size: 14px; color: var(--body); cursor: pointer;
}
.palette__item svg { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }
.palette__item.is-ativo { background: var(--surface-card); color: var(--ink); }
.palette__item .cel-codigo { margin-left: auto; }
.palette__vazio { padding: 34px 20px; text-align: center; color: var(--muted); font-size: 14px; }
.palette__foot {
  display: flex; gap: 16px; padding: 10px 18px; border-top: 1px solid var(--hairline);
  background: var(--surface-soft); font-size: 11.5px; color: var(--muted);
}
.palette__foot kbd {
  font-family: var(--font-ui); font-size: 10.5px; font-weight: 600; padding: 2px 5px;
  border-radius: var(--r-xs); background: var(--canvas); border: 1px solid var(--hairline); color: var(--body);
}

/* --------------------------------------------------------------------------
   18. Calendário
   -------------------------------------------------------------------------- */
.cal { background: var(--canvas); border: 1px solid var(--hairline); border-radius: var(--r-lg); overflow: hidden; }
.cal__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-md); padding: 14px 18px; border-bottom: 1px solid var(--hairline); }
.cal__mes { font-family: var(--font-display); font-size: 20px; font-weight: 600; letter-spacing: -.5px; color: var(--ink); }
.cal__semana { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--surface-soft); border-bottom: 1px solid var(--hairline); }
.cal__semana span { padding: 9px 10px; font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal__grid > *, .cal__semana > * { min-width: 0; }
.cal__dia {
  min-height: 122px; padding: 8px; border-right: 1px solid var(--hairline-soft); border-bottom: 1px solid var(--hairline-soft);
  display: flex; flex-direction: column; gap: 4px;
  transition: background var(--t-fast) var(--ease);
}
.cal__dia:nth-child(7n) { border-right: 0; }
.cal__dia:hover { background: var(--surface-soft); }
.cal__dia.is-fora { background: var(--surface-soft); opacity: .55; }
.cal__dia.is-hoje { background: var(--info-soft); }
.cal__num { font-size: 12.5px; font-weight: 600; color: var(--muted); width: 24px; height: 24px; display: grid; place-items: center; border-radius: var(--r-full); }
.cal__dia.is-hoje .cal__num { background: var(--primary); color: var(--on-primary); }
.cal__evento {
  display: block; padding: 4px 7px; border-radius: var(--r-xs);
  background: var(--surface-card); font-size: 11.5px; line-height: 1.5;
  color: var(--ink); cursor: pointer;
  border-left: 3px solid var(--prio, var(--muted));
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
  animation: cardIn 320ms var(--ease) backwards;
}
.cal__evento:hover { background: var(--surface-strong); transform: translateX(2px); }
.cal__evento.is-concluida { opacity: .5; text-decoration: line-through; }
.cal__evento--google {
  background: transparent; border-left: 0; color: var(--muted);
  display: flex; align-items: center; gap: 5px; padding-left: 3px;
}
.cal__ponto {
  width: 7px; height: 7px; border-radius: var(--r-full);
  background: var(--ag, #4285F4); flex-shrink: 0;
}
.cal__evento--google.is-convite .cal__ponto { background: transparent; box-shadow: inset 0 0 0 2px var(--ag, #4285F4); }
.cal__evento--google b { font-weight: 600; color: var(--body); }
.cal__evento--google:hover { background: var(--surface-card); color: var(--ink); }

.agenda-linha {
  display: flex; align-items: center; gap: 8px; padding: 5px 6px;
  border-radius: var(--r-sm); cursor: pointer; font-size: 12.5px; color: var(--body);
  transition: background var(--t-fast) var(--ease);
}
.agenda-linha:hover { background: var(--surface-soft); }
.agenda-linha input { width: 14px; height: 14px; accent-color: var(--ink); flex-shrink: 0; }
.agenda-cor { width: 9px; height: 9px; border-radius: var(--r-full); flex-shrink: 0; }
.agenda-linha b { margin-left: auto; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.agenda-linha:has(input:not(:checked)) { opacity: .5; }
.cal__mais { font-size: 11px; color: var(--muted); padding-left: 7px; cursor: pointer; }
.cal__mais:hover { color: var(--ink); text-decoration: underline; }

/* --------------------------------------------------------------------------
   19. Login
   -------------------------------------------------------------------------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth__form { display: flex; flex-direction: column; justify-content: center; padding: var(--sp-xxl); background: var(--canvas); }
.auth__inner { width: 100%; max-width: 400px; margin-inline: auto; }
.auth__aside {
  position: relative; overflow: hidden;
  background: var(--surface-dark); color: var(--on-dark);
  display: flex; flex-direction: column; justify-content: center; padding: var(--sp-xxl);
}
.auth__aside::before, .auth__aside::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(60px); opacity: .28;
}
.auth__aside::before { width: 420px; height: 420px; background: #2563eb; top: -120px; right: -100px; animation: float1 16s var(--ease-in-out) infinite; }
.auth__aside::after  { width: 340px; height: 340px; background: #7c3aed; bottom: -110px; left: -80px; animation: float2 20s var(--ease-in-out) infinite; }
.auth__aside > * { position: relative; z-index: 1; }
@keyframes float1 { 0%,100% { transform: none; } 50% { transform: translate(-40px, 50px) scale(1.14); } }
@keyframes float2 { 0%,100% { transform: none; } 50% { transform: translate(50px, -40px) scale(1.1); } }

.auth__mock {
  background: var(--surface-dark-elevated); border: 1px solid #262626;
  border-radius: var(--r-xl); padding: var(--sp-lg); margin-top: var(--sp-xl);
  box-shadow: var(--sh-4);
}
.auth__mockrow {
  display: flex; align-items: center; gap: 11px; padding: 11px 0;
  border-bottom: 1px solid #232323; font-size: 13.5px;
  animation: cardIn 620ms var(--ease) backwards;
}
.auth__mockrow:last-child { border-bottom: 0; }
.auth__mockrow .barra { flex: 1; height: 5px; border-radius: var(--r-pill); background: #2c2c2c; overflow: hidden; }
.auth__mockrow .barra i { display: block; height: 100%; border-radius: var(--r-pill); animation: grow 1.4s var(--ease) backwards; }
@keyframes grow { from { width: 0 !important; } }

.alerta {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 14px; border-radius: var(--r-md); font-size: 13.5px; margin-bottom: var(--sp-md);
  animation: shake 420ms var(--ease);
}
.alerta svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.alerta--erro    { background: var(--error-soft);   color: var(--error); }
.alerta--sucesso { background: var(--success-soft); color: var(--success); }
@keyframes shake {
  0%,100% { transform: none; } 20% { transform: translateX(-6px); }
  40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); }
}

/* --------------------------------------------------------------------------
   20. Estados vazios / skeleton
   -------------------------------------------------------------------------- */
.vazio { text-align: center; padding: var(--sp-xxl) var(--sp-lg); }
.vazio__icone {
  width: 56px; height: 56px; margin: 0 auto var(--sp-md);
  border-radius: var(--r-full); background: var(--surface-card);
  display: grid; place-items: center; color: var(--muted-soft);
}
.vazio__icone svg { width: 24px; height: 24px; }
.vazio__titulo { font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: 5px; }
.vazio__texto { font-size: 14px; color: var(--muted); max-width: 380px; margin: 0 auto var(--sp-md); }
.vazio--mini { padding: var(--sp-lg) var(--sp-md); }
.vazio--mini .vazio__icone { width: 40px; height: 40px; margin-bottom: 10px; }
.vazio--mini .vazio__icone svg { width: 18px; height: 18px; }

.skeleton {
  background: linear-gradient(90deg, var(--surface-card) 25%, var(--hairline-soft) 37%, var(--surface-card) 63%);
  background-size: 400% 100%; border-radius: var(--r-sm);
  animation: shimmer 1.4s ease-in-out infinite;
}
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.sk-card { height: 92px; border-radius: var(--r-md); }
.sk-linha { height: 12px; }

/* --------------------------------------------------------------------------
   21. Rodapé escuro
   -------------------------------------------------------------------------- */
.footer {
  flex-shrink: 0; margin-top: var(--sp-xxl);
  background: var(--surface-dark); color: var(--on-dark-soft); padding-block: 40px 28px;
}
.footer__grid { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-xl); flex-wrap: wrap; }
.footer__marca { display: flex; align-items: center; gap: 10px; color: var(--on-dark); }
.footer__marca .brand__mark { background: var(--on-dark); color: var(--surface-dark); }
.footer__marca .brand__name { color: var(--on-dark); }
.footer__col h5 { font-size: 12px; font-weight: 600; color: var(--on-dark); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 11px; }
.footer__col a, .footer__col span { display: block; font-size: 13.5px; color: var(--on-dark-soft); padding: 3px 0; transition: color var(--t-fast) var(--ease); }
.footer__col a:hover { color: var(--on-dark); }
.footer__base {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-md); flex-wrap: wrap;
  margin-top: var(--sp-xl); padding-top: var(--sp-md); border-top: 1px solid #232323; font-size: 12.5px; color: #7d7d85;
}

/* --------------------------------------------------------------------------
   22. Animações de entrada
   -------------------------------------------------------------------------- */
.reveal { animation: revealUp 620ms var(--ease) backwards; animation-delay: calc(var(--i, 0) * 55ms); }
@keyframes revealUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.fade-in { animation: fadeIn var(--t-slow) var(--ease) backwards; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* --------------------------------------------------------------------------
   23. Responsivo
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .topnav__search { display: none; }
  .auth { grid-template-columns: 1fr; }
  .auth__aside { display: none; }
}
@media (max-width: 900px) {
  .nav-pill span { display: none; }
  .nav-pill { padding: 8px 11px; }
  .form-grid { grid-template-columns: 1fr; }
  h1 { font-size: 30px; letter-spacing: -.8px; }
  .display-lg { font-size: 34px; letter-spacing: -1px; }
}
@media (max-width: 720px) {
  .container { padding-inline: var(--sp-md); }
  .topnav__inner { gap: 8px; padding-inline: 12px; }
  .brand__name { display: none; }
  .hide-mobile { display: none; }
  .nav-pills { padding: 4px; }
  .nav-pill { padding: 8px 9px; }
  .btn--sm { padding: 0 10px; }
  .menu { min-width: 208px; }
  .page__head { gap: var(--sp-md); }
  .page__actions { width: 100%; }
  .page__actions .select, .page__actions .segmented { flex: 1 1 auto; }
  .board-scroll { margin-inline: calc(var(--sp-md) * -1); padding-inline: var(--sp-md); }
  .page { padding-block: var(--sp-lg) var(--sp-xl); }
  .kpi__value { font-size: 28px; }
  .row--between { flex-wrap: wrap; }
  .cal__dia { min-height: 84px; padding: 4px; }
  /* nas telas estreitas cada demanda vira uma faixa colorida — o texto não caberia */
  .cal__evento {
    font-size: 0; padding: 0; height: 6px; border-radius: 3px;
    border-left: 0; background: var(--prio);
  }
  .cal__evento.is-concluida { text-decoration: none; }
  .cal__mais { font-size: 10px; padding-left: 2px; }
  .cal__num { font-size: 11.5px; width: 20px; height: 20px; }
  .bulkbar {
    left: 12px; right: 12px; bottom: 12px; border-radius: var(--r-lg); flex-wrap: wrap;
    transform: translateY(calc(100% + 20px));
  }
  .bulkbar.is-on { transform: none; }
  .toasts { left: 12px; right: 12px; bottom: 12px; max-width: none; }
  .drawer { max-width: 100%; }
  .modal { max-height: 92vh; }
  .footer__grid { gap: var(--sp-lg); }
}

/* --------------------------------------------------------------------------
   24. Dashboard
   -------------------------------------------------------------------------- */
.dash-topo { display: grid; grid-template-columns: 340px 1fr; gap: var(--sp-md); align-items: start; }
.dash-grid { display: grid; gap: var(--sp-md); }
.dash-grid--2  { grid-template-columns: 1.55fr 1fr; }
.dash-grid--2b { grid-template-columns: 1fr 1fr; }
.dash-grid--3  { grid-template-columns: repeat(3, 1fr); }
.cal-layout    { display: grid; gap: var(--sp-md); grid-template-columns: 1fr 300px; align-items: start; }

/* itens de grade precisam poder encolher: sem isso o min-content estoura o container */
.dash-topo > *, .dash-grid > *, .cal-layout > *, .kpi-grid > * { min-width: 0; }
.card__head { flex-wrap: wrap; }

.hero-card {
  position: relative; overflow: hidden;
  background: var(--surface-dark); color: var(--on-dark);
  border-radius: var(--r-lg); padding: 22px 24px 20px;
  display: flex; flex-direction: column; min-height: 100%;
}
.hero-card::before {
  content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(59,130,246,.34), transparent 68%);
  top: -110px; right: -90px; pointer-events: none;
}
.hero-card > * { position: relative; z-index: 1; }
.hero-card__topo { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hero-num {
  font-family: var(--font-display); font-size: 56px; font-weight: 600;
  line-height: 1; letter-spacing: -2.4px; color: var(--on-dark); margin-top: 12px;
}
.hero-card__stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .1);
}
.hero-card__stats div { display: flex; flex-direction: column; gap: 1px; }
.hero-card__stats strong { font-size: 19px; font-weight: 600; color: var(--on-dark); letter-spacing: -.4px; }
.hero-card__stats span { font-size: 11.5px; color: var(--on-dark-soft); }
.hero-card__spark { margin-top: auto; padding-top: 18px; }

/* No tema escuro as superfícies "dark" precisam subir um degrau para não sumirem no fundo */
[data-theme="escuro"] .hero-card,
[data-theme="escuro"] .bulkbar,
[data-theme="escuro"] .chart-tip {
  background: var(--surface-dark-elevated); border: 1px solid var(--hairline);
}
[data-theme="escuro"] .toast {
  background: var(--surface-dark-elevated);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--acc, var(--on-dark));
}

.lista-demandas { display: flex; flex-direction: column; gap: 1px; }
.linha-demanda {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  padding: 10px 10px; border: 0; border-radius: var(--r-md); background: none; cursor: pointer;
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
  animation: rowIn 340ms var(--ease) backwards;
}
.linha-demanda:hover { background: var(--surface-soft); transform: translateX(3px); }
.linha-demanda__prio { width: 3px; align-self: stretch; min-height: 30px; border-radius: var(--r-pill); flex-shrink: 0; }
.linha-demanda__corpo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.linha-demanda__titulo { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.linha-demanda__meta { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); min-width: 0; }

.footer kbd {
  font-family: var(--font-ui); font-size: 10.5px; font-weight: 600; padding: 2px 5px;
  border-radius: var(--r-xs); background: var(--surface-dark-elevated);
  border: 1px solid #2a2a2a; color: var(--on-dark-soft);
}

/* Tamanho padrão dos ícones do sprite — perde para qualquer regra de classe */
:where(svg:not([width]):not([viewBox])) { width: 16px; height: 16px; }

/* --------- complementos do quadro --------- */
.task__grip {
  display: none; place-items: center; width: 18px; height: 18px; margin-right: -3px;
  color: var(--surface-strong); cursor: grab; touch-action: none;
}
.task__grip svg { width: 16px; height: 16px; }
@media (pointer: coarse) { .task__grip { display: grid; } }

.coluna-vazia {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 26px 12px; border: 1px dashed var(--hairline);
  border-radius: var(--r-md); color: var(--muted-soft); font-size: 12.5px;
}
.coluna-vazia svg { width: 20px; height: 20px; opacity: .6; }

.board.is-compacto .task { padding: 9px 11px; }
.board.is-compacto .task__tags,
.board.is-compacto .task__progresso,
.board.is-compacto .task__mini { display: none; }
.board.is-compacto .task__titulo { font-size: 13px; margin-bottom: 6px; -webkit-line-clamp: 2; }
.board.is-compacto .task__foot { margin-top: 7px; padding-top: 7px; }

/* --------- edição rápida no drawer --------- */
.drawer__rapido { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.drawer__rapido .select, .drawer__rapido .input { width: auto; min-width: 118px; flex: 0 1 auto; }

@media (max-width: 1200px) {
  .dash-topo { grid-template-columns: 1fr; }
  .dash-grid--2, .dash-grid--2b { grid-template-columns: 1fr; }
  .dash-grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1000px) {
  .cal-layout { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .dash-grid--3 { grid-template-columns: 1fr; }
  .hero-num { font-size: 46px; letter-spacing: -1.8px; }
}

/* --------------------------------------------------------------------------
   25. Menu suspenso com movimento (substitui todos os <select>)
   -------------------------------------------------------------------------- */
.mmenu { position: relative; display: inline-flex; vertical-align: top; }
.mmenu__nativo {
  position: absolute; width: 1px; height: 1px; opacity: 0;
  pointer-events: none; clip: rect(0 0 0 0); overflow: hidden;
}

.mmenu__trigger {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 12px 0 13px; min-width: 0; max-width: 100%;
  background: var(--canvas); color: var(--ink);
  border: 1px solid var(--hairline); border-radius: var(--r-md);
  font-size: 14px; font-weight: 500; line-height: 1; cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease),
              background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.mmenu--sm .mmenu__trigger { height: 34px; font-size: 13px; padding: 0 10px 0 11px; }
.mmenu__trigger:hover { border-color: var(--muted-soft); background: var(--surface-soft); }
.mmenu__trigger:focus-visible { outline: none; border-color: var(--ink); box-shadow: var(--ring); }
.mmenu[data-aberto="true"] .mmenu__trigger { border-color: var(--ink); box-shadow: var(--ring); background: var(--canvas); }
.mmenu__trigger.is-pulso { animation: mmenuPulso 320ms var(--spring); }
@keyframes mmenuPulso { 0% { transform: scale(1); } 45% { transform: scale(.965); } 100% { transform: scale(1); } }

.mmenu__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mmenu__label.is-vazio { color: var(--muted); font-weight: 400; }
.mmenu__ico { width: 15px; height: 15px; flex-shrink: 0; color: var(--muted); }
.mmenu__dot { width: 8px; height: 8px; border-radius: var(--r-full); flex-shrink: 0; }

.mmenu__chev {
  width: 14px; height: 14px; margin-left: auto; flex-shrink: 0; color: var(--muted);
  transition: transform var(--t-slow) var(--spring), color var(--t-fast) var(--ease);
}
.mmenu[data-aberto="true"] .mmenu__chev { transform: rotate(180deg) translateY(-1px); color: var(--ink); }

/* painel */
.mmenu__pop {
  position: fixed; z-index: 500; min-width: 190px; max-width: 340px;
  padding: 5px; overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface-raised); border: 1px solid var(--hairline);
  border-radius: var(--r-lg); box-shadow: var(--sh-3);
  transform-origin: var(--origem-x, 50%) top;
  opacity: 0; transform: translateY(-8px) scale(.96);
  transition: opacity var(--t-fast) var(--ease), transform var(--t) var(--spring);
}
.mmenu__pop.is-acima { transform-origin: var(--origem-x, 50%) bottom; transform: translateY(8px) scale(.96); }
.mmenu__pop.is-aberto { opacity: 1; transform: none; }

.mmenu__busca {
  display: flex; align-items: center; gap: 8px; padding: 7px 9px; margin: -5px -5px 5px;
  border-bottom: 1px solid var(--hairline-soft); position: sticky; top: -5px;
  background: var(--surface-raised); z-index: 2; border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.mmenu__busca svg { width: 14px; height: 14px; color: var(--muted-soft); flex-shrink: 0; }
.mmenu__busca input {
  flex: 1; min-width: 0; border: 0; outline: none; background: none;
  font-size: 13.5px; color: var(--ink);
}

.mmenu__lista { position: relative; }
.mmenu__hl {
  position: absolute; left: 0; right: 0; top: 0; z-index: 0;
  background: var(--surface-card); border-radius: var(--r-sm); opacity: 0;
  transition: transform var(--t) var(--spring), height var(--t) var(--ease), opacity var(--t-fast) var(--ease);
  pointer-events: none;
}

.mmenu__grupo {
  padding: 9px 10px 4px; font-size: 10.5px; font-weight: 600; letter-spacing: .5px;
  color: var(--muted-soft); text-transform: uppercase;
}

.mmenu__opt {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  padding: 8px 10px; border: 0; background: none; border-radius: var(--r-sm);
  font-size: 13.5px; color: var(--body); cursor: pointer;
  transition: color var(--t-fast) var(--ease);
}
.mmenu__opt.is-ativo, .mmenu__opt.is-sel { color: var(--ink); }
.mmenu__opt.is-sel { font-weight: 600; }
.mmenu__opt[disabled] { opacity: .45; cursor: not-allowed; }
.mmenu__texto { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.mmenu__texto > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mmenu__texto small { font-size: 11.5px; color: var(--muted); font-weight: 400; }
.mmenu__check {
  width: 14px; height: 14px; flex-shrink: 0; color: var(--ink);
  opacity: 0; transform: scale(.5);
  transition: opacity var(--t-fast) var(--ease), transform var(--t) var(--spring);
}
.mmenu__opt.is-sel .mmenu__check { opacity: 1; transform: none; }
.mmenu__vazio { padding: 22px 12px; text-align: center; font-size: 13px; color: var(--muted); }

/* --------------------------------------------------------------------------
   25b. Ficha de detalhe (drawer)
   -------------------------------------------------------------------------- */
.det { display: flex; flex-direction: column; }
.det__linha {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 0; min-width: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--hairline) 55%, transparent);
}
.det__linha:last-child { border-bottom: 0; }
.det__ico { width: 15px; height: 15px; color: var(--muted-soft); flex-shrink: 0; margin-top: 2px; }
.det__rot {
  width: 106px; flex-shrink: 0; font-size: 13px; color: var(--muted); line-height: 1.5;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.det__val {
  flex: 1; min-width: 0; font-size: 13.5px; color: var(--ink); font-weight: 500;
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap; line-height: 1.5;
}
.det__val .muted { font-weight: 400; }
/* valor à esquerda, encostado no rótulo como nas outras linhas; a barra vem depois */
.det__prog { display: flex; align-items: center; gap: 10px; width: 100%; }
.det__prog b { font-variant-numeric: tabular-nums; font-size: 13.5px; font-weight: 500; }
.det__prog .progress { flex: 1; max-width: 190px; height: 6px; }

/* --------------------------------------------------------------------------
   25c. Anexos
   -------------------------------------------------------------------------- */
.anexos-grade {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px;
}
.anexo {
  position: relative; border-radius: var(--r-md); overflow: hidden;
  border: 1px solid var(--hairline); background: var(--surface-card);
  aspect-ratio: 4 / 3; cursor: pointer; display: block; width: 100%; padding: 0;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t) var(--ease);
  animation: cardIn 340ms var(--ease) backwards;
}
.anexo:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.anexo img, .anexo video { width: 100%; height: 100%; object-fit: cover; display: block; }
.anexo__doc {
  width: 100%; height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px; padding: 8px;
  color: var(--muted); text-align: center;
}
.anexo__doc svg { width: 22px; height: 22px; }
.anexo__doc span { font-size: 10.5px; line-height: 1.3; word-break: break-word;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.anexo__play {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(0, 0, 0, .28); color: #fff; pointer-events: none;
}
.anexo__play svg { width: 26px; height: 26px; filter: drop-shadow(0 1px 3px rgba(0,0,0,.5)); }
.anexo__x {
  position: absolute; top: 5px; right: 5px; width: 22px; height: 22px; border-radius: var(--r-full);
  border: 0; background: rgba(10, 10, 10, .62); color: #fff; display: grid; place-items: center;
  cursor: pointer; opacity: 0; transition: opacity var(--t-fast) var(--ease);
}
.anexo:hover .anexo__x { opacity: 1; }
.anexo__x svg { width: 12px; height: 12px; }

.dropzone {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px; border: 1px dashed var(--surface-strong); border-radius: var(--r-md);
  color: var(--muted); font-size: 13px; cursor: pointer; background: transparent;
  width: 100%; transition: all var(--t-fast) var(--ease); margin-top: 8px;
}
.dropzone:hover, .dropzone.is-sobre { border-color: var(--ink); color: var(--ink); background: var(--surface-soft); }
.dropzone svg { width: 16px; height: 16px; }
.dropzone.is-enviando { pointer-events: none; opacity: .6; }

.lightbox {
  position: fixed; inset: 0; z-index: 600; display: grid; place-items: center;
  background: rgba(8, 8, 10, .88); backdrop-filter: blur(4px); padding: 32px;
  opacity: 0; pointer-events: none; transition: opacity var(--t) var(--ease);
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox img, .lightbox video {
  max-width: min(94vw, 1200px); max-height: 86vh; border-radius: var(--r-lg);
  box-shadow: var(--sh-4); transform: scale(.96); transition: transform var(--t-slow) var(--spring);
}
.lightbox.is-open img, .lightbox.is-open video { transform: none; }
.lightbox__barra {
  position: absolute; top: 16px; left: 16px; right: 16px;
  display: flex; align-items: center; gap: 12px; color: #fff; font-size: 13.5px;
}
.lightbox__barra .btn-icon { background: rgba(255,255,255,.12); border-color: transparent; color: #fff; }
.lightbox__barra .btn-icon:hover { background: rgba(255,255,255,.22); color: #fff; }

/* --------------------------------------------------------------------------
   26. Etiquetas (modelo Trello)
   -------------------------------------------------------------------------- */
.etq {
  display: inline-flex; align-items: center; gap: 5px; max-width: 100%;
  padding: 2px 8px; border-radius: var(--r-xs);
  font-size: 11.5px; font-weight: 600; line-height: 1.5; white-space: nowrap;
  background: color-mix(in srgb, var(--etq) 15%, transparent);
  color: color-mix(in srgb, var(--etq) 78%, var(--ink));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--etq) 26%, transparent);
}
[data-theme="escuro"] .etq {
  background: color-mix(in srgb, var(--etq) 22%, transparent);
  color: color-mix(in srgb, var(--etq) 62%, #ffffff);
}
.etq > span { overflow: hidden; text-overflow: ellipsis; }
.etq--solida { background: var(--etq); color: #fff; box-shadow: none; }
.etq--faixa { width: 34px; height: 8px; padding: 0; border-radius: var(--r-xs); background: var(--etq); }
.etq--btn { border: 0; cursor: pointer; transition: transform var(--t-fast) var(--ease); }
.etq--btn:hover { transform: translateY(-1px); }

.etq-lista { display: flex; flex-wrap: wrap; gap: 4px; }

.pes-linha {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 7px 8px; border: 0; background: none; border-radius: var(--r-sm);
  cursor: pointer; font-size: 13.5px; color: var(--body);
  transition: background var(--t-fast) var(--ease);
}
.pes-linha:hover { background: var(--surface-soft); }
.pes-linha.is-on { color: var(--ink); font-weight: 600; }
.pes-linha.is-travada { cursor: not-allowed; }
.pes-check { width: 15px; height: 15px; color: var(--success); flex-shrink: 0; }

.campo-pessoas {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  text-align: left; cursor: pointer; min-height: 40px; padding: 6px 12px;
}
.campo-pessoas:hover { border-color: var(--muted-soft); }
.campo-pessoas .avatar-stack .avatar { border-color: var(--canvas); }

.opcao-agenda {
  align-items: flex-start; gap: 10px; width: 100%;
  padding: 12px 14px; border-radius: var(--r-md);
  background: var(--surface-soft); border: 1px solid var(--hairline);
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.opcao-agenda:hover { border-color: var(--surface-strong); }
.opcao-agenda:has(input:checked) { background: var(--info-soft); border-color: color-mix(in srgb, var(--brand-accent) 35%, transparent); }
.opcao-agenda .check__box { margin-top: 1px; }
.opcao-agenda__logo { width: 17px; height: 17px; flex-shrink: 0; margin-top: 1px; }
.opcao-agenda b { font-size: 13.5px; color: var(--ink); }

.campo-etq {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  text-align: left; cursor: pointer; min-height: 40px; padding: 7px 12px;
}
.campo-etq:hover { border-color: var(--muted-soft); }
.campo-etq:has(.etq) > .muted { display: none; }

/* seletor de etiquetas */
.etq-picker { width: 288px; padding: 4px; }
.etq-picker__linha {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 6px; border: 0; background: none; border-radius: var(--r-sm); cursor: pointer;
  transition: background var(--t-fast) var(--ease);
}
.etq-picker__linha:hover { background: var(--surface-soft); }
.etq-picker__cor {
  flex: 1; min-width: 0; height: 30px; border-radius: var(--r-xs);
  display: flex; align-items: center; padding: 0 10px; gap: 6px;
  background: var(--etq); color: #fff; font-size: 12.5px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: filter var(--t-fast) var(--ease);
}
.etq-picker__linha:hover .etq-picker__cor { filter: brightness(1.08); }
.etq-picker__cor svg { width: 14px; height: 14px; margin-left: auto; opacity: 0; transition: opacity var(--t-fast) var(--ease); }
.etq-picker__linha.is-marcada .etq-picker__cor svg { opacity: 1; }
.etq-picker__editar { flex-shrink: 0; }

.cor-grade { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.cor-opt {
  height: 30px; border-radius: var(--r-xs); border: 0; cursor: pointer;
  background: var(--c); position: relative;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.cor-opt:hover { transform: scale(1.07); }
.cor-opt.is-sel { box-shadow: 0 0 0 2px var(--canvas), 0 0 0 4px var(--ink); }
.cor-opt svg { width: 15px; height: 15px; color: #fff; opacity: 0; }
.cor-opt.is-sel svg { opacity: 1; }

/* --------------------------------------------------------------------------
   27. Medidor (progress) com preenchimento animado
   -------------------------------------------------------------------------- */
.meter { display: flex; flex-direction: column; gap: 7px; }
.meter__top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.meter__rot { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--body); min-width: 0; }
.meter__rot svg { width: 14px; height: 14px; color: var(--acc, var(--muted)); flex-shrink: 0; }
.meter__val {
  font-size: 13px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.meter__val small { font-weight: 500; color: var(--muted); }
.meter__track {
  position: relative; height: 8px; border-radius: var(--r-pill); overflow: hidden;
  background: color-mix(in srgb, var(--acc, var(--ink)) 12%, transparent);
}
.meter__fill {
  position: absolute; inset: 0 auto 0 0; width: 0; border-radius: var(--r-pill);
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--acc, var(--ink)) 72%, transparent), var(--acc, var(--ink)));
  transition: width 900ms var(--ease);
}
.meter__fill::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .38), transparent);
  transform: translateX(-100%);
  animation: brilho 2.6s var(--ease-in-out) 900ms infinite;
}
@keyframes brilho { 0% { transform: translateX(-100%); } 55%, 100% { transform: translateX(220%); } }
.meter--fino .meter__track { height: 6px; }
.meter__legenda { font-size: 11.5px; color: var(--muted); }

/* --------------------------------------------------------------------------
   28. Donut interativo
   -------------------------------------------------------------------------- */
.donut-seg {
  cursor: pointer; transform-origin: center;
  transition: filter 200ms var(--ease), opacity 200ms var(--ease), transform 200ms var(--ease);
}
.donut-wrap.tem-ativo .donut-seg:not(.is-ativo) { opacity: .38; }
.donut-legenda { display: flex; flex-direction: column; gap: 1px; width: 100%; margin-top: var(--sp-md); }
.donut-legenda__item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 7px 9px; border: 0; background: none; border-radius: var(--r-sm);
  cursor: pointer; font-size: 13px; color: var(--body);
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
  animation: rowIn 340ms var(--ease) backwards;
}
.donut-legenda__item:hover, .donut-legenda__item.is-ativo { background: var(--surface-soft); transform: translateX(2px); }
.donut-legenda__item b { margin-left: auto; color: var(--ink); font-variant-numeric: tabular-nums; }
.donut-legenda__item .pct { width: 42px; text-align: right; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }

.donut-center strong { transition: color 200ms var(--ease); }
.donut-center .rot {
  display: block; font-size: 12px; color: var(--muted); max-width: 112px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-inline: auto;
}
.donut-center .pct { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-top: 2px; }
.donut-troca { animation: donutTroca 260ms var(--ease); }
@keyframes donutTroca { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }

/* --------------------------------------------------------------------------
   29. Acompanhamento (quadro com colunas do usuário)
   -------------------------------------------------------------------------- */
.column--edit .column__title { cursor: text; }
.column__title[contenteditable="true"] {
  outline: none; border-bottom: 1px dashed var(--muted-soft); padding-bottom: 1px;
}
.column--conclui .column__count { border-color: var(--success); color: var(--success); }
.column__wip {
  font-size: 10.5px; font-weight: 600; padding: 1px 6px; border-radius: var(--r-pill);
  background: var(--surface-card); color: var(--muted);
}
.column__wip.is-estourado { background: var(--error-soft); color: var(--error); }
.column.is-arrastando-col { opacity: .5; }
.column__handle { cursor: grab; color: var(--surface-strong); display: grid; place-items: center; }
.column__handle:hover { color: var(--muted); }
.column__handle svg { width: 14px; height: 14px; }

.coluna-nova {
  flex: 0 0 250px; min-width: 250px; align-self: flex-start;
  border: 1px dashed var(--surface-strong); border-radius: var(--r-lg);
  background: transparent; color: var(--muted); cursor: pointer;
  padding: 16px; display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 13.5px; font-weight: 500;
  transition: all var(--t-fast) var(--ease);
}
.coluna-nova:hover { border-color: var(--ink); color: var(--ink); background: var(--surface-soft); }

.grupo-tabela {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px;
  background: var(--surface-soft); border-bottom: 1px solid var(--hairline);
  font-size: 13px; font-weight: 600; color: var(--ink); position: sticky; top: 0; z-index: 2;
}

/* --------------------------------------------------------------------------
   30. Trocador de visão + resumo de filtro
   -------------------------------------------------------------------------- */
.periodo-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px;
  border-radius: var(--r-pill); background: var(--info-soft); color: var(--brand-accent);
  font-size: 12.5px; font-weight: 600;
}
.periodo-chip button { border: 0; background: none; color: inherit; cursor: pointer; display: grid; place-items: center; }
.periodo-chip svg { width: 12px; height: 12px; }

.datas-custom { display: flex; align-items: center; gap: 6px; }
.datas-custom .input { width: 138px; }

/* --------------------------------------------------------------------------
   31. Movimento reduzido / impressão
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
}

@media print {
  .topnav, .footer, .filterbar, .bulkbar, .toasts, .page__actions, .cel-acoes { display: none !important; }
  *, *::before, *::after { animation: none !important; opacity: 1 !important; transform: none !important; }
  body { background: #fff; }
  .card, .table-wrap { border-color: #ccc; box-shadow: none; }
}

/* --------------------------------------------------------------------------
   32. Quadro branco (lousa Excalidraw)
   -------------------------------------------------------------------------- */
/* a página inteira cabe na janela: a lousa nunca fica escondida abaixo da dobra */
.qb-page {
  height: calc(100vh - var(--topnav-h));
  display: flex; flex-direction: column;
  padding-block: var(--sp-md) var(--sp-md);
}
.qb-page .page__head { align-items: baseline; margin-bottom: var(--sp-md); flex: none; }
.qb-page .display-lg { font-size: clamp(26px, 3.2vh, 38px); }
.qb-legenda { max-width: 46ch; text-align: right; }

.qb-layout {
  flex: 1; min-height: 0;
  display: grid; grid-template-columns: 288px minmax(0, 1fr);
  gap: var(--sp-lg); align-items: stretch;
}

.qb-lateral { display: flex; flex-direction: column; gap: var(--sp-md); min-height: 0; overflow: auto; }
.qb-card-lista { padding-bottom: var(--sp-xs); flex: none; }
.qb-card-lista .card__head { align-items: center; margin-bottom: var(--sp-sm); }

.qb-lista { display: flex; flex-direction: column; gap: 2px; max-height: 46vh; overflow: auto; margin: 0 -8px; padding: 0 8px; }

.qb-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border: 0; border-radius: var(--r-md);
  background: none; color: var(--body); text-align: left; cursor: pointer;
  transition: background var(--t-fast) var(--ease-in-out);
}
.qb-item:hover { background: var(--surface-strong); }
.qb-item.is-ativa { background: var(--primary); color: var(--on-primary); }
.qb-item__nome { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; }
.qb-item__meta { font-size: 11.5px; opacity: .7; font-variant-numeric: tabular-nums; }
.qb-item svg { width: 15px; height: 15px; flex: none; opacity: .8; }

.qb-dicas { list-style: none; display: flex; flex-direction: column; gap: 9px; font-size: 13px; color: var(--body); }
.qb-dicas li { position: relative; padding-left: 16px; line-height: 1.55; }
.qb-dicas li::before { content: ""; position: absolute; left: 3px; top: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--muted); }
.qb-dicas code { font-family: var(--font-mono); font-size: 11.5px; background: var(--surface-strong); padding: 1px 5px; border-radius: var(--r-xs); }

.qb-palco {
  display: flex; flex-direction: column; min-width: 0;
  border: 1px solid var(--hairline); border-radius: var(--r-lg);
  background: var(--canvas); overflow: hidden; box-shadow: var(--sh-1);
}

.qb-barra {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px 8px 12px; border-bottom: 1px solid var(--hairline);
  background: var(--surface-soft);
}

.qb-nome {
  min-width: 0; max-width: 340px; flex: 0 1 auto;
  border: 1px solid transparent; border-radius: var(--r-sm);
  background: none; color: var(--ink); font: 600 14.5px/1.2 var(--font-ui);
  padding: 6px 8px; transition: border-color var(--t-fast), background var(--t-fast);
}
.qb-nome:hover:not(:disabled) { border-color: var(--hairline); }
.qb-nome:focus { outline: none; border-color: var(--primary); background: var(--canvas); box-shadow: var(--ring); }

.qb-estado {
  font-size: 12px; color: var(--muted); white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
}
.qb-estado::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--muted-soft); }
.qb-estado.is-salvando::before { background: var(--warning); }
.qb-estado.is-salvo::before { background: var(--success); }
.qb-estado.is-erro::before { background: var(--error); }

.qb-canvas { position: relative; flex: 1; min-height: 320px; }
.qb-canvas .excalidraw { --zIndex-layerUI: 4; }

.qb-vazio {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 24px;
  background: var(--canvas);
}
.qb-spinner {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2.5px solid var(--surface-strong); border-top-color: var(--primary);
  animation: qbGirar .8s linear infinite;
}
@keyframes qbGirar { to { transform: rotate(360deg); } }

/* tela cheia — a lousa ocupa a janela inteira */
.qb-palco.is-cheia {
  position: fixed; inset: 0; z-index: 90;
  border-radius: 0; border: 0; box-shadow: none;
}
.qb-palco.is-cheia .qb-canvas { height: auto; flex: 1; max-height: none; }
body.qb-travado { overflow: hidden; }

@media (max-width: 1024px) {
  .qb-page { height: auto; }
  .qb-layout { grid-template-columns: 1fr; }
  .qb-lateral { overflow: visible; }
  .qb-lista { max-height: 240px; }
  .qb-canvas { height: 70vh; flex: none; }
  .qb-legenda { text-align: left; }
}

/* --------------------------------------------------------------------------
   33. Bloco de notas (post-its flutuantes)
   -------------------------------------------------------------------------- */
.menu__atalho {
  margin-left: auto; font-family: var(--font-mono); font-size: 10.5px;
  color: var(--muted); border: 1px solid var(--hairline); border-radius: var(--r-xs);
  padding: 1px 5px; background: var(--surface-card);
}

.notas-camada { position: fixed; inset: 0; z-index: 250; pointer-events: none; }

.nota {
  position: fixed; pointer-events: auto;
  display: flex; flex-direction: column;
  background: var(--nota-papel, #fef7a4);
  color: #1f1f1f;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .18), 0 10px 28px rgba(0, 0, 0, .22);
  overflow: hidden;
  animation: notaEntra .18s var(--ease);
}
@keyframes notaEntra { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.nota.is-arrastando { box-shadow: 0 2px 4px rgba(0, 0, 0, .2), 0 22px 48px rgba(0, 0, 0, .3); }

.nota__barra {
  display: flex; align-items: center; gap: 2px; flex: none;
  height: 34px; padding: 0 4px;
  background: var(--nota-barra, #fbe870);
  cursor: move; touch-action: none;
}
.nota__pega { flex: 1; align-self: stretch; }

.nota__btn {
  width: 26px; height: 26px; flex: none;
  display: grid; place-items: center;
  border: 0; border-radius: 3px; background: none; color: #3b3b3b; cursor: pointer;
  transition: background var(--t-fast) var(--ease-in-out);
}
.nota__btn:hover { background: rgba(0, 0, 0, .10); }
.nota__btn.is-ativo { background: rgba(0, 0, 0, .16); color: #111; }
.nota__btn svg { width: 15px; height: 15px; }

.nota__texto {
  flex: 1; min-height: 0; overflow: auto;
  padding: 12px 14px; outline: none;
  font: 400 14.5px/1.6 var(--font-ui); color: #1f1f1f;
  overflow-wrap: anywhere;
}
.nota__texto ul, .nota__texto ol { padding-left: 22px; }
.nota.is-vazia .nota__texto::before {
  content: attr(data-vazio); color: rgba(0, 0, 0, .38); pointer-events: none;
}

.nota__ferramentas {
  display: flex; align-items: center; gap: 2px; flex: none;
  padding: 4px 6px; border-top: 1px solid rgba(0, 0, 0, .10);
  background: rgba(255, 255, 255, .28);
}
.nota__format {
  width: 28px; height: 26px; border: 0; border-radius: 3px; background: none;
  color: #3b3b3b; font-size: 13.5px; font-family: var(--font-ui); cursor: pointer;
  display: grid; place-items: center;
  transition: background var(--t-fast) var(--ease-in-out);
}
.nota__format:hover { background: rgba(0, 0, 0, .10); }
.nota__format svg { width: 15px; height: 15px; }

.nota__menu {
  position: absolute; top: 34px; right: 6px; z-index: 2;
  background: var(--canvas); border: 1px solid var(--hairline);
  border-radius: var(--r-md); box-shadow: var(--sh-3); padding: 8px;
}
.nota__cores { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.nota__cor {
  width: 24px; height: 24px; border-radius: 50%; border: 2px solid transparent; cursor: pointer;
  transition: transform var(--t-fast) var(--spring);
}
.nota__cor:hover { transform: scale(1.12); }
.nota__cor.is-ativa { box-shadow: 0 0 0 2px var(--canvas), 0 0 0 4px var(--ink); }
.nota__menu-item {
  display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 8px;
  padding: 7px 8px; border: 0; border-radius: var(--r-sm); background: none;
  font-size: 13px; color: var(--error); cursor: pointer; text-align: left;
}
.nota__menu-item:hover { background: var(--error-soft); }
.nota__menu-item svg { width: 15px; height: 15px; }

.nota__canto {
  position: absolute; right: 0; bottom: 0; width: 16px; height: 16px;
  cursor: nwse-resize; touch-action: none;
  background: linear-gradient(135deg, transparent 50%, rgba(0, 0, 0, .22) 50%);
}

@media (max-width: 640px) {
  .nota { width: calc(100vw - 24px) !important; left: 12px !important; }
}

/* --------------------------------------------------------------------------
   34. Lista de pessoas (Configurações → Equipe)
   -------------------------------------------------------------------------- */
.pessoa {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-md);
  padding: 11px 10px; border-bottom: 1px solid var(--hairline-soft);
}
.pessoa.is-inativa .avatar,
.pessoa.is-inativa .title-sm,
.pessoa.is-inativa .body-sm { opacity: .5; }

.pessoa__acoes { display: flex; gap: 2px; opacity: 0; transition: opacity var(--t-fast) var(--ease-in-out); }
.pessoa:hover .pessoa__acoes,
.pessoa:focus-within .pessoa__acoes { opacity: 1; }
@media (hover: none) { .pessoa__acoes { opacity: 1; } }

.btn-icon--perigo:hover { background: var(--error-soft); color: var(--error); }

/* visibilidade da lousa (pública x privada) */
.qb-visib { gap: 7px; }
.qb-visib.is-privada { border-color: var(--hairline); background: var(--surface-strong); }
.qb-visib:disabled { opacity: .6; cursor: default; }
.qb-item.is-ativa .qb-item__nome { font-weight: 600; }
