/* wealth-os v2 · Refined Wealth Terminal Design System
 * Light-first editorial fintech aesthetic with crisp Dark Mode support.
 */
:root {
  color-scheme: light;
  --bg: #F5F7FA;
  --bg-subtle: #EEF2F7;
  --surface: #FFFFFF;
  --surface-2: #F8FAFC;
  --surface-hover: #F1F5F9;
  --sidebar-bg: #FFFFFF;
  --border: #E2E8F0;
  --border-soft: #EEF2F6;
  --text: #0F172A;
  --text-2: #475569;
  --text-3: #64748B;

  --brand: #2563EB;
  --brand-hover: #1D4ED8;
  --brand-soft: rgba(37, 99, 235, 0.09);
  --brand-border: rgba(37, 99, 235, 0.24);
  --on-brand: #FFFFFF;

  --green: #059669;
  --green-soft: rgba(5, 150, 105, 0.10);
  --green-border: rgba(5, 150, 105, 0.25);
  --red: #E11D48;
  --red-soft: rgba(225, 29, 72, 0.09);
  --red-border: rgba(225, 29, 72, 0.24);
  --warn: #D97706;
  --warn-soft: rgba(217, 119, 6, 0.10);
  --warn-border: rgba(217, 119, 6, 0.28);

  --indigo: #4F46E5;
  --indigo-soft: rgba(79, 70, 229, 0.10);
  --violet: #7C3AED;
  --amber: #D97706;
  --teal: #0D9488;
  --slate: #64748B;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 12px 32px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);

  --sidebar-w: 232px;
  --font-ui: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-display: "Inter", "SF Pro Display", -apple-system, "PingFang SC", sans-serif;
  --font-num: "SF Pro Display", "Inter", "DIN Alternate", -apple-system, "PingFang SC", sans-serif;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0B1120;
  --bg-subtle: #111827;
  --surface: #111827;
  --surface-2: #192234;
  --surface-hover: #1E293B;
  --sidebar-bg: #0E1525;
  --border: #1F2A3E;
  --border-soft: rgba(148, 163, 184, 0.10);
  --text: #F1F5F9;
  --text-2: #94A3B8;
  --text-3: #7C8BA1;

  --brand: #3B82F6;
  --brand-hover: #60A5FA;
  --brand-soft: rgba(59, 130, 246, 0.16);
  --brand-border: rgba(59, 130, 246, 0.36);
  --on-brand: #FFFFFF;

  --green: #10B981;
  --green-soft: rgba(16, 185, 129, 0.14);
  --green-border: rgba(16, 185, 129, 0.30);
  --red: #FB7185;
  --red-soft: rgba(251, 113, 133, 0.14);
  --red-border: rgba(251, 113, 133, 0.30);
  --warn: #FBBF24;
  --warn-soft: rgba(251, 191, 36, 0.12);
  --warn-border: rgba(251, 191, 36, 0.30);

  --indigo: #818CF8;
  --indigo-soft: rgba(129, 140, 248, 0.15);
  --violet: #A78BFA;
  --amber: #FBBF24;
  --teal: #2DD4BF;
  --slate: #94A3B8;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 18px 42px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums lining-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12.5px;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--bg-subtle);
}

/* ── App Shell (Sidebar + Main) ─────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  z-index: 30;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 16px;
  color: var(--text);
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #2563EB, #4F46E5);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28);
  flex: none;
}
.brand-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.brand-tag {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 500;
}

.nav-group {
  margin-top: 8px;
}
.nav-group-label {
  padding: 8px 10px 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-3);
  text-transform: uppercase;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  margin-bottom: 2px;
  border-radius: 10px;
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.14s ease, color 0.14s ease;
}
.nav-link svg {
  width: 17px;
  height: 17px;
  flex: none;
  opacity: 0.78;
}
.nav-link:hover {
  background: var(--surface-hover);
  color: var(--text);
  text-decoration: none;
}
.nav-link.active {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
}
.nav-link.active svg { opacity: 1; }

.sidebar-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
}
.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 700;
  font-size: 13px;
  display: grid;
  place-items: center;
  flex: none;
}
.user-info { min-width: 0; }
.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-role {
  font-size: 11px;
  color: var(--text-3);
}
.sidebar-actions {
  display: flex;
  gap: 8px;
}
.sidebar-actions > * { flex: 1; }
.sidebar-actions form { display: flex; }
.sidebar-actions form button { width: 100%; }

/* Mobile header & bottom bar */
.mobile-bar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 25;
  height: 54px;
  padding: 0 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  align-items: center;
  justify-content: space-between;
}
.mobile-nav {
  display: none;
  position: fixed;
  inset: auto 0 0 0;
  z-index: 35;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
  grid-template-columns: repeat(5, 1fr);
}
.mobile-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: var(--text-3);
  padding: 4px 2px;
  border-radius: 8px;
  text-decoration: none;
}
.mobile-nav a svg { width: 19px; height: 19px; }
.mobile-nav a.active { color: var(--brand); font-weight: 600; }

/* Main canvas */
.main-wrap {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-width: 0;
}
.shell {
  max-width: 1260px;
  margin: 0 auto;
  padding: 26px 28px 64px;
}

/* ── Page Header ────────────────────────────────────── */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.kicker {
  display: block;
  color: var(--brand);
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.page-head h1 {
  margin: 3px 0 0;
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.025em;
  font-weight: 700;
}
.page-meta {
  color: var(--text-3);
  font-size: 12.5px;
}
.head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ── KPI Strip & Bento Grid ─────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.kpi-card.featured {
  background: linear-gradient(135deg, var(--surface) 0%, var(--brand-soft) 100%);
  border-color: var(--brand-border);
}
.kpi-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.kpi-value {
  font-family: var(--font-num);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
}
.kpi-sub {
  font-size: 12px;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.bento-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 18px;
}
.bento-2 > .card { margin-bottom: 0; }

/* ── Cards ──────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-xs);
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.card-head h2, .card-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.card-head .hint {
  color: var(--text-3);
  font-size: 12px;
}
.card h4 {
  margin: 18px 0 10px;
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
}

/* ── Market Allocation List ─────────────────────────── */
.alloc-bar {
  display: flex;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--bg-subtle);
  margin-bottom: 16px;
  gap: 2px;
}
.alloc-seg { height: 100%; border-radius: 2px; min-width: 4px; }
.m-A { background: #2563EB; }
.m-FUT { background: #D97706; }
.m-HK { background: #7C3AED; }
.m-US { background: #0D9488; }

.market-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.market-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
}
.market-row-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.dot {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  flex: none;
}
.market-row-name { font-weight: 600; font-size: 13.5px; color: var(--text); }
.market-row-meta { font-size: 11.5px; color: var(--text-3); }
.market-row-right { text-align: right; }
.market-row-eq { font-family: var(--font-num); font-weight: 700; font-size: 14px; }
.market-row-pnl { font-family: var(--font-num); font-size: 12px; font-weight: 600; }

/* ── Interactive Chart ──────────────────────────────── */
.chart-tabs {
  display: inline-flex;
  background: var(--bg-subtle);
  padding: 3px;
  border-radius: 9px;
  gap: 2px;
}
.chart-tab {
  border: 0;
  background: transparent;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}
.chart-tab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-xs);
}
.chart-readout {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  min-height: 22px;
  font-size: 12.5px;
  color: var(--text-2);
}
.chart-readout strong {
  font-family: var(--font-num);
  font-size: 15px;
  color: var(--text);
}
.chart-box {
  position: relative;
  width: 100%;
  height: 215px;
}
.chart-box svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

/* ── Filter Tabs & Pill Bar ─────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.pill-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pill-tab {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.14s ease;
}
.pill-tab:hover { border-color: var(--brand-border); color: var(--text); }
.pill-tab.active {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--on-brand);
}

/* ── Tables (strict alignment + clean rows) ─────────── */
.table-wrap {
  overflow-x: auto;
  margin: 0 -4px;
  padding: 0 4px;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.table th {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text-3);
  font-size: 11.5px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
  background: var(--surface-2);
}
.table th:first-child { border-radius: 8px 0 0 8px; }
.table th:last-child { border-radius: 0 8px 8px 0; }
.table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-hover); }

/* Higher specificity so th.num is ALWAYS right-aligned! */
.table th.num,
.table td.num,
.num {
  text-align: right;
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.table th.actions-col,
.table td.actions-col {
  text-align: right;
  white-space: nowrap;
}
.nowrap { white-space: nowrap; }
.table .name { font-weight: 600; color: var(--text); }
.table .sub { color: var(--text-3); font-size: 11.5px; font-weight: 400; }
.row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: nowrap;
}
.row-actions form { display: inline-flex; margin: 0; }

/* ── Badges / Semantic States ───────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-2);
  background: var(--surface-2);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.badge.buy, .badge.long, .badge.ok {
  color: var(--green);
  border-color: var(--green-border);
  background: var(--green-soft);
}
.badge.sell, .badge.short, .badge.leveraged, .badge.danger {
  color: var(--red);
  border-color: var(--red-border);
  background: var(--red-soft);
}
.badge.warn {
  color: var(--warn);
  border-color: var(--warn-border);
  background: var(--warn-soft);
}
.badge.strategy {
  color: var(--indigo);
  border-color: rgba(79, 70, 229, 0.25);
  background: var(--indigo-soft);
}

.green { color: var(--green); }
.red { color: var(--red); }
.yellow { color: var(--warn); }
.muted { color: var(--text-3); }

/* ── Alerts & Collapsibles ──────────────────────────── */
.alert {
  padding: 11px 14px;
  border: 1px solid var(--brand-border);
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--text);
  font-size: 13px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.alert.error {
  color: var(--red);
  border-color: var(--red-border);
  background: var(--red-soft);
}
.alert.warn {
  color: var(--warn);
  border-color: var(--warn-border);
  background: var(--warn-soft);
}
.alert.compact {
  padding: 9px 14px;
  font-size: 12.5px;
}

details.card-collapsible {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 18px;
  box-shadow: var(--shadow-xs);
}
details.card-collapsible > summary {
  list-style: none;
  cursor: pointer;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 650;
  font-size: 14.5px;
  user-select: none;
}
details.card-collapsible > summary::-webkit-details-marker { display: none; }
details.card-collapsible > summary .summary-arrow {
  color: var(--text-3);
  font-size: 12px;
  transition: transform 0.16s ease;
}
details.card-collapsible[open] > summary {
  border-bottom: 1px solid var(--border-soft);
}
details.card-collapsible[open] > summary .summary-arrow {
  transform: rotate(180deg);
}
details.card-collapsible .collapsible-body {
  padding: 18px 20px;
}

/* ── Forms & Controls (zero double arrows!) ─────────── */
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 16px;
}
.form-grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.field { min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field.span-2 { grid-column: span 2; }
.field label, label.field-label {
  display: block;
  margin: 0 0 6px;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
}
.field-help {
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--text-3);
}
.input, .select, .table input, .table select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}
.input::placeholder { color: var(--text-3); opacity: 0.75; }
.input:focus, .select:focus, .table input:focus, .table select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
  outline: none;
}
.select, .table select {
  padding-right: 28px;
  cursor: pointer;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
}
.checkbox input { width: auto; accent-color: var(--brand); }
.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

/* ── Buttons ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.14s ease, border-color 0.14s ease, transform 0.08s ease;
}
.btn:hover { background: var(--brand-hover); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text-2);
}
.btn.ghost:hover {
  background: var(--surface-hover);
  color: var(--text);
  border-color: var(--text-3);
}
.btn.danger-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-3);
}
.btn.danger-ghost:hover {
  background: var(--red-soft);
  border-color: var(--red-border);
  color: var(--red);
}
.btn.small {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 7px;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}
.icon-btn:hover { border-color: var(--brand-border); color: var(--text); }

/* ── Auth Split Layout ──────────────────────────────── */
.auth-split {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  background: var(--bg);
}
.auth-showcase {
  background: linear-gradient(155deg, #0F172A 0%, #1E293B 52%, #1E3A8A 100%);
  color: #F8FAFC;
  padding: 56px 52px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.auth-showcase::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.28), transparent 70%);
  top: -120px;
  right: -120px;
  pointer-events: none;
}
.auth-showcase-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}
.auth-showcase-hero {
  position: relative;
  max-width: 460px;
}
.auth-showcase-hero h1 {
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1.22;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
  font-weight: 700;
}
.auth-showcase-hero p {
  margin: 0 0 24px;
  color: #CBD5E1;
  font-size: 15px;
  line-height: 1.65;
}
.auth-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.auth-pill {
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #E2E8F0;
  font-size: 12px;
  font-weight: 500;
}
.auth-showcase-foot {
  position: relative;
  font-size: 12px;
  color: #94A3B8;
}

.auth-panel {
  display: grid;
  place-items: center;
  padding: 32px 24px;
}
.auth-card {
  width: min(400px, 100%);
  padding: 34px 32px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}
.auth-card-head { margin-bottom: 22px; }
.auth-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}
.auth-sub {
  color: var(--text-3);
  font-size: 13px;
  margin: 5px 0 0;
}
.auth-foot {
  color: var(--text-3);
  font-size: 12px;
  margin: 18px 0 0;
  text-align: center;
}
.pw-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.pw-wrap .input { padding-right: 54px; }
.pw-toggle {
  position: absolute;
  right: 8px;
  border: 0;
  background: transparent;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
}
.pw-toggle:hover { color: var(--text); }

/* ── Upload dropzone ────────────────────────────────── */
.dropzone {
  border: 1.5px dashed var(--border);
  border-radius: 12px;
  padding: 20px;
  background: var(--surface-2);
  text-align: center;
  transition: border-color 0.14s ease, background 0.14s ease;
}
.dropzone:hover { border-color: var(--brand); background: var(--brand-soft); }

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 1120px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento-2 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .sidebar { display: none; }
  .mobile-bar { display: flex; }
  .mobile-nav { display: grid; }
  .main-wrap { margin-left: 0; padding-bottom: 72px; }
  .shell { padding: 18px 14px 32px; }
  .auth-split { grid-template-columns: 1fr; }
  .auth-showcase { display: none; }
}

@media (max-width: 600px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .form-grid, .form-grid.cols-2 { grid-template-columns: 1fr; }
  .field.span-2 { grid-column: auto; }
  .kpi-value { font-size: 24px; }
  .card { padding: 15px; }
}
