/* =============================================================================
   ROB E BANK AI — premium.css  [Billion-Dollar Terminal Overlay 2026-06-12]
   Loaded AFTER theme.css + mobile.css. Pure visual overlay:
   - upgrades depth, glow, glass, motion on EXISTING classes only
   - never changes layout primitives, IDs, display modes or JS hooks
   - respects prefers-reduced-motion
   ============================================================================= */

/* ── Ambient terminal background: AI grid + drifting energy orbs ───────────── */
body.auth-authorized {
  background:
    radial-gradient(900px 520px at 82% -8%,  rgba(208, 149, 48, 0.075), transparent 65%),
    radial-gradient(760px 480px at 8% 112%,  rgba(34, 197, 94, 0.05),   transparent 62%),
    radial-gradient(640px 420px at 96% 88%,  rgba(124, 58, 237, 0.05),  transparent 60%),
    var(--page-bg);
  background-attachment: fixed;
}

body.auth-authorized::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(232, 168, 50, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 168, 50, 0.024) 1px, transparent 1px);
  background-size: 42px 42px;
  -webkit-mask-image: radial-gradient(72% 64% at 50% 30%, #000 28%, transparent 78%);
  mask-image: radial-gradient(72% 64% at 50% 30%, #000 28%, transparent 78%);
}

body.auth-authorized::after {
  content: "";
  position: fixed;
  inset: -14%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(380px 300px at 18% 22%, rgba(208, 149, 48, 0.06), transparent 70%),
    radial-gradient(420px 330px at 84% 74%, rgba(34, 197, 94, 0.045), transparent 70%),
    radial-gradient(300px 260px at 64% 12%, rgba(124, 58, 237, 0.045), transparent 70%);
  animation: rob-ambient-drift 22s ease-in-out infinite alternate;
}

@keyframes rob-ambient-drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(2%, -1.6%) scale(1.05); }
}

/* keep the app above the ambient layers */
body.auth-authorized nav.nav,
body.auth-authorized main.container { position: relative; z-index: 1; }

/* ── Navigation: glass bar + lit brand ─────────────────────────────────────── */
nav.nav {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(200, 140, 48, 0.22);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.45);
}

.nav-brand-icon {
  filter: drop-shadow(0 0 9px rgba(232, 168, 50, 0.55));
}

.nav-brand-text {
  background: linear-gradient(92deg, #eaaa36, #ffd98a 45%, #eaaa36 90%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rob-brand-sheen 6s linear infinite;
}

@keyframes rob-brand-sheen {
  to { background-position: 200% center; }
}

.status-dot.connected {
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.85), 0 0 18px rgba(34, 197, 94, 0.35);
  animation: rob-live-pulse 2.1s ease-in-out infinite;
}

@keyframes rob-live-pulse {
  0%, 100% { box-shadow: 0 0 8px rgba(34, 197, 94, 0.85), 0 0 18px rgba(34, 197, 94, 0.35); }
  50%      { box-shadow: 0 0 5px rgba(34, 197, 94, 0.55), 0 0 10px rgba(34, 197, 94, 0.18); }
}

/* ── Cards: 3D glass panels with gold rim lighting ─────────────────────────── */
.card {
  position: relative;
  background:
    radial-gradient(140% 90% at 18% 0%, rgba(208, 149, 48, 0.07), transparent 52%),
    linear-gradient(168deg, var(--card-from) 0%, var(--card-to) 100%);
  box-shadow:
    0 1px 0 rgba(245, 220, 170, 0.07) inset,
    0 0 0 1px rgba(165, 110, 28, 0.16) inset,
    0 14px 34px rgba(0, 0, 0, 0.5),
    0 0 30px rgba(180, 120, 32, 0.07);
  transition: box-shadow 0.28s ease, border-color 0.28s ease;
}

.card:hover {
  border-color: var(--border-bright);
  box-shadow:
    0 1px 0 rgba(245, 220, 170, 0.1) inset,
    0 0 0 1px rgba(200, 140, 48, 0.2) inset,
    0 18px 44px rgba(0, 0, 0, 0.55),
    0 0 44px rgba(200, 140, 48, 0.12);
}

/* gold hairline running across every card top */
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 8%; right: 8%;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(232, 168, 50, 0.5), rgba(34, 197, 94, 0.25), transparent);
  opacity: 0.7;
}

/* ── Buttons: rich, clickable, powerful ────────────────────────────────────── */
.btn {
  transition: transform 0.16s ease, box-shadow 0.22s ease, filter 0.22s ease,
              border-color 0.22s ease, background 0.22s ease;
}

.btn:hover:not(:disabled)  { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0) scale(0.985); }

.btn-gold,
.btn-connect {
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(200, 140, 48, 0.3), 0 0 26px rgba(200, 140, 48, 0.1);
}

.btn-gold:hover:not(:disabled),
.btn-connect:hover:not(:disabled) {
  box-shadow: 0 7px 24px rgba(200, 140, 48, 0.45), 0 0 40px rgba(200, 140, 48, 0.16);
}

/* shine sweep on primary actions */
.btn-gold::after,
.btn-connect::after {
  content: "";
  position: absolute;
  top: 0; left: -80%;
  width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.38), transparent);
  transform: skewX(-22deg);
  pointer-events: none;
}

.btn-gold:hover:not(:disabled)::after,
.btn-connect:hover:not(:disabled)::after {
  animation: rob-btn-shine 0.7s ease;
}

@keyframes rob-btn-shine { to { left: 130%; } }

.btn-purple {
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.28);
}
.btn-purple:hover:not(:disabled) {
  box-shadow: 0 6px 22px rgba(124, 58, 237, 0.42);
}

/* ── Inputs & selects: focus that feels alive ──────────────────────────────── */
input, select, textarea {
  transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: rgba(232, 168, 50, 0.7) !important;
  box-shadow: 0 0 0 3px rgba(232, 168, 50, 0.13), 0 0 18px rgba(200, 148, 48, 0.18);
}

/* keyboard accessibility — visible focus everywhere */
button:focus-visible, a:focus-visible {
  outline: 2px solid rgba(232, 168, 50, 0.65);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ── Badges: jewel finish ──────────────────────────────────────────────────── */
.badge {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 2px 6px rgba(0, 0, 0, 0.3);
}
.badge-green  { text-shadow: 0 0 8px rgba(34, 197, 94, 0.45); }
.badge-gold   { text-shadow: 0 0 8px rgba(232, 168, 50, 0.45); }
.badge-purple { text-shadow: 0 0 8px rgba(124, 58, 237, 0.5); }

/* ── Scrollbars: terminal-grade ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: rgba(10, 9, 5, 0.6); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(165, 110, 28, 0.55), rgba(110, 72, 18, 0.55));
  border-radius: 8px;
  border: 2px solid rgba(8, 7, 4, 0.9);
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(208, 149, 48, 0.75), rgba(150, 98, 26, 0.75));
}

::selection { background: rgba(232, 168, 50, 0.32); }

/* ── Hero card: cinematic spotlight ────────────────────────────────────────── */
.hero-card {
  background:
    radial-gradient(120% 130% at 80% -20%, rgba(208, 149, 48, 0.13), transparent 55%),
    radial-gradient(70% 90% at 8% 110%, rgba(34, 197, 94, 0.06), transparent 60%),
    linear-gradient(168deg, var(--card-from) 0%, var(--card-to) 100%);
}

.hero-icon {
  filter: drop-shadow(0 0 14px rgba(232, 168, 50, 0.5));
}

/* ── Strategy toggles row polish (visual only) ─────────────────────────────── */
.strategy-row, .strategy-item {
  transition: background 0.22s ease;
}

/* ── Reduced motion: kill all decorative animation ─────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  body.auth-authorized::after,
  .nav-brand-text,
  .status-dot.connected,
  .btn-gold::after,
  .btn-connect::after {
    animation: none !important;
  }
  .btn, .card, input, select, textarea { transition: none !important; }
}

/* ── Mobile: keep ambient layers cheap ─────────────────────────────────────── */
@media (max-width: 640px) {
  body.auth-authorized::after { animation: none; }
  body.auth-authorized::before { background-size: 34px 34px; }
}

/* =============================================================================
   PART 2 — Per-workspace component polish (real classes from every strategy)
   Still visual-only: shadows, glow, transitions, hover transforms.
   ============================================================================= */

/* ── Stat tiles (TX / Goon / Bank Clerk / Quantum / BMF / Match Lock) ──────── */
.tx-stat-box, .gx-stat-item, .bc-stat-item, .bc-hist-stat-box,
.bmf-hist-stat-box, .qx-hist-stat-box, .tx-mla-stat, .qx-auto-stat,
.bmf-auto-stat, .bmf-zone-stat, .cg-stat, .rg-stat {
  position: relative;
  box-shadow: 0 1px 0 rgba(245, 220, 170, 0.05) inset, 0 4px 12px rgba(0, 0, 0, 0.28);
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}
.tx-stat-box:hover, .gx-stat-item:hover, .bc-stat-item:hover,
.bc-hist-stat-box:hover, .bmf-hist-stat-box:hover, .qx-hist-stat-box:hover,
.tx-mla-stat:hover, .qx-auto-stat:hover, .bmf-auto-stat:hover, .bmf-zone-stat:hover {
  transform: translateY(-1.5px);
  border-color: rgba(200, 140, 48, 0.45);
  box-shadow: 0 1px 0 rgba(245, 220, 170, 0.08) inset, 0 8px 20px rgba(0, 0, 0, 0.4),
              0 0 18px rgba(200, 140, 48, 0.1);
}

/* stat values glow softly in their own accent */
.tx-stat-value, .gx-stat-value, .bc-stat-value, .bc-hist-stat-value,
.bmf-hist-stat-value, .qx-hist-stat-value, .tx-mla-stat-val,
.qx-auto-stat-val, .bmf-auto-stat-val, .bmf-zone-stat-val {
  text-shadow: 0 0 12px rgba(232, 168, 50, 0.18);
}

/* ── Digit boards / heatmaps / pressure maps ───────────────────────────────── */
.tx-digit-grid > *, .fx-digit-btn, .fx-scan-digit-cell, .fx-freq-cell,
.qx-heat-cell, .bmf-pressure-cell, .bmf-digit-pill {
  transition: transform 0.16s ease, box-shadow 0.2s ease, border-color 0.2s ease,
              background 0.2s ease;
}
.tx-digit-grid > *:hover, .fx-digit-btn:hover, .fx-scan-digit-cell:hover,
.qx-heat-cell:hover, .bmf-pressure-cell:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.42), 0 0 14px rgba(232, 168, 50, 0.16);
  z-index: 2;
}

/* heat bars get a lit edge */
.qx-heat-bar-fill, .gx-progress-fill, .bc-auto-progress-fill,
.bc-sp-progress-fill, .tx-mla-progress-bar {
  box-shadow: 0 0 10px rgba(232, 168, 50, 0.35);
}

/* ── History panels: rows light up, wins/losses glow their color ───────────── */
.tx-history-list > *, .qx-history-entry, .bmf-history-list > *,
.bc-history-list > *, .gx-scanner-results > * {
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.tx-history-list > *:hover, .qx-history-entry:hover,
.bmf-history-list > *:hover, .bc-history-list > *:hover {
  background: rgba(208, 149, 48, 0.05);
  border-color: rgba(200, 140, 48, 0.35);
}
.tradex-digit-overlay-win  { box-shadow: 0 0 12px rgba(34, 197, 94, 0.4); }
.tradex-digit-overlay-loss { box-shadow: 0 0 12px rgba(239, 68, 68, 0.35); }

/* ── Toggles: powered-up feel when ON ──────────────────────────────────────── */
.toggle-switch, .tx-toggle, .gx-mini-toggle, .bc-mini-toggle, .gx-brain-toggle,
.tx-mla-toggle, .tx-bps-toggle, .gx-scanner-toggle, .admin-access-toggle {
  transition: background 0.22s ease, border-color 0.22s ease, box-shadow 0.25s ease;
}
.toggle-switch.on, .toggle-switch.active, .toggle-switch[aria-checked="true"],
.tx-toggle.on, .tx-toggle.active, .tx-toggle[aria-checked="true"],
.tx-mla-toggle.active, .tx-bps-toggle.on, .gx-brain-toggle.on,
.gx-mini-toggle.on, .bc-mini-toggle.on, .gx-scanner-toggle.on {
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.35), 0 0 0 1px rgba(34, 197, 94, 0.3);
}
.tx-toggle-knob { transition: transform 0.22s cubic-bezier(0.34, 1.4, 0.64, 1), background 0.22s ease; }

/* ── Status bars & pills: glass strips ─────────────────────────────────────── */
.tx-status-bar, .bc-status-bar, .bmf-status-bar, .qx-status-bar,
.tx-bps-status-row, .tx-mla-status-row, .tc-status-pill, .bmf-trap-status-pill {
  backdrop-filter: blur(4px);
  box-shadow: 0 1px 0 rgba(245, 220, 170, 0.04) inset, 0 3px 10px rgba(0, 0, 0, 0.25);
}

/* ── Empty states: intentional, not abandoned ──────────────────────────────── */
.tx-history-empty, .gx-scan-empty, .gx-last20-empty, .bc-history-empty,
.bc-runs-empty, .bmf-history-empty, .bmf-pair-empty, .bmf-ranked-empty,
.qx-history-empty, .right-empty {
  border: 1px dashed rgba(165, 110, 28, 0.3) !important;
  border-radius: 11px;
  background:
    radial-gradient(60% 100% at 50% 0%, rgba(208, 149, 48, 0.04), transparent 70%);
}

/* ── Filter tabs & connection-method tabs: active state lights up ──────────── */
.connection-method-tab, .bc-hist-filter-btn, .qx-hist-filter-btn,
.bmf-hist-filter-btn {
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease,
              box-shadow 0.2s ease;
}
.connection-method-tab.active, .bc-hist-filter-btn.active,
.qx-hist-filter-btn.active, .bmf-hist-filter-btn.active {
  box-shadow: 0 0 14px rgba(200, 140, 48, 0.18), 0 1px 0 rgba(245, 220, 170, 0.08) inset;
}

/* ── Scanner result cards (TX BPS + Goon X): float on hover ────────────────── */
.tx-bps-result-card, .gx-scanner-results .gx-scan-row {
  transition: transform 0.2s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.tx-bps-result-card:hover {
  transform: translateY(-2px);
  border-color: rgba(200, 140, 48, 0.5);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45), 0 0 22px rgba(200, 140, 48, 0.12);
}

/* score pills shimmer */
.tx-bps-result-score-pill {
  box-shadow: 0 0 10px rgba(232, 168, 50, 0.2);
}

/* ── Strategy list rows (the ON/OFF rail) ──────────────────────────────────── */
.strategy-item:hover, .strategy-row:hover {
  background: rgba(208, 149, 48, 0.045);
  border-radius: 9px;
}

/* ── Workspace section headers: gold underline accent ──────────────────────── */
.tx-history-header, .bc-history-header, .bmf-history-header, .qx-history-header,
.bc-ko-history-header {
  position: relative;
}

@media (prefers-reduced-motion: reduce) {
  .tx-digit-grid > *, .fx-digit-btn, .qx-heat-cell, .bmf-pressure-cell,
  .tx-stat-box, .gx-stat-item, .bc-stat-item, .tx-bps-result-card {
    transition: none !important;
  }
}
