/* ==========================================================================
   THEATRE PRODUCTION STAGE CONTROL DESIGN SYSTEM
   ========================================================================== */

:root {
  /* Default Theme: Theatre Noir (theatre-dark) */
  --bg-primary: #0a0d14;
  --bg-secondary: #121722;
  --bg-card: #18202e;
  --bg-surface: #202b3d;
  --border-color: #2b394f;
  --border-active: #485c7e;

  --text-main: #f0f4f8;
  --text-muted: #8b9bb4;
  --text-dim: #5c6c82;

  --color-standby: #ff3344;
  --color-standby-glow: rgba(255, 51, 68, 0.4);
  --color-amber: #ff9800;
  --color-amber-glow: rgba(255, 152, 0, 0.45);
  --color-go: #00e676;
  --color-go-glow: rgba(0, 230, 118, 0.4);
  --color-tech-cyan: #00c0f3;
  --color-tech-glow: rgba(0, 192, 243, 0.35);
  --color-purple: #a855f7;

  --cue-bulb-off-bg: #2b3342;
  --cue-bulb-off-border: #3d495d;
  --clock-bg: rgba(0, 0, 0, 0.35);
  --ticker-bg: rgba(0, 0, 0, 0.4);

  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-panel: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
  --transition-fast: 0.15s ease;
  --transition-med: 0.25s ease;
}

/* ==========================================================================
   THEME PALETTES (12 THEMES: DARK, LIGHT, FUNKY, NEON, EXOTIC)
   ========================================================================== */

/* 1. Midnight Abyss (OLED Dark) */
:root[data-theme="midnight-abyss"] {
  --bg-primary: #000000;
  --bg-secondary: #08090d;
  --bg-card: #0e121a;
  --bg-surface: #171c26;
  --border-color: #1e2535;
  --border-active: #3b4d6e;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --color-standby: #ff2244;
  --color-standby-glow: rgba(255, 34, 68, 0.5);
  --color-amber: #ffaa00;
  --color-amber-glow: rgba(255, 170, 0, 0.5);
  --color-go: #00ff88;
  --color-go-glow: rgba(0, 255, 136, 0.45);
  --color-tech-cyan: #38bdf8;
  --color-tech-glow: rgba(56, 189, 248, 0.4);
  --cue-bulb-off-bg: #141822;
  --cue-bulb-off-border: #232c3d;
  --clock-bg: rgba(0, 0, 0, 0.6);
  --ticker-bg: rgba(0, 0, 0, 0.6);
}

/* 2. Carbon Stealth (Industrial Dark) */
:root[data-theme="carbon-stealth"] {
  --bg-primary: #111316;
  --bg-secondary: #181b20;
  --bg-card: #22262d;
  --bg-surface: #2c323b;
  --border-color: #373e4a;
  --border-active: #566173;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --color-standby: #f43f5e;
  --color-standby-glow: rgba(244, 63, 94, 0.45);
  --color-amber: #f59e0b;
  --color-amber-glow: rgba(245, 158, 11, 0.45);
  --color-go: #10b981;
  --color-go-glow: rgba(16, 185, 129, 0.45);
  --color-tech-cyan: #06b6d4;
  --color-tech-glow: rgba(6, 182, 212, 0.4);
  --cue-bulb-off-bg: #272d36;
  --cue-bulb-off-border: #3d4553;
  --clock-bg: rgba(0, 0, 0, 0.4);
  --ticker-bg: rgba(0, 0, 0, 0.4);
}

/* 3. Daylight Studio (Clean Crisp Light) */
:root[data-theme="daylight-studio"] {
  --bg-primary: #edf1f7;
  --bg-secondary: #f8fafc;
  --bg-card: #ffffff;
  --bg-surface: #e2e8f0;
  --border-color: #cbd5e1;
  --border-active: #94a3b8;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --color-standby: #e11d48;
  --color-standby-glow: rgba(225, 29, 72, 0.35);
  --color-amber: #d97706;
  --color-amber-glow: rgba(217, 119, 6, 0.35);
  --color-go: #059669;
  --color-go-glow: rgba(5, 150, 105, 0.35);
  --color-tech-cyan: #0284c7;
  --color-tech-glow: rgba(2, 132, 199, 0.35);
  --cue-bulb-off-bg: #cbd5e1;
  --cue-bulb-off-border: #94a3b8;
  --clock-bg: rgba(15, 23, 42, 0.08);
  --ticker-bg: #f1f5f9;
  --shadow-panel: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
}

/* 4. Parchment Script (Warm Antique Prompt Script) */
:root[data-theme="parchment-script"] {
  --bg-primary: #f4ede0;
  --bg-secondary: #fcf9f2;
  --bg-card: #ffffff;
  --bg-surface: #ede4d3;
  --border-color: #d8c8a8;
  --border-active: #b89f72;
  --text-main: #291e13;
  --text-muted: #5f4b38;
  --text-dim: #8a7057;
  --color-standby: #b91c1c;
  --color-standby-glow: rgba(185, 28, 28, 0.35);
  --color-amber: #b45309;
  --color-amber-glow: rgba(180, 83, 9, 0.35);
  --color-go: #15803d;
  --color-go-glow: rgba(21, 128, 61, 0.35);
  --color-tech-cyan: #0369a1;
  --color-tech-glow: rgba(3, 105, 161, 0.35);
  --cue-bulb-off-bg: #d8c8a8;
  --cue-bulb-off-border: #b89f72;
  --clock-bg: rgba(41, 30, 19, 0.08);
  --ticker-bg: #ede4d3;
  --shadow-panel: 0 10px 25px -5px rgba(41, 30, 19, 0.08);
}

/* 5. 80s Retro Synthwave (Funky Sunset Grid) */
:root[data-theme="retro-synthwave"] {
  --bg-primary: #130924;
  --bg-secondary: #1f0e38;
  --bg-card: #2d144e;
  --bg-surface: #3e1b6a;
  --border-color: #5b238f;
  --border-active: #ff007f;
  --text-main: #fdf4ff;
  --text-muted: #d8b4fe;
  --text-dim: #9333ea;
  --color-standby: #ff007f;
  --color-standby-glow: rgba(255, 0, 127, 0.55);
  --color-amber: #ff9e00;
  --color-amber-glow: rgba(255, 158, 0, 0.55);
  --color-go: #00f5d4;
  --color-go-glow: rgba(0, 245, 212, 0.5);
  --color-tech-cyan: #00f0ff;
  --color-tech-glow: rgba(0, 240, 255, 0.5);
  --color-purple: #c77dff;
  --cue-bulb-off-bg: #3a1c62;
  --cue-bulb-off-border: #5a2c94;
  --clock-bg: rgba(19, 9, 36, 0.65);
  --ticker-bg: rgba(19, 9, 36, 0.6);
}

/* 6. Funky Disco 70s (Funky Velvet & Tangerine) */
:root[data-theme="funky-groove"] {
  --bg-primary: #1a0628;
  --bg-secondary: #280b3d;
  --bg-card: #391154;
  --bg-surface: #4c186e;
  --border-color: #682394;
  --border-active: #ffb703;
  --text-main: #fff4ec;
  --text-muted: #e9b3d0;
  --text-dim: #b46b96;
  --color-standby: #e63946;
  --color-standby-glow: rgba(230, 57, 70, 0.5);
  --color-amber: #fb8500;
  --color-amber-glow: rgba(251, 133, 0, 0.5);
  --color-go: #06d6a0;
  --color-go-glow: rgba(6, 214, 160, 0.5);
  --color-tech-cyan: #ffb703;
  --color-tech-glow: rgba(255, 183, 3, 0.5);
  --color-purple: #9d4edd;
  --cue-bulb-off-bg: #431761;
  --cue-bulb-off-border: #64268e;
  --clock-bg: rgba(26, 6, 40, 0.65);
  --ticker-bg: rgba(26, 6, 40, 0.6);
}

/* 7. Cyberpunk 2099 (High-Voltage Neon) */
:root[data-theme="cyberpunk-neon"] {
  --bg-primary: #06080c;
  --bg-secondary: #0d1017;
  --bg-card: #141822;
  --bg-surface: #1d2332;
  --border-color: #2a3347;
  --border-active: #39ff14;
  --text-main: #f0fff4;
  --text-muted: #86efac;
  --text-dim: #22c55e;
  --color-standby: #ff0055;
  --color-standby-glow: rgba(255, 0, 85, 0.65);
  --color-amber: #ffe600;
  --color-amber-glow: rgba(255, 230, 0, 0.6);
  --color-go: #39ff14;
  --color-go-glow: rgba(57, 255, 20, 0.65);
  --color-tech-cyan: #00f7ff;
  --color-tech-glow: rgba(0, 247, 255, 0.65);
  --color-purple: #f000ff;
  --cue-bulb-off-bg: #1c2434;
  --cue-bulb-off-border: #2a3852;
  --clock-bg: rgba(6, 8, 12, 0.7);
  --ticker-bg: rgba(6, 8, 12, 0.65);
}

/* 8. Matrix Terminal (Cyber Grid Neon) */
:root[data-theme="laser-matrix"] {
  --bg-primary: #020904;
  --bg-secondary: #051409;
  --bg-card: #0a2211;
  --bg-surface: #10331b;
  --border-color: #1a4f2b;
  --border-active: #00ff66;
  --text-main: #e6ffed;
  --text-muted: #56d364;
  --text-dim: #166534;
  --color-standby: #ff1744;
  --color-standby-glow: rgba(255, 23, 68, 0.55);
  --color-amber: #ffd600;
  --color-amber-glow: rgba(255, 214, 0, 0.55);
  --color-go: #00ff66;
  --color-go-glow: rgba(0, 255, 102, 0.65);
  --color-tech-cyan: #00e5ff;
  --color-tech-glow: rgba(0, 229, 255, 0.55);
  --color-purple: #00ffaa;
  --cue-bulb-off-bg: #0e3019;
  --cue-bulb-off-border: #174d28;
  --clock-bg: rgba(2, 9, 4, 0.75);
  --ticker-bg: rgba(2, 9, 4, 0.7);
}

/* 9. Electric Ultraviolet (Blacklight Neon) */
:root[data-theme="electric-violet"] {
  --bg-primary: #090417;
  --bg-secondary: #130a2e;
  --bg-card: #1e1047;
  --bg-surface: #2b1863;
  --border-color: #422596;
  --border-active: #bf5af2;
  --text-main: #faf5ff;
  --text-muted: #d8b4fe;
  --text-dim: #8b5cf6;
  --color-standby: #ff375f;
  --color-standby-glow: rgba(255, 55, 95, 0.6);
  --color-amber: #ffd60a;
  --color-amber-glow: rgba(255, 214, 10, 0.6);
  --color-go: #30d158;
  --color-go-glow: rgba(48, 209, 88, 0.6);
  --color-tech-cyan: #bf5af2;
  --color-tech-glow: rgba(191, 90, 242, 0.65);
  --color-purple: #bf5af2;
  --cue-bulb-off-bg: #2d1863;
  --cue-bulb-off-border: #452894;
  --clock-bg: rgba(9, 4, 23, 0.7);
  --ticker-bg: rgba(9, 4, 23, 0.65);
}

/* 10. Royal Opera House (Imperial Velvet & Gold Exotic) */
:root[data-theme="royal-opera"] {
  --bg-primary: #16050b;
  --bg-secondary: #240812;
  --bg-card: #330c1a;
  --bg-surface: #451224;
  --border-color: #5f1b33;
  --border-active: #d4af37;
  --text-main: #fff6ea;
  --text-muted: #e5c48b;
  --text-dim: #a37c44;
  --color-standby: #e11d48;
  --color-standby-glow: rgba(225, 29, 72, 0.5);
  --color-amber: #d4af37;
  --color-amber-glow: rgba(212, 175, 55, 0.55);
  --color-go: #10b981;
  --color-go-glow: rgba(16, 185, 129, 0.5);
  --color-tech-cyan: #e5c07b;
  --color-tech-glow: rgba(229, 192, 123, 0.5);
  --color-purple: #c084fc;
  --cue-bulb-off-bg: #3f1122;
  --cue-bulb-off-border: #5a1a32;
  --clock-bg: rgba(22, 5, 11, 0.7);
  --ticker-bg: rgba(22, 5, 11, 0.65);
}

/* 11. Tropical Aurora (Bioluminescent Exotic Lagoon) */
:root[data-theme="tropical-aurora"] {
  --bg-primary: #04131a;
  --bg-secondary: #07212c;
  --bg-card: #0e3140;
  --bg-surface: #154559;
  --border-color: #1e5e7a;
  --border-active: #06b6d4;
  --text-main: #ecfeff;
  --text-muted: #67e8f9;
  --text-dim: #0891b2;
  --color-standby: #fb7185;
  --color-standby-glow: rgba(251, 113, 133, 0.5);
  --color-amber: #fbbf24;
  --color-amber-glow: rgba(251, 191, 36, 0.5);
  --color-go: #34d399;
  --color-go-glow: rgba(52, 211, 153, 0.5);
  --color-tech-cyan: #22d3ee;
  --color-tech-glow: rgba(34, 211, 238, 0.55);
  --color-purple: #a78bfa;
  --cue-bulb-off-bg: #164356;
  --cue-bulb-off-border: #236582;
  --clock-bg: rgba(4, 19, 26, 0.7);
  --ticker-bg: rgba(4, 19, 26, 0.65);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Base Top Navigation */
.top-navbar {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.badge-sm {
  background: rgba(255, 51, 68, 0.15);
  color: #ff5263;
  border: 1px solid rgba(255, 51, 68, 0.4);
}

.badge-tech {
  background: rgba(0, 192, 243, 0.15);
  color: var(--color-tech-cyan);
  border: 1px solid rgba(0, 192, 243, 0.4);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  background-color: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.nav-btn:hover {
  background-color: var(--bg-surface);
  border-color: var(--border-active);
  color: #fff;
}

.nav-btn.active {
  background-color: rgba(0, 192, 243, 0.15);
  border-color: var(--color-tech-cyan);
  color: var(--color-tech-cyan);
}

.nav-status-group {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.live-clock {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--color-tech-cyan);
  background: var(--clock-bg, rgba(0, 0, 0, 0.35));
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 192, 243, 0.2);
}

.show-timer-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  color: var(--color-go);
  background: var(--clock-bg, rgba(0, 0, 0, 0.35));
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 230, 118, 0.3);
  transition: all var(--transition-fast);
  user-select: none;
}

.show-timer-badge.running {
  border-color: var(--color-go);
  box-shadow: 0 0 10px rgba(0, 230, 118, 0.25);
}

.show-timer-badge.running .timer-digits {
  color: var(--color-go);
  text-shadow: 0 0 8px var(--color-go-glow);
}

.show-timer-badge .timer-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.show-timer-badge .timer-digits {
  font-weight: 700;
  color: var(--color-go);
  min-width: 66px;
  text-align: center;
}

.timer-ctrl-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  width: 22px;
  height: 22px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.timer-ctrl-btn:hover {
  background: var(--bg-surface);
  color: #fff;
  border-color: var(--border-active);
}

/* Connection Pill */
.comm-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.comm-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-go);
  box-shadow: 0 0 8px var(--color-go);
}

/* Master Layouts */
.portal-container {
  max-width: 1400px;
  margin: 1.5rem auto;
  padding: 0 1.25rem;
}

.simple-portal {
  max-width: 720px;
}

/* Panels & Cards */
.console-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-panel);
  margin-bottom: 1.5rem;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.card-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* Cue Lights Bar */
.cue-light-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.cue-light {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
  position: relative;
  transition: all var(--transition-med);
}

.cue-light-bulb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  margin: 0 auto 0.6rem;
  background-color: var(--cue-bulb-off-bg, #2b3342);
  border: 2px solid var(--cue-bulb-off-border, #3d495d);
  transition: all var(--transition-med);
}

.cue-light-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.cue-light-sub {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  margin-top: 0.25rem;
}

/* Active Cue Light states */
.cue-light.active-red .cue-light-bulb {
  background-color: var(--color-standby);
  border-color: #ff6677;
  box-shadow: 0 0 16px var(--color-standby), 0 0 32px var(--color-standby-glow);
}
.cue-light.active-red {
  border-color: rgba(255, 51, 68, 0.6);
  background-color: rgba(255, 51, 68, 0.08);
}
.cue-light.active-red .cue-light-label {
  color: #ff8592;
}

.cue-light.active-amber .cue-light-bulb {
  background-color: var(--color-amber);
  border-color: #ffc107;
  box-shadow: 0 0 16px var(--color-amber), 0 0 32px var(--color-amber-glow);
  animation: pulse-glow 1.2s infinite alternate;
}
.cue-light.active-amber {
  border-color: rgba(255, 152, 0, 0.6);
  background-color: rgba(255, 152, 0, 0.08);
}
.cue-light.active-amber .cue-light-label {
  color: #ffba59;
}

.cue-light.active-green .cue-light-bulb {
  background-color: var(--color-go);
  border-color: #55ff99;
  box-shadow: 0 0 16px var(--color-go), 0 0 32px var(--color-go-glow);
}
.cue-light.active-green {
  border-color: rgba(0, 230, 118, 0.6);
  background-color: rgba(0, 230, 118, 0.08);
}
.cue-light.active-green .cue-light-label {
  color: #70ffad;
}

@keyframes pulse-glow {
  0% { transform: scale(0.95); opacity: 0.8; }
  100% { transform: scale(1.1); opacity: 1; }
}

/* Massive Theatrical Action Buttons */
.tactile-btn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 640px) {
  .tactile-btn-grid {
    grid-template-columns: 1fr;
  }
}

.stage-btn {
  appearance: none;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 1.5rem 1.25rem;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
  user-select: none;
}

.stage-btn .btn-desc {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: none;
  opacity: 0.85;
  letter-spacing: normal;
}

/* Specific button styles */
.btn-ready {
  background: linear-gradient(135deg, #e65100, #ff9800);
  color: #fff;
  border: 2px solid #ffa726;
  box-shadow: 0 6px 20px rgba(255, 152, 0, 0.35);
}
.btn-ready:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(255, 152, 0, 0.5);
  filter: brightness(1.1);
}
.btn-ready:active:not(:disabled) {
  transform: translateY(1px);
}
.btn-ready.state-ready {
  background: linear-gradient(135deg, #1b5e20, #00c853);
  border-color: #69f0ae;
  box-shadow: 0 6px 20px rgba(0, 200, 83, 0.4);
}

.btn-clearance {
  background: linear-gradient(135deg, #00796b, #00bfa5);
  color: #fff;
  border: 2px solid #64ffda;
  box-shadow: 0 6px 20px rgba(0, 191, 165, 0.35);
}
.btn-clearance:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 191, 165, 0.5);
  filter: brightness(1.1);
}
.btn-clearance:active:not(:disabled) {
  transform: translateY(1px);
}
.btn-clearance.state-cleared {
  background: linear-gradient(135deg, #004d40, #00796b);
  border-color: #80cbc4;
  opacity: 0.9;
}

/* Disabled button state */
.stage-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  filter: grayscale(0.8);
  box-shadow: none !important;
  transform: none !important;
}

/* Status Banner */
.status-banner {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.status-banner-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.status-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
}

.badge-warning {
  background: rgba(255, 152, 0, 0.2);
  color: #ffa726;
  border: 1px solid rgba(255, 152, 0, 0.5);
}

.badge-success {
  background: rgba(0, 230, 118, 0.2);
  color: #69f0ae;
  border: 1px solid rgba(0, 230, 118, 0.5);
}

.badge-neutral {
  background: rgba(139, 155, 180, 0.15);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

/* ==========================================================================
   TECH PORTAL SPECIFIC STYLES
   ========================================================================== */

/* Multi-Page Tab Navigation within Tech Console */
.tech-tabs-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--bg-secondary);
  padding: 0.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.tech-tab {
  padding: 0.6rem 1.25rem;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tech-tab:hover {
  color: var(--text-main);
  background-color: var(--bg-card);
}

.tech-tab.active {
  background-color: var(--bg-surface);
  color: var(--color-tech-cyan);
  border-color: rgba(0, 192, 243, 0.4);
}

.tech-tab-badge {
  background: rgba(0, 192, 243, 0.25);
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-full);
}

/* Tab Views */
.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Tech Pre-Show Action Card */
.tech-action-panel {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.tech-stage-step {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  transition: all var(--transition-med);
}

.step-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.step-title {
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.step-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.step-action {
  flex-shrink: 0;
}

/* Confirm Ready Button in Tech */
.btn-confirm-ready {
  background: linear-gradient(135deg, #f57c00, #ff9800);
  color: #fff;
  border: 2px solid #ffb74d;
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
  transition: all var(--transition-fast);
}

.btn-confirm-ready.pulse-attention {
  animation: pulse-button 1s infinite alternate;
}

@keyframes pulse-button {
  0% { transform: scale(0.98); box-shadow: 0 0 10px rgba(255, 152, 0, 0.4); }
  100% { transform: scale(1.02); box-shadow: 0 0 25px rgba(255, 152, 0, 0.8); }
}

.btn-confirm-ready:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  animation: none;
  box-shadow: none;
}

/* House Announcement Button & Flashing State */
.btn-announcement {
  background: linear-gradient(135deg, #d84315, #ff5722);
  color: #fff;
  border: 2px solid #ff8a65;
  padding: 0.9rem 1.75rem;
  font-size: 1.05rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255, 87, 34, 0.3);
  transition: all var(--transition-fast);
}

.btn-announcement:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 87, 34, 0.5);
}

/* 20-Second Flashing Orange House Announcement Active Mode! */
.announcement-active-hero {
  border: 3px solid #ff9800 !important;
  background-color: rgba(255, 152, 0, 0.12) !important;
  animation: orange-flash-bg 0.8s infinite alternate !important;
  box-shadow: 0 0 40px rgba(255, 152, 0, 0.5) !important;
}

@keyframes orange-flash-bg {
  0% {
    background-color: rgba(255, 152, 0, 0.08);
    border-color: #ff9800;
    box-shadow: 0 0 25px rgba(255, 152, 0, 0.4);
  }
  100% {
    background-color: rgba(255, 152, 0, 0.28);
    border-color: #ffe082;
    box-shadow: 0 0 60px rgba(255, 152, 0, 0.85);
  }
}

.announcement-timer-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.75rem 1rem;
  border-radius: var(--radius-md);
  border: 2px dashed rgba(255, 152, 0, 0.6);
  background: rgba(0, 0, 0, 0.35);
  margin-top: 1rem;
}

.announcement-countdown {
  font-family: var(--font-mono);
  font-size: 3.5rem;
  font-weight: 800;
  color: #ffb74d;
  line-height: 1;
  text-shadow: 0 0 20px rgba(255, 152, 0, 0.8);
  margin: 0.5rem 0;
}

/* Audio wave animation bars */
.wave-bars {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  margin-top: 0.5rem;
}

.wave-bar {
  width: 5px;
  height: 100%;
  background-color: #ff9800;
  border-radius: 3px;
  animation: wave-scale 1s infinite ease-in-out alternate;
}

.wave-bar:nth-child(2) { animation-delay: 0.15s; }
.wave-bar:nth-child(3) { animation-delay: 0.3s; }
.wave-bar:nth-child(4) { animation-delay: 0.45s; }
.wave-bar:nth-child(5) { animation-delay: 0.2s; }
.wave-bar:nth-child(6) { animation-delay: 0.35s; }
.wave-bar:nth-child(7) { animation-delay: 0.5s; }

@keyframes wave-scale {
  0% { transform: scaleY(0.2); }
  100% { transform: scaleY(1); }
}

/* ==========================================================================
   CUE LIST & SHOW CONTROL PAGE
   ========================================================================== */

.cuelist-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 980px) {
  .cuelist-layout {
    grid-template-columns: 1fr;
  }
}

/* Current Cue Display Hero */
.current-cue-hero {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.4);
}

.current-cue-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-tech-cyan), var(--color-go));
}

.current-cue-title {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.current-cue-digits {
  font-family: var(--font-mono);
  font-size: 5.5rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
  text-shadow: 0 0 25px rgba(0, 192, 243, 0.4);
  margin-bottom: 0.5rem;
}

.current-cue-sub {
  font-size: 0.85rem;
  color: var(--color-go);
  font-family: var(--font-mono);
}

/* Cue Control Controls Area */
.cue-actions-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

@media (max-width: 680px) {
  .cue-actions-grid {
    grid-template-columns: 1fr;
  }
}

/* Giant Advance Cue +1 Button */
.btn-advance-cue {
  background: linear-gradient(135deg, #00897b, #00c853);
  color: #fff;
  border: 2px solid #69f0ae;
  border-radius: var(--radius-md);
  padding: 1.5rem 1rem;
  cursor: pointer;
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  box-shadow: 0 6px 20px rgba(0, 200, 83, 0.4);
  transition: all var(--transition-fast);
}

.btn-advance-cue:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 200, 83, 0.6);
  filter: brightness(1.1);
}

.btn-advance-cue:active {
  transform: translateY(2px);
}

.btn-advance-cue .sub-hint {
  font-size: 0.75rem;
  font-weight: 500;
  opacity: 0.85;
  text-transform: none;
  font-family: var(--font-mono);
}

/* Manual Set Cue Form */
.manual-cue-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.manual-cue-label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.manual-cue-input-group {
  display: flex;
  gap: 0.5rem;
}

.manual-cue-input {
  flex: 1;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  outline: none;
  transition: border-color var(--transition-fast);
}

.manual-cue-input:focus {
  border-color: var(--color-tech-cyan);
  box-shadow: 0 0 10px rgba(0, 192, 243, 0.3);
}

.btn-set-cue {
  background: var(--bg-surface);
  color: var(--color-tech-cyan);
  border: 1px solid rgba(0, 192, 243, 0.5);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.25rem;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-set-cue:hover {
  background: rgba(0, 192, 243, 0.2);
  color: #fff;
}

/* Running Cue Log (Side Panel) */
.running-log-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-panel);
  display: flex;
  flex-direction: column;
  height: 540px;
}

.log-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
}

.log-panel-title {
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.log-count-badge {
  background: var(--bg-surface);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
}

.cue-log-scroll-area {
  flex: 1;
  overflow-y: auto;
  padding-right: 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Custom Scrollbar */
.cue-log-scroll-area::-webkit-scrollbar {
  width: 6px;
}
.cue-log-scroll-area::-webkit-scrollbar-track {
  background: var(--bg-card);
  border-radius: 3px;
}
.cue-log-scroll-area::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}
.cue-log-scroll-area::-webkit-scrollbar-thumb:hover {
  background: var(--border-active);
}

.cue-log-empty {
  margin: auto;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
  padding: 2rem 1rem;
}

.cue-log-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--color-tech-cyan);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: slideInBottom 0.2s ease;
  transition: all var(--transition-fast);
}

.cue-log-item:hover {
  background: var(--bg-surface);
  border-color: var(--border-active);
}

.cue-log-item.latest-cue {
  border-left-color: var(--color-go);
  background: rgba(0, 230, 118, 0.06);
}

.cue-log-text {
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.cue-log-time {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

@keyframes slideInBottom {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Log Action Bar */
.log-footer-actions {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.btn-icon-text {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-icon-text:hover {
  background: var(--bg-card);
  color: var(--text-main);
  border-color: var(--border-active);
}

/* ==========================================================================
   SIMULATOR / DUAL VIEW SPLIT SCREEN
   ========================================================================== */

.split-view-container {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 1.5rem;
  height: calc(100vh - 70px);
  padding: 1rem 1.25rem;
}

@media (max-width: 1024px) {
  .split-view-container {
    grid-template-columns: 1fr;
    height: auto;
  }
}

.split-frame-wrapper {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-panel);
}

.split-frame-header {
  background: var(--bg-card);
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.split-frame-title {
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.split-frame-content {
  flex: 1;
  border: none;
  width: 100%;
  height: 100%;
  min-height: 600px;
}

/* System Message Ticker */
.system-ticker-bar {
  background: var(--ticker-bg, rgba(0, 0, 0, 0.4));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ticker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-tech-cyan);
}


/* ==========================================================================
   GOOGLE SHEETS CLOUD SYNC UI & MODAL
   ========================================================================== */

.sheets-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-color: rgba(0, 192, 243, 0.4);
}

.sheets-nav-dot,
.sheets-status-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  transition: all var(--transition-fast);
}

.sheets-status-indicator-dot {
  width: 10px;
  height: 10px;
}

.dot-active {
  background-color: var(--color-go);
  box-shadow: 0 0 8px var(--color-go-glow);
}

.dot-pending {
  background-color: var(--color-amber);
  box-shadow: 0 0 8px var(--color-amber-glow);
  animation: pulse-dot 1s infinite alternate;
}

.dot-inactive {
  background-color: var(--text-dim);
}

.dot-error {
  background-color: #ff5263;
  box-shadow: 0 0 8px rgba(255, 82, 99, 0.5);
}

@keyframes pulse-dot {
  from { opacity: 0.4; }
  to { opacity: 1; }
}

.sheets-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 13, 20, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.sheets-modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-panel);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  animation: modal-enter 0.2s ease-out;
}

@keyframes modal-enter {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.sheets-modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sheets-modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem;
  transition: color var(--transition-fast);
}

.sheets-modal-close-btn:hover {
  color: var(--text-main);
}

.sheets-modal-body {
  padding: 1.5rem;
}

.sheets-status-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
}

.sheets-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  transition: border-color var(--transition-fast);
}

.sheets-input:focus {
  outline: none;
  border-color: var(--color-tech-cyan);
  box-shadow: 0 0 0 2px rgba(0, 192, 243, 0.2);
}

.sheets-modal-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.sheets-instructions-details {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.2rem;
}

.sheets-instructions-details[open] {
  border-color: var(--border-active);
}

/* ==========================================================================
   PORTAL TABS & THEME GALLERY SYSTEM
   ========================================================================== */

/* Stage Manager Portal Tabs Bar */
.portal-tabs-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--bg-secondary);
  padding: 0.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.portal-tab {
  padding: 0.6rem 1.25rem;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.portal-tab:hover {
  color: var(--text-main);
  background-color: var(--bg-card);
}

.portal-tab.active {
  background-color: var(--bg-surface);
  color: var(--color-tech-cyan);
  border-color: rgba(0, 192, 243, 0.4);
}

.theme-tab-badge {
  background: rgba(0, 192, 243, 0.2);
  color: var(--color-tech-cyan);
  font-size: 0.72rem;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  letter-spacing: 0.03em;
  transition: all var(--transition-fast);
}

/* Theme Gallery Container */
.theme-gallery-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Category Filter Bar */
.theme-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.5rem;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.theme-filter-btn {
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.theme-filter-btn:hover {
  color: var(--text-main);
  background: var(--bg-surface);
}

.theme-filter-btn.active {
  background: var(--bg-surface);
  border-color: var(--border-active);
  color: var(--text-main);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.theme-filter-btn .count-badge {
  font-size: 0.7rem;
  padding: 0.1rem 0.35rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.theme-filter-btn.active .count-badge {
  background: var(--color-tech-cyan);
  color: #000;
  font-weight: 700;
}

/* Live Active Theme Header Card */
.theme-active-header-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.theme-active-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.theme-active-name {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Theme Cards Grid */
.theme-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

/* Single Theme Card */
.theme-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  cursor: pointer;
  transition: all var(--transition-med);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.theme-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-active);
  box-shadow: var(--shadow-panel);
}

.theme-card.active {
  border-color: var(--color-tech-cyan);
  box-shadow: 0 0 0 2px var(--color-tech-cyan), var(--shadow-panel);
}

.theme-card.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-standby), var(--color-amber), var(--color-go), var(--color-tech-cyan));
}

.theme-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.theme-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Category Badges */
.theme-category-badge {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
}

.badge-cat-dark {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.badge-cat-light {
  background: rgba(251, 191, 36, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(251, 191, 36, 0.4);
}

.badge-cat-funky {
  background: rgba(236, 72, 153, 0.15);
  color: #ec4899;
  border: 1px solid rgba(236, 72, 153, 0.4);
}

.badge-cat-neon {
  background: rgba(57, 255, 20, 0.15);
  color: #39ff14;
  border: 1px solid rgba(57, 255, 20, 0.4);
}

.badge-cat-exotic {
  background: rgba(212, 175, 55, 0.18);
  color: #d4af37;
  border: 1px solid rgba(212, 175, 55, 0.4);
}

.theme-card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 1rem;
}

/* Palette Swatches Bar */
.theme-palette-bar {
  display: flex;
  height: 24px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 1.15rem;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.theme-swatch {
  flex: 1;
  height: 100%;
  position: relative;
  transition: transform var(--transition-fast);
}

.theme-swatch:hover {
  transform: scaleY(1.2);
  z-index: 2;
}

/* Bottom Action Row in Theme Card */
.theme-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

.theme-active-indicator {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-go);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.theme-btn-select {
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-main);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-card:hover .theme-btn-select {
  border-color: var(--color-tech-cyan);
  color: var(--color-tech-cyan);
}

.theme-card.active .theme-btn-select {
  background: var(--color-tech-cyan);
  color: #000;
  border-color: var(--color-tech-cyan);
}

/* Live Preview Interactive Strip */
.theme-preview-strip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.theme-preview-bulb-mini {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
}

/* Responsive simple-portal when in Themes tab */
.simple-portal.themes-active-mode {
  max-width: 1100px;
  transition: max-width 0.3s ease;
}

