@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Sora:wght@400;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* ── Dark theme (default) — Design v2 "Aurora" ── */
  --brand-dark:    #0B0B12;
  --brand-deep:    #10101A;
  --brand-card:    #15151F;
  --brand-border:  rgba(255,255,255,0.08);
  --brand-purple:  #8B7CFF;
  --brand-violet:  #B7A5FF;
  --brand-glow:    #7263F2;
  --brand-gold:    #F0C060;
  --brand-rose:    #F472B6;
  --text-primary:  #F2F1FA;
  --text-secondary:#A8A5C2;
  --text-muted:    #6B6885;
  --success:       #4ADE80;
  --warning:       #FBBF24;
  --danger:        #F87171;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  /* New Design-v2 tokens (gradient, glows, shadows) */
  --vl-accent-2:    #C084FC;
  --vl-grad:        linear-gradient(135deg, #8B7CFF 0%, #C084FC 100%);
  --vl-accent-soft: rgba(139,124,255,0.12);
  --vl-accent-ring: rgba(139,124,255,0.40);
  --vl-card-shadow: 0 10px 30px rgba(0,0,0,0.35);
  --vl-btn-shadow:  0 6px 22px rgba(139,124,255,0.35);
  --vl-glow-1:      rgba(139,124,255,0.10);
  --vl-glow-2:      rgba(192,132,252,0.05);
}

/* ── Light theme — activated via <html data-theme="light"> ── */
[data-theme="light"] {
  --brand-dark:    #F4F3FA;
  --brand-deep:    #F7F6FB;
  --brand-card:    #FFFFFF;
  --brand-border:  rgba(24,20,50,0.10);
  --brand-purple:  #6C59E8;
  --brand-violet:  #7A5CF0;
  --brand-glow:    #5B48D6;
  --brand-gold:    #B9821F;
  --brand-rose:    #DB2777;
  --text-primary:  #191627;
  --text-secondary:#57536E;
  --text-muted:    #8F8BA4;
  --success:       #16A34A;
  --warning:       #D97706;
  --danger:        #DC2626;
  --vl-accent-2:    #A855F7;
  --vl-grad:        linear-gradient(135deg, #6C59E8 0%, #A855F7 100%);
  --vl-accent-soft: rgba(108,89,232,0.10);
  --vl-accent-ring: rgba(108,89,232,0.35);
  --vl-card-shadow: 0 8px 26px rgba(64,52,140,0.10);
  --vl-btn-shadow:  0 6px 20px rgba(108,89,232,0.30);
  --vl-glow-1:      rgba(108,89,232,0.07);
  --vl-glow-2:      rgba(168,85,247,0.05);
}

html, body {
  height: 100%;
  font-family: 'Inter', sans-serif;
  background: var(--brand-dark);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

a { color: var(--brand-purple); text-decoration: none; }
a:hover { color: var(--brand-violet); }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--brand-deep); }
::-webkit-scrollbar-thumb { background: var(--brand-border); border-radius: 3px; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 24px; border-radius: var(--radius-md);
  font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 500;
  cursor: pointer; border: none; transition: all 0.18s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--brand-purple);
  color: #fff;
}
.btn-primary:hover { background: var(--brand-glow); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--brand-border);
}
.btn-ghost:hover { background: var(--brand-card); color: var(--text-primary); }

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(248,113,113,0.3);
}
.btn-danger:hover { background: rgba(248,113,113,0.08); }

.btn-sm { padding: 7px 16px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 15px; }
.btn-full { width: 100%; justify-content: center; }

/* ── Cards ── */
.card {
  background: var(--brand-card);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.card-sm { padding: 16px; }
.card-lg { padding: 32px; }

/* ── Form Elements ── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 13px; font-weight: 500; color: var(--text-secondary); letter-spacing: 0.02em; text-transform: uppercase; }
.form-input {
  background: var(--brand-deep);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-md);
  padding: 11px 16px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  transition: border-color 0.15s;
  width: 100%;
}
.form-input:focus { outline: none; border-color: var(--brand-purple); }
.form-input::placeholder { color: var(--text-muted); }
select.form-input { cursor: pointer; }

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 100px;
  font-size: 12px; font-weight: 500;
}
.badge-purple { background: rgba(124,106,247,0.15); color: var(--brand-violet); }
.badge-gold   { background: rgba(240,192,96,0.15);  color: var(--brand-gold); }
.badge-green  { background: rgba(52,211,153,0.12);  color: var(--success); }
.badge-rose   { background: rgba(244,114,182,0.12); color: var(--brand-rose); }
.badge-muted  { background: var(--brand-border);    color: var(--text-secondary); }
.badge-danger { background: rgba(248,113,113,0.12); color: var(--danger); }

/* ── Score Ring (reusable) ── */
.score-ring-wrap { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.score-ring-wrap svg { transform: rotate(-90deg); }
.score-ring-label {
  position: absolute; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.score-ring-label .score-num { font-family: 'Sora', sans-serif; font-weight: 700; }
.score-ring-label .score-sub { font-size: 11px; color: var(--text-muted); }

/* ── Navigation sidebar ── */
.sidebar {
  width: 240px; height: 100vh;
  background: var(--brand-deep);
  border-right: 1px solid var(--brand-border);
  display: flex; flex-direction: column;
  padding: 0; flex-shrink: 0;
  position: fixed; left: 0; top: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
}
.sidebar-logo {
  padding: 26px 24px 20px;
  border-bottom: 1px solid var(--brand-border);
  margin-bottom: 12px;
  position: sticky; top: 0;
  background: var(--brand-deep);
  z-index: 2;
}
.sidebar-logo .wordmark { font-family: 'Sora', sans-serif; font-size: 18px; font-weight: 700; }
.sidebar-logo .wordmark span { color: var(--brand-purple); }
.sidebar-logo .tagline { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.nav-section-label {
  font-size: 10px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-muted);
  padding: 16px 24px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 24px; color: var(--text-secondary);
  font-size: 14px; font-weight: 400;
  cursor: pointer; transition: all 0.15s;
  border-left: 2px solid transparent;
  text-decoration: none;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.7; }
.nav-item:hover { color: var(--text-primary); background: rgba(124,106,247,0.06); }
.nav-item.active {
  color: var(--brand-violet);
  background: rgba(124,106,247,0.1);
  border-left-color: var(--brand-purple);
  font-weight: 500;
}
.nav-item.active svg { opacity: 1; }

.sidebar-footer {
  margin-top: auto;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--brand-border);
  position: sticky; bottom: 0;
  background: var(--brand-deep);
  z-index: 2;
}
/* Bigger, more prominent account area (photo + name + sign-out) */
#sidebarAvatar { width: 46px; height: 46px; font-size: 17px; }
#sidebarName { font-size: 15px !important; }
#sidebarRole { font-size: 12px !important; }
.sidebar-footer > div:first-child { gap: 12px !important; margin-bottom: 14px !important; padding-right: 30px; }
.sidebar-footer .btn { padding: 12px 18px; font-size: 14px; }

/* ── Page layout with sidebar ── */
.app-layout { display: flex; min-height: 100vh; }
.main-content { margin-left: 240px; flex: 1; padding: 40px; min-height: 100vh; }

/* ── Page header ── */
.page-header { margin-bottom: 32px; }
.page-header h1 { font-size: 26px; margin-bottom: 4px; }
.page-header p { color: var(--text-secondary); font-size: 15px; }

/* ── Stat cards grid ── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 32px; }
.stat-card {
  background: var(--brand-card); border: 1px solid var(--brand-border);
  border-radius: var(--radius-lg); padding: 20px 24px;
}
.stat-card .stat-label { font-size: 12px; font-weight: 500; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; }
.stat-card .stat-value { font-family: 'Sora', sans-serif; font-size: 28px; font-weight: 700; }
.stat-card .stat-sub { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.stat-card .stat-icon { width: 36px; height: 36px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }

/* ── Table ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead th { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; padding: 10px 16px; text-align: left; border-bottom: 1px solid var(--brand-border); }
tbody td { padding: 14px 16px; border-bottom: 1px solid rgba(42,42,64,0.5); color: var(--text-secondary); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(124,106,247,0.04); color: var(--text-primary); }

/* ── Progress bar ── */
.progress-bar { height: 6px; background: var(--brand-border); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 3px; transition: width 0.4s ease; }
.fill-purple { background: var(--brand-purple); }
.fill-gold   { background: var(--brand-gold); }
.fill-green  { background: var(--success); }
.fill-rose   { background: var(--brand-rose); }

/* ── Divider ── */
.divider { border: none; border-top: 1px solid var(--brand-border); margin: 24px 0; }

/* ── Avatar ── */
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; flex-shrink: 0;
  background: rgba(124,106,247,0.2); color: var(--brand-violet);
}
.avatar-lg { width: 52px; height: 52px; font-size: 18px; }
.avatar-sm { width: 28px; height: 28px; font-size: 11px; }

/* ── Glow accent backgrounds ── */
.glow-purple { box-shadow: 0 0 40px rgba(124,106,247,0.12); }
.accent-line { width: 36px; height: 3px; background: var(--brand-purple); border-radius: 2px; margin-bottom: 16px; }

/* ── Utility ── */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.text-muted { color: var(--text-secondary); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.font-medium { font-weight: 500; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.w-full { width: 100%; }

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
/* v11.83: no lingering fill-mode. A completed 'forwards' fill kept these
   elements in their own Safari compositing layers, which painted later
   siblings (e.g. filter chips) OVER open dropdowns despite z-index.
   The end state equals the natural styles, so no fill is needed after the
   animation; the delayed variants only need 'backwards' (no flash before
   their delay starts). Visually identical, stacking bug gone. */
.fade-up { animation: fadeUp 0.4s ease; }
.fade-up-2 { animation: fadeUp 0.4s 0.08s ease backwards; }
.fade-up-3 { animation: fadeUp 0.4s 0.16s ease backwards; }

@keyframes pulse-ring {
  0%   { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .sidebar { width: 200px; }
  .main-content { margin-left: 200px; padding: 24px; }
}
@media (max-width: 680px) {
  .sidebar { display: none; }
  .main-content { margin-left: 0; padding: 16px; }
}

/* ══ Toasts (themed notifications, shared app-wide) ══ */
#vl-toast-wrap {
  position: fixed; top: 18px; right: 18px; z-index: 10100;
  display: flex; flex-direction: column; gap: 10px;
  max-width: 360px; pointer-events: none;
}
.vl-toast {
  pointer-events: auto;
  display: flex; align-items: flex-start; gap: 11px;
  background: var(--brand-card);
  border: 1px solid var(--brand-border);
  border-left: 3px solid var(--brand-purple);
  border-radius: var(--radius-md);
  padding: 13px 15px;
  box-shadow: 0 12px 34px rgba(0,0,0,0.45);
  color: var(--text-primary); font-size: 14px; line-height: 1.45;
  cursor: pointer;
  opacity: 0; transform: translateX(16px);
  transition: opacity .22s ease, transform .22s ease;
}
.vl-toast.vl-in  { opacity: 1; transform: translateX(0); }
.vl-toast.vl-out { opacity: 0; transform: translateX(16px); }
.vl-toast .vl-toast-ico { flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px; }
.vl-toast-msg { flex: 1; word-break: break-word; }
.vl-toast.vl-success { border-left-color: var(--success); }
.vl-toast.vl-error   { border-left-color: var(--danger); }
.vl-toast.vl-warning { border-left-color: var(--warning); }
.vl-toast.vl-info    { border-left-color: var(--brand-purple); }
.vl-toast.vl-success .vl-toast-ico { color: var(--success); }
.vl-toast.vl-error   .vl-toast-ico { color: var(--danger); }
.vl-toast.vl-warning .vl-toast-ico { color: var(--warning); }
.vl-toast.vl-info    .vl-toast-ico { color: var(--brand-violet); }
@media (max-width: 820px) {
  #vl-toast-wrap { left: 12px; right: 12px; top: 64px; max-width: none; }
}

/* ══ Themed confirm dialog (shared app-wide) ══ */
#vl-confirm-bg {
  position: fixed; inset: 0; z-index: 10090;
  background: rgba(13,13,20,0.82); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
#vl-confirm-bg.vl-open { display: flex; }
.vl-confirm-panel {
  background: var(--brand-card);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-lg);
  padding: 26px 26px 22px; width: 420px; max-width: 100%;
  box-shadow: 0 24px 60px rgba(0,0,0,0.55);
  animation: fadeUp .25s ease;
}
.vl-confirm-panel h4 { font-family: 'Sora', sans-serif; font-size: 18px; margin-bottom: 8px; color: var(--text-primary); }
.vl-confirm-panel p  { color: var(--text-secondary); font-size: 14px; line-height: 1.55; margin-bottom: 22px; }
.vl-confirm-actions  { display: flex; gap: 10px; justify-content: flex-end; }

/* ══ Custom dropdown skin (auto-applied to select.form-input app-wide) ══ */
.cdrop { position: relative; }
.cdrop.open { z-index: 250; }
/* v11.83: while a dropdown is open, lift its container above sibling
   sections (filter chips, cards, …) — kills every stacking-context trap
   for good, no matter what animation or transform a parent carries. */
.fade-up:has(.cdrop.open), .fade-up-2:has(.cdrop.open), .fade-up-3:has(.cdrop.open),
.add-card:has(.cdrop.open), .card:has(.cdrop.open) { position: relative; z-index: 260; }
.cdrop-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--brand-deep); border: 1px solid var(--brand-border); border-radius: var(--radius-md);
  padding: 11px 16px; font-family: 'Inter', sans-serif; font-size: 15px; color: var(--text-primary);
  cursor: pointer; text-align: left; transition: border-color .15s;
}
.cdrop-trigger:hover { border-color: var(--brand-purple); }
.cdrop.open .cdrop-trigger { border-color: var(--brand-purple); }
.cdrop-trigger .cdrop-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cdrop-trigger .cdrop-label.placeholder { color: var(--text-muted); }
.cdrop-trigger .chev { flex-shrink: 0; color: var(--text-muted); transition: transform .15s; }
.cdrop.open .cdrop-trigger .chev { transform: rotate(180deg); }
.cdrop-menu {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60;
  background: var(--brand-card); border: 1px solid var(--brand-border); border-radius: var(--radius-md);
  padding: 6px; max-height: 264px; overflow-y: auto; box-shadow: 0 14px 34px rgba(0,0,0,0.5); display: none;
}
.cdrop.open .cdrop-menu { display: block; }
.cdrop-item {
  padding: 10px 12px; border-radius: var(--radius-sm); font-size: 14px; color: var(--text-secondary);
  cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cdrop-item:hover { background: rgba(124,106,247,0.14); color: var(--text-primary); }
.cdrop-item.selected { color: var(--text-primary); }
.cdrop-item.selected::after { content: '✓'; color: var(--brand-purple); font-weight: 700; font-size: 13px; }
.cdrop-empty { padding: 14px 12px; color: var(--text-muted); font-size: 13px; text-align: center; }

/* ══════════════════════════════════════════════════════════════════
   Premium polish — global micro-interactions & finishing touches
   ══════════════════════════════════════════════════════════════════ */
html { scroll-behavior: smooth; }
::selection { background: rgba(124,106,247,0.32); color: #fff; }

/* Smooth page entrance */
/* Opacity-only fade. NOTE: never animate transform on <body> — a persisted
   transform makes position:fixed anchor to <body> (which scrolls) instead of the
   viewport, which breaks the fixed sidebar, God Mode button and overlays. */
@keyframes vlPageIn { from { opacity: 0; } to { opacity: 1; } }
body { animation: vlPageIn .38s ease both; }

/* Clean keyboard focus ring (accessible, not on mouse clicks) */
:focus-visible { outline: 2px solid var(--brand-purple); outline-offset: 2px; border-radius: 6px; }
button:focus:not(:focus-visible), a:focus:not(:focus-visible) { outline: none; }

/* Buttons: tactile press + primary glow */
.btn { transition: all .18s ease, transform .07s ease; }
.btn:active { transform: translateY(1px) scale(.995); }
.btn-primary:hover { box-shadow: 0 8px 24px rgba(124,106,247,0.35); }

/* Inputs & dropdowns: soft focus glow */
.form-input:focus { box-shadow: 0 0 0 3px rgba(124,106,247,0.14); }
.cdrop.open .cdrop-trigger { box-shadow: 0 0 0 3px rgba(124,106,247,0.14); }

/* Stat cards: subtle lift on hover */
.stat-card { transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.stat-card:hover { transform: translateY(-2px); border-color: rgba(124,106,247,0.4); box-shadow: 0 12px 30px rgba(0,0,0,0.28); }

/* Nav items: smoother transitions */
.nav-item { transition: color .15s, background .15s, border-color .15s; }

/* Reusable loading shimmer + spinner (for polished loading states) */
@keyframes vlShimmer { 0% { background-position: -340px 0; } 100% { background-position: 340px 0; } }
.vl-skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.09) 37%, rgba(255,255,255,0.04) 63%);
  background-size: 680px 100%; animation: vlShimmer 1.3s infinite linear; border-radius: var(--radius-md);
}
@keyframes vlSpin { to { transform: rotate(360deg); } }
.vl-spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid var(--brand-border); border-top-color: var(--brand-purple);
  animation: vlSpin .7s linear infinite; display: inline-block; vertical-align: middle;
}

/* ══ Onboarding tour (picture tutorial) ══ */
#vl-tour-bg { position: fixed; inset: 0; z-index: 10070; background: rgba(10,10,16,0.8); backdrop-filter: blur(6px); display: none; align-items: center; justify-content: center; padding: 20px; }
#vl-tour-bg.vl-open { display: flex; }
.vl-tour-card { background: var(--brand-card); border: 1px solid var(--brand-border); border-radius: var(--radius-xl); width: 540px; max-width: 100%; max-height: 92vh; overflow-y: auto; box-shadow: 0 30px 80px rgba(0,0,0,0.6); position: relative; animation: fadeUp .3s ease; }
.vl-tour-x { position: absolute; top: 12px; right: 14px; background: rgba(0,0,0,0.4); border: none; color: var(--text-secondary); width: 30px; height: 30px; border-radius: 50%; font-size: 20px; line-height: 1; cursor: pointer; z-index: 2; }
.vl-tour-x:hover { color: #fff; background: rgba(0,0,0,0.6); }
.vl-tour-media { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, rgba(124,106,247,0.20), rgba(167,139,250,0.05)); border-radius: var(--radius-xl) var(--radius-xl) 0 0; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.vl-tour-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vl-tour-ph { position: absolute; color: var(--text-muted); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.vl-tour-body { padding: 22px 26px 4px; }
.vl-tour-body h3 { font-family: 'Sora', sans-serif; font-size: 20px; margin-bottom: 9px; }
.vl-tour-body p { color: var(--text-secondary); font-size: 14.5px; line-height: 1.6; }
.vl-tour-dots { display: flex; gap: 7px; justify-content: center; padding: 16px 0 2px; }
.vl-tour-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-border); cursor: pointer; transition: all .15s; }
.vl-tour-dot.on { background: var(--brand-purple); transform: scale(1.3); }
.vl-tour-foot { display: flex; align-items: center; gap: 8px; padding: 8px 22px 22px; }
#vl-tour-help { position: fixed; right: 22px; bottom: 22px; left: auto; z-index: 9998; width: 42px; height: 42px; border-radius: 50%; background: var(--brand-card); border: 1px solid var(--brand-border); color: var(--brand-violet); font-size: 20px; font-weight: 700; cursor: pointer; box-shadow: 0 4px 20px rgba(0,0,0,0.4); transition: all .18s; }
#vl-tour-help:hover { border-color: var(--brand-purple); color: #fff; transform: translateY(-2px); }
#vl-tour-help.in-footer { position: absolute; top: 14px; right: 14px; left: auto; bottom: auto; width: 27px; height: 27px; font-size: 14px; box-shadow: none; background: transparent; border: 1px solid transparent; color: var(--text-muted); }
#vl-tour-help.in-footer:hover { background: rgba(124,106,247,0.12); border-color: var(--brand-border); color: var(--brand-violet); transform: none; }
@media (max-width: 820px) { #vl-tour-help:not(.in-footer) { right: 14px; bottom: 74px; } }

/* ══ Command palette (⌘K) + sidebar search trigger ══ */
.vl-search-trigger { display: flex; align-items: center; gap: 9px; width: calc(100% - 24px); margin: 6px 12px; padding: 9px 12px; background: var(--brand-deep); border: 1px solid var(--brand-border); border-radius: 10px; color: var(--text-muted); font-size: 13px; font-family: 'Inter',sans-serif; cursor: pointer; transition: all .15s; }
.vl-search-trigger:hover { border-color: var(--brand-purple); color: var(--text-secondary); }
.vl-search-trigger svg { width: 15px; height: 15px; flex-shrink: 0; }
.vl-search-trigger span { flex: 1; text-align: left; }
.vl-search-trigger kbd { font-family: 'Inter',sans-serif; font-size: 11px; background: var(--brand-card); border: 1px solid var(--brand-border); border-radius: 5px; padding: 1px 6px; color: var(--text-muted); }

#vl-cmdk-bg { position: fixed; inset: 0; z-index: 10080; background: rgba(10,10,16,0.62); backdrop-filter: blur(6px); display: none; align-items: flex-start; justify-content: center; padding: 14vh 20px 20px; }
#vl-cmdk-bg.vl-open { display: flex; }
.vl-cmdk { width: 100%; max-width: 600px; background: var(--brand-card); border: 1px solid var(--brand-border); border-radius: 16px; box-shadow: 0 30px 80px rgba(0,0,0,0.6); overflow: hidden; animation: fadeUp .2s ease; }
.vl-cmdk-top { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--brand-border); }
.vl-cmdk-top > svg { width: 19px; height: 19px; color: var(--text-muted); flex-shrink: 0; }
.vl-cmdk-input { flex: 1; background: transparent; border: none; outline: none; color: var(--text-primary); font-family: 'Inter',sans-serif; font-size: 16px; }
.vl-cmdk-input::placeholder { color: var(--text-muted); }
.vl-cmdk-list { max-height: 52vh; overflow-y: auto; padding: 8px; }
.vl-cmdk-group { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); padding: 10px 12px 6px; }
.vl-cmdk-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; color: var(--text-secondary); font-size: 14.5px; }
.vl-cmdk-item .vl-ci-ico { width: 32px; height: 32px; border-radius: 8px; background: var(--brand-deep); border: 1px solid var(--brand-border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.vl-cmdk-item .vl-ci-ico svg { width: 16px; height: 16px; color: var(--brand-violet); }
.vl-cmdk-item.sel { background: rgba(124,106,247,0.14); color: #fff; }
.vl-cmdk-item.sel .vl-ci-ico { border-color: var(--brand-purple); }
.vl-cmdk-empty { padding: 28px; text-align: center; color: var(--text-muted); font-size: 14px; }
.vl-cmdk-foot { display: flex; gap: 18px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--brand-border); font-size: 12px; color: var(--text-muted); }
.vl-cmdk-foot kbd { font-family: 'Inter',sans-serif; background: var(--brand-deep); border: 1px solid var(--brand-border); border-radius: 4px; padding: 1px 6px; margin-right: 4px; }

/* ══════════════════════════════════════════════════════════════════
   Sidebar refinement — calmer, more premium (rounded pills, density)
   ══════════════════════════════════════════════════════════════════ */
.sidebar { width: 236px; scrollbar-width: thin; scrollbar-color: var(--brand-border) transparent; }
.sidebar::-webkit-scrollbar { width: 7px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--brand-border); border-radius: 10px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: var(--brand-purple); }

.sidebar-logo { padding: 22px 22px 15px; margin-bottom: 6px; }
.nav-section-label { padding: 15px 20px 6px; font-size: 10px; letter-spacing: 0.13em; }

/* Rounded "pill" nav items — inset from the edges, soft hover, filled active */
.nav-item { margin: 1px 10px; padding: 9px 13px; border-radius: 10px; border-left: none !important; font-size: 13.5px; gap: 11px; font-weight: 450; }
.nav-item svg { width: 17px; height: 17px; opacity: 0.6; }
.nav-item:hover { background: rgba(255,255,255,0.045); color: var(--text-primary); }
.nav-item:hover svg { opacity: 0.92; }
.nav-item.active { background: rgba(124,106,247,0.14); color: var(--brand-violet); font-weight: 600; box-shadow: inset 0 0 0 1px rgba(124,106,247,0.22); }
.nav-item.active svg { opacity: 1; }

.vl-search-trigger { margin: 2px 10px 8px; }

/* ══════════════════════════════════════════════════════════════════
   DESIGN V2 — "Aurora" update (v11.13)
   Gradient accents, soft depth, light/dark theming.
   These rules intentionally come LAST so they refine everything above.
   ══════════════════════════════════════════════════════════════════ */

/* Ambient background glows behind the whole app */
body {
  background:
    radial-gradient(1000px 560px at 88% -12%, var(--vl-glow-1), transparent 60%),
    radial-gradient(760px 460px at -12% 18%, var(--vl-glow-2), transparent 60%),
    var(--brand-dark);
  background-attachment: fixed;
}

/* Smooth color change when switching themes */
body, .sidebar, .sidebar-logo, .sidebar-footer {
  transition: background-color .25s ease, border-color .25s ease, color .25s ease;
}

/* Bigger, clearer page titles */
.page-header h1 { font-size: 30px; }

/* Primary buttons: purple → violet gradient with a soft glow */
.btn-primary {
  background: var(--vl-grad);
  box-shadow: var(--vl-btn-shadow);
}
.btn-primary:hover {
  background: var(--vl-grad);
  box-shadow: 0 10px 30px var(--vl-accent-ring);
  transform: translateY(-2px);
}
.btn-primary:active { transform: translateY(0) scale(.995); }

/* Cards get gentle depth */
.card, .stat-card { box-shadow: var(--vl-card-shadow); }

/* Progress bars in brand purple become gradient */
.fill-purple { background: var(--vl-grad); }

/* Avatars get a subtle accent ring */
.avatar { border: 1.5px solid var(--vl-accent-ring); }

/* ── Theme toggle button (injected by api.js on every page) ── */
#vl-theme-toggle {
  width: 32px; height: 32px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--brand-border);
  color: var(--text-secondary); cursor: pointer; padding: 0;
  transition: all .15s ease;
}
#vl-theme-toggle:hover { border-color: var(--brand-purple); color: var(--brand-violet); }
#vl-theme-toggle.in-sidebar { position: absolute; top: 24px; right: 16px; }
#vl-theme-toggle.floating {
  position: fixed; top: 18px; right: 18px; z-index: 9990;
  background: var(--brand-card); box-shadow: var(--vl-card-shadow);
}

/* ── Light-mode fixes for rules above that hard-code dark colors ── */
[data-theme="light"] .nav-item:hover { background: rgba(24,20,50,0.05); }
[data-theme="light"] .vl-skeleton {
  background: linear-gradient(90deg, rgba(24,20,50,0.05) 25%, rgba(24,20,50,0.10) 37%, rgba(24,20,50,0.05) 63%);
  background-size: 680px 100%;
}
[data-theme="light"] .stat-card:hover { box-shadow: 0 12px 30px rgba(64,52,140,0.14); }
[data-theme="light"] .vl-toast { box-shadow: 0 12px 34px rgba(64,52,140,0.18); }
[data-theme="light"] .vl-confirm-panel,
[data-theme="light"] .vl-cmdk,
[data-theme="light"] .vl-tour-card { box-shadow: 0 24px 60px rgba(64,52,140,0.22); }
[data-theme="light"] .cdrop-menu { box-shadow: 0 14px 34px rgba(64,52,140,0.16); }
[data-theme="light"] ::selection { background: rgba(108,89,232,0.22); color: inherit; }

/* ══════════════════════════════════════════════════════════════════
   v11.14 — Light-mode fixes for page-level hard-coded dark colors
   (overrides classes defined inside individual pages' <style> blocks)
   ══════════════════════════════════════════════════════════════════ */

/* Members page: chatter role pill was a solid dark block on white */
[data-theme="light"] .role-chatter {
  background: rgba(24,20,50,0.07);
  color: var(--text-secondary);
}

/* Agencies table: "inactive" status pill had the same hard-coded dark bg */
[data-theme="light"] .agency-status-inactive {
  background: rgba(24,20,50,0.07);
  color: var(--text-muted);
  border-color: var(--brand-border);
}

/* Leaderboard: silver & bronze were too pale to read on white */
[data-theme="light"] .rank-2,
[data-theme="light"] .lb-rank.silver { color: #64748B; }
[data-theme="light"] .rank-3,
[data-theme="light"] .lb-rank.bronze { color: #9A6B42; }
[data-theme="light"] .podium-2 .podium-block { color: #64748B; border-color: rgba(100,116,139,0.35); background: rgba(100,116,139,0.08); }
[data-theme="light"] .podium-3 .podium-block { color: #9A6B42; border-color: rgba(154,107,66,0.35);  background: rgba(154,107,66,0.08); }

/* Login page: frosted-glass card was hard-coded dark */
[data-theme="light"] .float-card { background: rgba(255,255,255,0.85); }

/* ══════════════════════════════════════════════════════════════════
   v11.46 — Mobile tables: cards containing a table become side-swipeable
   instead of squeezing columns into unreadable slivers. Uses :has(), so
   older browsers simply keep the previous behavior (no harm done).
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 680px) {
  .card:has(> table),
  .card:has(table) {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .card table {
    min-width: 560px;   /* keep columns readable; the card scrolls instead */
  }
  .card table th,
  .card table td {
    white-space: nowrap;
  }
}

/* ══════════════════════════════════════════════════════════════════
   DESIGN V3 — "Onyx Violet" (v11.56)
   True-black stage, hairline borders, one restrained violet accent.
   Same pattern as Design v2: overrides come LAST so they win the cascade.
   ══════════════════════════════════════════════════════════════════ */
:root {
  --brand-dark:    #0A0A0B;
  --brand-deep:    #0D0D0F;
  --brand-card:    #101011;
  --brand-border:  rgba(255,255,255,0.07);
  --brand-purple:  #8B7CFF;
  --brand-violet:  #A78BFA;
  --brand-glow:    #7B6CF0;
  --brand-gold:    #D9B975;
  --brand-rose:    #E28BB4;
  --text-primary:  #EDEDEF;
  --text-secondary:#8A8A90;
  --text-muted:    #5A5A60;
  --success:       #4FCE9B;
  --warning:       #E8B84A;
  --danger:        #E77E7E;
  --radius-sm: 7px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --vl-accent-2:    #C4B5FD;
  --vl-grad:        linear-gradient(90deg, #8B7CFF 0%, rgba(196,181,253,0.45) 100%);
  --vl-accent-soft: rgba(167,139,250,0.12);
  --vl-accent-ring: rgba(167,139,250,0.35);
  --vl-card-shadow: none;
  --vl-btn-shadow:  none;
  --vl-glow-1:      transparent;
  --vl-glow-2:      transparent;
  /* New v3 tokens (hover wash + emphasized border) */
  --vl-hover:         rgba(255,255,255,0.055);
  --vl-border-strong: rgba(255,255,255,0.16);
}
[data-theme="light"] {
  --brand-dark:    #F7F7F8;
  --brand-deep:    #F2F2F4;
  --brand-card:    #FFFFFF;
  --brand-border:  rgba(18,18,22,0.09);
  --brand-purple:  #6D5AE6;
  --brand-violet:  #7C66F0;
  --brand-glow:    #5B48D6;
  --brand-gold:    #A87F2A;
  --brand-rose:    #C94F86;
  --text-primary:  #161618;
  --text-secondary:#5B5B63;
  --text-muted:    #8E8E96;
  --success:       #14976B;
  --warning:       #B07A14;
  --danger:        #CE4B4B;
  --vl-accent-2:    #6D5AE6;
  --vl-grad:        linear-gradient(90deg, #6D5AE6 0%, rgba(139,114,245,0.5) 100%);
  --vl-accent-soft: rgba(109,90,230,0.10);
  --vl-accent-ring: rgba(109,90,230,0.30);
  --vl-card-shadow: none;
  --vl-btn-shadow:  none;
  --vl-glow-1:      transparent;
  --vl-glow-2:      transparent;
  --vl-hover:         rgba(18,18,22,0.05);
  --vl-border-strong: rgba(18,18,22,0.20);
}

/* ── Typography: one family in the app chrome; Sora retires ── */
h1, h2, h3, h4,
.vl-confirm-panel h4,
.vl-tour-body h3,
.sidebar-logo .wordmark,
.score-ring-label .score-num,
.stat-card .stat-value {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.page-header h1 { font-size: 26px; letter-spacing: -0.025em; }
.sidebar-logo .wordmark span { color: var(--text-primary); }

/* ── Flat, hairline surfaces: glows and hover-lifts retire ── */
.card, .stat-card { box-shadow: none; }
.stat-card:hover { transform: none; box-shadow: none; border-color: var(--vl-border-strong); }
.glow-purple { box-shadow: none; }

/* ── Primary button: solid violet with dark text — the one loud element ── */
.btn-primary { background: var(--brand-violet); color: #0A0A0B; box-shadow: none; }
.btn-primary:hover { background: #B9A7FC; box-shadow: none; transform: translateY(-1px); }
[data-theme="light"] .btn-primary { background: var(--brand-purple); color: #fff; }
[data-theme="light"] .btn-primary:hover { background: var(--brand-glow); }

/* ── Quieter interaction states across the chrome ── */
.nav-item:hover { background: var(--vl-hover); }
.nav-item.active { background: var(--vl-accent-soft); color: var(--vl-accent-2); box-shadow: none; }
tbody tr:hover td { background: var(--vl-hover); }
.cdrop-item:hover { background: var(--vl-hover); }
.vl-cmdk-item.sel { background: var(--vl-hover); color: var(--text-primary); }
::selection { background: rgba(167,139,250,0.30); color: inherit; }
.avatar { border: 1px solid var(--brand-border); }
.badge-purple { background: var(--vl-accent-soft); color: var(--vl-accent-2); }
.form-input:focus, .cdrop.open .cdrop-trigger { box-shadow: 0 0 0 3px var(--vl-accent-soft); }
.form-input:hover { border-color: var(--vl-border-strong); }
.btn-ghost:hover { border-color: var(--vl-border-strong); background: transparent; color: var(--text-primary); }
.vl-search-trigger:hover { border-color: var(--vl-border-strong); }
.cdrop-trigger:hover { border-color: var(--vl-border-strong); }
#vl-theme-toggle:hover { border-color: var(--vl-border-strong); color: var(--text-primary); }

/* ══════════════════════════════════════════════════════════════════
   v11.61 — Empty states: the Signal V as the product's recurring mark
   Usage: VLEmpty.mount(container, { title, sub, cta, href }) from api.js
   ══════════════════════════════════════════════════════════════════ */
.vl-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 72px 24px; }
.vl-empty-mark { width: 108px; height: 108px; margin-bottom: 4px; }
.vl-empty h3 { font-family: 'Inter', sans-serif; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; color: var(--text-primary); margin: 10px 0 6px; }
.vl-empty p { font-size: 13.5px; color: var(--text-secondary); max-width: 360px; line-height: 1.55; margin: 0 0 22px; }
.vl-empty .vl-empty-cta { display: inline-flex; align-items: center; gap: 8px; background: var(--brand-violet); color: #0A0A0B; border: none; border-radius: 9px; padding: 10px 20px; font-family: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; text-decoration: none; transition: background .15s ease, transform .12s ease; }
.vl-empty .vl-empty-cta:hover { background: #B9A7FC; transform: translateY(-1px); }
[data-theme="light"] .vl-empty .vl-empty-cta { background: var(--brand-purple); color: #fff; }
[data-theme="light"] .vl-empty .vl-empty-cta:hover { background: var(--brand-glow); }

/* ════════════════════════════════════════════════════════════════
   v12.01 — Unified brand: sidebar logo matches the homepage nav
   (icon-512 tile + VALEOLEGACY, all-white, uppercase, tracked)
   Compact scale (like the homepage's narrow-width brand) so it
   clears the theme toggle. No `gap` on the flex row: the markup is
   Valeo<span>Legacy</span>, so a gap would split the two words —
   icon↔text spacing lives on the icon's margin instead.
   ════════════════════════════════════════════════════════════════ */
.sidebar-logo .wordmark {
  display: flex;
  align-items: center;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-primary);
  white-space: nowrap;
}
.sidebar-logo .wordmark::before {
  content: "";
  width: 26px;
  height: 26px;
  margin-right: 9px;
  border-radius: 8px;
  background: url('/icon-512.png') center / cover no-repeat;
  flex-shrink: 0;
}
.sidebar-logo .wordmark span { color: var(--text-primary); }
.sidebar-logo .tagline { display: none; }
@media (max-width: 900px) {
  .sidebar-logo .wordmark { font-size: 12.5px; }
  .sidebar-logo .wordmark::before { width: 22px; height: 22px; margin-right: 7px; border-radius: 7px; }
}

/* ── Modal & dropdown scroll containment (v12.88) ──────────────────── */
/* Fixes scroll chaining: wheel/trackpad scrolling inside an open modal or
   a dropdown list must never leak through and scroll the page behind it.
   Every page defines .modal-bg/.modal-panel locally, but they all share
   this stylesheet, so one rule set covers the whole platform.
   1) While any modal is open, the page behind cannot scroll at all.
   2) Modal panels and dropdown lists keep their scrolling to themselves. */
body:has(.modal-bg.open) { overflow: hidden; }
.modal-bg,
.modal-panel,
.vl-select-menu,
.cdrop-menu { overscroll-behavior: contain; }

/* ══ VLDrop: reactive dropzone + honest upload lanes (v13.38) ══ */
.vl-drop { border: 2px dashed var(--brand-border); border-radius: 14px; padding: 26px; text-align: center; color: var(--text-muted); cursor: pointer; transition: border-color .15s ease, background .15s ease, color .15s ease; }
.vl-drop:hover { border-color: var(--brand-purple); color: var(--text-secondary); }
.vl-drop .vl-drop-ico { width: 36px; height: 36px; margin: 0 auto 8px; color: var(--brand-purple); transition: transform .18s ease; }
.vl-drop .vl-drop-ico svg { width: 100%; height: 100%; }
.vl-drop .vl-drop-t { font-size: 14px; font-weight: 600; color: var(--text-secondary); transition: color .15s ease; }
.vl-drop .vl-drop-s { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.vl-drop.vl-over { border-color: var(--brand-purple); background: rgba(139,124,255,0.06); }
.vl-drop.vl-over .vl-drop-t { color: var(--text-primary); }
.vl-drop.vl-over .vl-drop-ico { transform: translateY(-2px); }
[data-theme="light"] .vl-drop.vl-over { background: rgba(124,106,247,0.07); }

.vl-lanes { margin-top: 10px; }
.vl-lane { display: flex; align-items: center; gap: 12px; background: var(--brand-card); border: 1px solid var(--brand-border); border-radius: 12px; padding: 11px 14px; margin-bottom: 8px; animation: fadeUp .18s ease; }
.vl-lane .ic { width: 32px; height: 32px; border-radius: 8px; background: rgba(139,124,255,0.10); color: var(--brand-purple); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.vl-lane .mid { flex: 1; min-width: 0; }
.vl-lane .nm { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vl-lane .sub { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.vl-lane .bar { height: 4px; background: var(--brand-border); border-radius: 99px; margin-top: 7px; overflow: hidden; }
.vl-lane .bar i { display: block; height: 100%; width: 0%; background: var(--brand-purple); border-radius: 99px; transition: width .2s ease; }
.vl-lane .pct { font-size: 12px; font-weight: 600; color: var(--text-secondary); min-width: 38px; text-align: right; font-variant-numeric: tabular-nums; }
.vl-lane.done .ic { background: rgba(74,222,128,0.12); color: var(--success); }
.vl-lane.done .bar, .vl-lane.err .bar { display: none; }
.vl-lane.err .ic { background: rgba(248,113,113,0.12); color: var(--danger); }
.vl-lane.err .sub { color: var(--danger); }

/* ══ vlBusy: inline button spinner (v13.41) ══ */
.vl-btnspin { display: inline-block; width: 13px; height: 13px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; opacity: .85; animation: vlSpin .6s linear infinite; vertical-align: -2px; }

/* ══ What's new (v13.53) ══ */
.vlwn-btn { position: relative; width: 40px; height: 40px; border-radius: 50%; background: none; border: 1px solid transparent; color: var(--text-muted); display: flex; align-items: center; justify-content: center; cursor: pointer; margin-right: 2px; transition: color .15s, border-color .15s, background .15s; }
.vlwn-btn:hover { color: var(--brand-purple); border-color: var(--brand-border); background: rgba(139,124,255,0.05); }
.vlwn-dot { position: absolute; top: 8px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--brand-purple); }
.vlwn-when { font-size: 10.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--brand-purple); }
.vlwn-empty { color: var(--text-muted); font-size: 13px; padding: 26px 0 14px; text-align: center; }
#vlwnBg { position: fixed; inset: 0; z-index: 10060; background: rgba(13,13,20,0.85); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; padding: 20px; }
#vlwnBg.open { display: flex; }
.vlwn-card { background: var(--brand-card); border: 1px solid var(--brand-border); border-radius: var(--radius-xl); padding: 28px 26px 18px; width: 500px; max-width: 100%; max-height: 86vh; overflow-y: auto; position: relative; animation: fadeUp .25s ease; }
.vlwn-eyebrow { font-size: 10.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--brand-purple); margin-bottom: 7px; }
.vlwn-card h3 { font-size: 20px; margin-bottom: 4px; }
.vlwn-sub { font-size: 12.5px; color: var(--text-muted); margin-bottom: 14px; }
.vlwn-x { position: absolute; top: 12px; right: 14px; background: none; border: none; color: var(--text-muted); font-size: 22px; line-height: 1; cursor: pointer; }
.vlwn-x:hover { color: var(--text-primary); }
.vlwn-item { display: flex; gap: 14px; align-items: flex-start; padding: 14px 10px; margin: 0 -10px; border-radius: 12px; animation: fadeUp .35s ease both; transition: background .15s; }
.vlwn-item:hover { background: rgba(139,124,255,0.05); }
.vlwn-item + .vlwn-item { border-top: 1px solid var(--brand-border); border-radius: 0 0 12px 12px; }
.vlwn-ic { width: 36px; height: 36px; border-radius: 10px; background: rgba(139,124,255,0.10); border: 1px solid rgba(139,124,255,0.22); color: var(--brand-purple); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.vlwn-ic svg { width: 17px; height: 17px; }
.vlwn-body { flex: 1; min-width: 0; }
.vlwn-toprow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.vlwn-t { font-size: 13.5px; font-weight: 600; }
.vlwn-new { font-size: 9.5px; font-weight: 700; letter-spacing: .06em; color: var(--brand-purple); background: rgba(139,124,255,0.14); border: 1px solid rgba(139,124,255,0.3); border-radius: 5px; padding: 2px 6px; }
.vlwn-tag { font-size: 10.5px; color: var(--text-muted); border: 1px solid var(--brand-border); border-radius: 99px; padding: 2px 8px; margin-left: auto; }
.vlwn-d { font-size: 12.5px; color: var(--text-secondary); line-height: 1.55; }
[data-theme="light"] .vlwn-ic { background: rgba(124,106,247,0.08); border-color: rgba(124,106,247,0.25); }
[data-theme="light"] .vlwn-item:hover { background: rgba(124,106,247,0.05); }

/* ══ Account bar + overlay (v13.52) ══ */
.vlac-bar { display: flex; justify-content: flex-end; align-items: center; margin: -6px 0 10px; }
.vlac-chip { display: flex; align-items: center; gap: 12px; background: none; border: 1px solid transparent; border-radius: 99px; padding: 6px 7px 6px 16px; cursor: pointer; color: var(--text-primary); font-family: inherit; transition: border-color .15s, background .15s; }
.vlac-chip:hover { border-color: var(--brand-border); background: rgba(139,124,255,0.05); }
.vlac-who { text-align: right; line-height: 1.3; }
.vlac-nm { display: block; font-size: 13.5px; font-weight: 600; }
.vlac-rl { display: block; font-size: 11px; color: var(--text-muted); }
.vlac-av { width: 40px; height: 40px; border-radius: 50%; background: rgba(139,124,255,0.16); color: var(--brand-purple); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 15.5px; overflow: hidden; flex-shrink: 0; }
.vlac-av img { width: 100%; height: 100%; object-fit: cover; }
.vlac-av.big { width: 52px; height: 52px; font-size: 20px; }
@media (max-width: 700px) { .vlac-who { display: none; } .vlac-chip { padding-left: 7px; } }

/* stacking: page < whats-new 10060 < account 10070 < confirm 10090 < toasts 10100 */
#vlacBg { position: fixed; inset: 0; z-index: 10070; background: rgba(8,8,10,0.66); backdrop-filter: blur(7px); display: none; align-items: flex-start; justify-content: center; padding: 7vh 20px 20px; overflow-y: auto; }
#vlacBg.open { display: flex; }
.vlac-ov { background: var(--brand-card); border: 1px solid var(--brand-border); border-radius: 18px; width: 600px; max-width: 100%; overflow: hidden; animation: fadeUp .22s ease; }
.vlac-head { display: flex; align-items: center; gap: 16px; padding: 24px 26px; border-bottom: 1px solid var(--brand-border); }
.vlac-hw { flex: 1; min-width: 0; }
.vlac-hn { font-size: 16px; font-weight: 600; }
.vlac-ha { font-size: 12.5px; color: var(--text-muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vlac-pill { font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-purple); background: rgba(139,124,255,0.12); border: 1px solid rgba(139,124,255,0.28); border-radius: 6px; padding: 3px 8px; white-space: nowrap; }
.vlac-x { background: none; border: none; color: var(--text-muted); font-size: 22px; cursor: pointer; line-height: 1; padding: 4px; }
.vlac-x:hover { color: var(--text-primary); }
.vlac-body { padding: 8px 26px 22px; }
.vlac-sec { padding: 20px 0; border-bottom: 1px solid var(--brand-border); }
.vlac-sec:last-of-type { border-bottom: none; }
.vlac-st { font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 14px; }
.vlac-row { display: flex; align-items: center; gap: 14px; }
.vlac-row + .vlac-row { margin-top: 12px; }
.vlac-f { flex: 1; min-width: 0; }
.vlac-f label { display: block; font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; }
.vlac-f input { width: 100%; background: var(--brand-bg); border: 1px solid var(--brand-border); border-radius: 10px; color: var(--text-primary); font-family: inherit; font-size: 13.5px; padding: 10px 12px; outline: none; transition: border-color .15s; }
.vlac-f input:focus { border-color: var(--brand-purple); }
.vlac-photo { width: 66px; height: 66px; border-radius: 50%; border: 2px dashed var(--brand-border); background: none; display: flex; align-items: center; justify-content: center; color: var(--text-muted); cursor: pointer; flex-shrink: 0; transition: border-color .15s, color .15s; }
.vlac-photo:hover { border-color: var(--brand-purple); color: var(--brand-purple); }
.vlac-val { font-size: 13.5px; }
.vlac-ok { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--success); background: rgba(74,222,128,0.1); border: 1px solid rgba(74,222,128,0.25); border-radius: 6px; padding: 2px 8px; margin-left: 8px; }
.vlac-warn { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: #F0C060; background: rgba(240,192,96,0.08); border: 1px solid rgba(240,192,96,0.22); border-radius: 6px; padding: 2px 8px; margin-left: 8px; }
.vlac-warn a { color: inherit; }
.vlac-sub { font-size: 12px; color: var(--text-muted); margin-top: 10px; line-height: 1.55; }
.vlac-link { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; text-align: left; background: var(--brand-bg); border: 1px solid var(--brand-border); border-radius: 12px; padding: 13px 16px; color: var(--text-primary); font-family: inherit; cursor: pointer; transition: border-color .15s; }
.vlac-link:hover { border-color: var(--brand-purple); }
.vlac-link .vlac-ll { display: block; font-size: 13.5px; }
.vlac-link .vlac-ls { display: block; font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.vlac-link svg { color: var(--text-muted); flex-shrink: 0; }
.vlac-foot { display: flex; align-items: center; justify-content: space-between; padding: 14px 26px; border-top: 1px solid var(--brand-border); background: rgba(255,255,255,0.015); font-size: 12.5px; color: var(--text-muted); }
.vlac-signout { background: rgba(248,113,113,0.10); border: 1px solid rgba(248,113,113,0.35); border-radius: 9px; color: var(--danger); font-family: inherit; font-size: 12.5px; font-weight: 600; padding: 7px 14px; cursor: pointer; transition: background .15s, color .15s; }
.vlac-signout:hover { background: var(--danger); color: #fff; }
.vlac-offbadge { display: inline-flex; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--danger); background: rgba(248,113,113,0.10); border: 1px solid rgba(248,113,113,0.3); border-radius: 6px; padding: 3px 9px; }
[data-theme="light"] .vlac-chip:hover { background: rgba(124,106,247,0.05); }
[data-theme="light"] .vlac-foot { background: rgba(0,0,0,0.015); }

/* ══ Two-factor section (v13.58) ══ */
.vlsec-qr { background: #FFFFFF; border-radius: 12px; padding: 10px; flex-shrink: 0; line-height: 0; }
.vlsec-key { font-family: 'SF Mono', ui-monospace, Menlo, monospace; font-size: 12.5px; letter-spacing: .06em; background: var(--brand-bg); border: 1px solid var(--brand-border); border-radius: 8px; padding: 8px 10px; word-break: break-all; }
.vlsec-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; margin-top: 12px; font-family: 'SF Mono', ui-monospace, Menlo, monospace; font-size: 13px; letter-spacing: .05em; color: var(--text-secondary); }
