/* ==========================================================================
   ENCANTRA · Aurora Design System v1.0
   "Do primeiro contato ao fã da marca."
   Tokens → Base → Layout → Componentes → Utilitários
   Documentação viva em /design-system
   ========================================================================== */

/* ---------- 1. TOKENS ---------- */
:root {
  /* Marca */
  --violet-50:#F3EEFF; --violet-100:#E6DCFF; --violet-200:#CDB9FF; --violet-300:#AE8CFF; --violet-400:#8E5DFF;
  --violet-500:#6C3BFF; --violet-600:#5A25EB; --violet-700:#4818C4; --violet-800:#36129A; --violet-900:#230B66;
  --coral-50:#FFF0F4; --coral-100:#FFDCE6; --coral-300:#FF94B2; --coral-500:#FF5C8A; --coral-600:#EE3D70; --coral-700:#C92657;
  --amber-50:#FFF7E8; --amber-100:#FFEBC2; --amber-500:#FFB547; --amber-600:#F59E0B; --amber-700:#B86E00;
  --mint-50:#E8FBF4; --mint-100:#C6F4E3; --mint-500:#22C59A; --mint-600:#13A47E; --mint-700:#0B7A5D;
  --sky-50:#EAF3FF; --sky-100:#CFE3FF; --sky-500:#3D8BFF; --sky-600:#2470E6; --sky-700:#1652B0;
  --red-50:#FFEEF0; --red-100:#FFD6DB; --red-500:#F0445B; --red-600:#D72C44; --red-700:#A81B30;

  /* Neutros com subtom violeta ("ink") */
  --ink-0:#FFFFFF; --ink-25:#FBFAFE; --ink-50:#F6F4FC; --ink-100:#EEEBF7; --ink-200:#E1DCEF; --ink-300:#C9C2DD;
  --ink-400:#A39BBC; --ink-500:#7D7597; --ink-600:#5C5577; --ink-700:#423C5C; --ink-800:#2A2541; --ink-900:#1A1530; --ink-950:#0F0B1F;

  /* Gradientes assinatura */
  --grad-aurora: linear-gradient(135deg, #6C3BFF 0%, #A63BFF 45%, #FF5C8A 100%);
  --grad-sunrise: linear-gradient(135deg, #FF5C8A 0%, #FFB547 100%);
  --grad-ocean: linear-gradient(135deg, #3D8BFF 0%, #6C3BFF 100%);
  --grad-mint: linear-gradient(135deg, #22C59A 0%, #3D8BFF 100%);
  --grad-glow: radial-gradient(60% 80% at 10% 0%, rgba(108,59,255,.18) 0%, transparent 60%), radial-gradient(50% 60% at 100% 0%, rgba(255,92,138,.14) 0%, transparent 60%);

  /* Tipografia */
  --font-display: "Sora", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --text-xs:.75rem; --text-sm:.8125rem; --text-base:.9375rem; --text-md:1rem; --text-lg:1.125rem;
  --text-xl:1.375rem; --text-2xl:1.75rem; --text-3xl:2.25rem; --text-4xl:3rem; --text-5xl:3.75rem;

  /* Espaço, raio, sombra, movimento */
  --sp-1:4px; --sp-2:8px; --sp-3:12px; --sp-4:16px; --sp-5:20px; --sp-6:24px; --sp-8:32px; --sp-10:40px; --sp-12:48px; --sp-16:64px;
  --r-xs:6px; --r-sm:8px; --r-md:12px; --r-lg:16px; --r-xl:20px; --r-2xl:28px; --r-full:999px;
  --ease: cubic-bezier(.2,.8,.2,1); --ease-spring: cubic-bezier(.34,1.56,.64,1);
  --dur-1:120ms; --dur-2:200ms; --dur-3:320ms;

  /* Semânticos — tema claro */
  --bg: var(--ink-50);
  --bg-elevated: var(--ink-0);
  --bg-subtle: var(--ink-25);
  --bg-muted: var(--ink-100);
  --bg-inset: var(--ink-100);
  --surface-glass: rgba(255,255,255,.72);
  --border: var(--ink-200);
  --border-strong: var(--ink-300);
  --text: var(--ink-900);
  --text-muted: var(--ink-600);
  --text-subtle: var(--ink-500);
  --text-inverse: #fff;
  --primary: var(--violet-500);
  --primary-hover: var(--violet-600);
  --primary-soft: var(--violet-50);
  --primary-soft-text: var(--violet-700);
  --accent: var(--coral-500);
  --focus-ring: 0 0 0 3px rgba(108,59,255,.28);
  --shadow-xs: 0 1px 2px rgba(26,21,48,.06);
  --shadow-sm: 0 1px 2px rgba(26,21,48,.05), 0 2px 8px rgba(26,21,48,.05);
  --shadow-md: 0 4px 12px rgba(26,21,48,.06), 0 12px 32px -8px rgba(60,30,140,.12);
  --shadow-lg: 0 12px 28px -6px rgba(26,21,48,.12), 0 30px 60px -12px rgba(60,30,140,.22);
  --shadow-glow: 0 10px 30px -8px rgba(108,59,255,.55);
  --sidebar-bg: #120D24;
  --sidebar-text: #CFC8E8;
  --sidebar-muted: #8C84AB;
  --sidebar-hover: rgba(255,255,255,.06);
  --sidebar-active: rgba(140,100,255,.18);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:#0D0A1A; --bg-elevated:#161229; --bg-subtle:#130F24; --bg-muted:#1E1936; --bg-inset:#0F0B1F;
    --surface-glass: rgba(22,18,41,.72);
    --border:#2A2444; --border-strong:#3A3359;
    --text:#EFECFA; --text-muted:#B4ADCF; --text-subtle:#8C84AB;
    --primary:#8E5DFF; --primary-hover:#A47BFF; --primary-soft:rgba(142,93,255,.16); --primary-soft-text:#C9B3FF;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow-md: 0 8px 24px rgba(0,0,0,.35); --shadow-lg: 0 24px 60px rgba(0,0,0,.5);
    --sidebar-bg:#0A0716;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg:#0D0A1A; --bg-elevated:#161229; --bg-subtle:#130F24; --bg-muted:#1E1936; --bg-inset:#0F0B1F;
  --surface-glass: rgba(22,18,41,.72);
  --border:#2A2444; --border-strong:#3A3359;
  --text:#EFECFA; --text-muted:#B4ADCF; --text-subtle:#8C84AB;
  --primary:#8E5DFF; --primary-hover:#A47BFF; --primary-soft:rgba(142,93,255,.16); --primary-soft-text:#C9B3FF;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow-md: 0 8px 24px rgba(0,0,0,.35); --shadow-lg: 0 24px 60px rgba(0,0,0,.5);
  --sidebar-bg:#0A0716;
  color-scheme: dark;
}

/* ---------- 2. BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 var(--text-base)/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
}
h1,h2,h3,h4,h5 { font-family: var(--font-display); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.02em; font-weight: 700; }
h1 { font-size: var(--text-3xl); } h2 { font-size: var(--text-2xl); } h3 { font-size: var(--text-xl); } h4 { font-size: var(--text-lg); } h5 { font-size: var(--text-md); }
p { margin: 0 0 1em; }
a { color: var(--primary); text-decoration: none; transition: color var(--dur-1) var(--ease); }
a:hover { color: var(--primary-hover); }
img { max-width: 100%; display: block; }
code, kbd, pre { font-family: var(--font-mono); font-size: .875em; }
code { background: var(--bg-muted); padding: .12em .4em; border-radius: var(--r-xs); }
pre { background: var(--ink-950); color: #E7E2FF; padding: var(--sp-4); border-radius: var(--r-md); overflow: auto; line-height: 1.6; }
pre code { background: none; padding: 0; color: inherit; }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--sp-6) 0; }
::selection { background: rgba(108,59,255,.22); }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--r-sm); }
.ico { width: 18px; height: 18px; stroke-width: 2; flex-shrink: 0; vertical-align: middle; }
svg.ico, i.ico { display: inline-block; }

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

/* ---------- 3. LAYOUT (App Shell) ---------- */
.app { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.app.is-collapsed { grid-template-columns: 76px 1fr; }

.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--sidebar-bg); color: var(--sidebar-text);
  display: flex; flex-direction: column; padding: var(--sp-4) var(--sp-3);
  background-image: radial-gradient(120% 40% at 0% 0%, rgba(108,59,255,.28) 0%, transparent 60%), radial-gradient(80% 30% at 100% 100%, rgba(255,92,138,.14) 0%, transparent 60%);
  z-index: 30;
}
.sidebar__brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 18px; color: #fff; }
.sidebar__brand:hover { color: #fff; }
.sidebar__logo { width: 34px; height: 34px; border-radius: 11px; background: var(--grad-aurora); display: grid; place-items: center; box-shadow: var(--shadow-glow); flex-shrink: 0; }
.sidebar__logo svg { width: 20px; height: 20px; }
.sidebar__name { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: -.02em; }
.sidebar__tenant { margin: 0 4px 14px; padding: 10px 12px; border-radius: var(--r-md); background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.07); display: flex; align-items: center; gap: 10px; font-size: var(--text-sm); }
.sidebar__tenant small { display: block; color: var(--sidebar-muted); font-size: 11px; }
.sidebar__group { margin-top: 14px; }
.sidebar__label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--sidebar-muted); padding: 0 12px 6px; font-weight: 600; }
.sidebar__link {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; color: var(--sidebar-text);
  font-size: var(--text-sm); font-weight: 500; position: relative; transition: background var(--dur-1), color var(--dur-1);
}
.sidebar__link:hover { background: var(--sidebar-hover); color: #fff; }
.sidebar__link.is-active { background: var(--sidebar-active); color: #fff; }
.sidebar__link.is-active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--grad-aurora); }
.sidebar__link .ico { width: 18px; height: 18px; opacity: .9; }
.sidebar__badge { margin-left: auto; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: var(--r-full); background: var(--coral-500); color: #fff; }
.sidebar__footer { margin-top: auto; padding-top: var(--sp-4); }
.app.is-collapsed .sidebar__name, .app.is-collapsed .sidebar__label, .app.is-collapsed .sidebar__link span, .app.is-collapsed .sidebar__tenant div, .app.is-collapsed .sidebar__badge { display: none; }
.app.is-collapsed .sidebar__link { justify-content: center; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: 64px; display: flex; align-items: center; gap: var(--sp-3);
  padding: 0 var(--sp-6); background: var(--surface-glass); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar__search {
  flex: 1; max-width: 520px; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px;
  background: var(--bg-muted); border: 1px solid transparent; border-radius: var(--r-md); color: var(--text-subtle); cursor: text; font-size: var(--text-sm);
  transition: border-color var(--dur-1), background var(--dur-1);
}
.topbar__search:hover { border-color: var(--border-strong); }
.topbar__search kbd { margin-left: auto; }
.topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.content { padding: var(--sp-8) var(--sp-8) var(--sp-16); width: 100%; max-width: 1480px; margin: 0 auto; }
.content--full { max-width: none; padding: 0; }

.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-6); flex-wrap: wrap; }
.page-header h1 { font-size: var(--text-2xl); margin: 0; }
.page-header p { margin: 4px 0 0; color: var(--text-muted); }
.page-header__actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.eyebrow { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .12em; font-weight: 700; color: var(--primary); margin-bottom: 6px; display: inline-flex; gap: 6px; align-items: center; }

.grid { display: grid; gap: var(--sp-5); }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid-sidebar { grid-template-columns: minmax(0,1fr) 340px; }
.grid-sidebar-left { grid-template-columns: 280px minmax(0,1fr); }
.stack { display: flex; flex-direction: column; gap: var(--sp-4); }
.stack-sm { display: flex; flex-direction: column; gap: var(--sp-2); }
.row { display: flex; align-items: center; gap: var(--sp-3); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.wrap { flex-wrap: wrap; }

/* ---------- 4. COMPONENTES ---------- */

/* Botões */
.btn {
  --btn-bg: var(--bg-elevated); --btn-fg: var(--text); --btn-bd: var(--border);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: var(--r-md); border: 1px solid var(--btn-bd); background: var(--btn-bg); color: var(--btn-fg);
  font: 600 var(--text-sm)/1 var(--font-body); cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: transform var(--dur-1) var(--ease), box-shadow var(--dur-2) var(--ease), background var(--dur-1), border-color var(--dur-1), color var(--dur-1);
  box-shadow: var(--shadow-xs); user-select: none;
}
.btn:hover { border-color: var(--border-strong); color: var(--btn-fg); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }
.btn .ico { width: 16px; height: 16px; }
.btn--primary { --btn-bg: var(--primary); --btn-fg: #fff; --btn-bd: transparent; box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 6px 16px -6px rgba(108,59,255,.6); }
.btn--primary:hover { --btn-bg: var(--primary-hover); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 10px 22px -6px rgba(108,59,255,.7); }
.btn--aurora { --btn-fg: #fff; --btn-bd: transparent; background: var(--grad-aurora); background-size: 160% 160%; box-shadow: var(--shadow-glow); }
.btn--aurora:hover { color: #fff; background-position: 100% 0; }
.btn--soft { --btn-bg: var(--primary-soft); --btn-fg: var(--primary-soft-text); --btn-bd: transparent; box-shadow: none; }
.btn--ghost { --btn-bg: transparent; --btn-bd: transparent; box-shadow: none; --btn-fg: var(--text-muted); }
.btn--ghost:hover { background: var(--bg-muted); color: var(--text); }
.btn--danger { --btn-bg: var(--red-500); --btn-fg: #fff; --btn-bd: transparent; }
.btn--danger:hover { --btn-bg: var(--red-600); color: #fff; }
.btn--success { --btn-bg: var(--mint-500); --btn-fg: #fff; --btn-bd: transparent; }
.btn--sm { height: 32px; padding: 0 12px; font-size: var(--text-xs); border-radius: 10px; }
.btn--lg { height: 48px; padding: 0 22px; font-size: var(--text-md); border-radius: var(--r-lg); }
.btn--icon { width: 40px; padding: 0; }
.btn--icon.btn--sm { width: 32px; }
.btn--block { width: 100%; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; }
.btn-group .btn:first-child { border-radius: var(--r-md) 0 0 var(--r-md); }
.btn-group .btn:last-child { border-radius: 0 var(--r-md) var(--r-md) 0; }
.btn-group .btn + .btn { margin-left: -1px; }
.btn.is-loading { color: transparent !important; position: relative; pointer-events: none; }
.btn.is-loading::after { content: ""; position: absolute; width: 16px; height: 16px; border: 2px solid currentColor; border-color: #fff #fff transparent transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.btn:not(.btn--primary):not(.btn--aurora):not(.btn--danger).is-loading::after { border-color: var(--primary) var(--primary) transparent transparent; }

/* Formulários */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--sp-4); }
.field > label, .label { font-size: var(--text-sm); font-weight: 600; color: var(--text); }
.field .help, .help { font-size: var(--text-xs); color: var(--text-subtle); }
.field .error { font-size: var(--text-xs); color: var(--red-600); }
.input, .select, .textarea {
  width: 100%; height: 42px; padding: 0 14px; border-radius: var(--r-md); border: 1px solid var(--border);
  background: var(--bg-elevated); color: var(--text); font: 400 var(--text-base) var(--font-body);
  transition: border-color var(--dur-1), box-shadow var(--dur-2);
}
.textarea { height: auto; min-height: 110px; padding: 12px 14px; resize: vertical; line-height: 1.55; }
.input::placeholder, .textarea::placeholder { color: var(--text-subtle); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--border-strong); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--focus-ring); }
.select { appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%237D7597' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.input--sm, .select--sm { height: 34px; font-size: var(--text-sm); border-radius: 10px; }
.input-group { display: flex; align-items: center; position: relative; }
.input-group > .ico { position: absolute; left: 13px; color: var(--text-subtle); pointer-events: none; }
.input-group > .input { padding-left: 40px; }
.checkbox, .radio { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: var(--text-sm); }
.checkbox input, .radio input { width: 18px; height: 18px; accent-color: var(--primary); }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: var(--text-sm); }
.switch input { appearance: none; width: 40px; height: 23px; border-radius: 99px; background: var(--ink-300); position: relative; cursor: pointer; transition: background var(--dur-2); margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform var(--dur-2) var(--ease-spring); }
.switch input:checked { background: var(--primary); }
.switch input:checked::after { transform: translateX(17px); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 var(--sp-4); }
.form-grid .span-2 { grid-column: span 2; }
.form-actions { display: flex; gap: var(--sp-2); justify-content: flex-end; padding-top: var(--sp-4); border-top: 1px solid var(--border); margin-top: var(--sp-2); }

/* Cards */
.card { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-sm); min-width: 0; }
.card__header { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-5) var(--sp-6) 0; }
.card__header h3, .card__title { font-size: var(--text-md); margin: 0; font-weight: 700; font-family: var(--font-display); }
.card__header p { margin: 2px 0 0; font-size: var(--text-sm); color: var(--text-muted); }
.card__body { padding: var(--sp-5) var(--sp-6); }
.card__footer { padding: var(--sp-4) var(--sp-6); border-top: 1px solid var(--border); background: var(--bg-subtle); border-radius: 0 0 var(--r-xl) var(--r-xl); }
.card--flush .card__body { padding: 0; }
.card--hover { transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease), border-color var(--dur-2); }
.card--hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--violet-200); }
.card--aurora { position: relative; border: none; background: var(--grad-aurora); color: #fff; overflow: hidden; }
.card--aurora::after { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 80% at 100% 0%, rgba(255,255,255,.25), transparent 60%); pointer-events: none; }
.card--aurora .text-muted { color: rgba(255,255,255,.8) !important; }
.card--glow { background-image: var(--grad-glow); }

/* KPI / Stat */
.stat { padding: var(--sp-5) var(--sp-6); display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden; }
.stat__label { font-size: var(--text-sm); color: var(--text-muted); font-weight: 500; display: flex; align-items: center; gap: 8px; }
.stat__value { font-family: var(--font-display); font-size: 2rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.stat__delta { font-size: var(--text-xs); font-weight: 600; display: inline-flex; align-items: center; gap: 3px; }
.stat__delta.up { color: var(--mint-600); } .stat__delta.down { color: var(--red-600); }
.stat__icon { position: absolute; right: 18px; top: 18px; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.stat__icon.coral { background: var(--coral-50); color: var(--coral-600); }
.stat__icon.mint { background: var(--mint-50); color: var(--mint-600); }
.stat__icon.amber { background: var(--amber-50); color: var(--amber-700); }
.stat__icon.sky { background: var(--sky-50); color: var(--sky-600); }
.stat__spark { height: 36px; margin-top: 4px; }

/* Badges / Pills / Tags */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: var(--r-full); font-size: 11.5px; font-weight: 600; white-space: nowrap; background: var(--bg-muted); color: var(--text-muted); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--violet, .badge--primary { background: var(--violet-50); color: var(--violet-700); }
.badge--coral { background: var(--coral-50); color: var(--coral-700); }
.badge--amber, .badge--warning { background: var(--amber-50); color: var(--amber-700); }
.badge--mint, .badge--success { background: var(--mint-50); color: var(--mint-700); }
.badge--sky, .badge--info { background: var(--sky-50); color: var(--sky-700); }
.badge--red, .badge--danger { background: var(--red-50); color: var(--red-700); }
.badge--dark { background: var(--ink-900); color: #fff; }
.badge--outline { background: transparent; border: 1px solid var(--border-strong); }
.badge--aurora { background: var(--grad-aurora); color: #fff; }
:root[data-theme="dark"] .badge--violet, :root[data-theme="dark"] .badge--primary { background: rgba(142,93,255,.18); color: #CDB9FF; }
:root[data-theme="dark"] .badge--coral { background: rgba(255,92,138,.16); color: #FF94B2; }
:root[data-theme="dark"] .badge--amber, :root[data-theme="dark"] .badge--warning { background: rgba(255,181,71,.15); color: #FFC86E; }
:root[data-theme="dark"] .badge--mint, :root[data-theme="dark"] .badge--success { background: rgba(34,197,154,.15); color: #5EE0B9; }
:root[data-theme="dark"] .badge--sky, :root[data-theme="dark"] .badge--info { background: rgba(61,139,255,.16); color: #8BB9FF; }
:root[data-theme="dark"] .badge--red, :root[data-theme="dark"] .badge--danger { background: rgba(240,68,91,.16); color: #FF8A9A; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--r-xs); font-size: 12px; background: var(--bg-muted); color: var(--text-muted); border: 1px solid var(--border); }

/* Avatares */
.avatar { --size: 32px; width: var(--size); height: var(--size); border-radius: 50%; display: inline-grid; place-items: center; flex-shrink: 0; font-size: calc(var(--size) * .38); font-weight: 700; color: #fff; background: hsl(var(--hue, 262) 70% 58%); overflow: hidden; position: relative; font-family: var(--font-display); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--xs { --size: 22px; } .avatar--sm { --size: 28px; } .avatar--lg { --size: 44px; } .avatar--xl { --size: 64px; }
.avatar--square { border-radius: 30%; }
.avatar__status { position: absolute; right: -1px; bottom: -1px; width: 30%; height: 30%; border-radius: 50%; border: 2px solid var(--bg-elevated); background: var(--ink-400); }
.avatar__status.online { background: var(--mint-500); } .avatar__status.away { background: var(--amber-500); }
.avatar-stack { display: inline-flex; } .avatar-stack .avatar { border: 2px solid var(--bg-elevated); margin-left: -8px; } .avatar-stack .avatar:first-child { margin-left: 0; }

/* Tabelas */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--text-sm); }
.table th { text-align: left; font-weight: 600; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-subtle); padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--bg-subtle); white-space: nowrap; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background var(--dur-1); }
.table tbody tr:hover { background: var(--bg-subtle); }
.table tr.is-clickable { cursor: pointer; }
.table .cell-main { font-weight: 600; color: var(--text); }
.table .cell-sub { font-size: var(--text-xs); color: var(--text-subtle); }
.card > .table-wrap .table th:first-child { border-top-left-radius: var(--r-xl); }
.card > .table-wrap .table th:last-child { border-top-right-radius: var(--r-xl); }

/* Tabs e segmentado */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: var(--sp-5); overflow-x: auto; }
.tab { padding: 10px 14px; font-size: var(--text-sm); font-weight: 600; color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 7px; align-items: center; background: none; border-top: 0; border-left: 0; border-right: 0; cursor: pointer; }
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--primary); border-bottom-color: var(--primary); }
.tab .count { font-size: 11px; padding: 0 7px; border-radius: 99px; background: var(--bg-muted); color: var(--text-muted); }
.tab-panel { display: none; } .tab-panel.is-active { display: block; animation: fadeUp var(--dur-3) var(--ease); }
.segmented { display: inline-flex; padding: 3px; background: var(--bg-muted); border-radius: var(--r-md); gap: 2px; }
.segmented a, .segmented button { padding: 6px 12px; border-radius: 9px; font-size: var(--text-sm); font-weight: 600; color: var(--text-muted); border: 0; background: none; cursor: pointer; }
.segmented .is-active { background: var(--bg-elevated); color: var(--text); box-shadow: var(--shadow-sm); }

/* Dropdown */
.dropdown { position: relative; display: inline-block; }
.dropdown__menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; padding: 6px; z-index: 50;
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.98); transform-origin: top right; transition: all var(--dur-2) var(--ease);
}
.dropdown__menu--left { right: auto; left: 0; transform-origin: top left; }
.dropdown.is-open .dropdown__menu { opacity: 1; visibility: visible; transform: none; }
.dropdown__item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 11px; border-radius: 9px; font-size: var(--text-sm); color: var(--text); background: none; border: 0; cursor: pointer; text-align: left; }
.dropdown__item:hover { background: var(--bg-muted); color: var(--text); }
.dropdown__item .ico { width: 16px; height: 16px; color: var(--text-subtle); }
.dropdown__item--danger { color: var(--red-600); } .dropdown__item--danger .ico { color: var(--red-500); }
.dropdown__divider { height: 1px; background: var(--border); margin: 6px 0; }
.dropdown__header { padding: 8px 11px; font-size: var(--text-xs); color: var(--text-subtle); }

/* Modal e Drawer */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15,11,31,.55); backdrop-filter: blur(4px); z-index: 90; display: none; align-items: flex-start; justify-content: center; padding: 8vh 16px 16px; overflow-y: auto; }
.modal-backdrop.is-open { display: flex; animation: fade var(--dur-2) var(--ease); }
.modal { width: 100%; max-width: 560px; background: var(--bg-elevated); border-radius: var(--r-2xl); box-shadow: var(--shadow-lg); animation: popIn var(--dur-3) var(--ease-spring); border: 1px solid var(--border); }
.modal--lg { max-width: 820px; } .modal--sm { max-width: 420px; }
.modal__header { padding: var(--sp-6) var(--sp-6) 0; display: flex; justify-content: space-between; align-items: flex-start; gap: var(--sp-4); }
.modal__header h3 { margin: 0; font-size: var(--text-lg); }
.modal__body { padding: var(--sp-5) var(--sp-6); }
.modal__footer { padding: var(--sp-4) var(--sp-6) var(--sp-6); display: flex; justify-content: flex-end; gap: var(--sp-2); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 100vw); background: var(--bg-elevated); z-index: 95; box-shadow: var(--shadow-lg); transform: translateX(100%); transition: transform var(--dur-3) var(--ease); display: flex; flex-direction: column; border-left: 1px solid var(--border); }
.drawer.is-open { transform: none; }

/* Toasts */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 120; display: flex; flex-direction: column; gap: 10px; max-width: 380px; }
.toast { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-lg); background: var(--ink-900); color: #fff; box-shadow: var(--shadow-lg); animation: slideIn var(--dur-3) var(--ease-spring); font-size: var(--text-sm); }
.toast .ico { margin-top: 1px; }
.toast--success .ico { color: var(--mint-500); } .toast--error .ico { color: var(--coral-500); } .toast--warning .ico { color: var(--amber-500); } .toast--info .ico { color: var(--violet-300); }
.toast.is-leaving { animation: slideOut var(--dur-2) var(--ease) forwards; }

/* Alertas / Callouts */
.alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r-lg); font-size: var(--text-sm); border: 1px solid; margin-bottom: var(--sp-4); }
.alert .ico { margin-top: 1px; }
.alert--info { background: var(--sky-50); border-color: var(--sky-100); color: var(--sky-700); }
.alert--success { background: var(--mint-50); border-color: var(--mint-100); color: var(--mint-700); }
.alert--warning { background: var(--amber-50); border-color: var(--amber-100); color: var(--amber-700); }
.alert--error, .alert--danger { background: var(--red-50); border-color: var(--red-100); color: var(--red-700); }
:root[data-theme="dark"] .alert { background: var(--bg-muted); border-color: var(--border); }

/* Lumi (IA) — painel com borda viva */
.lumi { position: relative; border-radius: var(--r-xl); padding: 1px; background: var(--grad-aurora); background-size: 200% 200%; animation: aurora 8s ease infinite; }
.lumi__inner { background: var(--bg-elevated); border-radius: calc(var(--r-xl) - 1px); padding: var(--sp-5); }
.lumi__head { display: flex; align-items: center; gap: 10px; margin-bottom: var(--sp-3); }
.lumi__orb { width: 30px; height: 30px; border-radius: 50%; background: var(--grad-aurora); box-shadow: 0 0 0 4px rgba(108,59,255,.12), var(--shadow-glow); display: grid; place-items: center; color: #fff; animation: breathe 3.2s ease-in-out infinite; }
.lumi__orb .ico { width: 16px; height: 16px; }
.lumi__title { font-weight: 700; font-family: var(--font-display); font-size: var(--text-sm); }
.lumi__sub { font-size: var(--text-xs); color: var(--text-subtle); }
.lumi-text { background: var(--grad-aurora); -webkit-background-clip: text; background-clip: text; color: transparent; }
.typing { display: inline-flex; gap: 4px; } .typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); animation: bounce 1.2s infinite; } .typing span:nth-child(2) { animation-delay: .15s; } .typing span:nth-child(3) { animation-delay: .3s; }

/* Progresso e medidores */
.progress { height: 8px; border-radius: 99px; background: var(--bg-muted); overflow: hidden; }
.progress__bar { height: 100%; border-radius: 99px; background: var(--grad-aurora); transition: width var(--dur-3) var(--ease); }
.progress--mint .progress__bar { background: var(--grad-mint); } .progress--sm { height: 5px; }
.gauge { --value: 70; --color: var(--mint-500); --size: 120px; width: var(--size); height: var(--size); border-radius: 50%; display: grid; place-items: center; position: relative;
  background: conic-gradient(var(--color) calc(var(--value) * 1%), var(--bg-muted) 0); }
.gauge::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: var(--bg-elevated); }
.gauge__value { position: relative; text-align: center; font-family: var(--font-display); font-weight: 700; font-size: calc(var(--size) * .26); line-height: 1; }
.gauge__value small { display: block; font-size: 11px; font-weight: 600; color: var(--text-subtle); font-family: var(--font-body); margin-top: 4px; }
.gauge--sm { --size: 48px; } .gauge--sm::before { inset: 5px; } .gauge--sm .gauge__value { font-size: 13px; }
.health { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: var(--text-sm); }
.health::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--ink-400); box-shadow: 0 0 0 3px rgba(125,117,151,.15); }
.health--healthy::before { background: var(--mint-500); box-shadow: 0 0 0 3px rgba(34,197,154,.18); }
.health--neutral::before { background: var(--amber-500); box-shadow: 0 0 0 3px rgba(255,181,71,.2); }
.health--at_risk::before { background: var(--coral-500); box-shadow: 0 0 0 3px rgba(255,92,138,.2); }
.health--critical::before { background: var(--red-600); box-shadow: 0 0 0 3px rgba(215,44,68,.22); }

/* Timeline */
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--border), transparent); }
.timeline__item { position: relative; padding-bottom: var(--sp-5); }
.timeline__dot { position: absolute; left: -28px; top: 1px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-elevated); border: 2px solid var(--border); color: var(--text-subtle); }
.timeline__dot .ico { width: 12px; height: 12px; }
.timeline__dot.violet { border-color: var(--violet-300); color: var(--violet-500); } .timeline__dot.coral { border-color: var(--coral-300); color: var(--coral-500); } .timeline__dot.mint { border-color: var(--mint-500); color: var(--mint-600); } .timeline__dot.amber { border-color: var(--amber-500); color: var(--amber-700); }
.timeline__title { font-weight: 600; font-size: var(--text-sm); }
.timeline__meta { font-size: var(--text-xs); color: var(--text-subtle); }
.timeline__body { margin-top: 6px; font-size: var(--text-sm); color: var(--text-muted); }

/* Kanban */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 1fr); gap: var(--sp-4); overflow-x: auto; padding-bottom: var(--sp-4); align-items: start; }
.kanban__col { background: var(--bg-muted); border-radius: var(--r-xl); padding: var(--sp-3); min-height: 200px; }
.kanban__head { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 12px; font-weight: 700; font-size: var(--text-sm); }
.kanban__cards { display: flex; flex-direction: column; gap: 10px; min-height: 60px; }
.kanban__card { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 12px 14px; box-shadow: var(--shadow-xs); cursor: grab; transition: box-shadow var(--dur-2), transform var(--dur-2); }
.kanban__card:hover { box-shadow: var(--shadow-md); }
.kanban__card.is-dragging { opacity: .5; transform: rotate(2deg); }
.kanban__col.is-over { outline: 2px dashed var(--primary); outline-offset: -4px; }

/* Conversa (tickets/chat) */
.thread { display: flex; flex-direction: column; gap: var(--sp-4); }
.msg { display: flex; gap: 12px; }
.msg__bubble { flex: 1; min-width: 0; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 4px var(--r-lg) var(--r-lg) var(--r-lg); padding: 14px 16px; }
.msg__head { display: flex; align-items: center; gap: 8px; font-size: var(--text-sm); margin-bottom: 6px; flex-wrap: wrap; }
.msg__head strong { font-weight: 600; } .msg__head time { color: var(--text-subtle); font-size: var(--text-xs); }
.msg__body { font-size: var(--text-base); line-height: 1.65; overflow-wrap: anywhere; }
.msg__body p:last-child { margin-bottom: 0; }
.msg--agent .msg__bubble { background: var(--primary-soft); border-color: transparent; }
.msg--note .msg__bubble { background: var(--amber-50); border-color: var(--amber-100); border-style: dashed; }
:root[data-theme="dark"] .msg--note .msg__bubble { background: rgba(255,181,71,.08); border-color: rgba(255,181,71,.3); }
.msg--ai .msg__bubble { background: linear-gradient(var(--bg-elevated), var(--bg-elevated)) padding-box, var(--grad-aurora) border-box; border: 1px solid transparent; }
.msg--system { justify-content: center; font-size: var(--text-xs); color: var(--text-subtle); }
.chat-bubble { max-width: 78%; padding: 10px 14px; border-radius: 18px; font-size: var(--text-sm); line-height: 1.5; }
.chat-bubble--in { background: var(--bg-muted); border-bottom-left-radius: 6px; align-self: flex-start; }
.chat-bubble--out { background: var(--primary); color: #fff; border-bottom-right-radius: 6px; align-self: flex-end; }

/* Composer */
.composer { border: 1px solid var(--border); border-radius: var(--r-xl); background: var(--bg-elevated); box-shadow: var(--shadow-sm); overflow: hidden; transition: border-color var(--dur-1), box-shadow var(--dur-2); }
.composer:focus-within { border-color: var(--primary); box-shadow: var(--focus-ring); }
.composer__tabs { display: flex; gap: 2px; padding: 6px 8px 0; border-bottom: 1px solid var(--border); background: var(--bg-subtle); }
.composer__tabs button { border: 0; background: none; padding: 8px 12px; font-size: var(--text-sm); font-weight: 600; color: var(--text-muted); border-bottom: 2px solid transparent; cursor: pointer; }
.composer__tabs button.is-active { color: var(--primary); border-color: var(--primary); }
.composer__tabs button[data-mode="note"].is-active { color: var(--amber-700); border-color: var(--amber-500); }
.composer textarea { border: 0; width: 100%; min-height: 120px; padding: 14px 16px; resize: vertical; background: transparent; color: var(--text); font: 400 var(--text-base)/1.6 var(--font-body); }
.composer textarea:focus { outline: none; }
.composer__bar { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--border); background: var(--bg-subtle); flex-wrap: wrap; }

/* Estado vazio */
.empty { text-align: center; padding: var(--sp-12) var(--sp-6); color: var(--text-muted); }
.empty__art { width: 76px; height: 76px; margin: 0 auto var(--sp-4); border-radius: 24px; display: grid; place-items: center; background: var(--grad-glow), var(--primary-soft); color: var(--primary); }
.empty__art .ico { width: 32px; height: 32px; }
.empty h3 { color: var(--text); font-size: var(--text-lg); }
.empty p { max-width: 420px; margin: 0 auto var(--sp-5); }

/* Lista */
.list { display: flex; flex-direction: column; }
.list__item { display: flex; align-items: center; gap: 12px; padding: 12px var(--sp-6); border-bottom: 1px solid var(--border); color: var(--text); }
.list__item:last-child { border-bottom: 0; }
a.list__item:hover { background: var(--bg-subtle); color: var(--text); }
.list__main { flex: 1; min-width: 0; }
.list__title { font-weight: 600; font-size: var(--text-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list__sub { font-size: var(--text-xs); color: var(--text-subtle); }

/* Stepper (jornadas/onboarding) */
.stepper { display: flex; gap: 0; counter-reset: step; }
.step { flex: 1; position: relative; text-align: center; font-size: var(--text-xs); color: var(--text-subtle); font-weight: 600; }
.step::before { counter-increment: step; content: counter(step); width: 30px; height: 30px; margin: 0 auto 8px; display: grid; place-items: center; border-radius: 50%; background: var(--bg-muted); color: var(--text-muted); font-size: 13px; position: relative; z-index: 1; border: 2px solid var(--bg-elevated); }
.step::after { content: ""; position: absolute; top: 15px; left: calc(-50% + 15px); right: calc(50% + 15px); height: 2px; background: var(--border); }
.step:first-child::after { display: none; }
.step.is-done::before { content: "✓"; background: var(--mint-500); color: #fff; }
.step.is-done::after, .step.is-current::after { background: var(--grad-aurora); }
.step.is-current::before { background: var(--primary); color: #fff; box-shadow: 0 0 0 4px var(--primary-soft); }
.step.is-current { color: var(--text); }

/* Funil 5A (Kotler) */
.path5a { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.path5a__stage { padding: 14px 12px; border-radius: var(--r-md); background: var(--bg-muted); position: relative; text-align: center; }
.path5a__stage strong { display: block; font-family: var(--font-display); font-size: var(--text-xl); }
.path5a__stage span { font-size: var(--text-xs); color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.path5a__stage:nth-child(1) { background: var(--sky-50); } .path5a__stage:nth-child(2) { background: var(--violet-50); } .path5a__stage:nth-child(3) { background: #F6EBFF; } .path5a__stage:nth-child(4) { background: var(--coral-50); } .path5a__stage:nth-child(5) { background: var(--amber-50); }
:root[data-theme="dark"] .path5a__stage { background: var(--bg-muted) !important; }

/* Command palette */
.cmdk { position: fixed; inset: 0; z-index: 130; display: none; align-items: flex-start; justify-content: center; padding-top: 12vh; background: rgba(15,11,31,.5); backdrop-filter: blur(6px); }
.cmdk.is-open { display: flex; animation: fade var(--dur-2); }
.cmdk__box { width: min(640px, 92vw); background: var(--bg-elevated); border-radius: var(--r-2xl); box-shadow: var(--shadow-lg); overflow: hidden; border: 1px solid var(--border); animation: popIn var(--dur-3) var(--ease-spring); }
.cmdk__input { width: 100%; border: 0; border-bottom: 1px solid var(--border); padding: 20px 22px; font-size: var(--text-lg); background: transparent; color: var(--text); }
.cmdk__input:focus { outline: none; }
.cmdk__list { max-height: 52vh; overflow-y: auto; padding: 8px; }
.cmdk__item { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: var(--r-md); color: var(--text); font-size: var(--text-sm); }
.cmdk__item.is-active, .cmdk__item:hover { background: var(--primary-soft); color: var(--primary-soft-text); }
.cmdk__group { padding: 10px 14px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-subtle); font-weight: 700; }
kbd, .kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 6px; border: 1px solid var(--border); border-bottom-width: 2px; background: var(--bg-elevated); font-size: 11px; color: var(--text-muted); font-family: var(--font-body); font-weight: 600; }

/* Paginação, breadcrumb */
.pagination { display: flex; gap: 4px; align-items: center; justify-content: flex-end; padding: var(--sp-4) var(--sp-6); }
.pagination a, .pagination span { min-width: 34px; height: 34px; display: inline-grid; place-items: center; padding: 0 10px; border-radius: 10px; font-size: var(--text-sm); color: var(--text-muted); font-weight: 600; }
.pagination a:hover { background: var(--bg-muted); color: var(--text); }
.pagination .is-active { background: var(--primary); color: #fff; }
.breadcrumb { display: flex; gap: 8px; align-items: center; font-size: var(--text-sm); color: var(--text-subtle); margin-bottom: 8px; }
.breadcrumb a { color: var(--text-muted); } .breadcrumb a:hover { color: var(--primary); }

/* Tooltip */
[data-tip] { position: relative; }
[data-tip]:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: var(--ink-900); color: #fff; font-size: 12px; padding: 6px 9px; border-radius: 8px; white-space: nowrap; z-index: 60; pointer-events: none; animation: fade var(--dur-1); font-weight: 500; }

/* Skeleton */
.skeleton { background: linear-gradient(90deg, var(--bg-muted) 25%, var(--bg-subtle) 37%, var(--bg-muted) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: var(--r-sm); height: 14px; }

/* Definição (detalhes) */
.dl { display: grid; grid-template-columns: 140px 1fr; gap: 10px 16px; font-size: var(--text-sm); margin: 0; }
.dl dt { color: var(--text-subtle); } .dl dd { margin: 0; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }

/* Rich content (artigos da base) */
.prose { font-size: 1rem; line-height: 1.75; color: var(--text); max-width: 760px; }
.prose h2 { font-size: var(--text-xl); margin-top: 1.8em; } .prose h3 { font-size: var(--text-lg); margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.3em; } .prose li { margin: .35em 0; }
.prose img { border-radius: var(--r-lg); margin: 1em 0; }
.prose blockquote { margin: 1em 0; padding: 12px 18px; border-left: 3px solid var(--primary); background: var(--primary-soft); border-radius: 0 var(--r-md) var(--r-md) 0; }
.prose table { width: 100%; border-collapse: collapse; } .prose th, .prose td { border: 1px solid var(--border); padding: 8px 10px; }

/* Auth / páginas públicas */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth__art { position: relative; overflow: hidden; background: #120D24; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth__art::before { content: ""; position: absolute; inset: -20%; background: radial-gradient(40% 40% at 20% 20%, rgba(108,59,255,.75), transparent 60%), radial-gradient(35% 35% at 80% 30%, rgba(255,92,138,.55), transparent 60%), radial-gradient(40% 40% at 60% 90%, rgba(255,181,71,.35), transparent 60%); filter: blur(30px); animation: drift 18s ease-in-out infinite alternate; }
.auth__art > * { position: relative; }
.auth__quote { font-family: var(--font-display); font-size: 2.2rem; line-height: 1.15; font-weight: 700; letter-spacing: -.03em; max-width: 520px; }
.auth__form { display: flex; align-items: center; justify-content: center; padding: 48px 24px; background: var(--bg-elevated); }
.auth__card { width: 100%; max-width: 400px; }
.auth__card h1 { font-size: var(--text-2xl); }

/* Utilitários */
.text-muted { color: var(--text-muted) !important; } .text-subtle { color: var(--text-subtle) !important; }
.text-sm { font-size: var(--text-sm); } .text-xs { font-size: var(--text-xs); } .text-lg { font-size: var(--text-lg); }
.text-right { text-align: right; } .text-center { text-align: center; }
.fw-600 { font-weight: 600; } .fw-700 { font-weight: 700; } .font-display { font-family: var(--font-display); }
.text-success { color: var(--mint-600); } .text-danger { color: var(--red-600); } .text-warning { color: var(--amber-700); } .text-primary { color: var(--primary); }
.mt-0 { margin-top: 0 !important; } .mt-2 { margin-top: var(--sp-2); } .mt-4 { margin-top: var(--sp-4); } .mt-6 { margin-top: var(--sp-6); } .mt-8 { margin-top: var(--sp-8); }
.mb-0 { margin-bottom: 0 !important; } .mb-2 { margin-bottom: var(--sp-2); } .mb-4 { margin-bottom: var(--sp-4); } .mb-6 { margin-bottom: var(--sp-6); }
.p-0 { padding: 0 !important; } .w-full { width: 100%; } .hidden { display: none !important; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nowrap { white-space: nowrap; } .flex-1 { flex: 1; min-width: 0; } .gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-4 { gap: 16px; }
.divider-v { width: 1px; align-self: stretch; background: var(--border); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Animações */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes popIn { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes slideIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
@keyframes slideOut { to { opacity: 0; transform: translateX(30px); } }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@keyframes aurora { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes breathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes bounce { 0%,80%,100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-5px); opacity: 1; } }
@keyframes drift { from { transform: translate(0,0) rotate(0); } to { transform: translate(4%, -3%) rotate(8deg); } }
.animate-in > * { animation: fadeUp var(--dur-3) var(--ease) both; }
.animate-in > *:nth-child(2) { animation-delay: 40ms; } .animate-in > *:nth-child(3) { animation-delay: 80ms; } .animate-in > *:nth-child(4) { animation-delay: 120ms; } .animate-in > *:nth-child(5) { animation-delay: 160ms; } .animate-in > *:nth-child(6) { animation-delay: 200ms; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* Responsivo */
@media (max-width: 1200px) { .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .grid-sidebar { grid-template-columns: 1fr; } }
@media (max-width: 960px) {
  .app, .app.is-collapsed { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; width: 280px; transform: translateX(-100%); transition: transform var(--dur-3) var(--ease); }
  .app.is-mobile-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  .grid-2, .grid-3, .grid-sidebar-left { grid-template-columns: 1fr; }
  .content { padding: var(--sp-5) 16px var(--sp-12); }
  .topbar { padding: 0 16px; }
  .auth { grid-template-columns: 1fr; } .auth__art { display: none; }
  .form-grid { grid-template-columns: 1fr; } .form-grid .span-2 { grid-column: auto; }
  .path5a { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) { .grid-4 { grid-template-columns: 1fr; } .dl { grid-template-columns: 1fr; } .topbar__search span, .topbar__search kbd { display: none; } }
@media (min-width: 961px) { .only-mobile { display: none !important; } }
