/* ==========================================================================
   BROADWAY.GARTER.APP // QVPBI PITCH-BLACK OBSIDIAN & BRUSHED ANODIZED METAL
   True Pitch-Black (#000000–#040406) · Milled Platinum · 3000K COB LED Strips
   ========================================================================== */

:root {
  --bg-obsidian: #010102;
  --bg-void: #000000;
  --bg-deep: #020203;
  --bg-panel: rgba(5, 5, 7, 0.92);
  --bg-panel-glass: rgba(5, 5, 7, 0.92);
  --bg-panel-heavy: rgba(3, 3, 5, 0.97);
  --bg-card: #070709;
  --bg-elevated: #0c0c10;
  --bg-hover: #131318;

  --gold: #c9a44c;
  --gold-bright: #f3d078;
  --gold-dim: rgba(212, 175, 55, 0.16);
  --gold-border: rgba(212, 175, 55, 0.24);
  --gold-border-strong: rgba(229, 193, 88, 0.62);
  --gold-glow: 0 1px 5px rgba(255, 246, 214, 0.75), 0 4px 18px rgba(212, 175, 55, 0.38);

  /* Milled Platinum / Brushed Steel (replaces plastic cyan) */
  --cyan: #d4d4d8;
  --cyan-bright: #e4e4e7;
  --cyan-dim: rgba(212, 212, 216, 0.11);
  --cyan-border: rgba(212, 212, 216, 0.30);
  --cyan-glow: 0 0 16px rgba(228, 228, 231, 0.20);
  --platinum: #d4d4d8;
  --platinum-bright: #e4e4e7;

  /* Warm 3000K COB LED Filament Gold (replaces neon emerald green) */
  --emerald: #f3d078;
  --emerald-bright: #ffe8a3;
  --emerald-dim: rgba(243, 208, 120, 0.14);
  --cob-filament: #fff8dc;
  --cob-gold: #f3d078;
  --cob-amber: #e5c158;
  --cob-brass: #b8860b;

  --crimson: #dc2626;
  --crimson-dim: rgba(220, 38, 38, 0.14);
  --crimson-border: rgba(220, 38, 38, 0.42);
  --crimson-glow: 0 0 16px rgba(220, 38, 38, 0.26);

  --text-primary: #f5f2eb;
  --text-secondary: #b8b5ad;
  --text-muted: #78756e;

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Sharp architectural 1px–2px chamfered metal corners (0px–2px max) */
  --border-radius: 2px;
  --radius-xs: 1px;
  --radius-sm: 2px;
  --radius-md: 2px;
  --radius-lg: 2px;

  --transition-fast: 150ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-obsidian);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
}

/* Custom Anodized Metal Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-void);
}
::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.34);
  border-radius: 1px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-bright);
}

/* Subtle Architectural Milled Grid & Warm 3000K COB Ambient Falloff */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(212, 212, 216, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 212, 216, 0.018) 1px, transparent 1px),
    radial-gradient(circle at 22% 14%, rgba(243, 208, 120, 0.055), transparent 46%),
    radial-gradient(circle at 80% 78%, rgba(212, 175, 55, 0.04), transparent 50%);
  background-size: 38px 38px, 38px 38px, 100% 100%, 100% 100%;
}

/* ==========================================================================
   SHARED BRUSHED ANODIZED METAL & CONTINUOUS 3000K COB LED STRIP UTILITIES
   ========================================================================== */
.cob-led-strip {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 2%, #b8860b 12%, #e5c158 30%, #fff8dc 50%, #e5c158 70%, #b8860b 88%, transparent 98%);
  box-shadow:
    0 1px 5px rgba(255, 246, 214, 0.85),
    0 4px 18px rgba(212, 175, 55, 0.45),
    0 10px 28px rgba(201, 164, 76, 0.18);
  z-index: 4;
}

.topbar,
.top-command-ribbon,
.kpi-card,
.hud-card,
.hud-panel,
.dossier-panel,
.dossier-card,
.vault-card,
.director-bar,
.bottom-studio-bar {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.012) 0px, rgba(255,255,255,0.012) 1px, transparent 1px, transparent 3px),
    linear-gradient(170deg, #111115 0%, #060608 48%, #020203 100%);
  border: 1px solid rgba(212, 175, 55, 0.24);
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 220, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.9),
    0 14px 36px rgba(0, 0, 0, 0.92);
}

/* Continuous 3000K COB LED Linear Strip along top edge of active & primary surfaces */
.topbar::before,
.top-command-ribbon::before,
.kpi-card::before,
.hud-card::before,
.hud-panel::before,
.stage-tab.active::before,
.view-tab-btn.active::before,
.fleet-pill.active::before,
.env-btn.active::before,
.envelope-btn.active::before,
.drawer-tab.active::before,
.drawer-tab-btn.active::before,
.director-bar::before,
.bottom-studio-bar::before,
.vault-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 2%, #b8860b 12%, #e5c158 30%, #fff8dc 50%, #e5c158 70%, #b8860b 88%, transparent 98%);
  box-shadow:
    0 1px 5px rgba(255, 246, 214, 0.85),
    0 4px 18px rgba(212, 175, 55, 0.45),
    0 10px 28px rgba(201, 164, 76, 0.18);
  z-index: 3;
}

/* ==========================================================================
   1. PASSWORD GATE OVERLAY (`zendaya`)
   ========================================================================== */
.vault-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background:
    radial-gradient(circle at 50% 32%, rgba(243, 208, 120, 0.10), rgba(1, 1, 2, 0.985) 64%),
    linear-gradient(rgba(212, 212, 216, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 212, 216, 0.025) 1px, transparent 1px),
    #000000;
  background-size: 100% 100%, 40px 40px, 40px 40px, 100% 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.55s ease;
}

.vault-overlay.is-unlocked {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.vault-card {
  width: 100%;
  max-width: 640px;
  border-color: var(--gold-border-strong);
  border-radius: var(--radius-md);
  padding: 36px 38px 32px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(24px);
}

.vault-eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.vault-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cob-filament);
  box-shadow: 0 0 8px var(--cob-filament), 0 0 16px var(--gold);
  animation: pulseDot 1.8s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.84); }
}

.vault-title {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  line-height: 1.12;
  margin-bottom: 8px;
}

.vault-subtitle {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--platinum-bright);
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}

.vault-kpi-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 22px;
  padding: 12px;
  background: #020203;
  border: 1px solid rgba(212, 175, 55, 0.24);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 1px 0 rgba(255, 245, 220, 0.08);
}

.vault-kpi-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vault-kpi-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.vault-kpi-val {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--emerald-bright);
}

.vault-kpi-val.cyan {
  color: var(--platinum-bright);
}

.vault-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vault-input-row {
  display: flex;
  gap: 10px;
}

.vault-input {
  flex: 1;
  background: #000000;
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-sm);
  padding: 12px 15px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  outline: none;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.95);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.vault-input:focus {
  border-color: var(--gold-bright);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.95), 0 0 14px rgba(243, 208, 120, 0.28);
}

.vault-submit-btn {
  background: linear-gradient(180deg, #ffe8a3 0%, #d4af37 48%, #9a741c 100%);
  color: #010102;
  border: 1px solid #fff8dc;
  border-radius: var(--radius-sm);
  padding: 0 22px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 2px 14px rgba(243, 208, 120, 0.35);
  transition: transform var(--transition-fast), filter var(--transition-fast), box-shadow var(--transition-fast);
}

.vault-submit-btn:hover {
  filter: brightness(1.08);
  box-shadow: var(--gold-glow);
}

.vault-submit-btn:active {
  transform: translateY(1px);
}

.vault-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}

.vault-error {
  color: var(--crimson);
  font-family: var(--font-mono);
  font-size: 11px;
  min-height: 16px;
}

@keyframes vaultShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-7px); }
  40%, 80% { transform: translateX(7px); }
}

.vault-card.shake {
  animation: vaultShake 0.36s ease;
}

/* ==========================================================================
   2. APP SHELL LAYOUT (TOP RIBBON + MAIN WORKSPACE SPLIT + BOTTOM STUDIO BAR)
   ========================================================================== */
.app-shell {
  position: relative;
  z-index: 1;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: transparent;
}

/* Top Command Ribbon (.topbar / .top-command-ribbon) */
.topbar,
.top-command-ribbon {
  position: relative;
  flex-shrink: 0;
  border-top: none;
  border-left: none;
  border-right: none;
  border-bottom: 1px solid var(--gold-border);
  padding: 8px 14px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 40;
}

.ribbon-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-cluster {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--emerald-bright);
  text-shadow: 0 0 14px rgba(243, 208, 120, 0.32);
  white-space: nowrap;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--platinum);
  letter-spacing: 0.08em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--gold-border-strong);
  color: var(--emerald-bright);
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.ribbon-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.cmd-btn,
.fleet-pill {
  position: relative;
  overflow: hidden;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.01) 0px, rgba(255,255,255,0.01) 1px, transparent 1px, transparent 3px),
    linear-gradient(180deg, #141419 0%, #07070a 100%);
  border: 1px solid rgba(212, 175, 55, 0.26);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.07em;
  padding: 5px 10px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: inset 0 1px 0 rgba(255, 245, 220, 0.10);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.cmd-btn:hover,
.fleet-pill:hover {
  border-color: var(--gold-bright);
  background: linear-gradient(180deg, rgba(243, 208, 120, 0.18), rgba(10, 10, 14, 0.96));
  color: var(--emerald-bright);
}

.cmd-btn.active,
.cmd-btn.gold-solid,
.fleet-pill.active {
  background: linear-gradient(180deg, rgba(243, 208, 120, 0.24) 0%, rgba(18, 15, 9, 0.95) 100%);
  border-color: var(--gold-border-strong);
  color: var(--cob-filament);
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 220, 0.35),
    0 2px 14px rgba(212, 175, 55, 0.28);
}

.cmd-btn.cyan-accent {
  border-color: var(--cyan-border);
  color: var(--platinum-bright);
}
.cmd-btn.cyan-accent:hover,
.cmd-btn.cyan-accent.active {
  background: var(--cyan-dim);
  border-color: var(--platinum-bright);
  box-shadow: var(--cyan-glow);
}

.cmd-btn.crimson-accent {
  border-color: var(--crimson-border);
  color: #fca5a5;
}
.cmd-btn.crimson-accent:hover {
  background: var(--crimson-dim);
  border-color: var(--crimson);
}

/* 5-Card Headline KPI Strip */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.kpi-card {
  position: relative;
  overflow: hidden;
  border-left: 2px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 7px 11px 6px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  cursor: pointer;
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.kpi-card:hover {
  border-color: var(--gold-border-strong);
  transform: translateY(-1px);
}

.kpi-card.kpi-half-price {
  border-left-color: var(--cob-filament);
}

.kpi-card.kpi-cyan {
  border-left-color: var(--platinum-bright);
}

.kpi-card.kpi-crimson {
  border-left-color: var(--gold-bright);
}

.kpi-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi-value-row {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
}

.kpi-main {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.kpi-card.kpi-half-price .kpi-main {
  color: var(--emerald-bright);
  text-shadow: 0 0 12px rgba(243, 208, 120, 0.35);
}

.kpi-card.kpi-cyan .kpi-main {
  color: var(--platinum-bright);
}

.kpi-sub {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--gold-bright);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Primary View Mode Switcher Tabs (.stage-tab / .view-tab-btn) */
.view-mode-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  padding-top: 2px;
}

.stage-tab,
.view-tab-btn {
  position: relative;
  overflow: hidden;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.008) 0px, rgba(255,255,255,0.008) 1px, transparent 1px, transparent 3px),
    linear-gradient(180deg, #0d0d11 0%, #040406 100%);
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 7px 12px 6px;
  border-radius: var(--radius-xs) var(--radius-xs) 0 0;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.stage-tab:hover,
.view-tab-btn:hover {
  color: var(--text-primary);
  background: linear-gradient(180deg, #16161c 0%, #07070a 100%);
  border-color: rgba(212, 175, 55, 0.38);
}

.stage-tab.active,
.view-tab-btn.active {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.014) 0px, rgba(255,255,255,0.014) 1px, transparent 1px, transparent 3px),
    linear-gradient(180deg, rgba(243, 208, 120, 0.18) 0%, #070709 75%);
  color: var(--cob-filament);
  border-color: var(--gold-border-strong);
  border-bottom: 1px solid #070709;
  font-weight: 600;
}

/* ==========================================================================
   3. INTERACTIVE SPLIT / FULLSCREEN WORKSPACE (62% LEFT / 38% RIGHT)
   ========================================================================== */
.workspace-split {
  flex: 1;
  min-height: 0;
  display: flex;
  width: 100%;
  position: relative;
  overflow: hidden;
  background: var(--bg-void);
}

.stage-left {
  width: 62%;
  height: 100%;
  position: relative;
  background: var(--bg-obsidian);
  border-right: 1px solid var(--gold-border);
  transition: width var(--transition-smooth);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.workspace-split.stage-fullscreen .stage-left {
  width: 100%;
  border-right: none;
}

.drawer-right {
  width: 38%;
  height: 100%;
  background: var(--bg-panel);
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: width var(--transition-smooth), opacity var(--transition-smooth);
  overflow: hidden;
}

.workspace-split.stage-fullscreen .drawer-right {
  width: 0%;
  opacity: 0;
  pointer-events: none;
}

/* Stage Panes */
.stage-pane {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.stage-pane.active {
  display: flex;
}

.webgl-mount,
.graph-stage-mount {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: auto;
  background: radial-gradient(circle at 50% 42%, #09090d 0%, #020203 65%, #000000 100%);
}

#building-webgl-container {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  outline: none;
}

/* ==========================================================================
   4. 3D BUILDING FLOATING HUD OVERLAYS (.hud-card / .hud-panel)
   ========================================================================== */
.hud-card,
.hud-panel {
  position: absolute;
  z-index: 20;
  border-radius: var(--radius-sm);
  padding: 11px 12px 10px;
  backdrop-filter: blur(18px);
  pointer-events: auto;
  overflow: hidden;
}

.hud-top-left {
  top: 12px;
  left: 12px;
  width: 320px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.hud-top-right {
  top: 12px;
  right: 12px;
  width: 280px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hud-bottom-left {
  bottom: 12px;
  left: 12px;
  width: 350px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hud-bottom-right {
  bottom: 12px;
  right: 12px;
  max-width: 310px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hud-section-title {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-bright);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hud-section-title .cyan-tag {
  color: var(--platinum-bright);
}

.hud-slider-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.hud-slider-label {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-secondary);
}

.hud-slider-val {
  color: var(--emerald-bright);
  font-weight: 600;
}

/* Recessed Dark-Metal Channel + Glowing 3000K COB LED Track + Milled Brass Thumb */
input[type="range"],
input[type="range"].luxury-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background:
    linear-gradient(90deg, #b8860b 0%, #e5c158 38%, #fff8dc 75%, #f3d078 100%);
  border: 1px solid rgba(212, 175, 55, 0.48);
  border-radius: 1px;
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.95),
    0 0 10px rgba(243, 208, 120, 0.32);
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb,
input[type="range"].luxury-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 2px;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.12) 0px, rgba(255,255,255,0.12) 1px, transparent 1px, transparent 2px),
    linear-gradient(180deg, #fff8dc 0%, #e5c158 45%, #8b6508 100%);
  border: 1px solid #010102;
  box-shadow:
    0 0 8px rgba(255, 248, 220, 0.9),
    0 2px 6px rgba(0, 0, 0, 0.95);
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb,
input[type="range"].luxury-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  background: linear-gradient(180deg, #fff8dc 0%, #e5c158 45%, #8b6508 100%);
  border: 1px solid #010102;
  box-shadow: 0 0 8px rgba(255, 248, 220, 0.9);
  cursor: pointer;
}

.hud-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.hud-pill {
  flex: 1;
  min-width: 42px;
  background: #030305;
  border: 1px solid rgba(212, 175, 55, 0.24);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 4px 7px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  text-align: center;
  transition: all var(--transition-fast);
}

.hud-pill:hover {
  border-color: var(--gold-bright);
  color: var(--text-primary);
  background: rgba(243, 208, 120, 0.08);
}

.hud-pill.active {
  background: linear-gradient(180deg, rgba(243, 208, 120, 0.22), rgba(12, 11, 8, 0.95));
  border-color: var(--gold-border-strong);
  color: var(--cob-filament);
  font-weight: 600;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.25);
}

.hud-pill.cyan.active {
  background: var(--cyan-dim);
  border-color: var(--platinum-bright);
  color: var(--platinum-bright);
}

.envelope-btn-grid {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.env-btn,
.envelope-btn {
  position: relative;
  overflow: hidden;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.008) 0px, rgba(255,255,255,0.008) 1px, transparent 1px, transparent 3px),
    linear-gradient(180deg, #0b0b0f 0%, #030305 100%);
  border: 1px solid rgba(212, 175, 55, 0.24);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 7px 9px 6px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all var(--transition-fast);
}

.env-btn:hover,
.envelope-btn:hover {
  border-color: var(--gold-bright);
  color: var(--text-primary);
  background: rgba(243, 208, 120, 0.09);
}

.env-btn.active,
.envelope-btn.active {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.012) 0px, rgba(255,255,255,0.012) 1px, transparent 1px, transparent 3px),
    linear-gradient(90deg, rgba(243, 208, 120, 0.22), rgba(212, 212, 216, 0.08));
  border-color: var(--gold-border-strong);
  color: var(--cob-filament);
  font-weight: 600;
  box-shadow: var(--gold-glow);
}

.envelope-badge {
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 1px;
  background: rgba(212, 212, 216, 0.12);
  border: 1px solid rgba(212, 212, 216, 0.24);
  color: var(--platinum-bright);
}

/* Character & On-Screen WASD + Elevator Controls */
.char-controls-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.char-select {
  width: 100%;
  background: #020203;
  border: 1px solid var(--gold-border);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 5px 8px;
  border-radius: var(--radius-xs);
  outline: none;
}

.wasd-elevator-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.wasd-pad {
  display: grid;
  grid-template-columns: repeat(3, 28px);
  grid-template-rows: repeat(2, 26px);
  gap: 3px;
}

.wasd-key {
  background: linear-gradient(180deg, #121216 0%, #040406 100%);
  border: 1px solid var(--cyan-border);
  color: var(--platinum-bright);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: all 80ms ease;
}

.wasd-key:hover,
.wasd-key.pressed {
  background: rgba(243, 208, 120, 0.18);
  border-color: var(--gold-bright);
  color: var(--cob-filament);
  box-shadow: var(--gold-glow);
  transform: scale(0.96);
}

.elevator-strip {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.elevator-btns {
  display: flex;
  gap: 4px;
}

/* ==========================================================================
   5. RIGHT INTELLIGENCE & DOSSIER DRAWER (4 TABS)
   ========================================================================== */
.drawer-tabs-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #020203;
  border-bottom: 1px solid var(--gold-border);
  flex-shrink: 0;
}

.drawer-tab,
.drawer-tab-btn {
  position: relative;
  overflow: hidden;
  background: transparent;
  border: none;
  border-right: 1px solid rgba(212, 175, 55, 0.14);
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 10px 6px 8px;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all var(--transition-fast);
}

.drawer-tab:last-child,
.drawer-tab-btn:last-child {
  border-right: none;
}

.drawer-tab:hover,
.drawer-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(243, 208, 120, 0.07);
}

.drawer-tab.active,
.drawer-tab-btn.active {
  color: var(--cob-filament);
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.012) 0px, rgba(255,255,255,0.012) 1px, transparent 1px, transparent 3px),
    linear-gradient(180deg, rgba(243, 208, 120, 0.18), rgba(7, 7, 9, 0.96));
  border-bottom-color: var(--gold-bright);
}

.drawer-content-area {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
  background: var(--bg-obsidian);
}

.drawer-pane {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  padding: 14px;
  display: none;
  flex-direction: column;
  gap: 14px;
}

.drawer-pane.active {
  display: flex;
}

/* Cards inside Drawer (.dossier-panel / .dossier-card) */
.dossier-panel,
.dossier-card {
  position: relative;
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dossier-card.cyan-card {
  border-color: var(--cyan-border);
}

.dossier-card.crimson-card {
  border-color: var(--crimson-border);
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.012) 0px, rgba(255,255,255,0.012) 1px, transparent 1px, transparent 3px),
    linear-gradient(180deg, rgba(220, 38, 38, 0.09), #040406 85%);
}

.card-eyebrow {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-bright);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.card-body {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.55;
  user-select: text;
}

.nyx-quote-box {
  background: rgba(243, 208, 120, 0.07);
  border-left: 2px solid var(--gold-bright);
  padding: 9px 11px;
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  font-style: italic;
  color: var(--text-primary);
  font-size: 12.5px;
  line-height: 1.5;
  user-select: text;
}

.narrate-action-btn {
  background: linear-gradient(180deg, #ffe8a3 0%, #d4af37 50%, #9a741c 100%);
  color: #010102;
  border: 1px solid #fff8dc;
  border-radius: var(--radius-xs);
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  box-shadow: 0 2px 14px rgba(243, 208, 120, 0.30);
  transition: all var(--transition-fast);
}

.narrate-action-btn:hover {
  filter: brightness(1.1);
  box-shadow: var(--gold-glow);
}

/* Spec Key-Value Grid */
.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.spec-cell {
  background: #030305;
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-radius: var(--radius-xs);
  padding: 6px 8px;
  box-shadow: inset 0 1px 0 rgba(255, 245, 220, 0.06);
}

.spec-k {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.spec-v {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-primary);
  font-weight: 600;
  margin-top: 2px;
}

/* Floor & Room Selector Accordion / Pills */
.floor-block {
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: var(--radius-xs);
  overflow: hidden;
  background: #040406;
}

.floor-block-header {
  padding: 7px 10px;
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.14), rgba(7, 7, 9, 0.95));
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--emerald-bright);
  cursor: pointer;
}

.room-chip-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  padding: 8px;
}

.room-chip {
  background: #070709;
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-radius: var(--radius-xs);
  padding: 6px 8px;
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: all var(--transition-fast);
}

.room-chip:hover {
  border-color: var(--gold-bright);
  background: rgba(243, 208, 120, 0.09);
}

.room-chip.active {
  border-color: var(--cob-filament);
  background: rgba(243, 208, 120, 0.16);
  box-shadow: var(--gold-glow);
}

.room-chip-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--gold-bright);
}

.room-chip-name {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 5 Lenses Interactive List */
.lens-item {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.01) 0px, rgba(255,255,255,0.01) 1px, transparent 1px, transparent 3px),
    linear-gradient(170deg, #0e0e12 0%, #050507 100%);
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-left: 2px solid var(--gold-bright);
  border-radius: var(--radius-xs);
  padding: 9px 11px;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lens-item:hover,
.lens-item.active {
  background: linear-gradient(90deg, rgba(243, 208, 120, 0.14), #070709);
  border-color: var(--gold-border-strong);
  box-shadow: var(--gold-glow);
}

.lens-top-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.lens-name {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.lens-point {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--emerald-bright);
  white-space: nowrap;
}

.lens-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--platinum);
}

.lens-verdict {
  font-size: 11.5px;
  color: var(--text-secondary);
}

/* ==========================================================================
   6. 37-DOCUMENT VAULT BROWSER (DRAWER + FULL STAGE VIEW)
   ========================================================================== */
.vault-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 0;
  background: var(--bg-obsidian);
  z-index: 5;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.18);
}

.doc-search-input {
  width: 100%;
  background: #000000;
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-xs);
  padding: 8px 11px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 11px;
  outline: none;
}

.doc-search-input:focus {
  border-color: var(--gold-bright);
}

.doc-cat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.doc-cat-pill {
  background: #030305;
  border: 1px solid rgba(212, 175, 55, 0.24);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 9.5px;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.doc-cat-pill.active,
.doc-cat-pill:hover {
  background: var(--gold-dim);
  border-color: var(--gold-bright);
  color: var(--cob-filament);
}

.doc-list-grid {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.doc-stage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 10px;
  padding: 16px;
  overflow-y: auto;
}

.doc-row-card {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.01) 0px, rgba(255,255,255,0.01) 1px, transparent 1px, transparent 3px),
    linear-gradient(170deg, #0d0d11 0%, #040406 100%);
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: var(--radius-xs);
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: inset 0 1px 0 rgba(255, 245, 220, 0.08);
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.doc-row-card:hover {
  border-color: var(--gold-bright);
  background: linear-gradient(170deg, #14141a 0%, #060609 100%);
}

.doc-row-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.doc-filename {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-all;
}

.doc-ext-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 1px;
  background: var(--cyan-dim);
  color: var(--platinum-bright);
  border: 1px solid var(--cyan-border);
  flex-shrink: 0;
}

.doc-ext-badge.pdf {
  background: var(--crimson-dim);
  color: #fca5a5;
  border-color: var(--crimson-border);
}

.doc-ext-badge.html {
  background: var(--gold-dim);
  color: var(--emerald-bright);
  border-color: var(--gold-border);
}

.doc-row-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--text-muted);
}

.doc-row-actions {
  display: flex;
  gap: 6px;
}

.doc-btn {
  flex: 1;
  background: #09090c;
  border: 1px solid rgba(212, 175, 55, 0.28);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 5px 8px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: all var(--transition-fast);
}

.doc-btn:hover {
  border-color: var(--gold-bright);
  background: var(--gold-dim);
  color: var(--cob-filament);
}

.doc-btn.primary {
  background: rgba(243, 208, 120, 0.12);
  border-color: var(--gold-border-strong);
  color: var(--emerald-bright);
}

.doc-btn.primary:hover {
  background: rgba(243, 208, 120, 0.24);
  border-color: var(--cob-filament);
}

/* ==========================================================================
   7. BOTTOM HYPERFRAMES STUDIO BAR (.director-bar / .bottom-studio-bar)
   ========================================================================== */
.director-bar,
.bottom-studio-bar {
  position: relative;
  flex-shrink: 0;
  min-height: 76px;
  border-left: none;
  border-right: none;
  border-bottom: none;
  border-top: 1px solid var(--gold-border);
  z-index: 45;
}

/* ==========================================================================
   8. IN-APP DOCUMENT PREVIEW MODAL (`<iframe>`)
   ========================================================================== */
.doc-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: rgba(0, 0, 0, 0.90);
  backdrop-filter: blur(14px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.doc-modal-backdrop.open {
  display: flex;
}

.doc-modal-window {
  width: 100%;
  max-width: 1280px;
  height: 88vh;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.012) 0px, rgba(255,255,255,0.012) 1px, transparent 1px, transparent 3px),
    linear-gradient(170deg, #111115 0%, #050507 100%);
  border: 1px solid var(--gold-border-strong);
  border-radius: var(--radius-md);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.96), var(--gold-glow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.doc-modal-header {
  padding: 12px 18px;
  background: #030305;
  border-bottom: 1px solid var(--gold-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.doc-modal-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.doc-modal-title {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--emerald-bright);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-modal-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}

.doc-modal-body {
  flex: 1;
  background: #050507;
  position: relative;
}

.doc-modal-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #ffffff;
}

/* Data Tables in Dossier */
.luxury-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 10.5px;
}

.luxury-table th {
  text-align: left;
  padding: 7px 8px;
  background: rgba(212, 175, 55, 0.14);
  color: var(--emerald-bright);
  border-bottom: 1px solid var(--gold-border);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.luxury-table td {
  padding: 7px 8px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.12);
  color: var(--text-secondary);
}

.luxury-table tr:hover td {
  background: rgba(243, 208, 120, 0.06);
  color: var(--text-primary);
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .kpi-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .stage-left {
    width: 56%;
  }
  .drawer-right {
    width: 44%;
  }
}


/* ============================================================================
   PBI 4D DEEP METALLIC BLACK MONOLITH + SPARSE DARK GOLD + MOVING 1PX COB LED
   (95% Black / 4% Dark Antique Metallic Gold #7c6230 / 1% Moving COB Trace)
   ============================================================================ */
:root {
  --bg-obsidian: #000000 !important;
  --bg-void: #000000 !important;
  --bg-panel: rgba(2, 2, 3, 0.94) !important;
  --bg-card: #030304 !important;
  --bg-card-hover: #060608 !important;
  --bg-elevated: #050507 !important;
  --bg-glass: rgba(2, 2, 3, 0.90) !important;

  --gold: #7c6230 !important;
  --gold-bright: #bfa055 !important;
  --gold-dim: #5f5230 !important;
  --gold-muted: rgba(124, 98, 48, 0.24) !important;
  --gold-glow: rgba(124, 98, 48, 0.14) !important;
  --gold-border: rgba(124, 98, 48, 0.22) !important;
  --gold-border-strong: rgba(191, 160, 85, 0.38) !important;

  --cyan: #8a8d93 !important;
  --cyan-bright: #bfa055 !important;
  --emerald: #9c7f3b !important;
  --emerald-bright: #bfa055 !important;
  --crimson: #85272c !important;

  --text-primary: #d8d3c8 !important;
  --text-secondary: #8a8270 !important;
  --text-muted: #565043 !important;
}

@keyframes cobMovingTrace {
  0%   { background-position: 180% 0; }
  100% { background-position: -80% 0; }
}

@keyframes cobMovingTraceVertical {
  0%   { background-position: 0 180%; }
  100% { background-position: 0 -80%; }
}

@keyframes chronoPulse4D {
  0%, 100% { opacity: 0.32; transform: scaleX(0.995); }
  50%      { opacity: 0.72; transform: scaleX(1.0); }
}

html, body {
  background: #000000 !important;
  color: #d8d3c8 !important;
}

/* 4D Spatial Depth Cockpit Perspective */
.app-shell {
  background: radial-gradient(circle at 50% 42%, #050507 0%, #010102 55%, #000000 100%) !important;
  perspective: 1800px;
  transform-style: preserve-3d;
}

.main-workspace {
  perspective: 1700px;
  transform-style: preserve-3d;
  gap: 8px !important;
  padding: 4px 8px 6px !important;
  background: #000000 !important;
}

/* 4D Multi-Plane Extruded Black-Metal Slabs with Mouse/Time Parallax */
.top-command-ribbon,
.topbar {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.006) 0px, rgba(255,255,255,0.006) 1px, transparent 1px, transparent 4px),
    linear-gradient(180deg, #050507 0%, #020203 65%, #000000 100%) !important;
  border-bottom: 1px solid rgba(124, 98, 48, 0.22) !important;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.98) !important;
  transform: translateZ(14px) rotateX(calc(var(--4d-rx, 0deg) * -0.25));
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.stage-left {
  background: #000000 !important;
  border: 1px solid rgba(124, 98, 48, 0.22) !important;
  box-shadow:
    inset 0 0 65px rgba(0, 0, 0, 0.98),
    -2px 4px 0 #090806,
    0 18px 48px rgba(0, 0, 0, 0.98) !important;
  transform: translateZ(4px) rotateX(calc(var(--4d-rx, 0deg) * 0.35)) rotateY(calc(var(--4d-ry, 0deg) * 0.35));
  transform-style: preserve-3d;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.stage-right {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.005) 0px, rgba(255,255,255,0.005) 1px, transparent 1px, transparent 4px),
    linear-gradient(175deg, #040406 0%, #010102 55%, #000000 100%) !important;
  border: 1px solid rgba(124, 98, 48, 0.22) !important;
  box-shadow:
    -1px 1px 0 #17130c,
    -3px 4px 0 #070604,
    -12px 22px 54px rgba(0, 0, 0, 0.99),
    inset 0 1px 0 rgba(191, 160, 85, 0.10) !important;
  transform: translateZ(22px) rotateY(calc(-1.4deg + var(--4d-ry, 0deg) * 0.55)) rotateX(calc(var(--4d-rx, 0deg) * 0.35));
  transform-style: preserve-3d;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Floating 4D HUD Panels inside the 3D Stage */
.hud-panel,
.hud-card {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.006) 0px, rgba(255,255,255,0.006) 1px, transparent 1px, transparent 4px),
    linear-gradient(168deg, rgba(6, 6, 8, 0.92) 0%, rgba(2, 2, 3, 0.96) 65%, rgba(0, 0, 0, 0.98) 100%) !important;
  border: 1px solid rgba(124, 98, 48, 0.22) !important;
  box-shadow:
    -1px 1px 0 #14100a,
    -2px 3px 0 #050504,
    0 16px 40px rgba(0, 0, 0, 0.96),
    inset 0 1px 0 rgba(191, 160, 85, 0.08) !important;
  transform: translateZ(28px) translate3d(calc(var(--4d-ry, 0deg) * -1.8px), calc(var(--4d-rx, 0deg) * 1.8px), 0);
  backdrop-filter: blur(12px);
}

/* Remove bright static ::before gold bars from all cards; replace with FAINT 1px moving COB LED trace */
.topbar::before,
.top-command-ribbon::before,
.kpi-card::before,
.hud-card::before,
.hud-panel::before,
.dossier-card::before,
.dossier-panel::before,
.director-bar::before,
.stage-tab.active::before,
.view-tab-btn.active::before,
.drawer-tab.active::before,
.drawer-tab-btn.active::before,
.env-btn.active::before,
.fleet-pill.active::before {
  height: 1px !important;
  background: linear-gradient(
    90deg,
    transparent 0%,
    transparent 36%,
    rgba(95, 82, 48, 0.18) 44%,
    rgba(191, 160, 85, 0.62) 50%,
    rgba(95, 82, 48, 0.18) 56%,
    transparent 64%,
    transparent 100%
  ) !important;
  background-size: 260% 100% !important;
  animation: cobMovingTrace 8.5s linear infinite !important;
  box-shadow: 0 1px 6px rgba(191, 160, 85, 0.16) !important;
  opacity: 0.85 !important;
}

/* Stagger the moving COB LED light trace across KPI cards so light flows across the ribbon */
.kpi-card:nth-child(1)::before { animation-delay: 0.0s !important; }
.kpi-card:nth-child(2)::before { animation-delay: -1.7s !important; }
.kpi-card:nth-child(3)::before { animation-delay: -3.4s !important; }
.kpi-card:nth-child(4)::before { animation-delay: -5.1s !important; }
.kpi-card:nth-child(5)::before { animation-delay: -6.8s !important; }

/* KPI Cards & Dossier Panels: Deep Black Anodized Metal + Multi-Stop Brushed Antique Gold Text */
.kpi-card,
.dossier-card,
.dossier-panel,
.meta-cell,
.lens-item {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.005) 0px, rgba(255,255,255,0.005) 1px, transparent 1px, transparent 4px),
    linear-gradient(172deg, #050507 0%, #020203 55%, #000000 100%) !important;
  border: 1px solid rgba(124, 98, 48, 0.18) !important;
  box-shadow:
    -1px 1px 0 #120f09,
    0 10px 26px rgba(0, 0, 0, 0.96),
    inset 0 1px 0 rgba(191, 160, 85, 0.06) !important;
}

.kpi-main,
.brand-mark,
.lens-val {
  background: linear-gradient(162deg, #5c4a22 0%, #8a6f34 28%, #bfa055 48%, #9c7f3b 55%, #6e5425 78%, #3b2d12 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
  text-shadow: none !important;
}

.kpi-label,
.hud-title,
.card-eyebrow,
.drawer-tab-btn,
.view-tab-btn {
  color: #7e6936 !important;
}

.kpi-sub {
  color: #6b6353 !important;
}

/* ELIMINATE ALL SOLID GOLD BUTTON FILLS — Deep Metallic Black + Sparse Dark Gold Trim Only */
.cmd-btn,
.cmd-btn.gold-solid,
.cmd-btn.cyan-accent,
.hud-btn,
.hud-btn.active,
.env-btn,
.env-btn.active,
.view-tab-btn,
.view-tab-btn.active,
.drawer-tab-btn,
.drawer-tab-btn.active,
.fleet-pill,
.fleet-pill.active,
#btn-narrate-room,
#btn-nyx-welcome,
#btn-open-voice-tab {
  background: linear-gradient(170deg, #08080b 0%, #030304 58%, #010102 100%) !important;
  color: #bfa055 !important;
  border: 1px solid rgba(124, 98, 48, 0.26) !important;
  box-shadow: inset 0 1px 0 rgba(191, 160, 85, 0.10), 0 4px 14px rgba(0, 0, 0, 0.92) !important;
  font-weight: 500 !important;
}

.cmd-btn:hover,
.hud-btn.active,
.env-btn.active,
.view-tab-btn.active,
.drawer-tab-btn.active,
.fleet-pill.active {
  background: linear-gradient(170deg, #0d0c0a 0%, #050506 58%, #010102 100%) !important;
  border-color: rgba(191, 160, 85, 0.45) !important;
  color: #d8c390 !important;
}

.env-badge {
  background: #020203 !important;
  color: #8a6f34 !important;
  border: 1px solid rgba(124, 98, 48, 0.22) !important;
}

/* Range Sliders: Recessed Black Anodized Channel with Thin Dark-Gold Filament */
input[type="range"] {
  background: #020203 !important;
  border: 1px solid rgba(124, 98, 48, 0.22) !important;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.98) !important;
  height: 4px !important;
}
input[type="range"]::-webkit-slider-thumb {
  background: linear-gradient(160deg, #bfa055 0%, #6e5425 55%, #2b210d 100%) !important;
  border: 1px solid rgba(191, 160, 85, 0.55) !important;
  box-shadow: 0 0 6px rgba(191, 160, 85, 0.30) !important;
  width: 11px !important;
  height: 11px !important;
  border-radius: 1px !important;
}

/* 4D Chrono-Dimension Bar inside Stage Header */
.chrono-4d-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px;
  background: linear-gradient(180deg, #040406 0%, #010102 100%);
  border-bottom: 1px solid rgba(124, 98, 48, 0.20);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #8a6f34;
  position: relative;
  overflow: hidden;
}
.chrono-4d-bar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, transparent 38%, rgba(191, 160, 85, 0.58) 50%, transparent 62%, transparent 100%);
  background-size: 240% 100%;
  animation: cobMovingTrace 6.5s linear infinite;
}
.chrono-4d-label {
  color: #bfa055;
  white-space: nowrap;
  font-weight: 600;
}
.chrono-4d-slider {
  flex: 1;
  min-width: 120px;
}
.chrono-4d-readout {
  color: #d8d3c8;
  white-space: nowrap;
  min-width: 210px;
  text-align: right;
}
.chrono-4d-orbit-btn {
  background: #030304;
  color: #bfa055;
  border: 1px solid rgba(124, 98, 48, 0.30);
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  cursor: pointer;
  border-radius: 1px;
}
.chrono-4d-orbit-btn.active {
  border-color: rgba(191, 160, 85, 0.65);
  color: #e6d3a3;
  box-shadow: 0 0 10px rgba(191, 160, 85, 0.18);
}

.narrate-action-btn,
#btn-narrate-selected,
.nyx-hf-play-btn {
  background: linear-gradient(175deg, #08080b 0%, #030304 60%, #010102 100%) !important;
  color: #bfa055 !important;
  border: 1px solid rgba(124, 98, 48, 0.32) !important;
  box-shadow: inset 0 1px 0 rgba(191, 160, 85, 0.10), 0 6px 18px rgba(0, 0, 0, 0.96) !important;
  font-weight: 500 !important;
  letter-spacing: 0.14em !important;
}
.chrono-4d-bar {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 45 !important;
  height: 26px !important;
  background: rgba(2, 2, 3, 0.94) !important;
  border-bottom: 1px solid rgba(124, 98, 48, 0.24) !important;
}
.hud-top-left,
.hud-top-center {
  top: 34px !important;
}


/* ============================================================================
   LAYERED METALLIC GREYS + SPARSE DARK ANTIQUE GOLD + FAINT BLOOD RED (#7E2125)
   ============================================================================ */
:root {
  --bg-obsidian: #060709 !important;
  --bg-void: #040507 !important;
  --bg-panel: rgba(14, 16, 21, 0.94) !important;
  --bg-card: #12151c !important;
  --bg-card-hover: #191d26 !important;
  --bg-elevated: #171a22 !important;
  --bg-glass: rgba(16, 19, 25, 0.90) !important;

  --gold: #8a6f34 !important;
  --gold-bright: #bfa055 !important;
  --gold-dim: #6e5829 !important;
  --crimson: #7e2125 !important;
  --blood-red: #7e2125 !important;
  --blood-red-hi: #a62c32 !important;
  --steel-grey: #8e95a2 !important;
  --pewter-grey: #b8bec9 !important;

  --text-primary: #e2dfd9 !important;
  --text-secondary: #9a9ea8 !important;
  --text-muted: #686d78 !important;
}

html, body {
  background: #050608 !important;
  color: #e2dfd9 !important;
}

.app-shell {
  background: radial-gradient(circle at 50% 38%, #141720 0%, #090b0f 55%, #040507 100%) !important;
}

.main-workspace {
  background: linear-gradient(180deg, #08090d 0%, #050608 100%) !important;
}

/* Brushed Gunmetal & Titanium Grey Panels with Faint Blood-Red & Antique-Gold Hairlines */
.top-command-ribbon,
.topbar {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.010) 0px, rgba(255,255,255,0.010) 1px, transparent 1px, transparent 4px),
    linear-gradient(180deg, #171a22 0%, #0f1117 62%, #090b0e 100%) !important;
  border-bottom: 1px solid rgba(138, 111, 52, 0.28) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 10px 28px rgba(0, 0, 0, 0.88) !important;
}

.stage-left {
  background: #06070a !important;
  border: 1px solid rgba(142, 149, 162, 0.20) !important;
  box-shadow:
    inset 0 0 48px rgba(0, 0, 0, 0.85),
    inset 0 0 18px rgba(126, 33, 37, 0.08),
    -2px 4px 0 #12151c,
    0 16px 42px rgba(0, 0, 0, 0.92) !important;
}

.stage-right {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.009) 0px, rgba(255,255,255,0.009) 1px, transparent 1px, transparent 4px),
    linear-gradient(175deg, #161922 0%, #0e1016 55%, #08090d 100%) !important;
  border: 1px solid rgba(142, 149, 162, 0.20) !important;
  box-shadow:
    -1px 1px 0 #232733,
    -3px 4px 0 #0c0e13,
    -10px 20px 48px rgba(0, 0, 0, 0.94),
    inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

/* Floating Metallic Grey HUD Slabs */
.hud-panel,
.hud-card {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.010) 0px, rgba(255,255,255,0.010) 1px, transparent 1px, transparent 4px),
    linear-gradient(168deg, rgba(24, 28, 37, 0.90) 0%, rgba(14, 16, 22, 0.94) 62%, rgba(9, 10, 14, 0.96) 100%) !important;
  border: 1px solid rgba(142, 149, 162, 0.22) !important;
  box-shadow:
    -1px 1px 0 #252935,
    -2px 3px 0 #0b0d12,
    0 14px 34px rgba(0, 0, 0, 0.90),
    inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

/* KPI Cards, Dossier Cards & Meta Cells: Milled Pewter/Gunmetal Grey with Subtle Blood-Red & Gold Accents */
.kpi-card,
.dossier-card,
.dossier-panel,
.meta-cell,
.lens-item {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.008) 0px, rgba(255,255,255,0.008) 1px, transparent 1px, transparent 4px),
    linear-gradient(170deg, #1b1f29 0%, #11141b 55%, #0b0d12 100%) !important;
  border: 1px solid rgba(142, 149, 162, 0.18) !important;
  box-shadow:
    -1px 1px 0 #242834,
    0 8px 22px rgba(0, 0, 0, 0.88),
    inset 0 1px 0 rgba(255, 255, 255, 0.07) !important;
}

/* Faint hints of Blood Red (#7E2125) on Crimson / Purchase / License Cards & Alternating Traces */
.kpi-card.kpi-crimson,
.dossier-card.crimson-card,
#kpi-card-purchase {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.008) 0px, rgba(255,255,255,0.008) 1px, transparent 1px, transparent 4px),
    linear-gradient(170deg, #211519 0%, #140f13 55%, #0b0a0e 100%) !important;
  border-color: rgba(126, 33, 37, 0.42) !important;
  box-shadow:
    inset 0 1px 0 rgba(166, 44, 50, 0.18),
    0 8px 22px rgba(0, 0, 0, 0.88) !important;
}

/* Faint Moving 1px COB LED Light Trace Combining Dark Antique Gold (#bfa055) + Faint Blood Red (#9e2a2f) */
.topbar::before,
.top-command-ribbon::before,
.kpi-card::before,
.hud-card::before,
.hud-panel::before,
.dossier-card::before,
.dossier-panel::before,
.director-bar::before,
.stage-tab.active::before,
.view-tab-btn.active::before,
.drawer-tab.active::before,
.drawer-tab-btn.active::before,
.env-btn.active::before,
.fleet-pill.active::before {
  height: 1px !important;
  background: linear-gradient(
    90deg,
    transparent 0%,
    transparent 30%,
    rgba(126, 33, 37, 0.48) 41%,
    rgba(191, 160, 85, 0.72) 50%,
    rgba(126, 33, 37, 0.48) 59%,
    transparent 70%,
    transparent 100%
  ) !important;
  background-size: 260% 100% !important;
  animation: cobMovingTrace 8.5s linear infinite !important;
  box-shadow: 0 1px 6px rgba(126, 33, 37, 0.22), 0 1px 4px rgba(191, 160, 85, 0.16) !important;
  opacity: 0.92 !important;
}

.kpi-label,
.hud-title,
.card-eyebrow {
  color: #a3a8b4 !important;
}

.kpi-sub {
  color: #858b98 !important;
}

/* Brushed Gunmetal Grey Buttons with Sparse Dark Gold & Faint Blood-Red Hover Rim */
.cmd-btn,
.cmd-btn.gold-solid,
.cmd-btn.cyan-accent,
.hud-btn,
.env-btn,
.view-tab-btn,
.drawer-tab-btn,
.fleet-pill,
.narrate-action-btn,
#btn-narrate-selected,
#btn-narrate-room,
#btn-nyx-welcome,
#btn-open-voice-tab,
.nyx-hf-play-btn {
  background: linear-gradient(175deg, #20242e 0%, #14171e 58%, #0d0f14 100%) !important;
  color: #d8d3c8 !important;
  border: 1px solid rgba(142, 149, 162, 0.24) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 4px 12px rgba(0, 0, 0, 0.85) !important;
}

.cmd-btn:hover,
.hud-btn.active,
.env-btn.active,
.view-tab-btn.active,
.drawer-tab-btn.active,
.fleet-pill.active,
#btn-open-voice-tab,
.cmd-btn.crimson-accent {
  background: linear-gradient(175deg, #261a1e 0%, #171318 58%, #0e0d12 100%) !important;
  border-color: rgba(158, 42, 47, 0.48) !important;
  color: #e6dfd3 !important;
  box-shadow: inset 0 1px 0 rgba(191, 160, 85, 0.16), 0 0 12px rgba(126, 33, 37, 0.22) !important;
}

.env-badge {
  background: #10131a !important;
  color: #bfa055 !important;
  border: 1px solid rgba(138, 111, 52, 0.28) !important;
}

.chrono-4d-bar {
  background: linear-gradient(90deg, rgba(16, 19, 26, 0.95) 0%, rgba(26, 16, 20, 0.95) 50%, rgba(16, 19, 26, 0.95) 100%) !important;
  border-bottom: 1px solid rgba(126, 33, 37, 0.36) !important;
}
