/* ══ Vigil Glass ════════════════════════════════════════════════════════════════════════════════════════════════
   The platform's materials, after the way Apple's interfaces layer: a living background (a soft aurora and the
   constellation of sensors, static/js/constellation.js), frosted chrome that content scrolls beneath (sidebar, top
   bar, menus, sheets, toasts, the Launchpad), and translucent cards with a hairline edge and a lit top edge.

   Every colour is mixed from the theme's own tokens, so the seven themes keep their character. Blur is kept to the
   chrome: on cards it would trap fixed-position menus inside them and cost frame time on pages of hundreds of cards —
   and it is how Apple does it too (content cards near-opaque, glass on bars and sheets).

   Off switches: the system's "reduce transparency", or html[data-glass="off"] (the Launchpad's Appearance toggle).
   ═══════════════════════════════════════════════════════════════════════════════════════════════════════════════ */

:root {
  --glass-card-a: 78%;
  --glass-chrome-a: 66%;
  --glass-edge: rgba(15, 23, 42, .07);
  --glass-hi: rgba(255, 255, 255, .85);
  --glass-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 32px -16px rgba(15, 23, 42, .18);
  --glass-shadow-lift: 0 2px 4px rgba(15, 23, 42, .05), 0 22px 44px -18px rgba(15, 23, 42, .26);
  --aurora-1: color-mix(in srgb, var(--accent) 16%, transparent);
  --aurora-2: rgba(139, 92, 246, .11);
  --aurora-3: rgba(14, 165, 233, .09);
  --radius: 10px;
  --radius-lg: 16px;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
}
html[data-theme="dark"], html[data-theme="midnight"], html[data-theme="ocean"], html[data-theme="forest"], html[data-theme="crimson"] {
  --glass-card-a: 74%;
  --glass-chrome-a: 62%;
  --glass-edge: rgba(255, 255, 255, .075);
  --glass-hi: rgba(255, 255, 255, .06);
  --glass-shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 16px 40px -18px rgba(0, 0, 0, .6);
  --glass-shadow-lift: 0 2px 6px rgba(0, 0, 0, .3), 0 26px 50px -18px rgba(0, 0, 0, .7);
  --aurora-1: color-mix(in srgb, var(--accent) 20%, transparent);
  --aurora-2: rgba(139, 92, 246, .14);
  --aurora-3: rgba(14, 165, 233, .10);
}

/* ── the living background ─────────────────────────────────────────────────────────────────────────────────── */
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
html[data-theme] body { background-image: none; }
/* the aurora lives on its own fixed layer, so it can drift on the GPU without repainting the page */
body::before {
  content: ''; position: fixed; inset: -18vmax; z-index: -2; pointer-events: none;
  background:
    radial-gradient(60vmax 38vmax at 26% 14%, var(--aurora-1), transparent 62%),
    radial-gradient(50vmax 36vmax at 88% 30%, var(--aurora-2), transparent 60%),
    radial-gradient(56vmax 42vmax at 50% 92%, var(--aurora-3), transparent 62%);
  will-change: transform;
}
html:not([data-aurora="still"]) body::before { animation: vg-aurora 64s ease-in-out infinite alternate; }
@keyframes vg-aurora {
  0%   { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); }
  50%  { transform: translate3d(3vmax, -2vmax, 0) scale(1.07) rotate(5deg); }
  100% { transform: translate3d(-3vmax, 2.2vmax, 0) scale(1.03) rotate(-4deg); }
}
@media (prefers-reduced-motion: reduce) { body::before { animation: none !important; } }

/* ── page transitions: the page cross-fades and rises; sidebar and ribbon stay where they are ──────────────── */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
.sidebar { view-transition-name: vg-sidebar; }
.topbar { view-transition-name: vg-topbar; }
::view-transition-group(vg-sidebar) { animation: none; }
::view-transition-old(root) { animation: vg-page-out .16s ease-in both; }
::view-transition-new(root) { animation: vg-page-in .34s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes vg-page-out { to { opacity: 0; } }
@keyframes vg-page-in { from { opacity: 0; transform: translateY(8px) scale(.995); } }
#iot-bg { opacity: 1 !important; z-index: -1 !important; }       /* behind every piece of content, above the page's own background */
.main-wrap { position: relative; }
.page-aura { position: absolute; top: 64px; right: 0; width: min(60%, 960px); height: 320px; pointer-events: none; z-index: -1;
  -webkit-mask-image: radial-gradient(120% 110% at 100% 0%, #000 25%, transparent 72%); mask-image: radial-gradient(120% 110% at 100% 0%, #000 25%, transparent 72%); }
.page-aura > .cst-canvas { z-index: auto; }
html[data-constellation="off"] #iot-bg, html[data-constellation="off"] .cst-canvas { display: none; }
.cst-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; border-radius: inherit; }
[data-constellation]:not(.page-aura) > :not(.cst-canvas) { position: relative; z-index: 1; }

/* ── typography: tighter, calmer, closer to the system's ───────────────────────────────────────────────────── */
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', 'Segoe UI Variable', 'Segoe UI', Roboto, sans-serif; }
.page-header h1, h1 { letter-spacing: -.022em; }
.page-header h1 { font-size: 24px; font-weight: 750; }

/* ── cards: translucent material, hairline edge, lit top edge ──────────────────────────────────────────────── */
html:not([data-glass="off"]) :is(.card, .stat-card, .kpi, .rp-card, .ae-card, .pc-card, .im-card, .cx-card, .ar-card, .section-card, .plan-card, .sh-filter-card, .vbp-card) {
  background: color-mix(in srgb, var(--surface) var(--glass-card-a), transparent);
  border-color: var(--glass-edge);
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--glass-shadow);
}
html:not([data-glass="off"]) .card { border-radius: var(--radius-lg); }
html:not([data-glass="off"]) :is(.card, .stat-card) :is(.card, .stat-card, .kpi) {       /* nested: a quieter layer, no second shadow */
  background: color-mix(in srgb, var(--surface-2) 62%, transparent);
  box-shadow: inset 0 1px 0 var(--glass-hi);
}
html:not([data-glass="off"]) a.card, html:not([data-glass="off"]) .card.clickable, html:not([data-glass="off"]) .card[onclick] {
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), border-color .2s;
}
html:not([data-glass="off"]) a.card:hover, html:not([data-glass="off"]) .card.clickable:hover, html:not([data-glass="off"]) .card[onclick]:hover {
  transform: translateY(-2px); box-shadow: inset 0 1px 0 var(--glass-hi), var(--glass-shadow-lift);
}
.card-header { border-bottom-color: var(--glass-edge); }

/* ── controls ──────────────────────────────────────────────────────────────────────────────────────────────── */
.btn { border-radius: var(--radius); transition: background .2s, box-shadow .2s, transform .12s, border-color .2s; }
.btn:active { transform: scale(.98); }
.btn-primary { background-image: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, 0)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 6px 16px -8px color-mix(in srgb, var(--accent) 70%, transparent); }
html:not([data-glass="off"]) .btn-ghost, html:not([data-glass="off"]) .btn-secondary { background-color: color-mix(in srgb, var(--surface) 55%, transparent); }
html:not([data-glass="off"]) .form-control, html:not([data-glass="off"]) select.form-control {
  background-color: color-mix(in srgb, var(--surface-2) 72%, transparent);
  border-radius: var(--radius);
  transition: box-shadow .2s, border-color .2s, background-color .2s;
}
.form-control:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); border-color: color-mix(in srgb, var(--accent) 60%, var(--border)); }

/* ── frosted chrome ────────────────────────────────────────────────────────────────────────────────────────── */
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  html:not([data-glass="off"]) .sidebar {
    background: color-mix(in srgb, var(--sb-bg) 82%, transparent);
    -webkit-backdrop-filter: blur(28px) saturate(180%); backdrop-filter: blur(28px) saturate(180%);
    border-right: 1px solid rgba(255, 255, 255, .06);
  }
  html:not([data-glass="off"]) .topbar {
    background: color-mix(in srgb, var(--surface) var(--glass-chrome-a), transparent);
    -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(22px) saturate(180%);
    border-bottom-color: transparent;
    transition: border-color .25s, box-shadow .25s, background-color .25s;
  }
  html.vg-scrolled:not([data-glass="off"]) .topbar {           /* the hairline appears once content is beneath it, as on iOS */
    border-bottom-color: var(--glass-edge);
    box-shadow: 0 10px 30px -22px rgba(15, 23, 42, .45);
  }
  html:not([data-glass="off"]) :is(.modal-box, .modal-content, .drop-menu, .dropdown-menu, .popover, .nav-tooltip, #nav-tooltip, .vgp-tip, #beacon-panel, .beacon-panel, #argus-panel) {
    background: color-mix(in srgb, var(--surface) 78%, transparent) !important;
    -webkit-backdrop-filter: blur(26px) saturate(180%); backdrop-filter: blur(26px) saturate(180%);
    border-color: var(--glass-edge) !important;
    box-shadow: inset 0 1px 0 var(--glass-hi), 0 24px 60px -20px rgba(0, 0, 0, .45) !important;
  }
  html:not([data-glass="off"]) :is(.modal-backdrop, .dl-modal-back) {
    background: rgba(8, 14, 28, .35) !important;
    -webkit-backdrop-filter: blur(8px) saturate(140%); backdrop-filter: blur(8px) saturate(140%);
  }
}

/* ── sidebar: calmer rows, a soft active pill, the Apps launcher ───────────────────────────────────────────── */
.sidebar nav a { border-radius: 9px; transition: background .18s, color .18s; }
.sidebar nav a.active { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 34%, transparent), color-mix(in srgb, var(--accent) 16%, transparent));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); }
.sidebar nav a svg { transition: transform .2s var(--ease-out); }
.sidebar nav a:hover svg { transform: scale(1.06); }
.sb-launch { padding-top: 10px; }
.sb-launch nav a.nav-apps { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); }
.sb-launch nav a.nav-apps:hover { background: rgba(255, 255, 255, .1); }
.nav-kbd { margin-left: auto; font: 600 10px/1 -apple-system, system-ui, sans-serif; color: rgba(255, 255, 255, .45); border: 1px solid rgba(255, 255, 255, .14); border-radius: 5px; padding: 3px 5px; }
.sidebar.collapsed .nav-kbd { display: none; }
.sidebar-logo { position: relative; overflow: hidden; }
.sidebar-logo .cst-canvas { opacity: .8; }

/* ── the Launchpad ─────────────────────────────────────────────────────────────────────────────────────────── */
.lp { position: fixed; inset: 0; z-index: 10500; display: none; color: #fff; }
.lp.open { display: block; }
.lp-bg { position: absolute; inset: 0; background: rgba(6, 11, 24, .58); -webkit-backdrop-filter: blur(34px) saturate(170%); backdrop-filter: blur(34px) saturate(170%);
  opacity: 0; transition: opacity .28s var(--ease-out); }
.lp.shown .lp-bg { opacity: 1; }
.lp-inner { position: relative; z-index: 1; height: 100%; overflow-y: auto; padding: 38px 6vw 150px; opacity: 0; transform: scale(1.04); transition: opacity .28s var(--ease-out), transform .36s var(--ease-out); }
.lp.shown .lp-inner { opacity: 1; transform: none; }
.lp-top { display: flex; align-items: center; gap: 12px; max-width: 1180px; margin: 0 auto 26px; }
.lp-search { flex: 1; max-width: 420px; margin: 0 auto; display: flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 12px; padding: 8px 12px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); }
.lp-search svg { width: 16px; height: 16px; opacity: .7 }
.lp-search input { flex: 1; background: none; border: none; outline: none; color: #fff; font: inherit; font-size: 15px; }
.lp-search input::placeholder { color: rgba(255, 255, 255, .55); }
.lp-btn { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); color: #fff; border-radius: 10px; padding: 8px 13px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.lp-btn:hover { background: rgba(255, 255, 255, .16); } .lp-btn.on { background: #fff; color: #0F1C35; }
.lp-close { width: 36px; height: 36px; padding: 0; display: grid; place-items: center; border-radius: 50%; }
.lp-sec { max-width: 1180px; margin: 0 auto 24px; }
.lp-sec h3 { font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .55); font-weight: 700; margin: 0 0 12px 6px; }
.lp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 18px 10px; }
.lp-app { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 4px 6px; border-radius: 16px; color: #fff; text-decoration: none; cursor: pointer; outline: none;
  opacity: 0; transform: translateY(8px) scale(.96); transition: opacity .4s var(--ease-out), transform .45s var(--ease-out), background .15s; }
.lp.shown .lp-app { opacity: 1; transform: none; }
.lp-app:hover, .lp-app:focus-visible { background: rgba(255, 255, 255, .07); color: #fff; }
.lp-tile { width: 72px; height: 72px; border-radius: 20px; display: grid; place-items: center; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -10px 20px rgba(0, 0, 0, .12), 0 10px 22px -10px rgba(0, 0, 0, .65);
  transition: transform .25s var(--ease-out); }
.lp-tile svg { width: 36px; height: 36px; color: #fff; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .18)); }
.lp-app:hover .lp-tile { transform: scale(1.06); }
.lp-app:active .lp-tile { transform: scale(.94); }
.lp-name { font-size: 12.5px; font-weight: 600; text-align: center; line-height: 1.25; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); max-width: 104px; }
.lp-dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(255, 255, 255, .85); opacity: 0; margin-top: -3px; }
.lp-app.pinned .lp-dot { opacity: 1; }
.lp-badge { position: absolute; top: 2px; left: calc(50% - 44px); width: 22px; height: 22px; border-radius: 50%; display: none; place-items: center; font-size: 15px; font-weight: 800; line-height: 1;
  background: rgba(245, 247, 250, .95); color: #0F1C35; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); z-index: 2; }
.lp.editing .lp-badge { display: grid; }
.lp.editing .lp-app { animation: lp-jiggle .32s ease-in-out infinite alternate; }
.lp.editing .lp-app:nth-child(2n) { animation-delay: -.16s; animation-duration: .3s; }
.lp.editing .lp-app:nth-child(3n) { animation-delay: -.08s; animation-duration: .34s; }
@keyframes lp-jiggle { from { transform: rotate(-1.6deg); } to { transform: rotate(1.6deg); } }
@media (prefers-reduced-motion: reduce) { .lp.editing .lp-app { animation: none; } .lp-inner, .lp-app { transition: none; } }
.lp-desc { max-width: 1180px; margin: -8px auto 18px; min-height: 20px; text-align: center; color: rgba(255, 255, 255, .72); font-size: 13px; }
.lp-dock { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(140%); z-index: 2; display: flex; align-items: flex-end; gap: 10px; max-width: 94vw; overflow-x: auto;
  padding: 10px 14px; border-radius: 24px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .2); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 18px 50px -12px rgba(0, 0, 0, .6); transition: transform .4s var(--ease-out); }
.lp.editing .lp-dock { transform: translateX(-50%); }
.lp-dock-grp { display: flex; gap: 6px; align-items: flex-end; }
.lp-dock-sep { width: 1px; align-self: stretch; background: rgba(255, 255, 255, .25); margin: 4px 2px; }
.lp-dock-item { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; cursor: grab; position: relative; transition: transform .2s var(--ease-out); flex-shrink: 0; }
.lp-dock-item svg { width: 23px; height: 23px; color: #fff; }
.lp-dock-item:hover { transform: translateY(-4px) scale(1.12); }
.lp-dock-item.dragging { opacity: .35; }
.lp-dock-item.over { box-shadow: -3px 0 0 0 #fff; }
.lp-dock-tip { position: absolute; bottom: 52px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 11.5px; background: rgba(15, 23, 42, .85); padding: 3px 7px; border-radius: 6px; opacity: 0; pointer-events: none; transition: opacity .15s; }
.lp-dock-item:hover .lp-dock-tip { opacity: 1; }
.lp-edit-bar { max-width: 1180px; margin: 0 auto 18px; display: none; align-items: center; gap: 10px; flex-wrap: wrap; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 14px; padding: 10px 14px; font-size: 13px; color: rgba(255, 255, 255, .85); }
.lp.editing .lp-edit-bar { display: flex; }
.lp-edit-bar .sp { flex: 1; }
.lp-app.hidden { display: none; }
.lp-empty { text-align: center; color: rgba(255, 255, 255, .6); padding: 40px 0; display: none; }
.lp-appear { display: flex; gap: 8px; align-items: center; }
.lp-appear label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.lp-page .lp { position: relative; display: block; inset: auto; min-height: calc(100vh - 64px); border-radius: 0; }
.lp-page .lp-bg { opacity: 1; background: linear-gradient(160deg, #0B1530, #1E1B4B 70%, #0F1C35); -webkit-backdrop-filter: none; backdrop-filter: none; }
.lp-page .lp-inner { opacity: 1; transform: none; height: auto; overflow: visible; }
.lp-page .lp-close { display: none; }

/* ── reduce transparency: opaque surfaces, no blur ─────────────────────────────────────────────────────────── */
@media (prefers-reduced-transparency: reduce) {
  html .sidebar { background: var(--sb-bg) !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
  html .topbar { background: var(--surface) !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
  html :is(.card, .stat-card, .kpi) { background: var(--surface) !important; }
}

/* ── the Appearance menu (in the Launchpad) ────────────────────────────────────────────────────────────────── */
.lp-appearance { position: absolute; top: 80px; left: max(6vw, calc(50% - 590px)); z-index: 5; width: 360px; display: none; padding: 14px; border-radius: 18px;
  background: rgba(20, 28, 48, .72); border: 1px solid rgba(255, 255, 255, .16); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 24px 60px -16px rgba(0, 0, 0, .6); }
.lp-appearance.open { display: block; animation: vg-pop .22s cubic-bezier(.2, .8, .2, 1); }
@keyframes vg-pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.lp-appearance h4 { margin: 2px 4px 10px; font-size: 13px; font-weight: 700; color: #fff; }
.lp-opt { display: flex; gap: 12px; align-items: center; padding: 9px 6px; border-radius: 12px; cursor: pointer; }
.lp-opt:hover { background: rgba(255, 255, 255, .06); }
.lp-opt b { display: block; font-size: 13px; color: #fff; font-weight: 650; }
.lp-opt span { display: block; font-size: 11.5px; color: rgba(255, 255, 255, .62); line-height: 1.35; }
.lp-opt .tx { flex: 1; min-width: 0; }
.lp-sw { position: relative; width: 38px; height: 23px; flex-shrink: 0; border-radius: 12px; background: rgba(255, 255, 255, .2); transition: background .2s; }
.lp-sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); transition: transform .22s cubic-bezier(.2, .8, .2, 1); }
.lp-opt.on .lp-sw { background: #34C759; }
.lp-opt.on .lp-sw::after { transform: translateX(15px); }
.lp-appearance .note { font-size: 11px; color: rgba(255, 255, 255, .5); margin: 8px 6px 0; }

/* ── arriving after sign-in (desktop): the mark dissolves, the sidebar and the page settle in ──────────────── */
#vg-arrive { display: none; }
html.vg-arriving #vg-arrive { position: fixed; inset: 0; z-index: 99000; display: grid; place-items: center; pointer-events: none; }
html.vg-arriving #vg-arrive img { width: 92px; height: 92px; filter: drop-shadow(0 0 28px rgba(59, 130, 246, .65)); animation: vg-arrive-hold 6s linear infinite; }
@keyframes vg-arrive-hold { to { transform: rotate(-360deg); } }                          /* the same slow turn the sign-in page ended on */
html.vg-arrive-go #vg-arrive { animation: vg-arrive-bg .9s .35s cubic-bezier(.4, 0, .2, 1) forwards; }
html.vg-arrive-go #vg-arrive img { animation: vg-arrive-mark 1.15s cubic-bezier(.4, 0, .2, 1) forwards; }
@keyframes vg-arrive-bg { to { opacity: 0; visibility: hidden; } }
@keyframes vg-arrive-mark { 0% { transform: rotate(0deg) scale(1); opacity: 1; } 55% { transform: rotate(-240deg) scale(1.08); opacity: 1; } 100% { transform: rotate(-360deg) scale(2.4); opacity: 0; } }
html.vg-arrive-go .sidebar nav a { animation: vg-row-in .5s cubic-bezier(.2, .8, .2, 1) both; }
html.vg-arrive-go .page-body > * { animation: vg-rise-in .7s .45s cubic-bezier(.2, .8, .2, 1) both; }
html.vg-arrive-go .topbar { animation: vg-fade-in .6s .4s ease both; }
@keyframes vg-row-in { from { opacity: 0; transform: translateX(-10px); } }
@keyframes vg-rise-in { from { opacity: 0; transform: translateY(14px) scale(.99); } }
@keyframes vg-fade-in { from { opacity: 0; } }

/* ── leaving (sign-out, desktop): arriving, run backwards — the page settles out, the rows slide away bottom first,
   the night comes in and the mark gathers from large to its resting size, turning the other way; the sign-in page
   then opens on it and unwinds it into the network (templates/dashboard/login.html) ─────────────────────────────── */
#vg-depart { position: fixed; inset: 0; z-index: 99000; display: grid; place-items: center; opacity: 0; animation: vg-depart-bg .7s .3s cubic-bezier(.4, 0, .2, 1) forwards; }
#vg-depart img { width: 92px; height: 92px; filter: drop-shadow(0 0 28px rgba(59, 130, 246, .65)); opacity: 0; animation: vg-depart-mark 1.15s .35s cubic-bezier(.4, 0, .2, 1) forwards; }
/* the night under both marks is the sign-in page's, as it stands while the mark is up: the website's ground and grid,
   its aurora (sized from the same overscan box, so the glows sit where they sat), and the vignette dimmed to .4 */
html.vg-arriving #vg-arrive, #vg-depart {
  isolation: isolate; overflow: hidden; background-color: #0A1628;
  background-image: linear-gradient(rgba(59, 130, 246, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(59, 130, 246, .035) 1px, transparent 1px);
  background-size: 48px 48px;
}
html.vg-arriving #vg-arrive::before, #vg-depart::before {
  content: ''; position: absolute; inset: -18vmax; z-index: -1; pointer-events: none;
  background: radial-gradient(60vmax 38vmax at 22% 10%, rgba(59, 130, 246, .20), transparent 62%),
    radial-gradient(50vmax 36vmax at 88% 26%, rgba(139, 92, 246, .13), transparent 60%),
    radial-gradient(56vmax 42vmax at 50% 96%, rgba(14, 165, 233, .11), transparent 62%);
}
html.vg-arriving #vg-arrive::after, #vg-depart::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 80% 80% at 40% 50%, transparent 40%, rgba(6, 14, 28, .29) 100%);
}
#vg-depart.hold img { opacity: 1; animation: vg-depart-hold 6s linear infinite; }
@keyframes vg-depart-bg { to { opacity: 1; } }
@keyframes vg-depart-mark { 0% { transform: rotate(-360deg) scale(2.4); opacity: 0; } 45% { transform: rotate(-120deg) scale(1.08); opacity: 1; } 100% { transform: rotate(0deg) scale(1); opacity: 1; } }
@keyframes vg-depart-hold { to { transform: rotate(360deg); } }
html.vg-departing .sidebar nav a { animation: vg-row-out .42s cubic-bezier(.4, 0, 1, 1) both; }
html.vg-departing .page-body > * { animation: vg-sink-out .5s cubic-bezier(.4, 0, 1, 1) both; }
html.vg-departing .topbar { animation: vg-fade-out .45s .08s ease both; }
html.vg-departing body { pointer-events: none; }
html.vg-departing #ht-card, html.vg-departing #ht-mask, html.vg-departing .toast, html.vg-departing .lp { animation: vg-fade-out .35s ease both; }   /* a tour card, a toast or the Launchpad left open */
@keyframes vg-row-out { to { opacity: 0; transform: translateX(-10px); } }
@keyframes vg-sink-out { to { opacity: 0; transform: translateY(14px) scale(.99); } }
@keyframes vg-fade-out { to { opacity: 0; } }

/* ── hub tabs: the apps that are one job, as a segmented control at the top of each of their pages ────────────── */
.hub-tabs { display: flex; gap: 2px; width: max-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; margin: 0 auto 16px;
  padding: 3px; border-radius: 12px; border: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 72%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4); view-transition-name: vg-hubtabs; }
.hub-tabs::-webkit-scrollbar { display: none; }
.hub-tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px 6px 10px; border-radius: 9px; font-size: 12.5px; font-weight: 620;
  color: var(--text-2); text-decoration: none; white-space: nowrap; transition: background .15s, color .15s, box-shadow .15s; }
.hub-tabs a svg { width: 15px; height: 15px; opacity: .75; flex-shrink: 0; }
.hub-tabs a:hover { color: var(--text); background: color-mix(in srgb, var(--surface-2) 80%, transparent); }
.hub-tabs a.on { color: var(--text); background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, .16), inset 0 0 0 1px var(--border);
  display: inline-flex; width: auto; height: auto; border-radius: 9px; opacity: 1; }   /* a page's own .on (a status dot, say) must not reshape the tab */
.hub-tabs a.on svg { color: var(--accent); opacity: 1; }
html[data-glass="off"] .hub-tabs { background: var(--surface-2); -webkit-backdrop-filter: none; backdrop-filter: none; }
