/* =============================================================================
   Genie UI — Production design system
   Dark SaaS dashboard theme
   ============================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

:root {
  --bg: #0a0e17;
  --bg-deep: #070a11;
  --surface: #111827;
  --surface-2: #182236;
  --surface-3: #1f2b43;
  --border: #22304a;
  --border-soft: #1a2438;
  --text: #e8ecf5;
  --muted: #94a0b8;
  --muted-2: #64718c;
  --accent: #6366f1;
  --accent-2: #8b5cf6;
  --accent-glow: rgba(99, 102, 241, .28);
  --cyan: #06b6d4;
  --success: #10b981;
  --success-soft: rgba(16, 185, 129, .14);
  --warning: #f59e0b;
  --warning-soft: rgba(245, 158, 11, .14);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, .14);
  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 20px;
  --topbar-height: 64px;
  --sidebar-width: 264px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Plus Jakarta Sans', 'Inter', sans-serif;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .25);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, .5);
  --gradient: linear-gradient(135deg, #6366f1, #8b5cf6);
  --gradient-soft: linear-gradient(135deg, rgba(99,102,241,.16), rgba(139,92,246,.10));
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  padding: 0; margin: 0;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }
h1, h2, h3, h4 { font-family: var(--font-display); }
::selection { background: var(--accent); color: #fff; }

/* =============================================================================
   Alerts (auth pages)
   ============================================================================= */
.alert-error {
  background: var(--danger-soft); border: 1px solid rgba(239,68,68,.5); color: #f87171;
  border-radius: 10px; padding: 11px 14px; font-size: 13px; margin-top: 14px;
  white-space: pre-wrap; word-break: break-word;
}
.alert-success {
  background: var(--success-soft); border: 1px solid rgba(16,185,129,.5); color: #34d399;
  border-radius: 10px; padding: 11px 14px; font-size: 13px; margin-top: 14px;
}

/* =============================================================================
   Scrollbar
   ============================================================================= */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #27344f; border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #324368; }

/* =============================================================================
   AUTH PAGES — split-brand hero
   ============================================================================= */
.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background:
    radial-gradient(1100px 500px at 80% -10%, var(--accent-glow), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, var(--accent-glow), transparent 60%),
    var(--bg);
}
.auth-shell {
  width: 100%;
  max-width: 960px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  min-height: 560px;
}
.auth-brand {
  background:
    radial-gradient(500px 300px at 20% 0%, var(--accent-glow), transparent 60%),
    radial-gradient(400px 260px at 90% 100%, var(--accent-glow), transparent 60%),
    var(--surface-2);
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--border);
}
.auth-brand-top { display: flex; align-items: center; gap: 12px; }
.brand-orb {
  width: 42px; height: 42px; border-radius: 13px;
  display: grid; place-items: center;
  background: var(--gradient);
  color: #fff; font-size: 21px;
  box-shadow: 0 8px 24px var(--accent-glow);
}
.brand-orb.sm { width: 32px; height: 32px; border-radius: 10px; font-size: 15px; }
.brand-word { font-family: var(--font-display); font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.brand-word span { color: var(--accent); }

.auth-brand h2 {
  font-size: 30px; line-height: 1.18; font-weight: 800; letter-spacing: -.02em;
  margin: 18px 0 12px;
}
.auth-brand h2 .hl { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-brand .brand-sub { color: var(--muted); font-size: 14px; max-width: 320px; }

.brand-features { display: flex; flex-direction: column; gap: 14px; margin-top: 28px; }
.brand-feature { display: flex; gap: 12px; align-items: flex-start; }
.brand-feature .feat-ic {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 14px; color: var(--accent);
  background: var(--gradient-soft); border: 1px solid var(--accent-glow);
}
.brand-feature .feat-title { font-weight: 600; font-size: 13.5px; }
.brand-feature .feat-desc { color: var(--muted); font-size: 12.5px; }
.auth-brand-foot { color: var(--muted-2); font-size: 12px; margin-top: 28px; }
.auth-brand-foot i { color: var(--cyan); margin-right: 6px; }

.auth-panel { padding: 44px 40px; display: flex; flex-direction: column; justify-content: center; }
.auth-panel h1 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.auth-panel .auth-sub { color: var(--muted); font-size: 13.5px; margin: 6px 0 26px; }

.auth-tabs {
  display: flex; gap: 4px; margin-bottom: 24px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 12px; padding: 4px;
}
.auth-tab {
  flex: 1; background: transparent; border: none;
  color: var(--muted); padding: 9px 0; border-radius: 9px;
  cursor: pointer; font-weight: 600; font-size: 13px; font-family: inherit;
  transition: all .2s ease;
}
.auth-tab.active { background: var(--gradient); color: #fff; box-shadow: 0 4px 16px var(--accent-glow); }
.auth-divider { display:flex; align-items:center; gap:10px; margin:16px 0; color:var(--muted); font-size:12px; }
.auth-divider::before,.auth-divider::after { content:""; flex:1; height:1px; background:var(--border-soft); }
.btn-google { display:flex; align-items:center; justify-content:center; gap:10px; width:100%; padding:10px 16px; border:1.5px solid var(--border); border-radius:var(--radius-sm); background:var(--surface-2); color:var(--text); font-size:14px; font-weight:600; text-decoration:none; transition:border-color .15s, box-shadow .15s; cursor:pointer; }
.btn-google:hover { border-color:var(--accent); box-shadow:0 2px 12px rgba(0,0,0,.15); }

/* =============================================================================
   Forms
   ============================================================================= */
.field { margin-bottom: 16px; }
.field label {
  display: flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 600; color: var(--muted);
  margin-bottom: 7px;
}
.field label i { color: var(--accent); width: 15px; text-align: center; }
.field label .req { color: var(--danger); }
input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="url"], input[type="datetime-local"],
input[type="date"], input[type="time"], input[type="search"], select, textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 14px; font-family: inherit;
  transition: border-color .18s ease, box-shadow .18s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
input::placeholder, textarea::placeholder { color: var(--muted-2); }
textarea { min-height: 102px; resize: vertical; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2394a0b8' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center;
  padding-right: 34px; cursor: pointer;
}
select option { background: var(--surface); color: var(--text); }
input[type="datetime-local"]::-webkit-calendar-picker-indicator { filter: invert(.7); cursor: pointer; }

.form-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.form-row .field { margin-bottom: 0; }
.field-btn-spacer { padding-top: 30px; }

/* =============================================================================
   Buttons
   ============================================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--gradient); color: #fff;
  border: none; border-radius: 10px; padding: 10px 18px;
  font-size: 13.5px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: all .18s ease; white-space: nowrap;
  box-shadow: 0 4px 16px var(--accent-glow);
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 6px 22px var(--accent-glow); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; filter: none; transform: none; box-shadow: none; }
.btn.block { width: 100%; }
.btn-lg { padding: 12px 22px; font-size: 14.5px; }

.btn-ghost {
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border);
  box-shadow: none;
}
.btn-ghost:hover { background: var(--surface-3); border-color: #2c3b5c; box-shadow: none; }
.btn-soft { background: rgba(99,102,241,.14); color: #a5b4fc; box-shadow: none; }
.btn-soft:hover { background: rgba(99,102,241,.22); box-shadow: none; }
.btn-success { background: var(--success); box-shadow: 0 4px 16px rgba(16,185,129,.25); }
.btn-danger { background: var(--danger); box-shadow: 0 4px 16px rgba(239,68,68,.22); }
.btn-danger:hover { filter: brightness(1.08); box-shadow: 0 6px 22px rgba(239,68,68,.3); }
.btn-sm { padding: 7px 13px; font-size: 12.5px; border-radius: 8px; }
.btn-xs { padding: 5px 10px; font-size: 11.5px; border-radius: 7px; }

.icon-btn {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--muted); cursor: pointer; transition: all .18s ease; font-size: 14px;
}
.icon-btn:hover { color: var(--text); background: var(--surface-3); border-color: #2c3b5c; }
.icon-btn.danger:hover { color: var(--danger); background: var(--danger-soft); border-color: rgba(239,68,68,.4); }

/* =============================================================================
   App shell
   ============================================================================= */
.app-body { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }

.topbar {
  flex-shrink: 0; height: var(--topbar-height);
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: rgba(17, 24, 39, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 20px; z-index: 40;
}
.topbar-left { display: flex; align-items: center; gap: 14px; }
.topbar-brand { display: flex; align-items: center; gap: 11px; }
.topbar-brand .brand-name { font-family: var(--font-display); font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.topbar-brand .brand-name span { color: var(--accent); }
.topbar-brand .brand-tag {
  font-size: 10px; font-weight: 600; color: var(--accent); letter-spacing: .08em; text-transform: uppercase;
  background: var(--accent-glow); padding: 3px 8px; border-radius: 6px;
}

.topbar-search {
  display: flex; align-items: center; gap: 9px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 7px 13px; width: 300px; max-width: 34vw;
}
.topbar-search i { color: var(--muted-2); font-size: 13px; }
.topbar-search input { background: none; border: none; outline: none; color: var(--text); font-size: 13px; width: 100%; }
.topbar-search input::placeholder { color: var(--muted-2); }
.topbar-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

.topbar-right { display: flex; align-items: center; gap: 10px; }

.credit-pill {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 14px 6px 8px; cursor: default;
}
.credit-pill .cp-ic {
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; font-size: 11px; color: #0a0e17;
  background: linear-gradient(135deg, #fbbf24, #f59e0b); font-weight: 800;
}
.credit-pill .cp-label { font-size: 10.5px; color: var(--muted-2); line-height: 1.2; text-transform: uppercase; letter-spacing: .04em; }
.credit-pill .cp-num { font-size: 13.5px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.credit-pill.live { border-color: rgba(245,158,11,.45); box-shadow: 0 0 0 3px rgba(245,158,11,.1); }

.user-menu { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 5px 10px 5px 5px; border-radius: 11px; transition: background .15s ease; }
.user-menu:hover { background: var(--surface-2); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13.5px; font-weight: 700; color: #fff;
  background: var(--gradient); overflow: hidden; flex-shrink: 0;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.plain { background: var(--surface-3); color: var(--accent); border: 1px solid var(--border); }
.user-menu .um-info { line-height: 1.15; }
.user-menu .um-name { font-size: 13px; font-weight: 600; }
.user-menu .um-role { font-size: 10.5px; color: var(--muted-2); text-transform: capitalize; }

.app-container { display: flex; flex: 1; overflow: hidden; }

/* Sidebar */
.sidebar {
  width: var(--sidebar-width); flex-shrink: 0;
  background: rgba(13, 18, 29, .9);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; overflow-y: auto;
  transition: margin-left .28s ease, opacity .28s ease;
}
.sidebar.collapsed { margin-left: calc(-1 * var(--sidebar-width)); opacity: 0; pointer-events: none; }

.sidebar-section {
  padding: 16px 16px 6px; color: var(--muted-2);
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em;
}
.sidebar-nav { list-style: none; padding: 4px 10px; flex: 1; }
.s-nav-item { margin-bottom: 2px; }
.s-nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; cursor: pointer; color: var(--muted);
  font-size: 13.5px; border-radius: 10px;
  border-left: 3px solid transparent;
  transition: all .15s ease; text-decoration: none;
}
.s-nav-link:hover { color: var(--text); background: var(--surface-2); }
.s-nav-link.active {
  color: #fff; background: var(--gradient);
  border-left-color: #0a0e17; font-weight: 600;
  box-shadow: 0 4px 18px var(--accent-glow);
}
.s-nav-link i { width: 19px; text-align: center; font-size: 14px; flex-shrink: 0; }
.s-nav-link .nav-badge {
  margin-left: auto; background: var(--danger); color: #fff;
  font-size: 9.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px;
}
.s-nav-link.active .nav-badge { background: rgba(255,255,255,.25); }

.sidebar-foot { padding: 12px 10px 16px; border-top: 1px solid var(--border); }
.sidebar-foot .s-nav-link { border-left-color: transparent; }

.sidebar-ad {
  margin: 10px 12px; padding: 14px; border-radius: 12px;
  background: var(--gradient-soft); border: 1px solid rgba(99,102,241,.25);
}
.sidebar-ad .sa-title { font-size: 12.5px; font-weight: 700; margin-bottom: 3px; }
.sidebar-ad .sa-sub { font-size: 11.5px; color: var(--muted); margin-bottom: 10px; }

/* Main */
.main-content { flex: 1; overflow-y: auto; min-width: 0; }
.content-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 24px 28px 0;
}
.content-header h2 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.content-header .ch-sub { color: var(--muted); font-size: 13px; margin-top: 3px; }
.section-badge {
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--muted); font-size: 11px; padding: 4px 12px; border-radius: 999px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em;
}
.content-body { padding: 20px 28px 60px; }

/* Tabs under the page title: pages that share one menu item (routes.js → MENU). Not ".section-tabs" — that class
   is the in-page tab control used inside some pages. */
.page-tabs { display: flex; gap: 4px; margin: 14px 28px 0; border-bottom: 1px solid var(--border); overflow-x: auto; }
.page-tabs[hidden] { display: none; }
.page-tab {
  padding: 9px 14px; font-size: 13.5px; font-weight: 600; color: var(--muted); text-decoration: none; white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px; border-radius: 8px 8px 0 0;
}
.page-tab:hover { color: var(--text, inherit); background: var(--surface-2); }
.page-tab.active { color: var(--text, #fff); border-bottom-color: var(--accent); }
@media (max-width: 768px) { .page-tabs { margin: 10px 16px 0; } }

.loading-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 90px 20px; color: var(--muted); gap: 14px;
}
.loading-state .spinner {
  width: 38px; height: 38px; border-radius: 50%;
  border: 3px solid var(--surface-3); border-top-color: var(--accent);
  animation: spin .7s linear infinite;
}
.loading-state p { font-size: 13.5px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* =============================================================================
   Cards & stat cards
   ============================================================================= */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px; margin-bottom: 16px;
}
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-header h3 { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 9px; }
.card-header h3 i { color: var(--accent); font-size: 14px; }
.card-header .ch-right { display: flex; align-items: center; gap: 8px; }
.card-sub { color: var(--muted); font-size: 12.5px; margin: -8px 0 16px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; display: flex; align-items: center; gap: 14px;
  transition: border-color .2s ease, transform .2s ease;
}
.stat-card:hover { border-color: #2c3b5c; transform: translateY(-2px); }
.stat-card .sc-ic {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 18px;
}
.sc-ic.indigo { background: var(--accent-glow); color: #a5b4fc; }
.sc-ic.cyan { background: rgba(6,182,212,.14); color: #67e8f9; }
.sc-ic.green { background: var(--success-soft); color: #34d399; }
.sc-ic.amber { background: var(--warning-soft); color: #fbbf24; }
.sc-ic.red { background: var(--danger-soft); color: #f87171; }
.sc-ic.violet { background: rgba(139,92,246,.15); color: #c4b5fd; }
.stat-card .sc-info { min-width: 0; }
.stat-card .sc-num { font-family: var(--font-display); font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-card .sc-label { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-top: 2px; }
.stat-card .sc-trend { font-size: 11px; margin-top: 4px; }
.sc-trend.up { color: var(--success); }
.sc-trend.down { color: var(--danger); }

/* Progress */
.progress-track { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 999px; background: var(--gradient); transition: width .6s ease; }
.progress-fill.green { background: linear-gradient(90deg, #10b981, #34d399); }
.progress-fill.amber { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.progress-fill.red { background: linear-gradient(90deg, #ef4444, #f87171); }
.progress-meta { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-top: 7px; }

/* =============================================================================
   Badges / pills
   ============================================================================= */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600;
  white-space: nowrap;
}
.pill i { font-size: 9px; }
.pill.gray { background: var(--surface-3); color: var(--muted); }
.pill.blue { background: rgba(99,102,241,.16); color: #a5b4fc; }
.pill.cyan { background: rgba(6,182,212,.14); color: #67e8f9; }
.pill.green { background: var(--success-soft); color: #34d399; }
.pill.amber { background: var(--warning-soft); color: #fbbf24; }
.pill.red { background: var(--danger-soft); color: #f87171; }
.pill.violet { background: rgba(139,92,246,.16); color: #c4b5fd; }

.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-queued, .status-draft { background: var(--surface-3); color: var(--muted); }
.status-processing { background: rgba(6,182,212,.14); color: #67e8f9; }
.status-succeeded, .status-published { background: var(--success-soft); color: #34d399; }
.status-failed { background: var(--danger-soft); color: #f87171; }
.status-canceled { background: var(--warning-soft); color: #fbbf24; }
.status-scheduled { background: rgba(99,102,241,.16); color: #a5b4fc; }

/* Plan badge */
.plan-badge {
  font-family: var(--font-display); font-size: 11px; font-weight: 700;
  padding: 4px 12px; border-radius: 8px; text-transform: uppercase; letter-spacing: .06em;
}
.plan-free { background: var(--surface-3); color: var(--muted); }
.plan-starter { background: var(--warning-soft); color: #fbbf24; }
.plan-pro { background: var(--accent-glow); color: #a5b4fc; }
.plan-business { background: var(--gradient); color: #fff; }

/* Plan comparison grid (Credits & Wallet) */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.plan-card {
  border: 1px solid var(--border); border-radius: 14px; padding: 16px;
  display: flex; flex-direction: column; gap: 10px; background: var(--surface-2);
}
.plan-card.current { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.plan-card-name { font-family: var(--font-display); font-weight: 700; text-transform: capitalize; font-size: 15px; }
.plan-card-credits { font-size: 13px; color: var(--muted); }
.plan-card-credits span { font-size: 11px; color: var(--muted-2); }
.plan-card-feats { list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 12px; flex: 1; }
.plan-card-feats li { display: flex; align-items: center; gap: 8px; text-transform: capitalize; }
.plan-card-feats li.on { color: var(--text); }
.plan-card-feats li.on i { color: #34d399; }
.plan-card-feats li.off { color: var(--muted-2); }
.plan-card-feats li.off i { color: var(--muted-2); }

/* =============================================================================
   Tables
   ============================================================================= */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table thead th {
  text-align: left; padding: 10px 14px;
  color: var(--muted); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table tbody td { padding: 12px 14px; border-bottom: 1px solid var(--border-soft); font-size: 13px; vertical-align: middle; }
.table tbody tr { transition: background .12s ease; }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: none; }
.table .cell-mono { font-family: ui-monospace, 'SF Mono', Consolas, monospace; font-size: 12px; color: var(--muted); }
.table .cell-strong { font-weight: 600; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .ta-right { text-align: right; }
.amount-pos { color: var(--success); font-weight: 700; }
.amount-neg { color: var(--danger); font-weight: 700; }

/* =============================================================================
   Job / list cards
   ============================================================================= */
.list-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 15px 17px; margin-bottom: 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  transition: border-color .15s ease;
}
.list-card:hover { border-color: #2c3b5c; }
.list-card .jc-main { flex: 1; min-width: 200px; }
.list-card .jc-title { font-weight: 600; font-size: 13.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.list-card .jc-meta { font-size: 12px; color: var(--muted); margin-top: 5px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.list-card .jc-meta b { color: var(--text); font-weight: 600; }
.list-card .jc-actions { display: flex; gap: 7px; }
.list-card .plat-ic {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  font-size: 14px; color: #fff; flex-shrink: 0;
}

/* Platform brand colors */
.ig-post {
  position: relative; border-radius: 12px; overflow: hidden;
  aspect-ratio: 1/1; background: var(--surface-2); border: 1px solid var(--border);
  display: block; transition: transform .15s ease, border-color .15s ease;
}
.ig-post:hover { transform: translateY(-3px); border-color: #e1306c; box-shadow: 0 10px 30px rgba(225, 48, 108, .15); }
.ig-post img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ig-noimg { height: 100%; display: grid; place-items: center; color: var(--muted-2); }
.ig-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.65));
  color: #fff; padding: 10px;
  display: flex; flex-direction: column; justify-content: flex-end; font-size: 12px; gap: 4px;
}
.ig-stats { display: flex; gap: 12px; font-weight: 600; }
.ig-cap {
  font-size: 11px; opacity: .92; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
}
.ig-time { font-size: 10px; opacity: .75; }
.ig-types { position: absolute; top: 10px; right: 10px; }
.ig-pill { background: rgba(0,0,0,.5); color: #fff; border: 1px solid rgba(255,255,255,.22); }
.instagram-gradient-text { background: linear-gradient(45deg, #f09433, #dc2743, #bc1888); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Platform brand colors */
.plat-instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.plat-facebook { background: #1877f2; }
.plat-linkedin { background: #0a66c2; }
.plat-youtube { background: #ff0000; }
.plat-pinterest { background: #e60023; }
.plat-badge { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-size: 13px; color: #fff; }
.plat-badge.instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.plat-badge.facebook { background: #1877f2; }
.plat-badge.linkedin { background: #0a66c2; }
.plat-badge.youtube { background: #ff0000; }
.plat-badge.pinterest { background: #e60023; }
.plat-badge.whatsapp { background: #25d366; }

.connect-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 9px; font-weight: 600; font-size: 12.5px;
  color: #fff; cursor: pointer; border: none; transition: filter .18s ease, transform .18s ease;
}
.connect-btn:hover { filter: brightness(1.12); transform: translateY(-1px); }
.connect-btn.instagram { background: linear-gradient(45deg, #e6683c, #dc2743, #cc2366, #bc1888); }
.connect-btn.facebook { background: #1877f2; }
.connect-btn.linkedin { background: #0a66c2; }
.connect-btn.youtube { background: #ff0000; }
.connect-btn.pinterest { background: #e60023; }
.connect-btn.whatsapp { background: #25d366; }

/* =============================================================================
   Content composer
   ============================================================================= */
.composer-wrap { display: grid; grid-template-columns: 1.25fr .75fr; gap: 18px; }

.media-drop {
  border: 2px dashed var(--border); border-radius: var(--radius); padding: 20px;
  text-align: center; cursor: pointer; transition: all .2s ease; min-height: 160px;
  display: flex; align-items: center; justify-content: center; background: var(--surface-2);
}
.media-drop:hover, .media-drop.drag { border-color: var(--accent); background: var(--accent-glow); }
.media-drop .md-ic { font-size: 30px; color: var(--muted-2); margin-bottom: 8px; }
.media-drop .md-title { font-weight: 600; font-size: 14px; }
.media-drop .md-sub { color: var(--muted); font-size: 12px; margin-top: 3px; }
.media-preview-wrap { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.media-preview { position: relative; border-radius: 11px; overflow: hidden; aspect-ratio: 1/1; background: var(--surface-2); border: 1px solid var(--border); }
.media-preview img, .media-preview video { width: 100%; height: 100%; object-fit: cover; }
.media-preview .mp-remove {
  position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(0,0,0,.65); color: #fff; font-size: 10px;
  cursor: pointer; border: none; opacity: 0; transition: opacity .15s ease;
}
.media-preview:hover .mp-remove { opacity: 1; }
.media-preview .mp-type {
  position: absolute; bottom: 6px; left: 6px; background: rgba(0,0,0,.6); color: #fff;
  font-size: 9.5px; padding: 2px 7px; border-radius: 5px; text-transform: uppercase; letter-spacing: .04em;
}

.type-select { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 9px; }
.type-opt {
  border: 1px solid var(--border); background: var(--surface-2); border-radius: 11px;
  padding: 12px 8px; text-align: center; cursor: pointer; transition: all .15s ease;
  color: var(--muted);
}
.type-opt i { font-size: 18px; display: block; margin-bottom: 6px; }
.type-opt .to-name { font-size: 12px; font-weight: 600; }
.type-opt .to-cost { font-size: 10px; color: var(--muted-2); margin-top: 2px; }
.type-opt:hover { border-color: #2c3b5c; color: var(--text); }
.type-opt.active { border-color: var(--accent); background: var(--accent-glow); color: #fff; box-shadow: 0 0 0 3px var(--accent-glow); }

.plat-check { display: flex; gap: 9px; flex-wrap: wrap; }
.plat-check .pc {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); background: var(--surface-2);
  border-radius: 999px; padding: 7px 13px; cursor: pointer; transition: all .15s ease; font-size: 12.5px; color: var(--muted); font-weight: 500;
}
.plat-check .pc:has(input:checked) { border-color: var(--accent); color: #fff; background: var(--accent-glow); }
.plat-check .pc input { accent-color: var(--accent); width: 14px; height: 14px; cursor: pointer; }
.plat-check .pc span.pt { width: 17px; text-align: center; }

/* Phone-style preview */
.preview-phone {
  width: 100%; max-width: 340px; margin: 0 auto;
  border-radius: 28px; border: 1px solid var(--border); overflow: hidden;
  background: var(--bg); box-shadow: var(--shadow-lg);
}
.preview-phone .pp-top { display: flex; align-items: center; gap: 9px; padding: 12px 14px; }
.preview-phone .pp-top .avatar { width: 28px; height: 28px; font-size: 11px; }
.preview-phone .pp-top .pp-name { font-size: 12.5px; font-weight: 600; }
.preview-phone .pp-top .pp-loc { font-size: 10.5px; color: var(--muted-2); }
.preview-phone .pp-media { aspect-ratio: 4/3; background: var(--surface-2); position: relative; overflow: hidden; }
.preview-phone .pp-media img, .preview-phone .pp-media video { width: 100%; height: 100%; object-fit: cover; }
.preview-phone .pp-media .pp-placeholder {
  height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--muted-2); gap: 8px; font-size: 12px;
}
.preview-phone .pp-body { padding: 12px 14px 18px; }
.preview-phone .pp-actions { display: flex; gap: 14px; font-size: 17px; color: var(--text); margin-bottom: 8px; }
.preview-phone .pp-caption { font-size: 12px; line-height: 1.5; }
.preview-phone .pp-caption .pp-user { font-weight: 600; margin-right: 6px; }

/* =============================================================================
   Steps / progress stepper (posting)
   ============================================================================= */
.steps { display: flex; align-items: center; gap: 8px; }
.step-chip { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 600; }
.step-chip .sc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--surface-3); }
.step-chip.done .sc-dot { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.step-chip.active .sc-dot { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); animation: pulse 1.4s infinite; }
.step-chip.active { color: var(--text); }
.step-chip.done { color: var(--success); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }

/* =============================================================================
   Admin user picker
   ============================================================================= */
.search-user {
  display: flex; gap: 9px; align-items: center; margin-bottom: 14px;
}
.search-user input { flex: 1; }
.user-option {
  display: flex; align-items: center; gap: 12px; padding: 11px 13px;
  border: 1px solid var(--border); border-radius: 11px; cursor: pointer; transition: all .15s ease; background: var(--surface-2);
}
.user-option:hover { border-color: var(--accent); }
.user-option.selected { border-color: var(--accent); background: var(--accent-glow); }
.user-option .uo-info { flex: 1; min-width: 0; }
.user-option .uo-name { font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.user-option .uo-email { color: var(--muted); font-size: 12px; }
.user-option .uo-id { font-size: 10.5px; color: var(--muted-2); font-family: monospace; }
.user-option .uo-bal { text-align: right; }
.user-option .uo-bal .num { font-size: 15px; font-weight: 700; }

/* =============================================================================
   Modal
   ============================================================================= */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(5, 8, 14, .72); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center; z-index: 300; padding: 20px;
}
.modal-backdrop.show { display: flex; }
.modal {
  width: 100%; max-width: 460px; max-height: 90vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 24px; box-shadow: var(--shadow-lg); animation: modalIn .22s ease;
}
.modal.wide { max-width: 620px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.modal-header h3 { font-size: 17px; font-weight: 800; }
.modal-foot { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }

/* =============================================================================
   Notifications drawer
   ============================================================================= */
.notif-drawer {
  position: fixed; top: var(--topbar-height); right: 0; width: 370px; max-width: 96vw;
  max-height: calc(100vh - var(--topbar-height));
  background: var(--surface); border-left: 1px solid var(--border); border-bottom: 1px solid var(--border);
  border-radius: 0 0 0 16px; z-index: 200; overflow-y: auto; display: none;
  box-shadow: -6px 4px 30px rgba(0,0,0,.4);
}
.notif-drawer.show { display: block; }
.notif-drawer-header {
  padding: 16px; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.notif-drawer-header .nd-title { font-weight: 700; font-size: 14.5px; display: flex; align-items: center; gap: 8px; }
.notif-item { padding: 14px 16px; border-bottom: 1px solid var(--border-soft); font-size: 13px; transition: background .12s ease; }
.notif-item:hover { background: var(--surface-2); }
.notif-item.unread { background: rgba(99,102,241,.06); border-left: 3px solid var(--accent); }
.notif-item .ni-title { font-weight: 600; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.notif-item .ni-msg { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.notif-item .ni-time { font-size: 10.5px; color: var(--muted-2); margin-top: 6px; }

/* =============================================================================
   Toasts
   ============================================================================= */
.toast-container { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 400; display: flex; flex-direction: column; gap: 9px; align-items: center; }
.toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface-3); border: 1px solid var(--border);
  padding: 11px 18px; border-radius: 12px; font-size: 13px;
  box-shadow: var(--shadow-lg); animation: slideUp .28s ease; color: var(--text);
  max-width: 92vw;
}
.toast i { font-size: 14px; }
.toast.success { border-color: rgba(16,185,129,.5); }
.toast.success i { color: var(--success); }
.toast.error { border-color: rgba(239,68,68,.5); }
.toast.error i { color: var(--danger); }
.toast.info { border-color: rgba(99,102,241,.5); }
.toast.info i { color: var(--accent); }
@keyframes slideUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }

/* =============================================================================
   Misc
   ============================================================================= */
.empty-state {
  text-align: center; padding: 60px 20px; color: var(--muted);
}
.empty-state .es-ic {
  width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 18px;
  background: var(--surface-2); border: 1px solid var(--border);
  display: grid; place-items: center; font-size: 24px; color: var(--muted-2);
}
.empty-state p { font-size: 14px; }

.hero-banner {
  background: var(--gradient-soft); border: 1px solid rgba(99,102,241,.3);
  border-radius: var(--radius); padding: 20px 22px; margin-bottom: 18px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.hero-banner h3 { font-size: 17px; font-weight: 800; }
.hero-banner p { color: var(--muted); font-size: 13px; margin-top: 3px; max-width: 640px; }
.hero-banner .hb-ic {
  width: 46px; height: 46px; border-radius: 13px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 19px; color: #fff; background: var(--gradient);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.section-tabs { display: flex; gap: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 4px; margin-bottom: 18px; }
.section-tab { padding: 8px 16px; border-radius: 9px; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; background: none; border: none; font-family: inherit; transition: all .15s ease; }
.section-tab.active { background: var(--gradient); color: #fff; }

.divider { height: 1px; background: var(--border); margin: 18px 0; }

.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--border-soft); font-size: 13px; }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 600; text-align: right; }
.kv .v.mono { font-family: monospace; font-size: 12px; }

.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 14px; }
.plan-card {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column; position: relative; transition: border-color .2s ease, transform .2s ease;
}
.plan-card:hover { border-color: #2c3b5c; transform: translateY(-3px); }
.plan-card.current { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.plan-card .pc-mark { position: absolute; top: 14px; right: 14px; }
.plan-card h4 { font-size: 16px; font-weight: 800; }
.plan-card .pc-price { font-family: var(--font-display); font-size: 27px; font-weight: 800; margin: 10px 0 2px; display: flex; align-items: baseline; gap: 5px; }
.plan-card .pc-price small { font-size: 12px; color: var(--muted); font-weight: 500; }
.plan-card .pc-feats { list-style: none; margin: 14px 0 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.plan-card .pc-feats li { font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.plan-card .pc-feats li i { color: var(--success); font-size: 11px; width: 14px; }
.plan-card .pc-feats li.no { color: var(--muted-2); }
.plan-card .pc-feats li.no i { color: var(--muted-2); }

.balance-hero {
  background: var(--gradient); border-radius: var(--radius); padding: 26px 26px; margin-bottom: 18px; color: #fff;
  position: relative; overflow: hidden;
}
.balance-hero::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px;
  border-radius: 50%; background: rgba(255,255,255,.12);
}
.balance-hero .bh-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; opacity: .85; }
.balance-hero .bh-num { font-family: var(--font-display); font-size: 46px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; margin-top: 4px; font-variant-numeric: tabular-nums; }
.balance-hero .bh-row { display: flex; gap: 34px; margin-top: 18px; flex-wrap: wrap; }
.balance-hero .bh-cell { position: relative; z-index: 1; }
.balance-hero .bh-cell .n { font-size: 19px; font-weight: 700; }
.balance-hero .bh-cell .l { font-size: 11px; opacity: .8; text-transform: uppercase; letter-spacing: .06em; margin-top: 2px; }
.balance-hero .bh-reset { position: absolute; right: 24px; top: 24px; z-index: 1; background: rgba(0,0,0,.18); padding: 7px 13px; border-radius: 999px; font-size: 11.5px; display: flex; align-items: center; gap: 7px; }

/* =============================================================================
   Socket status chip
   ============================================================================= */
.socket-chip {
  position: fixed; bottom: 16px; right: 16px; z-index: 150;
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 13px; font-size: 11px; color: var(--muted); box-shadow: var(--shadow);
}
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot-connected { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.dot-disconnected { background: var(--danger); }
.dot-connecting { background: var(--warning); animation: pulse 1.2s infinite; }

/* =============================================================================
   Responsive
   ============================================================================= */
@media (max-width: 900px) {
  .composer-wrap { grid-template-columns: 1fr; }
  .auth-shell { grid-template-columns: 1fr; max-width: 480px; }
  .auth-brand { display: none; }
  .topbar-search { display: none; }
}
@media (max-width: 768px) {
  .sidebar { position: fixed; top: var(--topbar-height); left: 0; bottom: 0; z-index: 60; }
  .content-header, .content-body { padding-left: 16px; padding-right: 16px; }
  .credit-pill .cp-label { display: none; }
  .user-menu .um-info { display: none; }
}

/* =============================================================================
   Role-based sidebar (generated from public/ui/js/routes.js)
   ============================================================================= */
/* "Signed in as" chip at the top of the sidebar */
.sidebar-role {
  display: flex; align-items: center; gap: 11px;
  margin: 14px 12px 2px; padding: 10px 12px; border-radius: 12px;
  background: var(--gradient-soft); border: 1px solid rgba(99,102,241,.25);
}
.sidebar-role .sr-ic {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center; color: #fff; font-size: 14px;
  background: var(--gradient);
}
.sidebar[data-role="admin"] .sr-ic { background: linear-gradient(135deg, #06b6d4, #6366f1); }
.sidebar[data-role="super_admin"] .sr-ic { background: linear-gradient(135deg, #f59e0b, #f97316); }
.sidebar-role .sr-txt { min-width: 0; line-height: 1.25; }
.sidebar-role .sr-name { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-role .sr-role { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }

/* Links that open in a new tab (Developer group) */
.s-nav-link .s-ext { margin-left: auto; width: auto; font-size: 10px; opacity: .5; }
.s-nav-link.external:hover .s-ext { opacity: 1; }
.s-nav-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Mobile drawer backdrop — only exists while the drawer is open */
.sidebar-scrim { display: none; }
@media (max-width: 768px) {
  .sidebar { background: #0d121d; box-shadow: var(--shadow-lg); }
  .sidebar-scrim.show {
    display: block; position: fixed; z-index: 55;
    top: var(--topbar-height); left: 0; right: 0; bottom: 0;
    background: rgba(3, 6, 12, .62);
  }
}

/* ---- Home ("Start here") — public/ui/js/home.js ---- */
.home-hero p { max-width: 720px; }
.home-start .home-start-head h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.home-start .home-start-head h3 i { color: var(--accent); }
.home-start .home-start-head p { color: var(--muted); font-size: 13px; margin: 4px 0 12px; }
.home-steps { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.home-step { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; }
.home-step.next { border-color: var(--accent); background: rgba(99, 102, 241, .06); }
.home-step.done { opacity: .6; }
.home-step-ic { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 50%; border: 2px solid var(--border); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
.home-step.done .home-step-ic { background: #22c55e; border-color: #22c55e; color: #fff; }
.home-step-txt { flex: 1; min-width: 0; }
.home-step-txt b { font-size: 14px; }
.home-step-txt small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; line-height: 1.4; }
.home-step-done { color: #22c55e; font-size: 12.5px; font-weight: 600; }
.home-opt { font-size: 10.5px; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 1px 7px; margin-left: 4px; }
.home-alert { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; border: 1px solid rgba(239, 68, 68, .45); background: rgba(239, 68, 68, .08); font-size: 13.5px; }
.home-alert > i { color: #f87171; font-size: 18px; }
.home-alert > div { flex: 1; }
.home-big-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 22px; }
.home-big { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); color: inherit; cursor: pointer; font: inherit; transition: border-color .15s, transform .15s; }
.home-big:hover { border-color: var(--accent); transform: translateY(-1px); }
.home-big i { font-size: 20px; color: var(--accent); margin-bottom: 4px; }
.home-big b { font-size: 14.5px; }
.home-big small { color: var(--muted); font-size: 12.5px; }
.home-h { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 4px 0 10px; }
.home-stat { text-align: left; cursor: pointer; font: inherit; color: inherit; width: 100%; }
.home-stat:hover { border-color: var(--accent); }
.home-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.home-cols .card { margin: 0; }
.home-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.home-list li { display: flex; align-items: center; gap: 12px; }
.home-list li > div { min-width: 0; flex: 1; }
.home-list small { display: block; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-list img, .home-thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex: 0 0 44px; background: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.home-avatar { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; background: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.home-prod { color: var(--muted); font-size: 11.5px; }
.home-empty { text-align: center; padding: 18px 10px; color: var(--muted); font-size: 13px; }
.home-empty i { font-size: 22px; margin-bottom: 6px; display: block; }
.home-empty p { margin: 0 0 10px; }
.home-muted { color: var(--muted); font-size: 12.5px; margin-bottom: 12px; }
.home-actions-row { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 560px) { .home-step { flex-wrap: wrap; } .home-step .btn { margin-left: 38px; } }
.home-failed { border-color: rgba(239, 68, 68, .45); }
.home-failed .card-header h3 i { color: #f87171; }
.home-fail-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.home-fail { display: flex; gap: 12px; align-items: flex-start; }
.home-fail > img, .home-fail > .home-thumb { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; flex: 0 0 52px; background: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.home-fail-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.home-fail-txt b { font-size: 14px; }
.home-fail-txt small { color: var(--muted); font-size: 12px; }
.home-fail-txt details { font-size: 12px; color: var(--muted); }
.home-fail-txt summary { cursor: pointer; }
.home-fail-txt code { display: block; white-space: pre-wrap; word-break: break-word; margin-top: 4px; }
.home-fail-txt .home-actions-row { margin-top: 6px; }

/* =============================================================================
   THEME ENGINE — mode × palette
   ─────────────────────────────────────────────────────────────────────────────
   ORDER IS CRITICAL — same specificity (one attr = 10pts) means last wins.
   1. [data-theme=X]          — dark accent + dark bg/surface
   2. [data-mode=light]       — light bg/surface (AFTER themes → overrides dark bg)
   3. [data-theme=X][data-mode=light] — light accent (20pts → always wins)
   ============================================================================= */

/* ── Theme: Gold — Genie brand metallic gold ──────────────────── */
[data-theme="gold"] {
  --accent: #d4a017; --accent-2: #f5c432; --accent-glow: rgba(212,160,23,.28);
  --gradient: linear-gradient(135deg, #b07a10, #d4a017, #f5c432);
  --gradient-soft: linear-gradient(135deg, rgba(212,160,23,.14), rgba(245,196,50,.07));
  --bg: #0a0a0a; --bg-deep: #070707;
  --surface: #111111; --surface-2: #191919; --surface-3: #222222;
  --border: #2e2e2e; --border-soft: #202020;
}

/* ── Theme: Emerald ───────────────────────────────────────────── */
[data-theme="emerald"] {
  --accent: #10b981; --accent-2: #34d399; --accent-glow: rgba(16,185,129,.28);
  --gradient: linear-gradient(135deg,#059669,#10b981);
  --gradient-soft: linear-gradient(135deg,rgba(16,185,129,.16),rgba(52,211,153,.08));
  --bg: #07130f; --bg-deep: #050e0a;
  --surface: #0f1f18; --surface-2: #162b22; --surface-3: #1d382c;
  --border: #1e3c2b; --border-soft: #142a1f;
}

/* ── Theme: Mono  (Black & White — Vapi / ElevenLabs style) ──── */
[data-theme="mono"] {
  --accent: #d4d4d4; --accent-2: #f5f5f5; --accent-glow: rgba(212,212,212,.18);
  --gradient: linear-gradient(135deg, #1c1c1c, #3d3d3d);
  --gradient-soft: linear-gradient(135deg, rgba(200,200,200,.12), rgba(240,240,240,.07));
  --bg: #080808; --bg-deep: #050505;
  --surface: #111111; --surface-2: #1a1a1a; --surface-3: #242424;
  --border: #2e2e2e; --border-soft: #202020;
}

/* ── Theme: Aurora  (Teal → Violet) ──────────────────────────── */
[data-theme="aurora"] {
  --accent: #14b8a6; --accent-2: #8b5cf6; --accent-glow: rgba(20,184,166,.26);
  --gradient: linear-gradient(135deg,#14b8a6,#8b5cf6);
  --gradient-soft: linear-gradient(135deg,rgba(20,184,166,.16),rgba(139,92,246,.10));
  --bg: #070d11; --bg-deep: #040a0d;
  --surface: #0d1c20; --surface-2: #12282e; --surface-3: #17333c;
  --border: #1a3e4a; --border-soft: #122e38;
}

/* ── Theme: Cosmos  (Blue → Violet) ──────────────────────────── */
[data-theme="cosmos"] {
  --accent: #3b82f6; --accent-2: #a855f7; --accent-glow: rgba(59,130,246,.26);
  --gradient: linear-gradient(135deg,#3b82f6,#a855f7);
  --gradient-soft: linear-gradient(135deg,rgba(59,130,246,.16),rgba(168,85,247,.10));
  --bg: #07080f; --bg-deep: #04050c;
  --surface: #10101c; --surface-2: #181628; --surface-3: #201e34;
  --border: #2c2848; --border-soft: #201c3c;
}

/* ── Light mode base — MUST come after all single-attr theme blocks ──
   Same specificity (10pts), so this wins over any [data-theme=X] above
   when data-mode="light" is also set on <html>.                        */
[data-mode="light"] {
  --bg: transparent;
  --bg-deep: rgba(230,234,255,.6);
  --surface: rgba(255,255,255,.72);
  --surface-2: rgba(255,255,255,.52);
  --surface-3: rgba(255,255,255,.36);
  --border: rgba(255,255,255,.70);
  --border-soft: rgba(255,255,255,.45);
  --text: #0d1229;
  --muted: #445070;
  --muted-2: #7285a8;
  --shadow: 0 2px 8px rgba(14,20,60,.08), 0 8px 32px rgba(14,20,60,.07);
  --shadow-lg: 0 20px 60px rgba(14,20,60,.14);
  color-scheme: light;
}

/* Gradient canvas — glass needs depth behind it */
[data-mode="light"] body {
  background: linear-gradient(135deg, #dde8ff 0%, #ede8ff 35%, #fce8ff 65%, #e8f4ff 100%) fixed;
  min-height: 100vh;
}
[data-mode="light"] .topbar {
  background: rgba(255,255,255,.65);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255,255,255,.6);
}
[data-mode="light"] .sidebar {
  background: rgba(255,255,255,.60);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-right: 1px solid rgba(255,255,255,.55);
}
[data-mode="light"] ::-webkit-scrollbar-thumb { background: rgba(100,120,180,.25); border-color: transparent; }
[data-mode="light"] ::-webkit-scrollbar-thumb:hover { background: rgba(100,120,180,.40); }

/* ── Light accents — 20pts → always win over both blocks above ── */
[data-theme="gold"][data-mode="light"] {
  --accent: #b07a10; --accent-2: #d4a017; --accent-glow: rgba(176,122,16,.24);
  --gradient: linear-gradient(135deg, #8b5e08, #b07a10, #d4a017);
  --gradient-soft: linear-gradient(135deg, rgba(176,122,16,.14), rgba(212,160,23,.08));
}
[data-theme="emerald"][data-mode="light"] {
  --accent: #059669; --accent-2: #10b981; --accent-glow: rgba(5,150,105,.22);
  --gradient: linear-gradient(135deg,#047857,#059669);
  --gradient-soft: linear-gradient(135deg,rgba(5,150,105,.14),rgba(16,185,129,.08));
}
[data-theme="mono"][data-mode="light"] {
  --accent: #0a0a0a; --accent-2: #1f1f1f; --accent-glow: rgba(10,10,10,.10);
  --gradient: linear-gradient(135deg, #0a0a0a, #2e2e2e);
  --gradient-soft: linear-gradient(135deg, rgba(10,10,10,.07), rgba(30,30,30,.04));
}
/* Mono light: clean neutral white — skip the colorful glass gradient */
[data-theme="mono"][data-mode="light"] body {
  background: #f5f5f5;
}
[data-theme="mono"][data-mode="light"] .card,
[data-theme="mono"][data-mode="light"] .stat-card,
[data-theme="mono"][data-mode="light"] .list-card,
[data-theme="mono"][data-mode="light"] .plan-card,
[data-theme="mono"][data-mode="light"] .modal,
[data-theme="mono"][data-mode="light"] .notif-drawer,
[data-theme="mono"][data-mode="light"] .theme-panel,
[data-theme="mono"][data-mode="light"] .toast,
[data-theme="mono"][data-mode="light"] .au-card,
[data-theme="mono"][data-mode="light"] .tip-card {
  background: #ffffff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-color: #e8e8e8;
  box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.05);
}
[data-theme="mono"][data-mode="light"] .topbar {
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: #e8e8e8;
}
[data-theme="mono"][data-mode="light"] .sidebar {
  background: #ffffff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-right-color: #e8e8e8;
}
[data-theme="mono"][data-mode="light"] input,
[data-theme="mono"][data-mode="light"] textarea,
[data-theme="mono"][data-mode="light"] select {
  background: #ffffff;
  border-color: #d4d4d4;
  backdrop-filter: none;
}
[data-theme="mono"][data-mode="light"] .auth-body { background: #f0f0f0; }
[data-theme="mono"][data-mode="light"] .auth-shell {
  background: #ffffff;
  backdrop-filter: none;
  border-color: #e4e4e4;
  box-shadow: 0 20px 60px rgba(0,0,0,.10);
}
[data-theme="mono"][data-mode="light"] .auth-brand {
  background: #fafafa;
  border-right-color: #e8e8e8;
}
[data-theme="aurora"][data-mode="light"] {
  --accent: #0d9488; --accent-2: #7c3aed; --accent-glow: rgba(13,148,136,.20);
  --gradient: linear-gradient(135deg,#0d9488,#7c3aed);
  --gradient-soft: linear-gradient(135deg,rgba(13,148,136,.14),rgba(124,58,237,.08));
}
[data-theme="cosmos"][data-mode="light"] {
  --accent: #2563eb; --accent-2: #9333ea; --accent-glow: rgba(37,99,235,.20);
  --gradient: linear-gradient(135deg,#2563eb,#9333ea);
  --gradient-soft: linear-gradient(135deg,rgba(37,99,235,.14),rgba(147,51,234,.08));
}

/* =============================================================================
   Theme Panel UI
   ============================================================================= */
.theme-panel {
  position: fixed;
  top: calc(var(--topbar-height) + 10px);
  right: 14px;
  width: 288px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 300;
  display: none;
  animation: tp-in .15s ease;
}
.theme-panel.open { display: block; }
@keyframes tp-in { from { opacity:0; transform: translateY(-6px) scale(.97); } to { opacity:1; transform: none; } }

.tp-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border-soft);
}
.tp-title { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; color: var(--text); }
.tp-title i { color: var(--accent); }

.tp-section { padding: 14px 16px; }
.tp-section + .tp-section { border-top: 1px solid var(--border-soft); }
.tp-label {
  font-size: 10.5px; font-weight: 700; color: var(--muted-2);
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px;
}

.tp-modes { display: flex; gap: 6px; }
.tp-mode-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 6px;
  background: var(--surface-2); border: 1.5px solid var(--border);
  border-radius: 10px; color: var(--muted);
  cursor: pointer; font-size: 12.5px; font-weight: 600; font-family: inherit;
  transition: all .15s ease;
}
.tp-mode-btn i { font-size: 13px; }
.tp-mode-btn:hover { color: var(--text); border-color: var(--accent); background: var(--surface-3); }
.tp-mode-btn.active { color: var(--accent); border-color: var(--accent); background: var(--accent-glow); }

.tp-swatches { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.tp-swatch {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 11px 6px 10px;
  background: var(--surface-2); border: 1.5px solid var(--border);
  border-radius: 11px; cursor: pointer; font-family: inherit;
  transition: all .15s ease;
}
.tp-swatch:hover { transform: translateY(-1px); border-color: var(--accent); }
.tp-swatch.active { border-color: var(--accent); background: var(--surface-3); }
.sw-dot {
  width: 24px; height: 24px; border-radius: 50%;
  flex-shrink: 0;
}
.sw-name { font-size: 11px; font-weight: 600; color: var(--muted); line-height: 1; }
.tp-swatch.active .sw-name { color: var(--text); }

/* =============================================================================
   LIGHT MODE — component-level fixes
   Every hardcoded dark colour and every light-text-on-dark-surface that breaks
   when the bg flips to white gets corrected here.
   ============================================================================= */

/* ── Shell ───────────────────────────────────────────────────── */
[data-mode="light"] .sidebar { background: var(--surface); }
@media (max-width: 768px) {
  [data-mode="light"] .sidebar { background: var(--surface); box-shadow: 0 4px 32px rgba(0,0,0,.1); }
  [data-mode="light"] .sidebar-scrim.show { background: rgba(0,0,0,.32); }
}
/* Active link: the left-border colour is the page bg so it blends — fix for light */
[data-mode="light"] .s-nav-link.active { border-left-color: var(--bg); }

/* ── Hardcoded hover borders ─────────────────────────────────── */
[data-mode="light"] .list-card:hover    { border-color: var(--accent); }
[data-mode="light"] .stat-card:hover    { border-color: var(--accent); }
[data-mode="light"] .plan-card:hover    { border-color: var(--accent); }
[data-mode="light"] .type-opt:hover     { border-color: var(--accent); color: var(--text); }
[data-mode="light"] .btn-ghost:hover    { background: var(--surface-3); border-color: var(--border); }
[data-mode="light"] .icon-btn:hover     { background: var(--surface-3); border-color: var(--border); }
[data-mode="light"] .icon-btn.danger:hover { border-color: rgba(239,68,68,.4); }

/* ── Active states that use white text on a near-transparent backing ─ */
/* type-opt & plat-check: active bg is accent-glow (very light) → text must be accent, not #fff */
[data-mode="light"] .type-opt.active          { color: var(--accent); }
[data-mode="light"] .plat-check .pc:has(input:checked) { color: var(--accent); }

/* ── Pill colours — light-on-dark pastels become dark-on-light ── */
[data-mode="light"] .pill.blue    { color: #4338ca; background: rgba(99,102,241,.12);  }
[data-mode="light"] .pill.cyan    { color: #0e7490; background: rgba(6,182,212,.13);   }
[data-mode="light"] .pill.green   { color: #047857; }
[data-mode="light"] .pill.amber   { color: #92400e; }
[data-mode="light"] .pill.red     { color: #b91c1c; }
[data-mode="light"] .pill.violet  { color: #5b21b6; background: rgba(139,92,246,.12); }

/* ── Status pills ────────────────────────────────────────────── */
[data-mode="light"] .status-queued,
[data-mode="light"] .status-draft      { color: var(--muted-2); }
[data-mode="light"] .status-processing { color: #0e7490; background: rgba(6,182,212,.12);  }
[data-mode="light"] .status-succeeded,
[data-mode="light"] .status-published  { color: #047857; }
[data-mode="light"] .status-failed     { color: #b91c1c; }
[data-mode="light"] .status-canceled   { color: #92400e; }
[data-mode="light"] .status-scheduled  { color: #4338ca; background: rgba(99,102,241,.12); }

/* ── Stat card icons ─────────────────────────────────────────── */
[data-mode="light"] .sc-ic.indigo { color: #4338ca; }
[data-mode="light"] .sc-ic.cyan   { color: #0e7490; }
[data-mode="light"] .sc-ic.green  { color: #047857; }
[data-mode="light"] .sc-ic.amber  { color: #92400e; }
[data-mode="light"] .sc-ic.red    { color: #b91c1c; }
[data-mode="light"] .sc-ic.violet { color: #5b21b6; }

/* ── Plan badges ─────────────────────────────────────────────── */
[data-mode="light"] .plan-free    { color: var(--muted); }
[data-mode="light"] .plan-starter { color: #92400e; }
[data-mode="light"] .plan-pro     { color: #4338ca; }

/* ── Modal backdrop (keep it dark even in light mode) ────────── */
/* already dark rgba — intentionally left as-is */

/* ── Notif drawer & toast ────────────────────────────────────── */
[data-mode="light"] .notif-drawer        { box-shadow: -2px 4px 20px rgba(0,0,0,.1); }
[data-mode="light"] .toast               { background: var(--surface); color: var(--text); }

/* ── Auth body gradient tint ────────────────────────────────── */
[data-mode="light"] .auth-body {
  background: linear-gradient(135deg, #dde8ff 0%, #ede8ff 35%, #fce8ff 65%, #e8f4ff 100%) fixed;
}
[data-mode="light"] .auth-shell {
  background: rgba(255,255,255,.55);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255,255,255,.70);
  box-shadow: 0 24px 80px rgba(14,20,60,.14), inset 0 1px 0 rgba(255,255,255,.9);
}
[data-mode="light"] .auth-brand {
  background:
    radial-gradient(400px 300px at 20% 0%, var(--accent-glow), transparent 60%),
    rgba(255,255,255,.25);
  border-right: 1px solid rgba(255,255,255,.50);
}

/* ── Inputs & selects ────────────────────────────────────────── */
[data-mode="light"] input[type="datetime-local"]::-webkit-calendar-picker-indicator { filter: none; opacity: .6; }
[data-mode="light"] select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235a6480' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
}

/* ── Genie chat panel ────────────────────────────────────────── */
[data-mode="light"] .gn-error .gn-bubble { color: #b91c1c; border-color: rgba(239,68,68,.3); }

/* =============================================================================
   LIGHT MODE — Glass theme
   ============================================================================= */

/* ── Glass mixin applied to all panel-like surfaces ── */
[data-mode="light"] .card,
[data-mode="light"] .stat-card,
[data-mode="light"] .list-card,
[data-mode="light"] .plan-card,
[data-mode="light"] .modal,
[data-mode="light"] .notif-drawer,
[data-mode="light"] .theme-panel,
[data-mode="light"] .dropdown,
[data-mode="light"] .toast,
[data-mode="light"] .au-card,
[data-mode="light"] .tip-card {
  background: rgba(255,255,255,.68);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-color: rgba(255,255,255,.65);
  box-shadow: 0 4px 24px rgba(14,20,60,.08), 0 1px 4px rgba(14,20,60,.06), inset 0 1px 0 rgba(255,255,255,.8);
}
[data-mode="light"] .modal {
  box-shadow: 0 24px 80px rgba(14,20,60,.18), 0 2px 8px rgba(14,20,60,.10), inset 0 1px 0 rgba(255,255,255,.9);
}

/* ── Inputs & selects — frosted ── */
[data-mode="light"] input, [data-mode="light"] textarea, [data-mode="light"] select {
  background: rgba(255,255,255,.65);
  border-color: rgba(255,255,255,.70);
  color: var(--text);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
[data-mode="light"] input:focus, [data-mode="light"] textarea:focus, [data-mode="light"] select:focus {
  background: rgba(255,255,255,.85);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ── Buttons ── */
[data-mode="light"] .btn-ghost {
  background: rgba(255,255,255,.55);
  border-color: rgba(255,255,255,.70);
  color: var(--text);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
[data-mode="light"] .btn-ghost:hover { background: rgba(255,255,255,.80); border-color: var(--accent); }
[data-mode="light"] .btn-soft {
  background: var(--accent-glow);
  color: var(--accent);
  border-color: var(--accent-glow);
}
[data-mode="light"] .btn-soft:hover { background: var(--accent-glow); filter: brightness(1.1); }

/* ── Toggle switch ── */
[data-mode="light"] .au-switch              { background: rgba(148,163,184,.35); border-color: rgba(255,255,255,.5); }
[data-mode="light"] .au-switch span         { background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.18); }
[data-mode="light"] .au-switch.on span      { background: #fff; }

/* ── Table ── */
[data-mode="light"] .table tr:hover td { background: rgba(255,255,255,.45); }
[data-mode="light"] .table th          { color: var(--muted); background: rgba(255,255,255,.40); }
[data-mode="light"] .table td          { border-color: rgba(255,255,255,.40); }

/* ── Sidebar nav links ── */
[data-mode="light"] .s-nav-link       { color: var(--muted); }
[data-mode="light"] .s-nav-link:hover { color: var(--text); background: rgba(255,255,255,.45); }
[data-mode="light"] .s-nav-link.active { color: var(--accent); background: rgba(255,255,255,.55); box-shadow: inset 0 1px 0 rgba(255,255,255,.7); }

/* ── Topbar search ── */
[data-mode="light"] .topbar-search { background: rgba(255,255,255,.55); border-color: rgba(255,255,255,.65); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }

/* ── Active states ── */
[data-mode="light"] .type-opt.active          { color: var(--accent); background: rgba(255,255,255,.65); }
[data-mode="light"] .plat-check .pc:has(input:checked) { color: var(--accent); }

/* ── Empty state & loading ── */
[data-mode="light"] .empty-state { color: var(--muted); }
[data-mode="light"] .spinner     { border-color: rgba(255,255,255,.4); border-top-color: var(--accent); }
