/* ==========================================================================
   BOOSTIO CUSTOMER OS — PORTAL STYLESHEET · /portal/css/portal.css · v1.0
   --------------------------------------------------------------------------
   Standalone design system for the customer portal (deploys on its own to
   app.boostio.in — deliberately does NOT depend on the marketing site CSS).
   Tokens mirror /css/boostio.css; keep the two in sync when tokens change.

   CONTENTS
   00. Fonts (adds "Mukta" for Hindi)
   01. Tokens (light) + dark theme overrides ([data-theme="dark"])
   02. Base & a11y
   03. App shell — topbar, sidebar, bottom bar (mobile), content
   04. Language (html[lang="hi"] font swap)
   05. Buttons
   06. Cards & stat tiles
   07. Badges, chips ("Read-only · No password", last-synced, plan)
   08. Tables
   09. Forms
   10. Modal & action sheet
   11. Toasts
   12. Empty states
   13. Menus (user dropdown)
   14. Utilities

   RULES CARRIED OVER: gradient (--gradient-brand) on at most ONE primary
   element per screen; no fake counters or urgency timers; numbers tabular.
   ========================================================================== */

/* ==========================================================================
   00. FONTS — Jakarta (headings) + Inter (body) + Mukta (Hindi UI)
   ========================================================================== */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Mukta:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap");

/* ==========================================================================
   01. TOKENS
   ========================================================================== */
:root {
  /* Brand ramps (subset used by the portal; full ramps in marketing CSS) */
  --violet-50:#F5F0FE; --violet-100:#EADFFD; --violet-200:#D3BEFA;
  --violet-400:#8E55F0; --violet-500:#5D16EA; --violet-600:#4B11C2; --violet-700:#3B0D99;
  --pink-100:#FDDEEC; --pink-500:#F6197C; --pink-600:#D40E67; --pink-700:#A80A52;
  --orange-100:#FFE4D9; --orange-500:#FE5621; --orange-700:#B33008;
  --navy-50:#F2F4F9; --navy-100:#E4E6EE; --navy-200:#C6CBDD; --navy-300:#9AA0B4;
  --navy-400:#667090; --navy-500:#3E4A6B; --navy-600:#232F52; --navy-700:#0A1740;
  --navy-800:#051238; --navy-900:#000C36;
  --success-50:#E7F8F0; --success-500:#12B76A; --success-700:#067647;
  --warning-50:#FEF4E6; --warning-500:#F5A524; --warning-700:#B54708;
  --error-50:#FEECEE;  --error-500:#F0384B;  --error-700:#B42318;

  /* Gradient — ONE primary element per screen, backgrounds don't count */
  --gradient-brand: linear-gradient(135deg,#482AF6 0%,#F6197C 62%,#FC3C54 100%);

  /* Semantic surfaces & text (THEMEABLE — components must use these) */
  --bg:        #FAFAFC;
  --surface:   #FFFFFF;
  --surface-2: #F2F4F9;          /* subtle wells inside cards */
  --border:    #E4E6EE;
  --text:      #0A1740;
  --text-2:    #3E4A6B;
  --text-3:    #667090;          /* AA-safe muted */
  --decor:     #9AA0B4;          /* decorative only */
  --link:      #4B11C2;
  --focus:     #5D16EA;
  --shadow-soft: 0 4px 16px rgba(10,23,64,.08);
  --shadow-lift: 0 10px 28px rgba(10,23,64,.14);
  --scrim: rgba(10,23,64,.45);

  /* Tinted chips (themeable so dark mode can go translucent) */
  --tint-violet-bg:#F5F0FE; --tint-violet-tx:#3B0D99; --tint-violet-bd:#EADFFD;
  --tint-success-bg:#E7F8F0; --tint-success-tx:#067647;
  --tint-warning-bg:#FEF4E6; --tint-warning-tx:#B54708;
  --tint-error-bg:#FEECEE;  --tint-error-tx:#B42318;

  /* Type */
  --font-heading: "Plus Jakarta Sans","Inter",ui-sans-serif,system-ui,sans-serif;
  --font-body: "Inter",ui-sans-serif,system-ui,sans-serif;
  --text-xs:.75rem; --text-sm:.875rem; --text-md:1rem; --text-lg:1.125rem;

  /* Spacing / radius / motion */
  --sp-2xs:.25rem; --sp-xs:.5rem; --sp-sm:.75rem; --sp-md:1rem;
  --sp-lg:1.5rem; --sp-xl:2rem; --sp-2xl:3rem;
  --r-sm:8px; --r-md:12px; --r-lg:16px; --r-pill:999px;
  --ease: cubic-bezier(.4,0,.2,1);
  --tr-fast:150ms var(--ease); --tr:220ms var(--ease);

  /* Shell metrics */
  --topbar-h:60px; --sidebar-w:232px; --bottombar-h:64px;
  --z-topbar:100; --z-overlay:200; --z-toast:300;
}

/* ---- Dark theme (navy ramp) — toggled via <html data-theme="dark"> ------ */
[data-theme="dark"] {
  --bg:        #070F33;
  --surface:   #0D1845;
  --surface-2: #111F55;
  --border:    #26335F;
  --text:      #EAEDF7;
  --text-2:    #C0C8E2;
  --text-3:    #93A0C4;
  --decor:     #5A6796;
  --link:      #B593F6;
  --focus:     #8E55F0;
  --shadow-soft: 0 4px 16px rgba(0,0,0,.35);
  --shadow-lift: 0 10px 28px rgba(0,0,0,.5);
  --scrim: rgba(0,6,26,.62);
  --tint-violet-bg:rgba(93,22,234,.22); --tint-violet-tx:#D3BEFA; --tint-violet-bd:rgba(142,85,240,.35);
  --tint-success-bg:rgba(18,183,106,.16); --tint-success-tx:#5CE0A5;
  --tint-warning-bg:rgba(245,165,36,.16); --tint-warning-tx:#F8C572;
  --tint-error-bg:rgba(240,56,75,.16);  --tint-error-tx:#F58E9A;
}

/* ==========================================================================
   02. BASE & A11Y
   ========================================================================== */
*,*::before,*::after{box-sizing:border-box}
*{margin:0}
html{-webkit-text-size-adjust:100%}
body{
  font-family:var(--font-body); font-size:var(--text-md); line-height:1.55;
  color:var(--text); background:var(--bg);
  -webkit-font-smoothing:antialiased;
}
img,svg{display:block;max-width:100%;height:auto}
[hidden]{display:none!important}   /* keep [hidden] winning over display resets */
input,button,select,textarea{font:inherit;color:inherit}
ul[class],ol[class]{list-style:none;padding:0}
h1,h2,h3,h4,.h-lg,.h-md,.h-sm{
  font-family:var(--font-heading); font-weight:700; line-height:1.2;
  letter-spacing:-.01em; color:var(--text);
}
.h-lg{font-size:1.5rem;font-weight:800}
.h-md{font-size:1.125rem}
.h-sm{font-size:1rem}
a{color:var(--link)}
.tabular{font-variant-numeric:tabular-nums}

.skip-link{
  position:fixed; top:10px; left:10px; z-index:var(--z-toast);
  padding:.65rem 1rem; background:var(--navy-700); color:#fff;
  font-size:var(--text-sm); font-weight:600; text-decoration:none;
  border-radius:var(--r-sm);
  transform:translateY(calc(-100% - 20px));
}
.skip-link:focus{transform:none}
:focus-visible{outline:3px solid var(--focus); outline-offset:2px; border-radius:var(--r-sm)}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important}
}

/* ==========================================================================
   03. APP SHELL
   --------------------------------------------------------------------------
   Mobile-first: topbar + content + bottom bar. ≥1024px: sidebar appears,
   bottom bar hides.
   ========================================================================== */
.app{min-height:100vh; display:flex; flex-direction:column}

/* ---- Topbar -------------------------------------------------------------- */
.topbar{
  position:sticky; top:0; z-index:var(--z-topbar);
  display:flex; align-items:center; gap:var(--sp-md);
  height:var(--topbar-h); padding-inline:var(--sp-md);
  background:var(--surface); border-bottom:1px solid var(--border);
}
.topbar__brand{display:inline-flex; align-items:center; gap:10px; text-decoration:none}
.topbar__brand img{width:30px;height:30px}
.topbar__name{font-family:var(--font-heading); font-weight:800; font-size:1.125rem; color:var(--text)}
.topbar__tag{
  padding:2px 8px; border-radius:var(--r-pill);
  background:var(--tint-violet-bg); color:var(--tint-violet-tx);
  font-size:var(--text-xs); font-weight:700; letter-spacing:.04em;
}
.topbar__spacer{flex:1}

/* Segmented language toggle */
.lang-toggle{
  display:inline-flex; gap:2px; padding:3px;
  background:var(--surface-2); border:1px solid var(--border);
  border-radius:var(--r-pill);
}
.lang-toggle button{
  min-height:34px; padding:.2rem .7rem; border:0; border-radius:var(--r-pill);
  background:transparent; cursor:pointer;
  font-weight:700; font-size:var(--text-xs); color:var(--text-2);
  transition:background-color var(--tr-fast), color var(--tr-fast);
}
.lang-toggle button.is-active{background:var(--navy-700); color:#fff}
[data-theme="dark"] .lang-toggle button.is-active{background:var(--violet-500)}

/* Icon buttons (theme toggle etc.) */
.icon-btn{
  display:inline-flex; align-items:center; justify-content:center;
  width:40px; height:40px; border:1px solid var(--border); border-radius:var(--r-md);
  background:var(--surface); color:var(--text-2); cursor:pointer;
  transition:border-color var(--tr-fast), color var(--tr-fast);
}
.icon-btn:hover{color:var(--violet-500); border-color:var(--violet-200)}

/* User button + avatar */
.user-btn{
  display:inline-flex; align-items:center; gap:8px;
  padding:4px 10px 4px 4px; border:1px solid var(--border); border-radius:var(--r-pill);
  background:var(--surface); cursor:pointer;
}
.user-btn:hover{border-color:var(--violet-200)}
.avatar{
  display:inline-flex; align-items:center; justify-content:center;
  width:32px; height:32px; border-radius:var(--r-pill);
  background:var(--violet-100); color:var(--violet-700);
  font-family:var(--font-heading); font-weight:700; font-size:.8125rem;
}
[data-theme="dark"] .avatar{background:rgba(142,85,240,.3); color:#D3BEFA}
.user-btn__name{font-size:var(--text-sm); font-weight:600; color:var(--text)}
@media (max-width:639.98px){ .user-btn__name{display:none} }

/* ---- Body: sidebar + content --------------------------------------------- */
.app__body{display:flex; flex:1}

.sidebar{
  display:none;
  width:var(--sidebar-w); flex:none;
  padding:var(--sp-md) var(--sp-sm);
  border-right:1px solid var(--border);
  background:var(--surface);
}
@media (min-width:1024px){
  .sidebar{display:block;
    position:sticky; top:var(--topbar-h);
    height:calc(100vh - var(--topbar-h)); overflow-y:auto;
  }
}
.sidebar__list{display:grid; gap:2px}
.nav-item{
  display:flex; align-items:center; gap:10px;
  padding:.6rem .75rem; border-radius:var(--r-md);
  font-size:var(--text-sm); font-weight:600; color:var(--text-2);
  text-decoration:none;
  transition:background-color var(--tr-fast), color var(--tr-fast);
}
.nav-item svg{flex:none; opacity:.85}
.nav-item:hover{background:var(--surface-2); color:var(--violet-500)}
[data-theme="dark"] .nav-item:hover{color:#D3BEFA}
.nav-item[aria-current="page"]{
  background:var(--tint-violet-bg); color:var(--tint-violet-tx);
}
.sidebar__foot{
  margin-top:var(--sp-lg); padding:var(--sp-sm) var(--sp-sm) 0;
  border-top:1px solid var(--border);
  font-size:var(--text-xs); color:var(--text-3);
}

.content{
  flex:1; min-width:0;
  padding:var(--sp-lg) var(--sp-md) calc(var(--bottombar-h) + var(--sp-xl));
}
@media (min-width:640px){ .content{padding-inline:var(--sp-lg)} }
@media (min-width:1024px){
  .content{padding:var(--sp-xl) var(--sp-2xl) var(--sp-2xl); max-width:1080px}
}
.page-head{margin-bottom:var(--sp-lg)}
.page-head h1{font-size:1.375rem; font-weight:800}
.page-head__sub{margin-top:2px; font-size:var(--text-sm); color:var(--text-3)}

/* ---- Bottom bar (mobile) -------------------------------------------------- */
.bottombar{
  position:fixed; bottom:0; left:0; right:0; z-index:var(--z-topbar);
  display:grid; grid-template-columns:repeat(5,1fr);
  height:var(--bottombar-h);
  background:var(--surface); border-top:1px solid var(--border);
  padding-bottom:env(safe-area-inset-bottom);
}
.bottombar a,.bottombar button{
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px;
  border:0; background:transparent; cursor:pointer;
  font-size:.6875rem; font-weight:600; color:var(--text-3); text-decoration:none;
}
.bottombar svg{opacity:.9}
.bottombar a[aria-current="page"]{color:var(--violet-500)}
[data-theme="dark"] .bottombar a[aria-current="page"]{color:#B593F6}
@media (min-width:1024px){ .bottombar{display:none} .content{padding-bottom:var(--sp-2xl)} }

/* ==========================================================================
   04. LANGUAGE — Hindi swaps to Mukta (Jakarta has no Devanagari)
   ========================================================================== */
html[lang="hi"] body{font-family:"Mukta",var(--font-body)}
html[lang="hi"] h1,html[lang="hi"] h2,html[lang="hi"] h3,html[lang="hi"] h4,
html[lang="hi"] .h-lg,html[lang="hi"] .h-md,html[lang="hi"] .h-sm,
html[lang="hi"] .btn,html[lang="hi"] .topbar__name{
  font-family:"Mukta",var(--font-heading); letter-spacing:0;
}

/* ==========================================================================
   05. BUTTONS
   ========================================================================== */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  min-height:44px; padding:.6rem 1.25rem;
  border:2px solid transparent; border-radius:var(--r-md);
  font-family:var(--font-heading); font-weight:700; font-size:.9375rem; line-height:1;
  text-decoration:none; white-space:nowrap; cursor:pointer;
  transition:transform var(--tr-fast), box-shadow var(--tr-fast),
             background-color var(--tr-fast), border-color var(--tr-fast), color var(--tr-fast);
}
.btn:active{transform:translateY(1px)}
.btn[disabled]{opacity:.55; cursor:not-allowed}
.btn--primary{background-image:var(--gradient-brand); color:#fff; box-shadow:var(--shadow-soft)}
.btn--primary:hover:not([disabled]){transform:translateY(-1px); box-shadow:var(--shadow-lift)}
.btn--solid{background:var(--violet-500); color:#fff}
.btn--solid:hover:not([disabled]){background:var(--violet-600)}
.btn--outline{background:var(--surface); border-color:var(--violet-500); color:var(--link)}
.btn--outline:hover:not([disabled]){background:var(--tint-violet-bg)}
.btn--ghost{background:transparent; color:var(--text-2)}
.btn--ghost:hover:not([disabled]){color:var(--violet-500); background:var(--surface-2)}
.btn--danger{background:var(--error-500); color:#fff}
.btn--danger:hover:not([disabled]){background:#D22736}
.btn--sm{min-height:36px; padding:.35rem .9rem; font-size:.8125rem}
.btn--block{display:flex; width:100%}

/* ==========================================================================
   06. CARDS & STAT TILES
   ========================================================================== */
.card{
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--r-lg); box-shadow:var(--shadow-soft);
  padding:var(--sp-lg);
}
.card__head{display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between;
  gap:var(--sp-sm); margin-bottom:var(--sp-md)}
.card__title{font-size:1rem}
.card--well{background:var(--surface-2); box-shadow:none}

.tile-row{display:grid; gap:var(--sp-md); grid-template-columns:repeat(2,1fr)}
@media (min-width:768px){ .tile-row{grid-template-columns:repeat(4,1fr)} }
.tile{
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--r-lg); box-shadow:var(--shadow-soft);
  padding:var(--sp-md) var(--sp-lg);
}
.tile__label{font-size:var(--text-xs); font-weight:600; color:var(--text-3);
  text-transform:uppercase; letter-spacing:.06em}
.tile__value{
  margin-top:4px; font-family:var(--font-heading); font-weight:800;
  font-size:clamp(1.375rem,1.2rem + .8vw,1.75rem); line-height:1.1;
  color:var(--text); font-variant-numeric:tabular-nums;
}
.tile__delta{display:inline-flex; align-items:center; gap:4px; margin-top:6px;
  font-size:var(--text-xs); font-weight:600; font-variant-numeric:tabular-nums}
.tile__delta--up{color:var(--tint-success-tx)}
.tile__delta--down{color:var(--tint-error-tx)}
.tile__note{margin-top:6px; font-size:var(--text-xs); color:var(--text-3)}

/* ==========================================================================
   07. BADGES & CHIPS
   ========================================================================== */
.badge{
  display:inline-flex; align-items:center; gap:6px;
  padding:.25rem .7rem; border-radius:var(--r-pill);
  font-size:var(--text-xs); font-weight:700; white-space:nowrap;
}
.badge--violet{background:var(--tint-violet-bg); color:var(--tint-violet-tx)}
.badge--success{background:var(--tint-success-bg); color:var(--tint-success-tx)}
.badge--warning{background:var(--tint-warning-bg); color:var(--tint-warning-tx)}
.badge--error{background:var(--tint-error-bg); color:var(--tint-error-tx)}

/* "Read-only · No password" trust badge — show near any stats/connection UI */
.badge-ro{
  display:inline-flex; align-items:center; gap:8px;
  padding:.4rem .9rem; border-radius:var(--r-pill);
  background:var(--surface); border:1px solid var(--border); box-shadow:var(--shadow-soft);
  font-family:var(--font-heading); font-weight:700; font-size:var(--text-xs);
  color:var(--text);
}
.badge-ro svg{flex:none}

/* Last-synced chip — always show near data so freshness is honest */
.chip-sync{
  display:inline-flex; align-items:center; gap:6px;
  padding:.25rem .7rem; border-radius:var(--r-pill);
  background:var(--surface-2); border:1px solid var(--border);
  font-size:var(--text-xs); color:var(--text-3);
  font-variant-numeric:tabular-nums;
}
.chip-sync i{width:7px; height:7px; border-radius:50%; background:var(--success-500)}

.plan-badge{
  display:inline-flex; align-items:center; gap:6px;
  padding:.25rem .75rem; border-radius:var(--r-pill);
  background:var(--tint-violet-bg); border:1px solid var(--tint-violet-bd);
  color:var(--tint-violet-tx); font-weight:700; font-size:var(--text-xs);
}

/* ==========================================================================
   08. TABLES
   ========================================================================== */
.table-wrap{
  overflow-x:auto; -webkit-overflow-scrolling:touch;
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--r-lg); box-shadow:var(--shadow-soft);
}
.table{width:100%; min-width:520px; border-collapse:collapse; font-size:var(--text-sm)}
.table th,.table td{padding:.7rem var(--sp-md); text-align:left}
.table thead th{
  font-size:var(--text-xs); font-weight:700; letter-spacing:.06em; text-transform:uppercase;
  color:var(--text-3); border-bottom:2px solid var(--border);
}
.table tbody tr + tr td{border-top:1px solid var(--border)}
.table td{color:var(--text-2)}
.table .td-num{text-align:right; font-variant-numeric:tabular-nums; color:var(--text); font-weight:600}

/* ==========================================================================
   09. FORMS
   ========================================================================== */
.field{margin-bottom:var(--sp-md)}
.field label{display:block; margin-bottom:4px; font-size:var(--text-sm); font-weight:600; color:var(--text)}
.field input,.field select,.field textarea{
  width:100%; min-height:46px; padding:.6rem .85rem;
  border:1px solid var(--border); border-radius:var(--r-md);
  background:var(--surface); color:var(--text); font-size:1rem;
  transition:border-color var(--tr-fast);
}
.field textarea{min-height:96px; resize:vertical}
.field input:hover,.field select:hover,.field textarea:hover{border-color:var(--navy-200)}
[data-theme="dark"] .field input:hover,[data-theme="dark"] .field select:hover{border-color:var(--violet-400)}
.field input[aria-invalid="true"]{border-color:var(--error-500)}
.field__hint{margin-top:4px; font-size:var(--text-xs); color:var(--text-3)}
.field__error{display:none; margin-top:4px; font-size:var(--text-xs); color:var(--tint-error-tx)}
.field.has-error .field__error{display:block}
.field__wrap{position:relative}
.field__toggle{
  position:absolute; top:50%; right:6px; transform:translateY(-50%);
  width:36px; height:36px; border:0; border-radius:var(--r-sm);
  display:inline-flex; align-items:center; justify-content:center;
  background:transparent; color:var(--text-3); cursor:pointer;
}
.field__toggle:hover{color:var(--violet-500)}

/* ==========================================================================
   10. MODAL & ACTION SHEET
   ========================================================================== */
.overlay{
  position:fixed; inset:0; z-index:var(--z-overlay);
  display:none; align-items:center; justify-content:center;
  background:var(--scrim); padding:var(--sp-md);
}
.overlay.is-open{display:flex}
.modal{
  width:100%; max-width:420px;
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--r-lg); box-shadow:var(--shadow-lift);
  padding:var(--sp-lg);
  animation:pop 160ms var(--ease);
}
@keyframes pop{from{opacity:0; transform:translateY(8px) scale(.98)} to{opacity:1; transform:none}}
.modal__head{display:flex; align-items:flex-start; justify-content:space-between; gap:var(--sp-sm); margin-bottom:var(--sp-sm)}
.modal__title{font-size:1.0625rem}
.modal__close{
  width:34px; height:34px; flex:none; border:0; border-radius:var(--r-sm);
  display:inline-flex; align-items:center; justify-content:center;
  background:transparent; color:var(--text-3); cursor:pointer; font-size:1.1rem;
}
.modal__close:hover{color:var(--text); background:var(--surface-2)}
.modal__body{font-size:var(--text-sm); color:var(--text-2)}
.modal__foot{display:flex; justify-content:flex-end; gap:var(--sp-sm); margin-top:var(--sp-lg)}

/* Action sheet (mobile "More" menu) — bottom-anchored modal variant */
.overlay--sheet{align-items:flex-end; padding:0}
.sheet{
  width:100%; max-width:640px; margin-inline:auto;
  background:var(--surface); border:1px solid var(--border); border-bottom:0;
  border-radius:var(--r-lg) var(--r-lg) 0 0; box-shadow:var(--shadow-lift);
  padding:var(--sp-sm) var(--sp-md) calc(var(--sp-md) + env(safe-area-inset-bottom));
  animation:rise 180ms var(--ease);
}
@keyframes rise{from{transform:translateY(24px); opacity:.6} to{transform:none; opacity:1}}
.sheet__grab{width:36px; height:4px; border-radius:2px; background:var(--border); margin:2px auto var(--sp-sm)}
.sheet .nav-item{padding:.8rem .75rem; font-size:1rem}

/* ==========================================================================
   11. TOASTS
   ========================================================================== */
.toast-region{
  position:fixed; z-index:var(--z-toast);
  left:50%; transform:translateX(-50%);
  bottom:calc(var(--bottombar-h) + var(--sp-md));
  display:grid; gap:var(--sp-xs); width:min(92vw,380px);
  pointer-events:none;
}
@media (min-width:1024px){ .toast-region{bottom:var(--sp-lg)} }
.toast{
  display:flex; align-items:flex-start; gap:10px;
  background:var(--surface); border:1px solid var(--border); border-left:4px solid var(--violet-500);
  border-radius:var(--r-md); box-shadow:var(--shadow-lift);
  padding:.7rem .9rem; font-size:var(--text-sm); color:var(--text);
  animation:pop 160ms var(--ease); pointer-events:auto;
}
.toast--success{border-left-color:var(--success-500)}
.toast--error{border-left-color:var(--error-500)}
.toast--warning{border-left-color:var(--warning-500)}

/* ==========================================================================
   12. EMPTY STATES
   ========================================================================== */
.empty{
  padding:var(--sp-2xl) var(--sp-lg);
  border:2px dashed var(--border); border-radius:var(--r-lg);
  text-align:center; color:var(--text-3);
}
.empty__icon{
  width:48px; height:48px; margin:0 auto var(--sp-sm);
  display:flex; align-items:center; justify-content:center;
  border-radius:var(--r-md); background:var(--tint-violet-bg); color:var(--tint-violet-tx);
}
.empty__title{font-family:var(--font-heading); font-weight:700; color:var(--text); margin-bottom:4px}
.empty p{font-size:var(--text-sm); max-width:26rem; margin-inline:auto}
.empty .btn{margin-top:var(--sp-md)}

/* ==========================================================================
   13. MENUS (user dropdown)
   ========================================================================== */
.menu-wrap{position:relative}
.menu{
  position:absolute; top:calc(100% + 8px); right:0; z-index:var(--z-overlay);
  min-width:210px; display:none;
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--r-md); box-shadow:var(--shadow-lift); padding:6px;
}
.menu.is-open{display:block; animation:pop 140ms var(--ease)}
.menu__info{padding:8px 10px 10px; border-bottom:1px solid var(--border); margin-bottom:6px}
.menu__name{font-weight:700; font-size:var(--text-sm); color:var(--text)}
.menu__meta{font-size:var(--text-xs); color:var(--text-3)}
.menu__item{
  display:flex; width:100%; align-items:center; gap:8px;
  padding:.55rem .65rem; border:0; border-radius:var(--r-sm);
  background:transparent; text-align:left; cursor:pointer;
  font-size:var(--text-sm); font-weight:600; color:var(--text-2); text-decoration:none;
}
.menu__item:hover{background:var(--surface-2); color:var(--violet-500)}
[data-theme="dark"] .menu__item:hover{color:#D3BEFA}
.menu__item--danger{color:var(--tint-error-tx)}
.menu__item--danger:hover{background:var(--tint-error-bg); color:var(--tint-error-tx)}

/* ==========================================================================
   14. UTILITIES
   ========================================================================== */
.visually-hidden{
  position:absolute!important; width:1px; height:1px; margin:-1px; padding:0;
  overflow:hidden; clip:rect(0 0 0 0); clip-path:inset(50%); white-space:nowrap; border:0;
}
.row{display:flex; flex-wrap:wrap; align-items:center; gap:var(--sp-sm)}
.row--between{justify-content:space-between}
.stack{display:grid; gap:var(--sp-md)}
.muted{color:var(--text-3); font-size:var(--text-sm)}
.mt-lg{margin-top:var(--sp-lg)}
.mt-md{margin-top:var(--sp-md)}

/* ==========================================================================
   15. ONBOARDING WIZARD (shared: also reused by future connect flows)
   ========================================================================== */
.wizard{max-width:640px; margin-inline:auto}
.wizard .card{padding:var(--sp-xl)}

/* Stepper */
.stepper{display:flex; justify-content:center; gap:var(--sp-lg); margin-bottom:var(--sp-lg)}
.stepper li{display:flex; flex-direction:column; align-items:center; gap:6px; font-size:var(--text-xs); font-weight:600; color:var(--text-3)}
.stepper i{
  width:30px; height:30px; border-radius:var(--r-pill);
  display:flex; align-items:center; justify-content:center;
  background:var(--surface-2); border:2px solid var(--border);
  font-style:normal; font-family:var(--font-heading); font-weight:800; font-size:.8125rem;
  font-variant-numeric:tabular-nums;
}
.stepper li.is-active{color:var(--tint-violet-tx)}
.stepper li.is-active i{background:var(--tint-violet-bg); border-color:var(--violet-500); color:var(--tint-violet-tx)}
.stepper li.is-done i{background:var(--tint-success-bg); border-color:var(--success-500); color:var(--tint-success-tx)}

/* Panels */
.panel[hidden]{display:none}
.panel__title{font-size:1.25rem; font-weight:800; margin-bottom:var(--sp-xs)}
.panel__body{font-size:var(--text-sm); color:var(--text-2); margin-bottom:var(--sp-lg)}
.panel__foot{display:flex; flex-wrap:wrap; gap:var(--sp-sm); justify-content:space-between; align-items:center; margin-top:var(--sp-lg)}
.panel__list{display:grid; gap:var(--sp-sm); margin-bottom:var(--sp-lg)}
.panel__list li{display:flex; gap:10px; align-items:flex-start; font-size:var(--text-sm); color:var(--text-2)}
.panel__list svg{flex:none; margin-top:1px}

/* Choice cards (connect vs manual) */
.choice{position:relative; border:2px solid var(--border); border-radius:var(--r-lg); padding:var(--sp-lg); background:var(--surface); transition:border-color var(--tr-fast)}
.choice--rec{border-color:var(--violet-500)}
.choice__flag{position:absolute; top:0; left:var(--sp-lg); transform:translateY(-50%)}
.choice__title{font-size:1rem; margin-bottom:var(--sp-xs)}
.choice__body{font-size:var(--text-sm); color:var(--text-2)}
.choice + .choice{margin-top:var(--sp-lg)}
.perm-list{display:grid; gap:var(--sp-xs); margin-block:var(--sp-md)}
.perm-list li{display:flex; gap:8px; align-items:center; font-size:var(--text-sm); color:var(--text-2)}
.perm-list svg{flex:none}
.choice__never{
  display:flex; gap:8px; align-items:flex-start;
  margin-block:var(--sp-md); padding:var(--sp-sm) var(--sp-md);
  background:var(--tint-violet-bg); border-radius:var(--r-md);
  font-size:var(--text-sm); font-weight:700; color:var(--tint-violet-tx);
}
.choice__never svg{flex:none; margin-top:2px}

/* File upload */
.upload{display:flex; flex-wrap:wrap; align-items:center; gap:var(--sp-sm)}
.upload input[type="file"]{position:absolute; width:1px; height:1px; opacity:0; overflow:hidden}
.upload__name{font-size:var(--text-sm); color:var(--text-3); font-variant-numeric:tabular-nums}
.upload__thumb{width:44px; height:44px; object-fit:cover; border-radius:var(--r-sm); border:1px solid var(--border)}

/* Success */
.ob-success{text-align:center}
.ob-success__icon{
  width:64px; height:64px; margin:0 auto var(--sp-md);
  display:flex; align-items:center; justify-content:center;
  border-radius:var(--r-pill); background:var(--tint-success-bg);
}
.ob-summary{display:grid; gap:var(--sp-xs); margin-block:var(--sp-lg); text-align:left}
.ob-summary p{
  display:flex; justify-content:space-between; gap:var(--sp-md);
  padding:.6rem var(--sp-md); border:1px solid var(--border); border-radius:var(--r-md);
  font-size:var(--text-sm); color:var(--text-2); font-variant-numeric:tabular-nums;
}
.ob-summary strong{color:var(--text)}

/* Auth screens (no shell) */
.auth-page{
  min-height:100vh; display:flex; align-items:center; justify-content:center;
  padding:var(--sp-lg); background:var(--bg);
}
.auth-box{width:100%; max-width:400px}
.auth-box .card{padding:var(--sp-xl)}
.auth-brand{display:flex; justify-content:center; margin-bottom:var(--sp-lg)}
.auth-brand img{height:44px; width:auto}
.auth-foot{margin-top:var(--sp-md); text-align:center; font-size:var(--text-xs); color:var(--text-3)}
