/* ==========================================================================
   Omnipilot UI — tokens → base → layout → components → auth → utilities
   Brand: Pilot Orange on ink. Display: Space Grotesk. UI text: Inter.
   ========================================================================== */
@font-face { font-family: "Inter"; src: url("../fonts/inter-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("../fonts/space-grotesk-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("../fonts/space-grotesk-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Space Grotesk", "Inter", ui-sans-serif, system-ui, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
  --r-xs: 6px; --r-sm: 8px; --r: 10px; --r-lg: 14px; --r-xl: 20px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --sidebar-w: 260px; --sidebar-w-collapsed: 74px; --topbar-h: 62px;

  /* dark (default) */
  --bg: #0e1013; --bg-2: #121519;
  --surface: #16191e; --surface-2: #1c2026; --surface-3: #262b33;
  --border: rgba(255, 255, 255, .08); --border-strong: rgba(255, 255, 255, .15);
  --text: #f4f2ee; --text-2: #a8adb5; --text-3: #8a9099;
  --brand: #ff6a33; --brand-hover: #ff7e4f; --brand-strong: #ff8a5c; --on-brand: #14161a;
  --brand-soft: rgba(255, 106, 51, .13); --brand-line: rgba(255, 106, 51, .38);
  --teal: #3fbfa8; --teal-soft: rgba(63, 191, 168, .13);
  --ok: #34d399; --ok-soft: rgba(52, 211, 153, .12);
  --warn: #fbbf24; --warn-soft: rgba(251, 191, 36, .12);
  --danger: #f87171; --danger-soft: rgba(248, 113, 113, .12);
  --info: #60a5fa; --info-soft: rgba(96, 165, 250, .12);
  --amber: #fbbf24; --amber-soft: rgba(251, 191, 36, .12);
  --rose: #fb7185; --rose-soft: rgba(251, 113, 133, .12);
  --violet: #a78bfa; --violet-soft: rgba(167, 139, 250, .12);
  --emerald: #34d399; --emerald-soft: rgba(52, 211, 153, .12);
  --muted-soft: rgba(255, 255, 255, .06);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, .55);
  --ring: 0 0 0 3px rgba(255, 106, 51, .35);
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f6f5f2; --bg-2: #efede8;
  --surface: #ffffff; --surface-2: #f6f4f0; --surface-3: #ebe8e2;
  --border: rgba(20, 22, 26, .09); --border-strong: rgba(20, 22, 26, .17);
  --text: #14161a; --text-2: #50555d; --text-3: #6b7078;
  --brand: #ff5a1f; --brand-hover: #f04d12; --brand-strong: #c2410c; --on-brand: #14161a;
  --brand-soft: rgba(255, 90, 31, .10); --brand-line: rgba(255, 90, 31, .4);
  --teal: #0e7c6b; --teal-soft: rgba(14, 124, 107, .10);
  --ok: #047857; --ok-soft: rgba(4, 120, 87, .10);
  --warn: #b45309; --warn-soft: rgba(217, 119, 6, .12);
  --danger: #dc2626; --danger-soft: rgba(220, 38, 38, .09);
  --info: #1d4ed8; --info-soft: rgba(37, 99, 235, .09);
  --amber: #b45309; --amber-soft: rgba(217, 119, 6, .11);
  --rose: #be123c; --rose-soft: rgba(225, 29, 72, .09);
  --violet: #6d28d9; --violet-soft: rgba(109, 40, 217, .09);
  --emerald: #047857; --emerald-soft: rgba(4, 120, 87, .10);
  --muted-soft: rgba(20, 22, 26, .05);
  --shadow-sm: 0 1px 2px rgba(20, 22, 26, .06);
  --shadow: 0 10px 30px rgba(20, 22, 26, .07);
  --shadow-lg: 0 24px 64px rgba(20, 22, 26, .16);
  --ring: 0 0 0 3px rgba(255, 90, 31, .3);
  color-scheme: light;
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 14.5px/1.55 var(--font); -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { color: var(--brand-strong); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
p { margin: 0; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
::selection { background: var(--brand); color: var(--on-brand); }
.ic { flex-shrink: 0; display: inline-block; vertical-align: -2px; }
.sr-only, .hp-field { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); font-size: .92em; }
.muted { color: var(--text-2); }
.subtle { color: var(--text-3); }
.hl { color: var(--brand); }

/* ---------------------------------------------------------------- logo */
.logo-mark { color: var(--text); }
.logo-mark .lm-arrow { fill: var(--brand); stroke: var(--brand); }
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark { display: grid; place-items: center; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 21px; letter-spacing: -.03em; line-height: 1; color: var(--text); }
.brand-sub { font-size: 11.5px; color: var(--text-3); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------------------------------------------------------- app layout */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .25s var(--ease); }
.app.is-collapsed { grid-template-columns: var(--sidebar-w-collapsed) minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--bg-2); border-right: 1px solid var(--border); padding: 18px 12px; overflow: hidden auto; z-index: 40; }
.sidebar-brand { padding: 4px 8px 18px; display: block; }
.sidebar-brand:hover { text-decoration: none; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); padding: 16px 12px 6px; white-space: nowrap; }
.nav-item { position: relative; display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: var(--r); color: var(--text-2); font-weight: 500; white-space: nowrap; transition: background .15s, color .15s; }
.nav-item:hover { background: var(--muted-soft); color: var(--text); text-decoration: none; }
.nav-item.active { background: var(--brand-soft); color: var(--text); }
.nav-item.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.nav-item.active .nav-ic { color: var(--brand); }
.nav-item.is-soon { opacity: .55; cursor: default; }
.nav-item.is-soon:hover { background: none; color: var(--text-2); }
.nav-tag { margin-left: auto; font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: 2px 6px; border-radius: 99px; background: var(--muted-soft); color: var(--text-3); }
.nav-ic { display: grid; place-items: center; flex-shrink: 0; }
.nav-text { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.app.is-collapsed .nav-text, .app.is-collapsed .nav-label, .app.is-collapsed .brand-text, .app.is-collapsed .side-foot-text, .app.is-collapsed .nav-tag { display: none; }
.app.is-collapsed .nav-item { justify-content: center; }
.app.is-collapsed .sidebar-brand { padding-left: 6px; }
.side-foot { padding: 12px 4px 0; }
.secure-chip { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--border); font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 var(--ok); animation: pulse 2.4s infinite; flex-shrink: 0; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .5); } 70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
.scrim { display: none; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; height: var(--topbar-h); display: flex; align-items: center; gap: 14px; padding: 0 24px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--text-3); min-width: 0; overflow: hidden; white-space: nowrap; }
.crumbs a { color: var(--text-2); }
.crumb-cur { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.search-trigger { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px 0 12px; min-width: 250px; border-radius: var(--r); border: 1px solid var(--border); background: var(--surface); color: var(--text-3); cursor: pointer; transition: border-color .15s; }
.search-trigger:hover { border-color: var(--border-strong); color: var(--text-2); }
.st-text { flex: 1; text-align: left; font-size: 13.5px; }
.kbd { font: 600 11px var(--mono); padding: 3px 6px; border-radius: 5px; background: var(--surface-3); color: var(--text-2); border: 1px solid var(--border); }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: var(--r); border: 1px solid transparent; background: none; color: var(--text-2); cursor: pointer; transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--muted-soft); color: var(--text); }
.theme-toggle .ic-sun { display: none; }
[data-theme="light"] .theme-toggle .ic-sun { display: block; }
[data-theme="light"] .theme-toggle .ic-moon { display: none; }
.user-menu { position: relative; }
.user-btn { display: flex; align-items: center; gap: 9px; padding: 4px 10px 4px 4px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; color: var(--text-2); }
.user-btn:hover { border-color: var(--border-strong); }
.u-name { font-weight: 600; font-size: 13.5px; color: var(--text); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--on-brand); font: 700 12px var(--display); letter-spacing: .02em; }
.avatar.lg { width: 56px; height: 56px; font-size: 19px; }
.dropdown { position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; padding: 6px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: .16s var(--ease); z-index: 50; }
.dropdown.open { opacity: 1; visibility: visible; transform: none; }
.dropdown-head { padding: 10px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.dropdown a, .dropdown .dd-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: var(--r-sm); color: var(--text-2); background: none; border: 0; cursor: pointer; text-align: left; font-size: 14px; }
.dropdown a:hover, .dropdown .dd-item:hover { background: var(--muted-soft); color: var(--text); text-decoration: none; }
.dropdown .dd-danger:hover { background: var(--danger-soft); color: var(--danger); }
.content { flex: 1; padding: 28px 28px 40px; max-width: 1440px; width: 100%; margin: 0 auto; }
.footer { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 28px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-3); }

/* ---------------------------------------------------------------- page head / sections */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: 30px; }
.page-head p { color: var(--text-2); margin-top: 6px; max-width: 640px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-strong); margin-bottom: 8px; }
.section-title { font-size: 18px; }

/* ---------------------------------------------------------------- cards & grid */
.card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-head h3 { display: flex; align-items: center; gap: 9px; font-size: 15.5px; }
.card-head .sub { font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-body { padding: 18px 20px; }
.card.hoverable { transition: border-color .2s, transform .2s var(--ease), box-shadow .2s; }
.card.hoverable:hover { border-color: var(--brand-line); transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.card-glow { border-color: var(--brand-line); background: linear-gradient(180deg, var(--brand-soft), transparent 140px), var(--surface); }
.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.items-start { align-items: flex-start; }
.center-x { justify-content: center; }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: 34px 34px 30px; margin-bottom: 20px; background: #14161a; color: #f4f2ee; border: 1px solid rgba(255, 255, 255, .06); }
.hero-inner { position: relative; z-index: 1; max-width: 640px; }
.hero h1 { font-size: 36px; color: #f4f2ee; }
.hero p { color: #b5bac2; margin-top: 8px; font-size: 15.5px; }
.hero .eyebrow { color: #ff8a5c; }
.hero .hl { color: #ff6a33; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.hero .chip { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .1); color: #d6d9de; }
.hero .chip.ok { color: #6ee7b7; }
.hero .chip.warn { color: #fcd34d; }
.orbit-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 99px; font-size: 12.5px; font-weight: 500; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
.chip:hover { text-decoration: none; }
.chip.ok { color: var(--ok); }
.chip.warn { color: var(--warn); }

/* ---------------------------------------------------------------- KPIs & tones */
.kpi { padding: 18px 20px; overflow: hidden; }
.kpi::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--tone, var(--brand)); opacity: .85; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kpi-label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.kpi-value { font: 700 30px/1.15 var(--display); letter-spacing: -.03em; margin-top: 10px; font-variant-numeric: tabular-nums; }
.kpi-foot { font-size: 12.5px; color: var(--text-3); margin-top: 6px; }
.chip-ic { width: 38px; height: 38px; flex-shrink: 0; display: grid; place-items: center; border-radius: var(--r); background: var(--tone-soft, var(--brand-soft)); color: var(--tone, var(--brand)); }
.chip-ic.sm { width: 28px; height: 28px; border-radius: var(--r-sm); }
.tone-brand { --tone: var(--brand); --tone-soft: var(--brand-soft); }
.tone-teal { --tone: var(--teal); --tone-soft: var(--teal-soft); }
.tone-emerald { --tone: var(--emerald); --tone-soft: var(--emerald-soft); }
.tone-amber { --tone: var(--amber); --tone-soft: var(--amber-soft); }
.tone-rose { --tone: var(--rose); --tone-soft: var(--rose-soft); }
.tone-violet { --tone: var(--violet); --tone-soft: var(--violet-soft); }
.tone-danger { --tone: var(--danger); --tone-soft: var(--danger-soft); }
.tone-muted { --tone: var(--text-3); --tone-soft: var(--muted-soft); }

/* ---------------------------------------------------------------- tool cards */
.tool-card { display: flex; flex-direction: column; gap: 16px; padding: 20px; color: var(--text); }
.tool-card h3 { font-size: 17px; }
.tool-card p { color: var(--text-2); font-size: 13.5px; }
.tool-card .t-ic { width: 46px; height: 46px; border-radius: var(--r-lg); }
.tool-card .t-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 14px; border-top: 1px dashed var(--border); font-size: 12.5px; color: var(--text-3); }
.tool-card .t-go { display: inline-flex; align-items: center; gap: 6px; color: var(--brand-strong); font-weight: 600; transition: gap .2s; }
.tool-card:hover .t-go { gap: 10px; }
.tool-card.soon { opacity: .72; }
.plat-card { display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.plat-card .meta { display: flex; flex-wrap: wrap; gap: 6px; }
.flex-1 { flex: 1; }

/* ---------------------------------------------------------------- buttons */
.btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 15px; border-radius: var(--r); border: 1px solid transparent; font-weight: 600; font-size: 14px; white-space: nowrap; cursor: pointer; transition: background .15s, border-color .15s, color .15s, transform .1s; user-select: none; }
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-loading { pointer-events: none; opacity: .7; }
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-hover); }
.btn-secondary { background: var(--surface-2); border-color: var(--border-strong); color: var(--text); }
.btn-secondary:hover { background: var(--surface-3); }
.btn-ghost { background: none; color: var(--text-2); }
.btn-ghost:hover { background: var(--muted-soft); color: var(--text); }
.btn-danger { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: var(--r-sm); }
.btn-lg { height: 46px; padding: 0 20px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-icon { width: 32px; padding: 0; }
.btn .spinner { display: none; }
.btn.is-loading .spinner { display: block; }
.btn.is-loading .btn-label, .btn.is-loading > .ic { opacity: .35; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ripple { position: absolute; border-radius: 50%; background: currentColor; opacity: .18; transform: scale(0); animation: ripple .6s ease-out; pointer-events: none; }
@keyframes ripple { to { transform: scale(2.4); opacity: 0; } }

/* ---------------------------------------------------------------- forms */
.form-section { padding: 22px 24px; border-bottom: 1px solid var(--border); }
.form-section h4 { display: flex; align-items: center; gap: 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); margin-bottom: 16px; font-family: var(--font); font-weight: 700; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; padding: 16px 24px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field .lbl { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field .req { color: var(--brand); }
.field-input, .select, .input { width: 100%; height: 40px; padding: 0 12px; border-radius: var(--r); border: 1px solid var(--border-strong); background: var(--bg-2); color: var(--text); transition: border-color .15s, box-shadow .15s; }
textarea.field-input { height: auto; padding: 10px 12px; resize: vertical; min-height: 90px; }
.field-input:hover, .select:hover, .input:hover { border-color: color-mix(in srgb, var(--text) 30%, transparent); }
.field-input:focus, .select:focus, .input:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.field-input::placeholder, .input::placeholder { color: var(--text-3); }
.select { appearance: none; padding-right: 34px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a9099' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.select-sm { height: 32px; font-size: 13px; }
.has-error .field-input, .has-error .select { border-color: var(--danger); }
.field-error { display: flex; align-items: flex-start; gap: 6px; color: var(--danger); font-size: 12.5px; margin-top: 2px; }
.field-error .ic { margin-top: 2px; }
.field-help { font-size: 12px; color: var(--text-3); }
.char-count { font-size: 11.5px; color: var(--text-3); text-align: right; margin-top: -2px; }
.char-count.ok { color: var(--ok); }
.char-count.over { color: var(--danger); }
.check { display: inline-flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--text-2); cursor: pointer; }
.check input { appearance: none; width: 18px; height: 18px; flex-shrink: 0; margin: 0; border-radius: 5px; border: 1.5px solid var(--border-strong); background: var(--bg-2); display: grid; place-items: center; cursor: pointer; transition: .15s; }
.check input:checked, .table input[type="checkbox"]:checked { background: var(--brand); border-color: var(--brand); }
.check input:checked::after, .table input[type="checkbox"]:checked::after { content: ""; width: 9px; height: 5px; border: 2px solid var(--on-brand); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.table input[type="checkbox"] { appearance: none; width: 17px; height: 17px; margin: 0; border-radius: 5px; border: 1.5px solid var(--border-strong); background: var(--bg-2); display: grid; place-items: center; cursor: pointer; }

/* floating fields (auth) */
.field-wrap { margin-bottom: 14px; }
.ffield { position: relative; }
.ffield .field-input { height: 54px; padding: 22px 44px 6px 44px; font-size: 15px; }
.ffield label { position: absolute; left: 44px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; transition: .15s var(--ease); font-size: 15px; }
.ffield .field-input:focus + label, .ffield .field-input:not(:placeholder-shown) + label { top: 16px; font-size: 11.5px; font-weight: 600; color: var(--text-2); }
.ffield .lead-ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.ffield:focus-within .lead-ic { color: var(--brand); }
.ffield .trail-btn { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; display: grid; place-items: center; border: 0; background: none; border-radius: var(--r-sm); color: var(--text-3); cursor: pointer; }
.ffield .trail-btn:hover { color: var(--text); background: var(--muted-soft); }
.has-error .ffield .field-input { border-color: var(--danger); }
.caps-warn { display: none; align-items: center; gap: 6px; font-size: 12px; color: var(--warn); margin-top: 6px; }
.caps-warn.show { display: flex; }
.pw-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 10px; }
.pw-meter span { height: 4px; border-radius: 4px; background: var(--surface-3); transition: background .2s; }
.pw-meter[data-score="1"] span:nth-child(-n+1) { background: var(--danger); }
.pw-meter[data-score="2"] span:nth-child(-n+2) { background: var(--warn); }
.pw-meter[data-score="3"] span:nth-child(-n+3) { background: var(--teal); }
.pw-meter[data-score="4"] span { background: var(--ok); }
.pw-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-3); margin-top: 6px; }
.pw-rules { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; font-size: 12px; color: var(--text-3); }
.pw-rules li::before { content: "○"; margin-right: 6px; }
.pw-rules li.ok { color: var(--ok); }
.pw-rules li.ok::before { content: "●"; }
.match-hint { font-size: 12px; margin-top: 6px; min-height: 0; }
.match-hint.ok { color: var(--ok); }
.match-hint.bad { color: var(--warn); }
.otp-hidden { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.otp-boxes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 6px 0 12px; }
.otp-boxes input { width: 100%; height: 58px; text-align: center; font: 700 24px var(--display); border-radius: var(--r); border: 1.5px solid var(--border-strong); background: var(--bg-2); transition: .15s; }
.otp-boxes input:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.otp-boxes input.filled { border-color: var(--brand-line); }
.otp-boxes.error input { border-color: var(--danger); animation: shake .35s; }
.otp-boxes.success input { border-color: var(--ok); }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.timer-ring { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2); }

/* ---------------------------------------------------------------- tables */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.toolbar .select, .toolbar .input { height: 36px; }
.search-box { position: relative; flex: 1 1 260px; min-width: 200px; }
.search-box .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.search-box .input { padding-left: 36px; }
.w-auto { width: auto; }
.ml-auto { margin-left: auto; }
.table-wrap { position: relative; overflow-x: auto; }
.fu { display: inline-flex; align-items: center; gap: 4px; }
.fu.due { color: var(--warn); font-weight: 600; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); padding: 11px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface-2); }
.table th a { color: inherit; }
.table th a:hover, .table th a.sorted { color: var(--brand-strong); text-decoration: none; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: var(--muted-soft); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .cell-main { font-weight: 600; color: var(--text); white-space: nowrap; }
.sno { font: 600 11.5px var(--mono); color: var(--text-3); margin-right: 6px; }
.table .cell-sub { font-size: 12.5px; color: var(--text-3); margin-top: 3px; }
.table .actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.table .num, .num { text-align: right; font-variant-numeric: tabular-nums; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.w-check { width: 40px; }
.trunc { max-width: 170px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trunc-cell { max-width: 340px; overflow-wrap: anywhere; }
.nowrap { white-space: nowrap; }
.text-warn { color: var(--warn) !important; }
.select-chip { height: 30px; width: auto; padding: 0 30px 0 10px; font-size: 12.5px; font-weight: 600; border-radius: 99px; background-position: right 10px center; }
.select-chip.tone-info { color: var(--info); background-color: var(--info-soft); border-color: transparent; }
.select-chip.tone-brand { color: var(--brand-strong); background-color: var(--brand-soft); border-color: transparent; }
.select-chip.tone-warn { color: var(--warn); background-color: var(--warn-soft); border-color: transparent; }
.select-chip.tone-ok { color: var(--ok); background-color: var(--ok-soft); border-color: transparent; }
.select-chip.tone-danger { color: var(--danger); background-color: var(--danger-soft); border-color: transparent; }
.select-chip option { color: var(--text); background: var(--surface); }
.bulkbar { display: none; align-items: center; gap: 10px; padding: 10px 16px; background: var(--brand-soft); border-bottom: 1px solid var(--brand-line); font-size: 13.5px; font-weight: 600; }
.bulkbar.show { display: flex; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-2); }
.pages { display: flex; gap: 4px; }
.pages a, .pages span { min-width: 32px; height: 32px; display: grid; place-items: center; padding: 0 8px; border-radius: var(--r-sm); color: var(--text-2); font-weight: 600; }
.pages a:hover { background: var(--muted-soft); text-decoration: none; }
.pages .current { background: var(--brand); color: var(--on-brand); }

/* ---------------------------------------------------------------- badges */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--muted-soft); color: var(--text-2); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.nodot::before { display: none; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.brand { background: var(--brand-soft); color: var(--brand-strong); }

/* ---------------------------------------------------------------- tabs / segmented */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; padding: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); width: fit-content; max-width: 100%; }
.tabs button, .tabs a { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border: 0; border-radius: var(--r); background: none; color: var(--text-2); font-weight: 600; font-size: 13.5px; cursor: pointer; }
.tabs button:hover, .tabs a:hover { color: var(--text); text-decoration: none; background: var(--muted-soft); }
.tabs .active { background: var(--brand); color: var(--on-brand); }
.tabs .active:hover { background: var(--brand); color: var(--on-brand); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeUp .3s var(--ease); }
.seg { display: flex; flex-wrap: wrap; gap: 4px; }
.seg a { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border-radius: 99px; font-size: 13px; font-weight: 600; color: var(--text-2); border: 1px solid var(--border); }
.seg a:hover { text-decoration: none; border-color: var(--border-strong); color: var(--text); }
.seg a.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.seg-n { font-size: 11.5px; opacity: .7; }

/* ---------------------------------------------------------------- data viz */
.bar-list { display: flex; flex-direction: column; gap: 14px; }
.bar-row { display: block; color: inherit; }
.bar-row.link-row { border-radius: var(--r-sm); margin: -4px -6px; padding: 4px 6px; }
.bar-row.link-row:hover { background: var(--muted-soft); text-decoration: none; }
.bar-meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.bar-meta strong { color: var(--text); font-variant-numeric: tabular-nums; }
.bar { height: 7px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--brand); transition: width 1s var(--ease); }
.bar.ok > i { background: var(--ok); }
.bar.warn > i { background: var(--warn); }
.bar.danger > i { background: var(--danger); }
.bar.info > i { background: var(--info); }
.bar.teal > i { background: var(--teal); }
.bar.brand > i { background: var(--brand); }
.donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.donut { position: relative; width: 150px; height: 150px; border-radius: 50%; background: var(--surface-3); flex-shrink: 0; transition: background .6s; }
.donut-center { position: absolute; inset: 22px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; text-align: center; }
.donut-center strong { display: block; font: 700 26px var(--display); letter-spacing: -.03em; }
.donut-center span { font-size: 12px; color: var(--text-3); }
.legend { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 140px; font-size: 13px; color: var(--text-2); }
.legend div { display: flex; align-items: center; gap: 8px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.legend strong { margin-left: auto; color: var(--text); }
.sw-info { background: var(--info); } .sw-brand { background: var(--brand); } .sw-amber { background: var(--amber); }
.sw-warn { background: #f59e0b; } .sw-ok { background: var(--ok); } .sw-danger { background: var(--danger); }
.score-ring { position: relative; width: 150px; height: 150px; margin: 6px auto 0; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; }
.score-ring::after { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: var(--surface); }
.score-ring > div { position: relative; z-index: 1; text-align: center; }
.score-ring strong { display: block; font: 700 36px/1 var(--display); letter-spacing: -.03em; }
.score-ring span { font-size: 12px; color: var(--text-3); }
.card-glow .score-ring::after { background: color-mix(in srgb, var(--surface) 92%, var(--brand)); }

/* ---------------------------------------------------------------- lists, timeline */
.timeline { display: flex; flex-direction: column; }
.tl-item { position: relative; display: flex; gap: 12px; padding-bottom: 16px; }
.tl-item:not(:last-child)::after { content: ""; position: absolute; left: 14px; top: 32px; bottom: 2px; width: 1px; background: var(--border); }
.tl-dot { width: 29px; height: 29px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); }
.tl-dot.warn { background: var(--warn-soft); color: var(--warn); }
.tl-dot.danger { background: var(--danger-soft); color: var(--danger); }
.tl-body { padding-top: 4px; min-width: 0; }
.tl-title { font-weight: 600; font-size: 13.5px; }
.tl-meta { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 0; font-size: 13.5px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; text-align: right; font-weight: 600; }
.check-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.check-list li { display: flex; gap: 12px; padding: 9px 8px; border-radius: var(--r-sm); }
.check-list li:hover { background: var(--muted-soft); }
.check-list .st { width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0; display: grid; place-items: center; }
.check-list .st.pass { background: var(--ok-soft); color: var(--ok); }
.check-list .st.warn { background: var(--warn-soft); color: var(--warn); }
.check-list .st.fail { background: var(--danger-soft); color: var(--danger); }
.check-list .ct { font-weight: 600; font-size: 13.5px; }
.check-list .cd { font-size: 12.5px; color: var(--text-3); margin-top: 1px; overflow-wrap: anywhere; }
.mini-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.mini-list a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 8px; border-radius: var(--r-sm); color: var(--text); }
.mini-list a:hover { background: var(--muted-soft); text-decoration: none; }
.ml-main { display: flex; flex-direction: column; min-width: 0; }
.copy-box { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--border); font-size: 13.5px; }
.copy-box > span:first-child { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.copy-box .btn { flex-shrink: 0; }
.steps-grid .step-n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--on-brand); font: 700 14px var(--display); margin-bottom: 10px; }

/* ---------------------------------------------------------------- misc components */
.empty { text-align: center; padding: 48px 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty h3 { font-size: 18px; }
.empty p { color: var(--text-2); max-width: 420px; margin-bottom: 8px; }
.e-ic { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 4px; }
.mx-auto { margin-left: auto; margin-right: auto; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); font-size: 13.5px; border: 1px solid; }
.alert .ic { margin-top: 1px; }
.alert.info { background: var(--info-soft); color: var(--info); border-color: color-mix(in srgb, var(--info) 30%, transparent); }
.alert.warn { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.alert.danger { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.alert.ok { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.alert p { color: inherit; }
.lock-banner { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: var(--r); background: var(--danger-soft); color: var(--danger); font-size: 13.5px; font-weight: 500; }
.divider { display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: var(--text-3); margin: 22px 0 14px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.divider-line { height: 1px; background: var(--border); margin: 16px 0; }
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 20px; border-radius: var(--r-lg); border: 2px dashed var(--border-strong); background: var(--surface-2); cursor: pointer; transition: .15s; }
.dropzone:hover, .dropzone.drag { border-color: var(--brand); background: var(--brand-soft); }
.dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dz-ic { width: 52px; height: 52px; border-radius: var(--r-lg); display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 10px; }
details.row-edit { position: relative; }
details.row-edit summary { list-style: none; }
details.row-edit summary::-webkit-details-marker { display: none; }
.popover { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 300px; padding: 14px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); gap: 10px; text-align: left; }
.popover .field-input, .popover .select { height: 36px; }

/* ---------------------------------------------------------------- overlays: modal, cmdk, toasts */
.overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: start center; padding: 12vh 16px 16px; background: rgba(8, 9, 11, .62); backdrop-filter: blur(4px); opacity: 0; visibility: hidden; transition: .18s; }
.overlay.open { opacity: 1; visibility: visible; }
.modal { width: 100%; max-width: 440px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); transform: translateY(8px) scale(.98); transition: .2s var(--ease); }
.overlay.open .modal, .overlay.open .cmdk { transform: none; }
.modal-body { padding: 22px; }
.modal-body.center { text-align: center; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--border); }
.cmdk { width: 100%; max-width: 580px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); overflow: hidden; transform: translateY(8px); transition: .2s var(--ease); }
.cmdk-input { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--border); color: var(--text-3); }
.cmdk-input input { flex: 1; height: 54px; border: 0; background: none; outline: none; font-size: 15.5px; color: var(--text); }
.cmdk-list { max-height: 360px; overflow-y: auto; padding: 6px; }
.cmdk-group { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); padding: 10px 10px 4px; }
.cmdk-item { display: flex; align-items: center; gap: 11px; padding: 10px; border-radius: var(--r); color: var(--text-2); font-weight: 500; }
.cmdk-item .ci { width: 28px; height: 28px; display: grid; place-items: center; border-radius: var(--r-sm); background: var(--surface-2); }
.cmdk-item.active { background: var(--brand-soft); color: var(--text); text-decoration: none; }
.cmdk-item.active .ci { background: var(--brand); color: var(--on-brand); }
.cmdk-empty { display: none; padding: 28px; text-align: center; color: var(--text-3); font-size: 13.5px; }
.cmdk-foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-3); }
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 36px)); }
.toast { position: relative; overflow: hidden; display: flex; align-items: flex-start; gap: 11px; padding: 13px 14px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); font-size: 13.5px; animation: toastIn .35s var(--ease); }
.toast.hide { animation: toastOut .3s forwards; }
.t-ic { width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0; display: grid; place-items: center; }
.toast.success .t-ic { background: var(--ok-soft); color: var(--ok); }
.toast.error .t-ic { background: var(--danger-soft); color: var(--danger); }
.toast.warning .t-ic { background: var(--warn-soft); color: var(--warn); }
.toast.info .t-ic { background: var(--info-soft); color: var(--info); }
.t-msg { flex: 1; padding-top: 3px; }
.t-x { border: 0; background: none; color: var(--text-3); cursor: pointer; padding: 4px; border-radius: 6px; }
.t-x:hover { color: var(--text); background: var(--muted-soft); }
.t-bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--brand); transform-origin: left; animation: toastBar 6s linear forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }
@keyframes toastBar { to { transform: scaleX(0); } }
.progress-top { position: fixed; top: 0; left: 0; height: 2px; width: 0; background: var(--brand); z-index: 300; opacity: 0; transition: width 2.5s var(--ease), opacity .3s; }

/* ---------------------------------------------------------------- auth */
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.auth-aside { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 40px 48px; background: #14161a; color: #f4f2ee; }
.auth-aside .brand-name { color: #f4f2ee; }
.auth-aside .brand-sub { color: #8a9099; }
.auth-aside .logo-mark { color: #f4f2ee; }
.auth-aside-top, .auth-pitch, .auth-foot { position: relative; z-index: 1; }
.auth-pitch { max-width: 480px; }
.auth-pitch .eyebrow { color: #ff8a5c; }
.auth-pitch h2 { font-size: 40px; line-height: 1.08; letter-spacing: -.03em; }
.auth-pitch h2 .hl { color: #ff6a33; }
.auth-pitch p { color: #b5bac2; margin-top: 16px; font-size: 15.5px; }
.trust-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 28px; }
.trust { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: var(--r); background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); font-size: 13px; color: #d6d9de; }
.trust .ti { color: #ff6a33; }
.auth-foot { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: #7d838c; }
.auth-main { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-top { position: absolute; top: 18px; right: 18px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font-size: 30px; }
.auth-card .lead { color: var(--text-2); margin: 8px 0 24px; }
.auth-card form > .btn-block { margin-top: 18px; }
.auth-card .row.between { margin-top: 4px; }
.auth-alt { text-align: center; margin-top: 22px; color: var(--text-2); font-size: 14px; }
.auth-alt a { font-weight: 600; }
.auth-mobile-brand { display: none; margin-bottom: 28px; }
.sec-note { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 30px; font-size: 12px; color: var(--text-3); }
.steps { display: flex; gap: 6px; margin-bottom: 18px; }
.steps span { height: 4px; width: 36px; border-radius: 4px; background: var(--surface-3); }
.steps .cur { background: var(--brand); }
.steps .done { background: var(--ok); }

/* ---------------------------------------------------------------- error page */
.error-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; text-align: center; }
.error-inner { max-width: 460px; display: flex; flex-direction: column; align-items: center; }
.error-code { font: 700 96px/1 var(--display); letter-spacing: -.05em; color: var(--brand); margin-top: 18px; }

/* ---------------------------------------------------------------- utilities */
.mt-1 { margin-top: 6px; } .mt-2 { margin-top: 14px; } .mt-3 { margin-top: 22px; }
.mb-1 { margin-bottom: 6px; } .mb-2 { margin-bottom: 16px; }
.m-3 { margin: 18px 24px 0; }
.p-0 { padding: 0; }
.fs-sm { font-size: 12.5px; } .fs-lg { font-size: 17px; }
.fw-6 { font-weight: 600; }
.center { text-align: center; }

/* ---------------------------------------------------------------- motion */
.page-enter { animation: fadeUp .4s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } }
.reveal { opacity: 0; transform: translateY(10px); transition: opacity .5s var(--ease), transform .5s var(--ease); transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

.roadmap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 14px; border-radius: var(--r-lg); border: 1px dashed var(--border-strong); }
.roadmap-label { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--text-3); margin-right: 4px; }
.roadmap-item { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 99px; background: var(--surface-2); font-size: 12.5px; color: var(--text-2); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1200px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 980px) {
  .app, .app.is-collapsed { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar-w); transform: translateX(-100%); transition: transform .25s var(--ease); }
  .app.mobile-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  .app.mobile-open .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(0, 0, 0, .5); }
  .app.is-collapsed .nav-text, .app.is-collapsed .nav-label, .app.is-collapsed .brand-text, .app.is-collapsed .side-foot-text { display: revert; }
  .search-trigger { min-width: 0; }
  .st-text, .search-trigger .kbd, .u-name { display: none; }
  .auth { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-mobile-brand { display: block; }
  .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .content { padding: 18px 16px 32px; }
  .topbar { padding: 0 12px; gap: 8px; }
  .crumbs { display: none; }
  .g-2, .g-3, .g-4, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .page-head h1 { font-size: 25px; }
  .hero { padding: 24px 20px; }
  .hero h1 { font-size: 27px; }
  .form-section, .form-actions { padding-left: 16px; padding-right: 16px; }
  .footer { padding: 14px 16px; }
  .otp-boxes { gap: 6px; }
  .otp-boxes input { height: 50px; font-size: 20px; }
  .popover { width: min(300px, calc(100vw - 40px)); }
  .pw-rules { grid-template-columns: 1fr; }
  .tabs { width: 100%; }
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 14px; }
  .kpi-value { font-size: 24px; }
  .kpi .chip-ic { width: 30px; height: 30px; }
  .page-actions .btn { flex: 1 1 auto; }
  /* tables become cards */
  .table.stack-sm thead { display: none; }
  .table.stack-sm, .table.stack-sm tbody { display: block; }
  .table.stack-sm tr { display: block; position: relative; padding: 12px 16px; border-bottom: 1px solid var(--border); }
  .table.stack-sm td { display: block; padding: 4px 0; border: 0; }
  .table.stack-sm td[data-label] { display: grid; grid-template-columns: 78px minmax(0, 1fr); column-gap: 12px; align-items: start; }
  .table.stack-sm td[data-label]::before { content: attr(data-label); grid-row: 1 / span 4; font-size: 12px; font-weight: 600; color: var(--text-3); padding-top: 2px; }
  .table.stack-sm td[data-label] > * { grid-column: 2; justify-self: start; min-width: 0; max-width: 100%; }
  .table.stack-sm td:first-child, .table.stack-sm td.cell-check + td { display: block; text-align: left; }
  .table.stack-sm .cell-check { position: absolute; right: 16px; top: 14px; padding: 0; }
  .table.stack-sm .cell-actions .actions, .table.stack-sm td:last-child .actions { justify-content: flex-start; flex-wrap: wrap; }
  .table.stack-sm td:last-child { display: block; padding-top: 8px; }
  .table.stack-sm .trunc { max-width: 200px; }
  .table.stack-sm .num { text-align: left; }
  .table.stack-sm td[data-label].num::after { content: none; }
}
