/* 4KJax look for the client portal and admin console: Midnight by default,
   Ordo's Liquid Glass as the light option (sun/moon button, never automatic).
   Colour, font and shadow come from these variables; pages and shells should
   not hard-code them. Needs fonts.css and brand.css (starfield). */
:root {
  color-scheme: dark;
  --bg: #07080a;
  --bg-elevated: #0e1526;
  --bg-elevated-2: #10203a;
  --border: rgb(255 255 255 / 0.10);
  --text: #ffffff;
  --text-muted: #94a3b8;
  --accent: #22d3ee;
  --accent-soft: rgba(34, 211, 238, 0.12);
  --on-accent: #000000;
  --bar-bg: rgba(7, 8, 10, 0.82);
  --tint: rgba(255, 255, 255, 0.07);
  --scrim: rgba(0, 0, 0, 0.5);
  --page-bg: radial-gradient(900px 520px at 50% -120px, rgb(14 38 64 / 0.55), transparent 70%), #07080a;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}
:root[data-theme="glass"] {
  color-scheme: light;
  --bg: #eef0f7;
  --bg-elevated: rgb(255 255 255 / 0.62);
  --bg-elevated-2: rgb(255 255 255 / 0.85);
  --border: rgb(15 23 42 / 0.12);
  --text: #070a12;
  --text-muted: #475569;
  --accent: #1d4ed8;
  --accent-soft: rgba(29, 78, 216, 0.10);
  --on-accent: #ffffff;
  --bar-bg: rgba(238, 240, 247, 0.78);
  --tint: rgba(15, 23, 42, 0.06);
  --scrim: rgba(15, 23, 42, 0.35);
  --page-bg: radial-gradient(42rem 42rem at 8% 12%, rgb(59 130 246 / 0.42), transparent 62%), radial-gradient(38rem 38rem at 92% 18%, rgb(236 72 153 / 0.34), transparent 62%), radial-gradient(46rem 46rem at 62% 98%, rgb(249 115 22 / 0.30), transparent 62%), #eef0f7;
}
/* The page background lives on html so the star layers (z-index -1) show through. */
html { background: var(--page-bg); background-attachment: fixed; min-height: 100%; }
html body { background: transparent; background-image: none; font-family: var(--font-sans); }
h1, h2, h3, .card-title, .stat-value { letter-spacing: -0.015em; }
h1, h2, .card-title, .stat-value { font-weight: 800; }
:root[data-theme="glass"] .shooting-stars,
:root[data-theme="glass"] body::before,
:root[data-theme="glass"] body::after { display: none; }
:root[data-theme="glass"] :is(.card, .panel, .sidebar, .topbar, header, .tenant-banner, .stat-card) {
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  backdrop-filter: blur(22px) saturate(170%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.9), 0 10px 36px -14px rgb(15 23 42 / 0.28);
}
.theme-toggle {
  display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border-radius: 50%;
  border: 1px solid var(--border); background: var(--bg-elevated); color: var(--text-muted); cursor: pointer;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.apps-link {
  font: 500 0.78rem var(--font-mono); letter-spacing: 0.04em; color: var(--text-muted); text-decoration: none;
  background: linear-gradient(100deg, currentColor 40%, var(--accent) 50%, currentColor 60%) 100% 0 / 250% 100%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; transition: background-position 1.1s ease;
}
.apps-link:hover, .apps-link:focus-visible { background-position: 0 0; }
@media (prefers-reduced-motion: reduce) { .apps-link { transition: none; } }
.sidebar-by { padding: 0 1.1rem 0.4rem; margin-top: -0.35rem; }
/* The nav logo is white lettering; on light Glass give it a dark silhouette. */
:root[data-theme="glass"] :is(.sidebar-brand-mark, .brand-icon) { filter: brightness(0) opacity(0.85); }
