/* ============================================================
 * Frost — réplica do design system do GestorERP para protótipos
 *
 * Fonte canônica: gestor-erp-app/src/styles/main.css + tailwind.config.js
 * Esta cópia existe para o hub System Design e para as telas de exemplo
 * (system-design/telas/**). Os NOMES de classe são os mesmos do app, para
 * que uma tela desenhada aqui seja portada para Vue sem tradução.
 *
 * Diferença deliberada: no app o tema escuro é a classe `.dark` no <html>;
 * aqui os tokens também respondem a `data-theme` e a prefers-color-scheme,
 * porque o hub é exibido no tema de quem o abre. `.dark` continua valendo.
 *
 * Ao mudar main.css, atualize este arquivo (ver README.md, "Manutenção").
 * ============================================================ */

:root {
  /* Cores base em triplets RGB (casam com rgb(var(--x) / a)) */
  --bg-a: 245 243 255;      /* violet-50 */
  --bg-b: 255 241 242;      /* rose-50 */
  --bg-c: 241 245 249;      /* slate-100 */
  --bg-solid: 248 247 252;
  --surface: 255 255 255;
  --surface-2: 241 245 249;
  --border: 226 232 240;
  --fg: 15 23 42;           /* slate-900 */
  --fg-2: 51 65 85;         /* slate-700 */
  --fg-muted: 100 116 139;  /* slate-500 */
  --accent: 139 92 246;     /* violet-500 */
  --accent-2: 6 182 212;    /* cyan-500 */
  --on-accent: 255 255 255;
  --danger: 244 63 94;      /* rose-500 */
  --success: 16 185 129;    /* emerald-500 */
  --warning: 245 158 11;    /* amber-500 */

  /* Botão primário — glass roxo (§20 COMPONENTS.md) */
  --btn-primary-bg: 139 92 246 / 0.18;
  --btn-primary-bg-hover: 139 92 246 / 0.28;
  --btn-primary-bg-active: 139 92 246 / 0.35;
  --btn-primary-border: 139 92 246 / 0.45;
  --btn-primary-border-hover: 139 92 246 / 0.75;
  --btn-primary-fg: 76 29 149;   /* violet-900 no claro */
  --btn-primary-ring: 139 92 246;

  /* Superfícies derivadas (no app são overrides `.dark .glass`) */
  --glass-bg: rgb(var(--surface) / 0.72);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-inset: rgba(255, 255, 255, 0.4);
  --glass-drop: rgba(15, 23, 42, 0.12);
  --nav-bg: rgb(var(--surface) / 0.65);
  --nav-border: rgba(255, 255, 255, 0.5);
  --soft-bg: rgb(var(--surface) / 0.5);
  --soft-border: rgb(var(--border) / 0.6);
  --modal-bg: rgb(var(--surface));
  --modal-border: rgb(var(--border));
  --modal-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 25px 50px -12px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(15, 23, 42, 0.02);
  --sec-bg: rgb(var(--surface) / 0.6);
  --sec-bg-hover: rgb(var(--surface) / 0.9);
  --sec-border: rgb(var(--border) / 0.8);
  --ghost-hover: rgb(var(--surface) / 0.5);
  --row-line: rgb(var(--border) / 0.4);
  --head-line: rgb(var(--border) / 0.5);
  --head-bg: rgb(var(--surface-2) / 0.4);
  --row-hover: rgb(var(--surface-2) / 0.4);
  --nav-fg: 51 65 85;
  --nav-fg-strong: 15 23 42;
  --nav-active-a: 0.18;
  --nav-active-b: 0.1;
  --hairline: rgb(var(--border) / 0.6);
  --scroll-thumb: rgba(100, 116, 139, 0.4);
  --x-hover: rgba(0, 0, 0, 0.15);
  --app-bg:
    radial-gradient(1200px 700px at 18% -10%, rgb(var(--bg-a) / 0.55), transparent 60%),
    radial-gradient(900px 600px at 90% 10%, rgb(var(--bg-b) / 0.45), transparent 55%),
    radial-gradient(1000px 600px at 50% 110%, rgb(var(--bg-c) / 0.5), transparent 60%),
    rgb(var(--bg-solid));

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Bricolage Grotesque", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius: 0.625rem;   /* rounded (DEFAULT) */
  --radius-lg: 0.75rem;
  --radius-xl: 0.875rem;
  --radius-2xl: 1.125rem;
  --radius-3xl: 1.5rem;
}

/* ── Tema escuro: os três caminhos levam aos mesmos valores ── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not(.light) {
    --bg-a: 30 27 75; --bg-b: 60 21 77; --bg-c: 2 6 23; --bg-solid: 11 16 32;
    --surface: 15 23 42; --surface-2: 30 41 59; --border: 51 65 85;
    --fg: 248 250 252; --fg-2: 203 213 225; --fg-muted: 148 163 184;
    --accent: 167 139 250; --accent-2: 34 211 238; --on-accent: 15 23 42;
    --btn-primary-fg: 221 214 254;
    --glass-bg: rgba(255, 255, 255, 0.04); --glass-border: rgba(255, 255, 255, 0.08);
    --glass-inset: rgba(255, 255, 255, 0.06); --glass-drop: rgba(0, 0, 0, 0.6);
    --nav-bg: rgba(15, 23, 42, 0.55); --nav-border: rgba(255, 255, 255, 0.06);
    --soft-bg: rgba(255, 255, 255, 0.03); --soft-border: rgba(255, 255, 255, 0.06);
    --modal-bg: rgb(30 41 59); --modal-border: rgba(255, 255, 255, 0.1);
    --modal-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 25px 60px -12px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.04);
    --sec-bg: rgba(255, 255, 255, 0.05); --sec-bg-hover: rgba(255, 255, 255, 0.1); --sec-border: rgba(255, 255, 255, 0.1);
    --ghost-hover: rgba(255, 255, 255, 0.06);
    --row-line: rgba(255, 255, 255, 0.05); --head-line: rgba(255, 255, 255, 0.08);
    --head-bg: rgba(255, 255, 255, 0.02); --row-hover: rgba(255, 255, 255, 0.03);
    --nav-fg: 248 250 252; --nav-fg-strong: 255 255 255;
    --nav-active-a: 0.22; --nav-active-b: 0.12;
    --hairline: rgba(255, 255, 255, 0.08);
    --scroll-thumb: rgba(255, 255, 255, 0.12); --x-hover: rgba(255, 255, 255, 0.15);
    --app-bg:
      radial-gradient(1200px 800px at 18% -10%, rgb(var(--bg-a) / 0.65), transparent 60%),
      radial-gradient(900px 700px at 90% 10%, rgb(var(--bg-b) / 0.4), transparent 55%),
      radial-gradient(1100px 700px at 50% 110%, rgb(var(--accent) / 0.15), transparent 60%),
      rgb(var(--bg-solid));
    color-scheme: dark;
  }
}
:root[data-theme="dark"], :root.dark {
  --bg-a: 30 27 75; --bg-b: 60 21 77; --bg-c: 2 6 23; --bg-solid: 11 16 32;
  --surface: 15 23 42; --surface-2: 30 41 59; --border: 51 65 85;
  --fg: 248 250 252; --fg-2: 203 213 225; --fg-muted: 148 163 184;
  --accent: 167 139 250; --accent-2: 34 211 238; --on-accent: 15 23 42;
  --btn-primary-fg: 221 214 254;
  --glass-bg: rgba(255, 255, 255, 0.04); --glass-border: rgba(255, 255, 255, 0.08);
  --glass-inset: rgba(255, 255, 255, 0.06); --glass-drop: rgba(0, 0, 0, 0.6);
  --nav-bg: rgba(15, 23, 42, 0.55); --nav-border: rgba(255, 255, 255, 0.06);
  --soft-bg: rgba(255, 255, 255, 0.03); --soft-border: rgba(255, 255, 255, 0.06);
  --modal-bg: rgb(30 41 59); --modal-border: rgba(255, 255, 255, 0.1);
  --modal-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 25px 60px -12px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.04);
  --sec-bg: rgba(255, 255, 255, 0.05); --sec-bg-hover: rgba(255, 255, 255, 0.1); --sec-border: rgba(255, 255, 255, 0.1);
  --ghost-hover: rgba(255, 255, 255, 0.06);
  --row-line: rgba(255, 255, 255, 0.05); --head-line: rgba(255, 255, 255, 0.08);
  --head-bg: rgba(255, 255, 255, 0.02); --row-hover: rgba(255, 255, 255, 0.03);
  --nav-fg: 248 250 252; --nav-fg-strong: 255 255 255;
  --nav-active-a: 0.22; --nav-active-b: 0.12;
  --hairline: rgba(255, 255, 255, 0.08);
  --scroll-thumb: rgba(255, 255, 255, 0.12); --x-hover: rgba(255, 255, 255, 0.15);
  --app-bg:
    radial-gradient(1200px 800px at 18% -10%, rgb(var(--bg-a) / 0.65), transparent 60%),
    radial-gradient(900px 700px at 90% 10%, rgb(var(--bg-b) / 0.4), transparent 55%),
    radial-gradient(1100px 700px at 50% 110%, rgb(var(--accent) / 0.15), transparent 60%),
    rgb(var(--bg-solid));
  color-scheme: dark;
}

/* ============================================================ Base */
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.625;
  color: rgb(var(--fg));
  background: var(--app-bg);
  background-attachment: fixed;
}
h1, h2, h3, h4 { color: rgb(var(--fg)); letter-spacing: -0.015em; margin: 0; }
h1 { font-family: var(--font-display); font-size: 2.25rem; line-height: 2.5rem; font-weight: 600; letter-spacing: -0.025em; }
h2 { font-size: 1.25rem; line-height: 1.75rem; font-weight: 600; }
h3, h4 { font-size: 0.875rem; line-height: 1.25rem; font-weight: 600; }
a { color: rgb(var(--accent)); transition: color .15s, opacity .15s; }
a:hover { opacity: 0.85; }
::selection { background: rgb(var(--accent) / 0.25); color: rgb(var(--fg)); }
hr { border: 0; border-top: 1px solid var(--hairline); }

.app-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; background: var(--app-bg); }

/* ============================================================ Superfícies */
.glass, .glass-panel, .card, .surface {
  border-radius: var(--radius-2xl);
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid var(--glass-border);
  box-shadow: 0 1px 0 var(--glass-inset) inset, 0 8px 32px -12px var(--glass-drop);
}
.glass-nav {
  background: var(--nav-bg);
  backdrop-filter: blur(32px) saturate(160%);
  -webkit-backdrop-filter: blur(32px) saturate(160%);
  border-color: var(--nav-border);
}
.glass-soft, .surface-muted {
  border-radius: var(--radius-xl);
  background: var(--soft-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--soft-border);
}
.glass-modal {
  border-radius: var(--radius-2xl);
  background: var(--modal-bg);
  border: 1px solid var(--modal-border);
  box-shadow: var(--modal-shadow);
}
.modal-overlay {
  position: fixed; inset: 0; z-index: 40;
  display: flex; align-items: center; justify-content: center; padding: 1rem;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  animation: fade-in .25s ease-out;
}
.modal-overlay--sobreposto { z-index: 98; }

/* ============================================================ Tipografia */
.display { font-family: var(--font-display); letter-spacing: -0.025em; font-weight: 600; }
.muted { color: rgb(var(--fg-muted)); }
.soft { color: rgb(var(--fg-2)); }
.gradient-text {
  background: linear-gradient(135deg, rgb(var(--accent)), rgb(var(--accent-2)));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.accent-bar { background: linear-gradient(90deg, rgb(var(--accent)), rgb(var(--accent-2))); }
.tabular-nums { font-variant-numeric: tabular-nums; }

/* ============================================================ Botões */
.btn, .btn-secondary, .btn-ghost, .btn-danger {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.5rem 0.875rem; border-radius: var(--radius-lg);
  font: inherit; font-size: 0.875rem; line-height: 1.25rem; font-weight: 500;
  border: 1px solid transparent; background: transparent; color: inherit;
  cursor: pointer; transition: all .15s ease;
}
.btn:focus-visible, .btn-secondary:focus-visible, .btn-ghost:focus-visible, .btn-danger:focus-visible {
  outline: 2px solid rgb(var(--accent)); outline-offset: 2px;
}
.btn:disabled, .btn-secondary:disabled, .btn-ghost:disabled, .btn-danger:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.625rem 1.125rem; min-height: 2.5rem; border-radius: 10px;
  border: 1px solid rgb(var(--btn-primary-border));
  background: rgb(var(--btn-primary-bg));
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10);
  color: rgb(var(--btn-primary-fg));
  font: inherit; font-size: 0.875rem; font-weight: 600; line-height: 1;
  white-space: nowrap; cursor: pointer; user-select: none;
  transition: background .18s ease, border-color .18s ease, transform .06s ease;
}
.btn-primary:hover { background: rgb(var(--btn-primary-bg-hover)); border-color: rgb(var(--btn-primary-border-hover)); }
.btn-primary:active { background: rgb(var(--btn-primary-bg-active)); transform: translateY(1px); }
.btn-primary:focus-visible { outline: 2px solid rgb(var(--btn-primary-ring)); outline-offset: 2px; }
.btn-primary:disabled, .btn-primary[aria-disabled="true"] { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn-primary svg { width: 1rem; height: 1rem; stroke-width: 2.5; flex-shrink: 0; }
.btn-primary-sm { padding: 0.4375rem 0.75rem; font-size: 0.8125rem; min-height: 2rem; border-radius: 0.5rem; }
.btn-primary-lg { padding: 0.8125rem 1.375rem; font-size: 0.9375rem; min-height: 2.875rem; border-radius: 0.75rem; }
.btn-primary-icon { padding: 0.625rem; aspect-ratio: 1 / 1; gap: 0; }
.btn-primary-block { width: 100%; }

.btn-secondary {
  background: var(--sec-bg); color: rgb(var(--fg));
  border-color: var(--sec-border);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.btn-secondary:hover { background: var(--sec-bg-hover); }
.btn-ghost { color: rgb(var(--fg-2)); }
.btn-ghost:hover { background: var(--ghost-hover); color: rgb(var(--fg)); }
.btn-danger { background: #F43F5E; color: #fff; }
.btn-danger:hover { filter: brightness(1.1); }

/* ============================================================ Inputs */
.input {
  box-sizing: border-box; width: 100%; min-height: 2.5rem;
  padding: 0.5rem 0.75rem; border-radius: var(--radius-lg);
  font: inherit; font-size: 0.875rem;
  background: rgb(var(--surface)); color: rgb(var(--fg));
  border: 1px solid rgb(var(--border)); transition: all .15s ease;
}
.input::placeholder { color: rgb(var(--fg-muted)); }
.input:focus { outline: none; border-color: rgb(var(--accent)); box-shadow: 0 0 0 1px rgb(var(--accent)); }
.input-error, .input.input-error { border-color: #F43F5E !important; }
.input-error:focus { box-shadow: 0 0 0 1px #F43F5E !important; }
.form-field-error { font-size: 0.75rem; margin-top: 0.25rem; line-height: 1.375; color: #F43F5E; }
.label {
  display: block; margin-bottom: 0.375rem;
  font-size: 0.75rem; line-height: 1rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: rgb(var(--fg-muted));
}
.field-hint { font-size: 0.75rem; margin-top: 0.375rem; line-height: 1.625; color: rgb(var(--fg-muted)); }
.field-hint strong { color: rgb(var(--fg-2)); font-weight: 600; }

/* ============================================================ Chips */
.chip {
  display: inline-flex; align-items: center; gap: 0.25rem;
  border-radius: 9999px; padding: 0.125rem 0.625rem;
  font-size: 0.75rem; line-height: 1rem; font-weight: 500; white-space: nowrap;
}
.badge-dot { display: inline-block; height: 0.5rem; width: 0.5rem; border-radius: 9999px; background: currentColor; }
.chip-recurso {
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.05rem 0.45rem; border-radius: 6px; font-weight: 500;
  background: rgb(var(--accent) / 0.14); color: rgb(var(--accent));
}
/* Status semântico (cor de status é a única cor fixa permitida) */
.chip--ok { background: rgb(var(--success) / 0.15); color: rgb(var(--success)); }
.chip--warn { background: rgb(var(--warning) / 0.15); color: rgb(var(--warning)); }
.chip--erro { background: rgb(var(--danger) / 0.15); color: rgb(var(--danger)); }
.chip--neutro { background: rgb(var(--fg-muted) / 0.14); color: rgb(var(--fg-2)); }

/* ============================================================ Tabelas */
.table-erp, .table-crm { width: 100%; font-size: 0.875rem; border-collapse: collapse; }
.table-erp th {
  padding: 0.75rem 1rem; text-align: left;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
  color: rgb(var(--fg-muted));
  border-bottom: 1px solid var(--head-line); background: var(--head-bg);
}
.table-erp td { padding: 0.75rem 1rem; color: rgb(var(--fg)); border-bottom: 1px solid var(--row-line); }
.table-erp tr:last-child td { border-bottom: 0; }
.table-erp tbody tr:hover td { background: var(--row-hover); }
.table-erp .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ============================================================ Navegação */
.nav-item {
  position: relative; display: flex; align-items: center; gap: 0.75rem;
  border-radius: var(--radius-lg); font-size: 0.875rem;
  color: rgb(var(--nav-fg)); text-decoration: none; transition: all .15s ease;
}
.nav-item:hover { background: var(--ghost-hover); color: rgb(var(--nav-fg-strong)); opacity: 1; }
.nav-item.active, .nav-item[aria-current="page"], .nav-item[aria-current="true"] {
  color: rgb(var(--nav-fg-strong));
  background: linear-gradient(135deg, rgb(var(--accent) / var(--nav-active-a)), rgb(var(--accent-2) / var(--nav-active-b)));
}
.nav-divider { height: 1px; margin: 1.25rem 0.25rem; background: var(--hairline); }
.qa-section-header {
  display: flex; align-items: center; gap: 0.375rem;
  padding: 0.25rem 0.625rem 0.5rem;
  font-size: 0.625rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  color: rgb(var(--accent)); opacity: 0.85;
}

/* ============================================================ Kanban */
.kanban-col {
  flex-shrink: 0; width: 18rem; display: flex; flex-direction: column;
  border-radius: var(--radius-2xl);
  background: var(--soft-bg); backdrop-filter: blur(16px);
  border: 1px solid var(--soft-border);
}
.kanban-col-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.625rem 0.75rem; border-bottom: 1px solid var(--row-line);
}
.kanban-col-header-title {
  display: flex; align-items: center; gap: 0.375rem;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
  color: rgb(var(--fg-2));
}
.kanban-col-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 1.25rem; padding: 0 0.375rem; border-radius: 0.25rem;
  font-size: 10px; font-weight: 600;
  background: var(--sec-bg); color: rgb(var(--fg-2)); border: 1px solid var(--soft-border);
}
.kanban-col-body { flex: 1; overflow-y: auto; padding: 0.5rem; display: flex; flex-direction: column; gap: 0.5rem; min-height: 80px; }
.kanban-card {
  border-radius: var(--radius-xl); padding: 0.625rem 0.75rem;
  background: var(--glass-bg); backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 2px 8px -2px rgba(15, 23, 42, 0.06);
  transition: all .15s ease;
}
.kanban-card:hover { border-color: rgb(var(--accent) / 0.4); box-shadow: 0 8px 20px -6px rgb(var(--accent) / 0.18); }
.kanban-card-title { font-size: 0.875rem; font-weight: 600; line-height: 1.25; color: rgb(var(--fg)); }

/* ============================================================ KBD */
.kbd {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.125rem 0.375rem; border-radius: 0.25rem;
  font-size: 10px; font-weight: 500; font-family: var(--font-sans);
  background: var(--soft-bg); border: 1px solid var(--soft-border); color: rgb(var(--fg-muted));
}

/* ============================================================ Filtros (§10.11) */
.filter-chip {
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding: 0.25rem 0.5rem 0.25rem 0.625rem; border-radius: 9999px;
  font-size: 0.75rem; line-height: 1; white-space: nowrap;
  border: 1px solid transparent; transition: border-color .15s ease, background .15s ease;
}
.filter-chip strong { font-weight: 600; }
.filter-chip--primario { background: rgb(var(--accent) / 0.14); color: rgb(var(--accent)); border-color: rgb(var(--accent) / 0.28); }
.filter-chip--primario:hover { border-color: rgb(var(--accent) / 0.55); }
.filter-chip--avancado { background: rgba(148, 163, 184, 0.14); color: rgb(var(--fg-2)); border-color: rgba(148, 163, 184, 0.28); }
.filter-chip--avancado:hover { border-color: rgba(148, 163, 184, 0.55); }
.filter-chip-x {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 9999px; padding: 0;
  background: transparent; border: 0; cursor: pointer; opacity: 0.7; color: currentColor;
  transition: opacity .12s ease, background .12s ease;
}
.filter-chip-x:hover { opacity: 1; background: var(--x-hover); }
.advanced-panel {
  margin-top: 0.75rem; overflow: hidden; border-radius: 0.875rem;
  border: 1px solid rgb(var(--accent) / 0.2); background: rgb(var(--accent) / 0.05);
}
.advanced-panel__header {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.75rem 1rem; border-bottom: 1px solid rgb(var(--accent) / 0.18); background: rgb(var(--accent) / 0.06);
}
.advanced-panel__body { padding: 1rem; display: flex; flex-direction: column; gap: 1rem; }

/* ============================================================ Modal de estado (step-up) */
.stepup-header {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--modal-border);
  background: linear-gradient(180deg, rgb(var(--stepup-tint, 245 158 11) / 0.09), rgb(var(--stepup-tint, 245 158 11) / 0.02));
}
.stepup-eyebrow { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; line-height: 1.4; }
.stepup-expira {
  display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.25rem 0.5rem; border-radius: 0.5rem;
  font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap;
  background: rgb(var(--fg-muted) / 0.1); color: rgb(var(--fg-muted));
}

/* ============================================================ Scroll e movimento */
.scrollbar-thin { scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) transparent; }
.scrollbar-thin::-webkit-scrollbar { height: 8px; width: 8px; }
.scrollbar-thin::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 999px; }
.scrollbar-thin::-webkit-scrollbar-track { background: transparent; }

@keyframes fade-in { 0% { opacity: 0; transform: translateY(4px); } 100% { opacity: 1; transform: translateY(0); } }
.animate-fade-in { animation: fade-in .25s ease-out; }
.skel {
  border-radius: 0.3125rem;
  background: linear-gradient(90deg, rgb(var(--fg-muted) / 0.06) 0%, rgb(var(--accent) / 0.18) 50%, rgb(var(--fg-muted) / 0.06) 100%);
  background-size: 220% 100%;
  animation: skel-shimmer 1.6s ease-in-out infinite;
}
@keyframes skel-shimmer { 0% { background-position: 220% 0; opacity: .7; } 50% { opacity: 1; } 100% { background-position: -220% 0; opacity: .7; } }
@media (prefers-reduced-motion: reduce) {
  .animate-fade-in, .modal-overlay { animation: none; }
  .skel { animation: none; background: rgb(var(--fg-muted) / 0.16); }
}

/* ============================================================ Célula de resumo (§12.8, HeaderResumo) */
.cr-celula { display: flex; align-items: center; gap: 0.625rem; width: 100%; min-width: 0; min-height: 3.25rem; padding: 0.5rem 0.625rem; border-radius: 0.625rem; border: 1px solid transparent; background: transparent; text-align: left; line-height: 1.25rem; }
.cr-tile { width: 1.875rem; height: 1.875rem; border-radius: 0.5625rem; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; }
.cr-tile--icone { background: rgb(var(--accent) / 0.14); color: rgb(var(--accent)); }
.cr-tile--vazio { border: 1px dashed rgb(var(--accent) / 0.6); color: rgb(var(--accent)); }
.cr-celula.is-erro .cr-tile { background: rgba(244, 63, 94, 0.14); color: #f43f5e; }
.cr-celula.is-alterado .cr-tile { box-shadow: 0 0 0 2px rgb(var(--accent) / 0.65); }
.cr-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.cr-label { font-size: 0.65625rem; line-height: 0.875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: rgb(var(--fg-muted)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-celula.is-erro .cr-label { color: #f43f5e; }
.cr-req { color: rgb(var(--accent)); margin-left: 0.125rem; }
.cr-flag { margin-left: 0.375rem; color: rgb(var(--accent)); text-transform: none; letter-spacing: 0; font-weight: 500; }
.cr-valor { display: flex; flex-wrap: wrap; align-items: center; align-content: flex-start; gap: 0 0.4375rem; max-height: 1.25rem; overflow: hidden; min-width: 0; font-size: 0.875rem; line-height: 1.25rem; }
.cr-nome { flex: 0 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; color: rgb(var(--fg)); }
.cr-doc { flex: 0 0 auto; white-space: nowrap; font-size: 0.6875rem; color: rgb(var(--fg-muted)); font-family: var(--font-mono); }
.cr-celula.is-pendente .cr-nome { color: rgb(var(--accent)); }
.cr-celula.is-erro .cr-nome { color: #f43f5e; }
