/* =========================================================================
   JAZZ ESL PRO v3.1 — ENTERPRISE & ESPORTS AUTOMATION CONTROL PANEL
   High-Contrast Dark & Light Modes • Non-Fixed Header • Responsive Grid
   ========================================================================= */

:root {
  --bg-main: #090b12;
  --bg-panel: #111522;
  --bg-card: #161c2e;
  --bg-card-hover: #1d253d;
  --bg-elevated: #1e263f;
  --bg-input: #0c101c;
  --border-color: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(99, 102, 241, 0.48);
  --text-main: #f8fafc;
  --text-muted: #a8b5cf;
  --text-dim: #7c8ba6;
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --accent-violet: #8b5cf6;
  --accent-pink: #ec4899;
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;
  --grad-brand: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  --grad-primary: linear-gradient(135deg, #5246e5 0%, #7c3aed 100%);
  --grad-cyan: linear-gradient(135deg, #0891b2 0%, #2563eb 100%);
  --grad-emerald: linear-gradient(135deg, #059669 0%, #10b981 100%);
  --shadow-lg: 0 18px 40px -10px rgba(0, 0, 0, 0.6);
  --radius-xl: 18px;
  --radius-lg: 14px;
  --radius-md: 10px;

  /* Override Bootstrap 5.3 variables so dark mode never renders dark-gray text */
  --bs-body-color: #f8fafc;
  --bs-body-bg: #090b12;
  --bs-secondary-color: #a8b5cf;
  --bs-tertiary-color: #7c8ba6;
  --bs-heading-color: #f8fafc;
  --bs-border-color: rgba(255, 255, 255, 0.1);
}

body.theme-light {
  --bg-main: #eef2f7;
  --bg-panel: #ffffff;
  --bg-card: #f8fafc;
  --bg-card-hover: #f1f5f9;
  --bg-elevated: #ffffff;
  --bg-input: #ffffff;
  --border-color: #cbd5e1;
  --border-strong: #6366f1;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --shadow-lg: 0 12px 30px -8px rgba(15, 23, 42, 0.08);

  --bs-body-color: #0f172a;
  --bs-body-bg: #eef2f7;
  --bs-secondary-color: #475569;
  --bs-tertiary-color: #64748b;
  --bs-heading-color: #0f172a;
  --bs-border-color: #cbd5e1;
}

/* Explicit High-Contrast Utility Overrides for Both Dark & Light Modes */
.text-muted,
.text-secondary {
  color: var(--text-muted) !important;
}

.text-light {
  color: var(--text-main) !important;
}

body:not(.theme-light) .text-info {
  color: #38bdf8 !important;
}
body.theme-light .text-info {
  color: #0284c7 !important;
}

body:not(.theme-light) .text-warning {
  color: #fbbf24 !important;
}
body.theme-light .text-warning {
  color: #d97706 !important;
}

body:not(.theme-light) .text-success {
  color: #34d399 !important;
}
body.theme-light .text-success {
  color: #059669 !important;
}

body:not(.theme-light) .text-danger {
  color: #f87171 !important;
}
body.theme-light .text-danger {
  color: #dc2626 !important;
}

code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82em;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.16);
  color: #c7d2fe;
  border: 1px solid rgba(99, 102, 241, 0.28);
}
body.theme-light code {
  background: rgba(99, 102, 241, 0.1);
  color: #4338ca;
  border-color: rgba(99, 102, 241, 0.25);
}

/* Outline buttons visibility in both dark & light themes */
body:not(.theme-light) .btn-outline-light {
  color: #e2e8f0;
  border-color: rgba(255, 255, 255, 0.22);
}
body:not(.theme-light) .btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
}
body.theme-light .btn-outline-light {
  color: #1e293b;
  border-color: #94a3b8;
  background: #ffffff;
}
body.theme-light .btn-outline-light:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #64748b;
}

body:not(.theme-light) .btn-outline-secondary {
  color: #cbd5e1 !important;
  border-color: rgba(255, 255, 255, 0.2);
}
body:not(.theme-light) .btn-outline-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff !important;
}
body.theme-light .btn-outline-secondary {
  color: #334155 !important;
  border-color: #94a3b8;
}
body.theme-light .btn-outline-secondary:hover {
  background: #e2e8f0;
  color: #0f172a !important;
}

/* Global Custom Scrollbars */
* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(99, 102, 241, 0.35) rgba(15, 23, 42, 0.2);
}
*::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
*::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.25);
  border-radius: 99px;
}
*::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.4);
  border-radius: 99px;
}
*::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.7);
}

body {
  background-color: var(--bg-main);
  background-image:
    radial-gradient(900px 420px at 12% -8%, rgba(99, 102, 241, 0.16) 0%, transparent 65%),
    radial-gradient(800px 400px at 88% 5%, rgba(139, 92, 246, 0.13) 0%, transparent 60%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  font-size: 0.925rem;
}

.font-mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* =========================================================================
   TOP COMMAND HEADER BAR (Not Fixed / Scrolls Naturally • Matches Screenshot 5)
   ========================================================================= */
.top-navbar {
  position: relative; /* NOT fixed/sticky */
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border-color);
  padding: 13px 0;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}
body.theme-light .top-navbar {
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--grad-brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.3rem;
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.35);
  flex-shrink: 0;
}

.brand-heading {
  font-weight: 800;
  font-size: 1.14rem;
  letter-spacing: -0.3px;
  margin: 0;
  color: var(--text-main);
}

.brand-version-pill {
  background: rgba(99, 102, 241, 0.18);
  color: #a5b4fc;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(99, 102, 241, 0.38);
}
body.theme-light .brand-version-pill {
  background: rgba(99, 102, 241, 0.12);
  color: #4338ca;
  border-color: rgba(99, 102, 241, 0.3);
}

.brand-subtitle {
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 2px;
}

.status-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-green 2s infinite;
}
.pulse-dot.off {
  background: var(--accent-amber);
  animation: none;
}
@keyframes pulse-green {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.nav-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.16s ease;
}
.nav-icon-btn:hover {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

/* =========================================================================
   SECTION & TAB HEADERS
   ========================================================================= */
.section-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}
.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-icon-badge {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.32);
  color: #818cf8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}
body.theme-light .section-icon-badge {
  background: rgba(99, 102, 241, 0.1);
  color: #4f46e5;
}
.section-heading {
  font-weight: 800;
  font-size: 1.06rem;
  color: var(--text-main);
  margin: 0;
  letter-spacing: -0.2px;
}
.section-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 2px 0 0 0;
}

/* KPI Telemetry Cards */
.kpi-box {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-lg);
  height: 100%;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.kpi-box:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.kpi-title {
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
}
.kpi-num {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.15;
  margin-top: 4px;
  letter-spacing: -0.5px;
  color: var(--text-main);
}
.kpi-foot {
  font-size: 0.77rem;
  color: var(--text-muted);
  margin-top: 5px;
}
.kpi-badge-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* Panel Containers */
.pro-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 20px 22px;
}

/* Signed-In Accounts Command Grid Cards */
.account-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  transition: all 0.2s ease;
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.account-card:hover {
  border-color: rgba(99, 102, 241, 0.45);
  background: var(--bg-card-hover);
}
.account-card.active-account {
  border-color: var(--primary);
  background: linear-gradient(160deg, rgba(99, 102, 241, 0.16) 0%, var(--bg-card) 100%);
  box-shadow: 0 10px 28px rgba(99, 102, 241, 0.18);
}
body.theme-light .account-card.active-account {
  background: linear-gradient(160deg, rgba(99, 102, 241, 0.1) 0%, #ffffff 100%);
}

.acc-avatar {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--grad-brand);
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.15);
}
.acc-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.acc-credits-box {
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.38);
  color: #fbbf24;
  border-radius: 10px;
  padding: 5px 11px;
  text-align: right;
}
body.theme-light .acc-credits-box {
  color: #b45309;
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.4);
}
.acc-credits-box .c-val {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.1;
}
.acc-credits-box .c-lbl {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.9;
}

.acc-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
  font-size: 0.78rem;
}
.acc-meta-item {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 7px 10px;
}
.acc-meta-label {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.45px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

/* Main Navigation Tabs (Full Width, No Scrollbars on Desktop) */
.workspace-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 13px;
  padding: 6px;
}
.workspace-tabs button {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.86rem;
  padding: 10px 12px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.workspace-tabs button:hover {
  color: var(--text-main);
  background: rgba(99, 102, 241, 0.08);
}
.workspace-tabs button.active {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
}

@media (max-width: 991px) {
  .workspace-tabs {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 575px) {
  .workspace-tabs {
    grid-template-columns: 1fr;
  }
}

/* Buttons & Inputs */
.form-control, .form-select {
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: var(--radius-md);
  padding: 9px 13px;
  font-size: 0.88rem;
}
.form-control::placeholder {
  color: var(--text-dim);
}
.form-control:focus, .form-select:focus {
  background-color: var(--bg-input);
  color: var(--text-main);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.22);
}
.form-select option {
  background-color: var(--bg-panel);
  color: var(--text-main);
}
.form-label {
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--text-muted) !important;
  margin-bottom: 5px;
}
.form-check-label {
  color: var(--text-main);
}

.btn-primary-grad {
  background: var(--grad-primary);
  border: none;
  color: #fff;
  font-weight: 700;
  border-radius: var(--radius-md);
  padding: 10px 18px;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
  transition: all 0.18s ease;
}
.btn-primary-grad:hover:not(:disabled) {
  filter: brightness(1.1);
  transform: translateY(-1px);
  color: #fff;
}
.btn-primary-grad:disabled {
  opacity: 0.65;
  color: #fff;
}

.btn-cyan-grad {
  background: var(--grad-cyan);
  border: none;
  color: #fff;
  font-weight: 700;
  border-radius: var(--radius-md);
  padding: 9px 14px;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.btn-cyan-grad:hover:not(:disabled) {
  filter: brightness(1.1);
  color: #fff;
}

.btn-soft {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
  font-weight: 600;
  border-radius: var(--radius-md);
  padding: 8px 13px;
  transition: all 0.16s ease;
  white-space: nowrap;
}
body.theme-light .btn-soft {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.3);
  color: #4338ca;
}
.btn-soft:hover:not(:disabled) {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Info / Toolbar Box */
.ip-toolbar {
  background: rgba(6, 182, 212, 0.07);
  border: 1px solid rgba(6, 182, 212, 0.26);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
}
body.theme-light .ip-toolbar {
  background: rgba(6, 182, 212, 0.06);
  border-color: rgba(6, 182, 212, 0.32);
}

/* Custom 12-Hour AM/PM Time Picker Component */
.ampm-picker-group {
  display: inline-flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 3px 6px;
  gap: 4px;
}
.ampm-select {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 4px 6px;
  cursor: pointer;
  outline: none;
}
.ampm-select option {
  background: var(--bg-panel);
  color: var(--text-main);
}
.ampm-colon {
  font-weight: 900;
  color: var(--primary);
}
.ampm-toggle {
  display: inline-flex;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 7px;
  padding: 2px;
  margin-left: 4px;
}
.ampm-toggle button {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.ampm-toggle button.active {
  background: var(--primary);
  color: #fff;
}

/* Per-Account Schedule / Account Vault Card */
.sched-account-row {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin-bottom: 12px;
  transition: border-color 0.2s ease;
}
.sched-account-row.sched-on {
  border-color: rgba(16, 185, 129, 0.45);
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.07) 0%, var(--bg-card) 40%);
}

/* Game Cards */
.game-card-v3 {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
}
.game-card-v3:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.game-tile-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  color: #fff;
  flex-shrink: 0;
}
.reward-badge {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  white-space: nowrap;
}
body.theme-light .reward-badge {
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
}

/* Live Arena Stage */
.arena-box {
  background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.22) 0%, #0b0e17 80%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 20px;
  color: #f8fafc;
  position: relative;
  overflow: hidden;
}
.arena-box .text-muted {
  color: #cbd5e1 !important;
}

.ring-wrap {
  position: relative;
  width: 126px;
  height: 126px;
  margin: 0 auto;
}
.ring-svg {
  transform: rotate(-90deg);
  width: 126px;
  height: 126px;
}
.ring-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 8;
}
.ring-bar {
  fill: none;
  stroke: url(#neonRingGrad);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 351.86;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.35s linear;
}
.ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.ring-sec {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  color: #fff;
}
.ring-sub {
  font-size: 0.65rem;
  letter-spacing: 1px;
  color: #cbd5e1;
  margin-top: 2px;
}

.pipeline-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 14px;
}
.pipe-step {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  padding: 8px;
  text-align: center;
  font-size: 0.76rem;
  font-weight: 700;
  color: #cbd5e1;
}
.pipe-step.running {
  background: rgba(6, 182, 212, 0.24);
  border-color: var(--accent-cyan);
  color: #fff;
}
.pipe-step.done {
  background: rgba(16, 185, 129, 0.24);
  border-color: var(--accent-emerald);
  color: #34d399;
}
.pipe-step.failed {
  background: rgba(239, 68, 68, 0.24);
  border-color: var(--accent-red);
  color: #f87171;
}

/* Queue & Step Rows */
.row-item {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 11px 14px;
  margin-bottom: 8px;
}
.row-item.active-row {
  border-color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.08);
}
.row-item .ic {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
}
.row-item .status {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: rgba(99, 102, 241, 0.1);
}
.row-item .status.ok { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.row-item .status.fail { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.row-item .status.warn { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.row-item .title { font-weight: 700; font-size: 0.9rem; color: var(--text-main); }
.row-item .detail { color: var(--text-muted); font-size: 0.82rem; }
.row-item .detail.ok { color: #10b981; }
.row-item .detail.fail { color: #ef4444; }

.pills { display: flex; gap: 5px; flex-wrap: wrap; }
.pill {
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 99px;
  padding: 3px 9px;
  background: rgba(99, 102, 241, 0.1);
  color: var(--text-muted);
}
.pill.run { background: rgba(6, 182, 212, 0.2); color: #38bdf8; }
.pill.ok { background: rgba(16, 185, 129, 0.2); color: #10b981; }
.pill.fail { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
.pill.warn { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }

.credits-badge {
  font-weight: 800;
  color: #fff;
  background: var(--grad-emerald);
  border-radius: 99px;
  padding: 3px 11px;
  font-size: 0.8rem;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2.5px solid rgba(99, 102, 241, 0.25);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.result-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(6, 182, 212, 0.12));
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
}
.result-card .big-num {
  font-size: 2.4rem;
  font-weight: 900;
  color: #10b981;
}

.step-card {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
}
.step-card .step-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.12);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.step-card.ok { border-color: rgba(16, 185, 129, 0.45); }
.step-card.ok .step-icon { background: rgba(16, 185, 129, 0.2); color: #10b981; }
.step-card.fail { border-color: rgba(239, 68, 68, 0.45); }
.step-card.fail .step-icon { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
.step-card.run { border-color: var(--accent-cyan); background: rgba(6, 182, 212, 0.08); }

/* Modals */
.modal-content {
  background: var(--bg-panel);
  color: var(--text-main);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.65);
}
.modal-header, .modal-footer {
  border-color: var(--border-color);
}
body:not(.theme-light) .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

.editor-row {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 8px;
}

/* Toast Notifications */
.toast-container-pro {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 2050;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 360px;
}
.pro-toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  color: var(--text-main);
  padding: 11px 15px;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* =========================================================================
   CRON STATUS BADGES (0 = Ready, 1 = Running, 2 = Failed with Error Tooltip)
   ========================================================================= */
.cron-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}
.cron-status-0 {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.38);
  color: #34d399;
}
body.theme-light .cron-status-0 {
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
}
.cron-status-1 {
  background: rgba(6, 182, 212, 0.2);
  border-color: rgba(6, 182, 212, 0.5);
  color: #38bdf8;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.25);
}
body.theme-light .cron-status-1 {
  color: #0369a1;
  background: rgba(6, 182, 212, 0.15);
}
.cron-status-2 {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.48);
  color: #f87171;
  cursor: help;
}
body.theme-light .cron-status-2 {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.14);
}
.cron-status-2:hover {
  background: rgba(239, 68, 68, 0.28);
  border-color: #ef4444;
}

/* Schedule Run Logs Modal & Failed Exit Payload Box */
.log-entry-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.log-entry-card.has-failed-exit {
  border-color: rgba(239, 68, 68, 0.45);
}
.failed-exit-box {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: 8px;
}
.payload-code-box {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  color: var(--text-secondary);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  margin-top: 6px;
}

/* =========================================================================
   JAZZ ESL PRO v3.2 — EYE-CATCHY UI UPGRADE (2026-11-14)
   Gradient brand, glowing KPIs, per-account accent colours, visible
   account-label pill on every card. Appended as overrides; earlier rules
   above still apply. Previous version backed up on the VPS as
   app.css.bak-20261114-1855.
   ========================================================================= */

/* --- Brand: gradient text + glowing logo --- */
.brand-heading {
  background: linear-gradient(90deg, #818cf8 0%, #c084fc 45%, #f472b6 75%, #38bdf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 1.3rem;
  letter-spacing: .5px;
}
.brand-logo {
  box-shadow: 0 0 0 2px rgba(139, 92, 246, .35), 0 8px 24px rgba(139, 92, 246, .55);
  animation: logoGlow 3s ease-in-out infinite;
}
@keyframes logoGlow {
  0%, 100% { box-shadow: 0 0 0 2px rgba(139, 92, 246, .35), 0 8px 24px rgba(139, 92, 246, .55); }
  50% { box-shadow: 0 0 0 3px rgba(6, 182, 212, .45), 0 8px 30px rgba(6, 182, 212, .65); }
}
.top-navbar {
  background: linear-gradient(180deg, #151a2e 0%, var(--bg-panel) 100%);
  border-bottom: 1px solid rgba(139, 92, 246, .35);
}

/* --- KPI cards: gradient top bar + stronger lift --- */
.kpi-box {
  position: relative;
  overflow: hidden;
}
.kpi-box::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6, #ec4899, #06b6d4);
}
.kpi-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 44px -12px rgba(99, 102, 241, .45);
}
.kpi-num {
  background: linear-gradient(90deg, #fff, #c7d2fe);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
body.theme-light .kpi-num {
  background: linear-gradient(90deg, #0f172a, #4f46e5);
  -webkit-background-clip: text;
  background-clip: text;
}
.kpi-box .kpi-num.text-warning {
  background: linear-gradient(90deg, #fde68a, #f59e0b, #fbbf24);
  -webkit-background-clip: text;
  background-clip: text;
}

/* --- Panels & section headings --- */
.pro-panel {
  border: 1px solid rgba(139, 92, 246, .28);
  box-shadow: 0 20px 48px -16px rgba(0, 0, 0, .65), 0 0 0 1px rgba(99, 102, 241, .06);
}
.section-heading {
  font-size: 1.16rem;
}
.section-icon-badge {
  box-shadow: 0 6px 18px rgba(99, 102, 241, .35);
}

/* --- Account cards: lift, glow, accent top edge --- */
.account-card {
  overflow: hidden;
  box-shadow: 0 10px 26px -12px rgba(0, 0, 0, .55);
}
.account-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--acc-a, #6366f1), var(--acc-b, #ec4899));
}
.account-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 44px -14px rgba(99, 102, 241, .5);
}
.account-card.active-account {
  box-shadow: 0 0 0 1px rgba(99, 102, 241, .55), 0 18px 40px -12px rgba(99, 102, 241, .55);
}
.account-card.acc-accent-0 { --acc-a: #6366f1; --acc-b: #06b6d4; }
.account-card.acc-accent-1 { --acc-a: #8b5cf6; --acc-b: #ec4899; }
.account-card.acc-accent-2 { --acc-a: #f59e0b; --acc-b: #ef4444; }
.account-card.acc-accent-3 { --acc-a: #10b981; --acc-b: #06b6d4; }
.account-card.acc-accent-4 { --acc-a: #ec4899; --acc-b: #f59e0b; }
.account-card.acc-accent-5 { --acc-a: #06b6d4; --acc-b: #6366f1; }
.acc-avatar {
  box-shadow: 0 0 0 2px var(--acc-a, #6366f1), 0 8px 20px rgba(0, 0, 0, .4);
}

/* --- Account label: visible on EVERY card --- */
.acc-label-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: -16px -16px 12px -16px;
  padding: 9px 14px;
  background: linear-gradient(90deg, var(--acc-a, #6366f1), var(--acc-b, #ec4899));
  color: #fff;
}
.acc-label-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  font-size: .92rem;
  letter-spacing: .2px;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .35);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.acc-label-pill i { font-size: .85rem; }
.acc-index-chip {
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff;
  background: rgba(255, 255, 255, .22);
  border: 1px solid rgba(255, 255, 255, .4);
  padding: 2px 8px;
  border-radius: 999px;
}
/* Label pill in the Accounts Vault / Scheduler rows (no gradient strip there) */
.acc-label-pill-inline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 800;
  font-size: .72rem;
  color: #fff;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  border: 1px solid rgba(255, 255, 255, .25);
  padding: 2px 9px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(99, 102, 241, .4);
  white-space: nowrap;
}

/* --- Credits: gold gradient pop --- */
.acc-credits-box {
  background: linear-gradient(135deg, rgba(245, 158, 11, .22), rgba(245, 158, 11, .08));
  box-shadow: 0 6px 16px rgba(245, 158, 11, .22);
}
.acc-credits-box .c-val {
  background: linear-gradient(90deg, #fde68a, #f59e0b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --- Buttons & tabs: more glow --- */
.btn-primary-grad {
  box-shadow: 0 10px 26px rgba(124, 58, 237, .5);
}
.btn-primary-grad:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(124, 58, 237, .6);
}
.workspace-tabs button.active {
  box-shadow: 0 8px 22px rgba(124, 58, 237, .55);
}
.game-card-v3:hover {
  box-shadow: 0 18px 36px -12px rgba(139, 92, 246, .5);
}

/* =========================================================================
   JAZZ ESL PRO v3.3 — SIGNED-IN ACCOUNTS HERO HEADER (2026-11-14)
   Gradient hero banner for the accounts section, responsive on desktop
   and mobile. Previous v3.2 backed up on the VPS as *.bak-20261114-1905.
   ========================================================================= */

/* --- Hero panel: gradient glow, no plain flat header --- */
.accounts-hero-panel {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(560px 220px at 8% 0%, rgba(99, 102, 241, .28) 0%, transparent 65%),
    radial-gradient(480px 200px at 96% 0%, rgba(236, 72, 153, .22) 0%, transparent 60%),
    var(--bg-panel);
  border: 1px solid rgba(139, 92, 246, .45);
  box-shadow: 0 24px 54px -18px rgba(99, 102, 241, .5);
}
.accounts-hero-panel::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6, #ec4899, #06b6d4);
}
.accounts-hero {
  position: relative;
  z-index: 1;
  border-bottom: 1px solid rgba(139, 92, 246, .3);
  padding-bottom: 18px;
  margin-bottom: 20px;
  align-items: center;
}
.accounts-hero .section-heading {
  font-size: 1.3rem;
  background: linear-gradient(90deg, #fff 20%, #c7d2fe 55%, #f9a8d4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
body.theme-light .accounts-hero .section-heading {
  background: linear-gradient(90deg, #0f172a 20%, #4f46e5 60%, #db2777 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.accounts-hero-icon {
  width: 52px;
  height: 52px;
  font-size: 1.5rem;
  border-radius: 15px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6 55%, #ec4899);
  border: none;
  color: #fff;
  box-shadow: 0 10px 26px rgba(139, 92, 246, .55);
}
.accounts-hero .section-sub {
  font-size: .86rem;
  color: var(--text-muted);
}
.hero-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: #34d399;
  background: rgba(16, 185, 129, .14);
  border: 1px solid rgba(16, 185, 129, .45);
  padding: 3px 10px;
  border-radius: 999px;
}
body.theme-light .hero-live-pill { color: #047857; }
.hero-live-pill .pulse-dot { width: 7px; height: 7px; }

/* --- Hero action buttons: bigger, glossier, tappable --- */
.accounts-hero-actions .btn {
  padding: 10px 16px;
  font-size: .9rem;
  border-radius: 12px;
}
.accounts-hero-actions .btn-soft {
  background: rgba(255, 255, 255, .07);
  border-color: rgba(255, 255, 255, .18);
  color: #e0e7ff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .25);
}
body.theme-light .accounts-hero-actions .btn-soft {
  background: #fff;
  border-color: rgba(99, 102, 241, .35);
  color: #4338ca;
}
.accounts-hero-actions .btn-soft:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(99, 102, 241, .4);
}
.accounts-hero-actions .btn-primary-grad {
  position: relative;
  overflow: hidden;
  padding: 10px 20px;
  box-shadow: 0 12px 30px rgba(124, 58, 237, .6);
}
.accounts-hero-actions .btn-primary-grad::after {
  content: "";
  position: absolute;
  top: 0; left: -80%;
  width: 50%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .45), transparent);
  transform: skewX(-20deg);
  animation: heroShine 3.2s ease-in-out infinite;
}
@keyframes heroShine {
  0%, 55% { left: -80%; }
  100% { left: 130%; }
}

/* --- Responsive: tablet & mobile --- */
@media (max-width: 991px) {
  .accounts-hero {
    flex-direction: column;
    align-items: stretch;
  }
  .accounts-hero .section-title-wrap {
    width: 100%;
  }
  .accounts-hero-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }
  .accounts-hero-actions .btn {
    justify-content: center;
    white-space: normal;
    text-align: center;
  }
  .accounts-hero-actions #topBatchRunBtn {
    grid-column: 1 / -1;
  }
}
@media (max-width: 575px) {
  .accounts-hero-panel { padding: 16px 14px; }
  .accounts-hero-icon { width: 44px; height: 44px; font-size: 1.25rem; }
  .accounts-hero .section-heading { font-size: 1.08rem; }
  .accounts-hero .section-sub { font-size: .8rem; }
  .accounts-hero-actions {
    grid-template-columns: 1fr;
  }
  .accounts-hero-actions .btn {
    width: 100%;
    padding: 12px 14px;
    font-size: .92rem;
  }
}

/* =========================================================================
   JAZZ ESL PRO v3.5 — PROFESSIONAL TABS REDESIGN (2026-11-14)
   Segmented pro tab bar, control-deck run settings, richer game cards,
   accent-edged scheduler / vault / log rows. Responsive: tabs scroll
   horizontally on phones instead of stacking tall. v3.4 backed up on the
   VPS as *.bak-20261114-1913.
   ========================================================================= */

/* --- Tab fade-in when switching --- */
.tab-section { animation: tabFade .35s ease; }
@keyframes tabFade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Pro segmented tab bar --- */
.workspace-tabs.tabs-pro {
  background:
    linear-gradient(180deg, rgba(99, 102, 241, .12), rgba(99, 102, 241, .04)),
    var(--bg-input);
  border: 1px solid rgba(139, 92, 246, .35);
  box-shadow: 0 12px 30px -12px rgba(99, 102, 241, .45), inset 0 1px 0 rgba(255, 255, 255, .06);
  padding: 8px;
  gap: 10px;
}
.workspace-tabs.tabs-pro button {
  padding: 12px 10px;
  border-radius: 12px;
  font-size: .9rem;
  letter-spacing: .1px;
}
.workspace-tabs.tabs-pro button i {
  font-size: 1.08rem;
  transition: transform .18s ease;
}
.workspace-tabs.tabs-pro button:hover {
  transform: translateY(-1px);
}
.workspace-tabs.tabs-pro button:hover i { transform: scale(1.15); }
.workspace-tabs.tabs-pro button.active {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 55%, #ec4899 100%);
  box-shadow: 0 12px 28px rgba(139, 92, 246, .6), inset 0 1px 0 rgba(255, 255, 255, .28);
}
.workspace-tabs.tabs-pro button.active i { color: #fff; }

/* --- Tab section headers: gradient underline accent --- */
.tab-section .section-header-bar {
  border-bottom: 1px solid rgba(139, 92, 246, .28);
}
.tab-section .section-heading { font-size: 1.2rem; }
.tab-section .section-icon-badge {
  box-shadow: 0 8px 20px rgba(99, 102, 241, .4);
}

/* --- Auto Play control deck --- */
.control-deck {
  background:
    linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
    linear-gradient(135deg, rgba(99, 102, 241, .65), rgba(236, 72, 153, .5) 55%, rgba(6, 182, 212, .55)) border-box;
  border: 1px solid transparent;
  border-radius: 18px;
  padding: 20px 18px;
  box-shadow: 0 18px 40px -16px rgba(99, 102, 241, .5);
}
.control-deck .form-control,
.control-deck .form-select {
  height: 48px;
  font-size: 1rem;
  font-weight: 600;
}
.control-deck .form-label {
  font-size: .82rem;
  letter-spacing: .4px;
  text-transform: uppercase;
}
.control-deck #startAutoBtn {
  height: 48px;
  font-size: 1.03rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 14px 32px rgba(124, 58, 237, .6);
}
.control-deck #startAutoBtn::after {
  content: "";
  position: absolute;
  top: 0; left: -80%;
  width: 50%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .45), transparent);
  transform: skewX(-20deg);
  animation: heroShine 3.2s ease-in-out infinite;
}
.control-deck .form-check-input { width: 1.35em; height: 1.35em; cursor: pointer; }
.control-deck .form-check-input:checked {
  background-color: #8b5cf6;
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, .3);
}

/* --- Game cards (Auto queue + Manual studio): richer + livelier --- */
.game-card-v3 {
  position: relative;
  overflow: hidden;
}
.game-card-v3::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6, #ec4899);
  opacity: 0;
  transition: opacity .2s ease;
}
.game-card-v3:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -14px rgba(139, 92, 246, .55);
  border-color: rgba(139, 92, 246, .55);
}
.game-card-v3:hover::before { opacity: 1; }
.game-card-v3 .game-tile-icon {
  box-shadow: 0 8px 18px rgba(0, 0, 0, .4), 0 0 0 2px rgba(255, 255, 255, .12);
}
.reward-badge {
  background: linear-gradient(135deg, rgba(245, 158, 11, .28), rgba(16, 185, 129, .2));
  font-size: .78rem;
  padding: 5px 11px;
  box-shadow: 0 4px 12px rgba(245, 158, 11, .2);
}

/* --- Scheduler / Accounts rows: accent edge + lift --- */
.sched-account-row {
  position: relative;
  overflow: hidden;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.sched-account-row::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #6366f1, #ec4899);
  opacity: .9;
}
.sched-account-row.sched-on::before {
  background: linear-gradient(180deg, #10b981, #06b6d4);
}
.sched-account-row:hover {
  transform: translateY(-2px);
  border-color: rgba(139, 92, 246, .5);
  box-shadow: 0 16px 34px -14px rgba(99, 102, 241, .5);
}

/* --- Scheduler toolbar + log rows --- */
.ip-toolbar {
  background:
    radial-gradient(420px 160px at 10% 0%, rgba(6, 182, 212, .16) 0%, transparent 65%),
    rgba(6, 182, 212, .06);
  border: 1px solid rgba(6, 182, 212, .35);
  box-shadow: 0 12px 28px -14px rgba(6, 182, 212, .4);
}
.log-entry-card {
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.log-entry-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, .5);
  box-shadow: 0 14px 30px -14px rgba(99, 102, 241, .45);
}
.row-item:hover {
  border-color: rgba(99, 102, 241, .45);
  box-shadow: 0 10px 24px -12px rgba(99, 102, 241, .4);
}

/* --- Responsive: tabs scroll on phones, deck + cards stack cleanly --- */
@media (max-width: 991px) {
  .workspace-tabs.tabs-pro {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .workspace-tabs.tabs-pro::-webkit-scrollbar { display: none; }
  .workspace-tabs.tabs-pro button {
    flex: 0 0 auto;
    padding: 11px 18px;
    scroll-snap-align: start;
  }
  .control-deck { padding: 16px 14px; }
}
@media (max-width: 575px) {
  .workspace-tabs.tabs-pro button { font-size: .83rem; padding: 10px 14px; }
  .workspace-tabs.tabs-pro button i { font-size: 1rem; }
  .tab-section .section-heading { font-size: 1.08rem; }
  .control-deck .form-control,
  .control-deck .form-select,
  .control-deck #startAutoBtn { height: 50px; }
  .control-deck #startAutoBtn { width: 100%; }
  .game-card-v3 { padding: 14px; }
  .sched-account-row { padding: 14px; }
}

/* =========================================================================
   JAZZ ESL PRO v3.5 fix (2026-11-14) — browser check found the game-card
   top accent only appeared on hover, and long game IDs were clipped.
   Accent line is now always visible; queue-chip IDs wrap instead of
   cutting off with "...".
   ========================================================================= */
.game-card-v3::before { opacity: 1; }
.game-card-v3:hover::before { opacity: 1; height: 4px; }
#gamesChips .font-mono.text-muted {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: .68rem;
  line-height: 1.35;
}

/* =========================================================================
   JAZZ ESL PRO v3.6 — PROFESSIONAL MODALS REDESIGN (2026-11-14)
   All 9 modals: gradient-edged glass panels, animated open, glowing
   headers, taller inputs, bigger primary actions. Responsive: on phones
   modals become near-full-width sheets with stacked footer buttons.
   v3.5 backed up on the VPS as *.bak-20261114-1917.
   ========================================================================= */

/* --- Backdrop blur + open animation --- */
.modal-backdrop.show { opacity: .72; backdrop-filter: blur(4px); }
.modal.fade .modal-dialog {
  transform: translateY(18px) scale(.97);
  transition: transform .28s cubic-bezier(.22, 1, .36, 1), opacity .28s ease;
}
.modal.show .modal-dialog { transform: translateY(0) scale(1); }

/* --- Pro modal panel --- */
.modal-content.modal-pro {
  background:
    linear-gradient(var(--bg-panel), var(--bg-panel)) padding-box,
    linear-gradient(135deg, rgba(99, 102, 241, .7), rgba(236, 72, 153, .55) 50%, rgba(6, 182, 212, .6)) border-box;
  border: 1px solid transparent;
  border-radius: 22px;
  box-shadow: 0 32px 80px -12px rgba(0, 0, 0, .75), 0 0 0 1px rgba(139, 92, 246, .15), 0 0 44px -8px rgba(139, 92, 246, .45);
  overflow: hidden;
}
.modal-pro .modal-header {
  background: linear-gradient(180deg, rgba(99, 102, 241, .18) 0%, rgba(99, 102, 241, .04) 100%);
  border-bottom: 1px solid rgba(139, 92, 246, .3);
  padding: 18px 22px 14px;
  align-items: center;
}
.modal-pro .modal-title {
  font-size: 1.12rem;
  letter-spacing: -.2px;
  display: flex;
  align-items: center;
  gap: 2px;
}
.modal-pro .modal-title > i,
.modal-pro .modal-title i:first-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6 55%, #ec4899);
  color: #fff !important;
  font-size: 1.05rem;
  margin-right: 10px;
  box-shadow: 0 8px 18px rgba(139, 92, 246, .5);
  flex-shrink: 0;
}
.modal-pro .modal-body { padding: 22px; }
.modal-pro .modal-footer {
  border-top: 1px solid rgba(139, 92, 246, .25);
  background: rgba(255, 255, 255, .02);
  padding: 14px 22px;
  gap: 10px;
}
.modal-pro .btn-close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background-color: rgba(255, 255, 255, .08);
  opacity: 1;
  transition: all .16s ease;
  flex-shrink: 0;
}
.modal-pro .btn-close:hover { background-color: rgba(239, 68, 68, .35); transform: rotate(90deg); }

/* --- Modal forms: taller, clearer inputs --- */
.modal-pro .form-control,
.modal-pro .form-select {
  min-height: 48px;
  font-size: .95rem;
  border-radius: 12px;
}
.modal-pro .form-control-lg { min-height: 54px; font-size: 1.05rem; }
.modal-pro .form-label {
  font-size: .82rem;
  letter-spacing: .4px;
  text-transform: uppercase;
}
.modal-pro .btn-primary-grad,
.modal-pro .btn-cyan-grad {
  padding: 12px 20px;
  font-size: .95rem;
  border-radius: 12px;
}
.modal-pro .input-group .btn { min-height: 48px; }

/* --- Arena modals: glow stage + steps --- */
#autoModal .modal-pro,
#manualPlayModal .modal-pro {
  box-shadow: 0 32px 80px -12px rgba(0, 0, 0, .8), 0 0 60px -10px rgba(139, 92, 246, .6);
}
.arena-box {
  box-shadow: 0 0 0 1px rgba(99, 102, 241, .25), 0 18px 44px -12px rgba(99, 102, 241, .5);
}
.ring-wrap { filter: drop-shadow(0 0 14px rgba(139, 92, 246, .45)); }
.step-card {
  border-radius: 14px;
  padding: 14px 16px;
  transition: all .2s ease;
}
.step-card.run { box-shadow: 0 10px 26px -8px rgba(6, 182, 212, .55); }
.step-card.ok { box-shadow: 0 10px 26px -8px rgba(16, 185, 129, .45); }
.result-card {
  box-shadow: 0 18px 40px -14px rgba(16, 185, 129, .5);
}

/* --- Delete modal: danger accent --- */
#deleteAccountModal .modal-pro {
  background:
    linear-gradient(var(--bg-panel), var(--bg-panel)) padding-box,
    linear-gradient(135deg, rgba(239, 68, 68, .75), rgba(245, 158, 11, .5)) border-box;
  box-shadow: 0 32px 80px -12px rgba(0, 0, 0, .75), 0 0 44px -8px rgba(239, 68, 68, .45);
}
#deleteAccountModal .modal-pro .modal-header {
  background: linear-gradient(180deg, rgba(239, 68, 68, .2) 0%, rgba(239, 68, 68, .04) 100%);
  border-bottom-color: rgba(239, 68, 68, .35);
}
#deleteAccountModal .modal-pro .modal-title > i {
  background: linear-gradient(135deg, #ef4444, #f59e0b);
  box-shadow: 0 8px 18px rgba(239, 68, 68, .5);
}

/* --- Delete modal: account card, warning rows, gradient delete button --- */
.delete-account-card {
  background: linear-gradient(180deg, rgba(239, 68, 68, .12), rgba(239, 68, 68, .04));
  border: 1px solid rgba(239, 68, 68, .35);
  border-radius: 14px;
  padding: 14px 16px;
  text-align: center;
  margin-bottom: 14px;
}
.delete-account-label {
  font-size: .72rem;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}
.delete-account-number {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: .5px;
  color: var(--text-main);
  margin-top: 2px;
}
.delete-warn-list { display: flex; flex-direction: column; gap: 10px; }
.delete-warn-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--bg-input);
  border: 1px solid rgba(139, 92, 246, .18);
  border-radius: 12px;
  padding: 12px 14px;
}
.delete-warn-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(239, 68, 68, .18), rgba(245, 158, 11, .14));
  color: #f87171;
  font-size: 1.05rem;
}
body.theme-light .delete-warn-icon { color: #dc2626; }
#deleteAccountModal .modal-footer .btn {
  flex: 1 1 0;
  min-height: 48px;
  border-radius: 12px;
  font-size: .95rem;
  font-weight: 700;
}
.btn-delete-grad {
  background: linear-gradient(135deg, #ef4444, #dc2626 60%, #b91c1c);
  color: #fff;
  border: none;
  box-shadow: 0 10px 22px -6px rgba(239, 68, 68, .55);
  transition: all .18s ease;
}
.btn-delete-grad:hover, .btn-delete-grad:focus {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 14px 28px -6px rgba(239, 68, 68, .65);
}
@media (max-width: 575px) {
  #deleteAccountModal .modal-footer { flex-direction: column; }
  #deleteAccountModal .modal-footer .btn { flex: 1 1 auto; width: 100%; }
}

/* --- Games editor rows inside modal --- */
.modal-pro .editor-row {
  border-radius: 14px;
  padding: 14px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.modal-pro .editor-row:hover {
  border-color: rgba(139, 92, 246, .5);
  box-shadow: 0 10px 24px -12px rgba(99, 102, 241, .45);
}
.modal-pro .ampm-picker-group {
  border-radius: 12px;
  padding: 5px 8px;
  box-shadow: 0 8px 20px -8px rgba(99, 102, 241, .45);
}

/* --- Responsive: near-full-width sheets on phones --- */
@media (max-width: 575px) {
  .modal-dialog { margin: .6rem; }
  .modal-content.modal-pro { border-radius: 18px; }
  .modal-pro .modal-header { padding: 16px 16px 12px; }
  .modal-pro .modal-title { font-size: 1.02rem; }
  .modal-pro .modal-body { padding: 18px 16px; }
  .modal-pro .modal-footer {
    flex-direction: column;
    align-items: stretch;
    padding: 14px 16px;
  }
  .modal-pro .modal-footer .btn {
    width: 100%;
    margin: 0 !important;
    padding: 13px 16px;
  }
  .modal-pro .modal-footer .me-auto { margin: 0 !important; }
  .modal-pro .form-control,
  .modal-pro .form-select { min-height: 50px; }
  .arena-box { padding: 16px 12px; }
  .pipeline-steps { grid-template-columns: repeat(2, 1fr); }
}

/* --- Modal title with a second account line (Daily Schedule modal) --- */
.modal-title-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}
.modal-title-text small {
  font-size: .78rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =========================================================================
   JAZZ ESL PRO v3.8 — LIGHT MODE DEFAULT + TOOLTIP & TEXT FIXES (2026-11-14)
   Light is now the default theme (dark only when the user saved it).
   Tooltips get explicit colours so they can never render as an empty
   black box; pale-on-light texts (brand gradient, gold numbers, pills)
   get darker light-theme versions. v3.7 backed up on the VPS as
   *.bak-20261114-1926.
   ========================================================================= */

/* --- Status tooltips: explicit dark bubble + white text, both themes --- */
.tooltip.pro-tooltip {
  --bs-tooltip-bg: #1e293b;
  --bs-tooltip-color: #ffffff;
  --bs-tooltip-max-width: 340px;
  z-index: 1090;
}
.tooltip.pro-tooltip .tooltip-inner {
  text-align: left;
  font-size: .9rem;
  font-weight: 500;
  line-height: 1.5;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .45);
}

/* --- Light theme: darker brand gradient (was pale purple on white) --- */
body.theme-light .brand-heading {
  background: linear-gradient(90deg, #4f46e5 0%, #7c3aed 45%, #db2777 75%, #0284c7 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* --- Light theme: darker gold numbers (was pale yellow on white) --- */
body.theme-light .kpi-box .kpi-num.text-warning {
  background: linear-gradient(90deg, #b45309, #d97706 55%, #f59e0b);
  -webkit-background-clip: text;
  background-clip: text;
}
body.theme-light .acc-credits-box .c-val {
  background: linear-gradient(90deg, #b45309, #d97706 60%, #ea580c);
  -webkit-background-clip: text;
  background-clip: text;
}

/* --- Light theme: darker status pills (was pale blue/green/amber) --- */
body.theme-light .pill.run { color: #0369a1; background: rgba(2, 132, 199, .14); }
body.theme-light .pill.ok { color: #047857; background: rgba(5, 150, 105, .14); }
body.theme-light .pill.warn { color: #b45309; background: rgba(217, 119, 6, .16); }
body.theme-light .pill.fail { color: #b91c1c; }

/* --- Light theme: darker small ok/fail texts in run-history rows --- */
body.theme-light .row-item .detail.ok { color: #047857; }
body.theme-light .row-item .detail.fail { color: #b91c1c; }

/* --- Light theme: result big number + modal close button --- */
body.theme-light .result-card .big-num { color: #059669; }
body.theme-light .modal-pro .btn-close { background-color: rgba(15, 23, 42, .08); }

/* --- Dark theme: danger outline button was too dim --- */
body:not(.theme-light) .btn-outline-danger {
  color: #f87171;
  border-color: rgba(248, 113, 113, .5);
}
body:not(.theme-light) .btn-outline-danger:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}

/* --- Input placeholders readable on both themes --- */
.form-control::placeholder,
.form-select::placeholder { color: #94a3b8; opacity: 1; }

/* =========================================================================
   JAZZ ESL PRO v3.10 — AUDIT FIXES (2026-11-14)
   Full light+dark text audit found 3 defects: the Run History "Auto Play"
   badge was green-on-green and almost invisible in light mode; the
   Space Football game ID broke mid-word leaving a lone "1"; the "2 Rounds"
   selector was squeezed against its dropdown chevron. Fixes: mode badges
   are now solid colours with white text (both themes); game IDs end with
   a clean "..." instead of breaking mid-word (full ID on hover); the
   rounds selector is wider. v3.9 backed up on the VPS as *.bak-20261114-1933.
   ========================================================================= */

/* --- Run-history mode badges: solid background + white text, both themes --- */
.mode-badge { color: #fff; font-weight: 700; }
.mode-badge.mode-scheduled { background: #0284c7; }
.mode-badge.mode-batch { background: #4f46e5; }
.mode-badge.mode-manual { background: #64748b; }
.mode-badge.mode-auto { background: #059669; }

/* =========================================================================
   JAZZ ESL PRO v3.12 — WORKSPACE POLISH (2026-11-14)
   The workspace looked flat: the tab bar sat on a 5-column grid so 3 tabs
   left a big empty gap, the section headers were plain, the streak toggle
   floated loose in the control deck, and game cards truncated names/IDs
   with "..." and pale badges. Fixes: tabs fill the bar evenly, headers get
   a tinted bar + bigger glowing icon + gradient title, the streak toggle
   is a proper chip aligned with the inputs, and queue cards show the full
   name + full ID with a bigger icon, a gold reward badge and a footer row.
   v3.11 backed up on the VPS as *.bak-20261114-2343.
   ========================================================================= */

/* --- Tab bar: 3 tabs fill the bar evenly --- */
.workspace-tabs.tabs-pro { grid-template-columns: repeat(3, 1fr); }
.workspace-tabs.tabs-pro button { padding: 13px 12px; font-size: .92rem; }

/* --- Section headers: tinted bar, bigger icon, gradient title --- */
.tab-section .section-header-bar {
  background: linear-gradient(180deg, rgba(99, 102, 241, .07), rgba(99, 102, 241, .015));
  border: 1px solid rgba(139, 92, 246, .22);
  border-radius: 16px;
  padding: 14px 16px;
}
.tab-section .section-heading {
  font-size: 1.28rem;
  background: linear-gradient(90deg, #818cf8, #c084fc 50%, #f472b6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
body.theme-light .tab-section .section-heading {
  background: linear-gradient(90deg, #4f46e5, #7c3aed 50%, #db2777);
  -webkit-background-clip: text;
  background-clip: text;
}
.tab-section .section-icon-badge {
  width: 46px;
  height: 46px;
  font-size: 1.3rem;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(99, 102, 241, .45);
}
.tab-section .section-sub { font-size: .86rem; }

/* --- Control deck: taller fields, streak toggle as a proper chip --- */
.control-deck { padding: 22px 20px; box-shadow: 0 20px 44px -16px rgba(99, 102, 241, .55); }
.control-deck .form-control,
.control-deck .form-select { height: 50px; border-radius: 12px; }
.control-deck #startAutoBtn { height: 50px; font-size: 1.05rem; letter-spacing: .2px; }
.streak-toggle-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  height: 50px;
  padding: 0 14px;
  margin: 0;
}
.streak-toggle-chip .form-check-input { margin: 0; flex-shrink: 0; }
.streak-toggle-chip .form-check-label { margin: 0; white-space: nowrap; }

/* --- Games queue header: count pill --- */
#gamesCount {
  display: inline-block;
  background: rgba(99, 102, 241, .14);
  color: #4f46e5;
  border-radius: 99px;
  padding: 3px 10px;
  font-weight: 800;
  text-transform: none;
  letter-spacing: 0;
  font-size: .75rem;
  margin-left: 6px;
}
body:not(.theme-light) #gamesCount { color: #a5b4fc; }
.games-queue-note { font-size: .82rem; }

/* --- Game queue cards: full name + full ID, gold reward, footer row --- */
.game-queue-card { padding: 18px; border-radius: 18px; }
.game-queue-card::before { height: 4px; }
.game-queue-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 44px -14px rgba(139, 92, 246, .6);
  border-color: rgba(139, 92, 246, .6);
}
.game-queue-card .game-tile-icon {
  width: 48px;
  height: 48px;
  font-size: 1.35rem;
  border-radius: 14px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, .4), 0 0 0 2px rgba(255, 255, 255, .14);
}
.game-queue-card .game-name {
  font-size: 1.02rem;
  letter-spacing: -.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.game-queue-card .game-id {
  font-size: .68rem;
  letter-spacing: .3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.game-card-meta {
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 99px;
  padding: 4px 10px;
  white-space: nowrap;
}
.reward-badge {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #451a03;
  border: 1px solid rgba(245, 158, 11, .55);
  box-shadow: 0 6px 14px rgba(245, 158, 11, .35);
  font-weight: 800;
}
body.theme-light .reward-badge {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #451a03;
}

/* --- Responsive polish --- */
@media (max-width: 767px) {
  .tab-section .section-header-bar { padding: 12px; }
  .tab-section .section-heading { font-size: 1.12rem; }
  .control-deck { padding: 16px 14px; }
}
@media (max-width: 575px) {
  .workspace-tabs.tabs-pro { grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 6px; }
  .workspace-tabs.tabs-pro button {
    font-size: .78rem;
    padding: 10px 4px;
    gap: 4px;
    flex-wrap: wrap;
    white-space: normal;
    line-height: 1.2;
  }
  .workspace-tabs.tabs-pro button i { font-size: 1rem; }
  .game-queue-card { padding: 14px; }
}

/* =========================================================================
   JAZZ ESL PRO v3.13 — ACCOUNTS TAB REDESIGN (2026-11-14)
   The vault rows were flat and cramped: small avatar, plain credits line,
   a squeezed IP input-group, and a row of tiny look-alike outline buttons.
   Now each row is a rich card: bigger avatar with a glowing ring and a
   green signed-in dot, gradient Active badge, a credits stat box with a
   gold-gradient number and a green earned pill, the IP field on its own
   line with three equal buttons (Save is now gradient), and a proper
   action toolbar — indigo Schedule Logs pill, a Select button that shows
   "Selected" on the active account, a glowing gradient Run button, and
   four tinted circular icon buttons (Schedule / Refresh / Open / Delete).
   v3.12 backed up on the VPS as *.bak-20261114-2349.
   ========================================================================= */

/* --- Vault row card --- */
.vault-row { padding: 18px 20px; border-radius: 18px; }
.vault-row:hover {
  border-color: rgba(139, 92, 246, .55);
  box-shadow: 0 18px 36px -14px rgba(99, 102, 241, .5);
}

/* --- Identity: bigger avatar, glowing ring, signed-in dot --- */
.vault-avatar {
  position: relative;
  box-shadow: 0 0 0 2px rgba(139, 92, 246, .55), 0 10px 22px rgba(139, 92, 246, .4);
}
.vault-status-dot {
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid var(--bg-card);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, .35);
}
.vault-name { font-size: 1.04rem; letter-spacing: -.2px; }

/* --- Active account: green glow ring on the avatar --- */
.vault-avatar.is-active {
  box-shadow: 0 0 0 2px rgba(16, 185, 129, .7), 0 10px 22px rgba(16, 185, 129, .45);
}

/* --- Avatar wrapper: the Active tag lives here, OUTSIDE the avatar box,
   because .acc-avatar has overflow:hidden and would clip it --- */
.vault-avatar-wrap { position: relative; flex-shrink: 0; }

/* --- Soft glow halo behind the profile pic (green on the active account) --- */
.vault-avatar-wrap::before {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 18px;
  background: radial-gradient(circle at 50% 40%, rgba(139, 92, 246, .45), rgba(139, 92, 246, 0) 70%);
  filter: blur(6px);
  z-index: 0;
  pointer-events: none;
}
.vault-avatar-wrap.is-active::before {
  background: radial-gradient(circle at 50% 40%, rgba(16, 185, 129, .5), rgba(16, 185, 129, 0) 70%);
}

/* --- Active tag: centred on top of the profile pic --- */
.vault-active-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, #10b981, #059669);
  border: 2px solid var(--bg-card);
  box-shadow: 0 4px 12px rgba(16, 185, 129, .55);
  font-size: .52rem;
  font-weight: 800;
  letter-spacing: .4px;
  text-transform: uppercase;
  padding: 2px 6px;
  white-space: nowrap;
}

/* --- Profile text: bigger label pill + bold number with phone icon --- */
.vault-identity-text { display: flex; flex-direction: column; gap: 7px; }
.vault-label-big {
  font-size: .88rem;
  padding: 6px 12px;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(99, 102, 241, .45);
}
.vault-number {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: .4px;
  color: var(--text-main);
}
.vault-number i { color: #06b6d4; font-size: .95rem; }
body.theme-light .vault-number i { color: #0891b2; }

/* --- Credits stat box: gold number + green earned pill --- */
.vault-stat {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 10px 12px;
}
.vault-credits { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.vault-coin { color: #f59e0b; font-size: 1rem; }
.vault-credits-num {
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -.3px;
  background: linear-gradient(90deg, #fde68a, #f59e0b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
body.theme-light .vault-credits-num {
  background: linear-gradient(90deg, #b45309, #d97706);
  -webkit-background-clip: text;
  background-clip: text;
}
.vault-earned {
  background: rgba(16, 185, 129, .16);
  color: #047857;
  border-radius: 99px;
  padding: 2px 8px;
  font-size: .72rem;
  font-weight: 800;
}
body:not(.theme-light) .vault-earned { color: #34d399; }
.vault-next { margin-top: 3px; }

/* --- Credits + Next Run: two side-by-side mini stat boxes (v3.25) ---
   Left box: gold-tinted, "CREDITS" label on top, big gold number, green
   +earned pill below. Right box: blue-tinted, "NEXT RUN" label on top,
   date big, time below. Equal height via flex stretch; works in both
   themes and at every width (each box is ~half its column). */
.vault-duo { display: flex; gap: 8px; }
/* Two-box layout is PHONES ONLY (v3.26): the duo is hidden on tablet and
   desktop, where the single combined box shows instead. */
.vault-duo-mobile { display: none; }
@media (max-width: 575px) {
  .vault-stat-desktop { display: none; }
  .vault-duo-mobile { display: flex; }
}
.vault-mini-stat {
  flex: 1 1 0;
  min-width: 0;
  border-radius: 14px;
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.vault-mini-credits {
  background: rgba(245, 158, 11, .10);
  border: 1px solid rgba(245, 158, 11, .35);
}
.vault-mini-next {
  background: rgba(59, 130, 246, .08);
  border: 1px solid rgba(59, 130, 246, .30);
}
.vault-mini-label {
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .8px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.vault-mini-credits .vault-mini-label { color: #b45309; }
body:not(.theme-light) .vault-mini-credits .vault-mini-label { color: #fbbf24; }
.vault-mini-next .vault-mini-label { color: #1d4ed8; }
body:not(.theme-light) .vault-mini-next .vault-mini-label { color: #93c5fd; }
/* One value row per box (v3.27): credits number + earned pill side by side,
   date + time side by side with no clock icon on the time. */
.vault-mini-value-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
}
.vault-mini-credits .vault-credits-num { font-size: 1.05rem; }
.vault-next-date {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
}
.vault-next-time {
  font-size: .85rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* --- Saved IP: field on its own line, three equal buttons --- */
.vault-ip-input { height: 42px; font-weight: 700; border-radius: 12px; }
.vault-ip-box .btn {
  height: 36px;
  border-radius: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* --- Actions: logs pill + toolbar with tinted icon buttons --- */
.vault-logs-btn {
  background: rgba(99, 102, 241, .12);
  color: #4f46e5;
  border: 1px solid rgba(99, 102, 241, .32);
  border-radius: 10px;
  padding: 7px 13px;
  font-weight: 700;
  transition: all .18s ease;
}
body:not(.theme-light) .vault-logs-btn { color: #a5b4fc; }
.vault-logs-btn:hover { background: rgba(99, 102, 241, .2); transform: translateY(-1px); color: #4f46e5; }
body:not(.theme-light) .vault-logs-btn:hover { color: #c7d2fe; }
.vault-action-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}
.vault-select-btn { font-weight: 700; border-radius: 10px; padding: 7px 12px; }
.vault-select-btn.is-selected {
  background: rgba(16, 185, 129, .16);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, .4);
}
body:not(.theme-light) .vault-select-btn.is-selected { color: #34d399; }
.vault-run-btn {
  padding: 7px 16px;
  font-weight: 800;
  border-radius: 10px;
  box-shadow: 0 10px 22px rgba(124, 58, 237, .5);
}
.vault-run-btn:hover { transform: translateY(-1px); }
.vault-icon-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  border: 1px solid transparent;
  transition: all .18s ease;
}
.vault-icon-btn:hover { transform: translateY(-2px); }
.vault-icon-indigo { background: rgba(99, 102, 241, .13); color: #4f46e5; }
body:not(.theme-light) .vault-icon-indigo { color: #a5b4fc; }
.vault-icon-indigo:hover { background: rgba(99, 102, 241, .24); }
.vault-icon-cyan { background: rgba(6, 182, 212, .13); color: #0891b2; }
body:not(.theme-light) .vault-icon-cyan { color: #67e8f9; }
.vault-icon-cyan:hover { background: rgba(6, 182, 212, .24); }
.vault-icon-violet { background: rgba(139, 92, 246, .13); color: #7c3aed; }
body:not(.theme-light) .vault-icon-violet { color: #c4b5fd; }
.vault-icon-violet:hover { background: rgba(139, 92, 246, .24); }
.vault-icon-danger { background: rgba(239, 68, 68, .1); color: #dc2626; }
body:not(.theme-light) .vault-icon-danger { color: #f87171; }
.vault-icon-danger:hover { background: rgba(239, 68, 68, .22); }

/* --- Responsive: roomier rows, Run grows on phones --- */
@media (max-width: 575px) {
  .vault-row { padding: 14px; }
  .vault-action-bar { justify-content: flex-start; }
  .vault-action-bar .vault-run-btn { flex: 1 1 auto; }
  .vault-icon-btn { width: 38px; height: 38px; }
}

/* =========================================================================
   JAZZ ESL PRO v3.14 — ACCOUNTS ACTION TOOLBAR FIX (2026-11-14)
   Two defects spotted in the user's desktop + mobile screenshots of v3.13:
   (a) the four action icons were pale, tiny, low-contrast tiles and the
   action bar wrapped into a lopsided 2x2 cluster on desktop; (b) the
   Active badge sat inside the truncating name div, so long names ate it
   entirely on desktop. Fix: actions are now a deliberate two-row toolbar
   — Select + Run as two equal wide buttons on top, then four big bold
   icon tiles (gradient tint, visible border, strong icon colour, larger
   glyph) in one even row; the Active badge now sits beside the name in a
   flex row so it is always visible while the name alone truncates.
   v3.13 backed up on the VPS as *.bak-20261114-2356.
   ========================================================================= */

/* --- Name row: badge always visible, name alone truncates --- */
.vault-name { min-width: 0; }

/* --- Two-row action toolbar --- */
.vault-action-primary {
  display: flex;
  gap: 8px;
  width: 100%;
}
.vault-action-primary .vault-select-btn,
.vault-action-primary .vault-run-btn {
  flex: 1 1 0;
  height: 42px;
  font-size: .92rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.vault-action-icons {
  display: flex;
  gap: 8px;
  width: 100%;
}

/* --- Bold icon tiles: gradient tint, border, strong colour, big glyph --- */
.vault-icon-btn {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  height: 42px;
  padding: 0;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  border: 1px solid transparent;
  box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .25);
  transition: all .18s ease;
}
.vault-icon-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 16px -6px rgba(0, 0, 0, .3); }
/* Solid saturated tiles with white icons — pale tints looked washed out next
   to the solid Run/Save buttons (fixed 2026-11-14 after the v3.14 check). */
.vault-icon-indigo {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  border-color: rgba(255, 255, 255, .25);
  box-shadow: 0 8px 18px -6px rgba(79, 70, 229, .55);
}
.vault-icon-indigo:hover { background: linear-gradient(135deg, #818cf8, #6366f1); }
.vault-icon-cyan {
  background: linear-gradient(135deg, #22d3ee, #0891b2);
  color: #fff;
  border-color: rgba(255, 255, 255, .25);
  box-shadow: 0 8px 18px -6px rgba(8, 145, 178, .55);
}
.vault-icon-cyan:hover { background: linear-gradient(135deg, #67e8f9, #06b6d4); }
.vault-icon-violet {
  background: linear-gradient(135deg, #a78bfa, #7c3aed);
  color: #fff;
  border-color: rgba(255, 255, 255, .25);
  box-shadow: 0 8px 18px -6px rgba(124, 58, 237, .55);
}
.vault-icon-violet:hover { background: linear-gradient(135deg, #c4b5fd, #8b5cf6); }
.vault-icon-danger {
  background: linear-gradient(135deg, #f87171, #dc2626);
  color: #fff;
  border-color: rgba(255, 255, 255, .25);
  box-shadow: 0 8px 18px -6px rgba(220, 38, 38, .5);
}
.vault-icon-danger:hover { background: linear-gradient(135deg, #fca5a5, #ef4444); }

/* --- Responsive: taller tiles for touch --- */
@media (max-width: 575px) {
  .vault-icon-btn { width: auto; height: 44px; }
  .vault-action-bar { justify-content: flex-start; }
}

/* =========================================================================
   JAZZ ESL PRO v3.15 — MOBILE HEADER: CREDITS BESIDE THE NAME (2026-11-15)
   On phones the credits box dropped to its own row and left the right half
   of the card empty, so the card felt long and unbalanced. The user's idea:
   float the credits box right beside the username/number block. The vault
   row grid is now identity col-7 + credits col-5 below lg (desktop keeps
   col-lg-3 / col-lg-2, unchanged), so the two sit side by side and the IP,
   logs and action toolbar follow underneath. Mobile sizing: smaller avatar
   and name so long usernames still fit, tighter stat box, and the name row
   may wrap so the Active badge always stays visible.
   v3.14 backed up on the VPS as *.bak-20261115-0001.
   ========================================================================= */

/* --- Name row may wrap so the Active badge is never eaten --- */
.vault-name-row { flex-wrap: wrap; row-gap: 2px; }

/* --- Compact mobile header --- */
@media (max-width: 575px) {
  /* Phones: profile + credits stack full-width (v3.23) so the number, the
     credits label and the next-run time never squeeze, clip or truncate. */
  .vault-avatar { width: 50px !important; height: 50px !important; font-size: 1.15rem !important; }
  .vault-name { font-size: .95rem; }
  .vault-stat { padding: 8px 10px; }
  .vault-credits-num { font-size: 1.05rem; }
  .vault-earned { font-size: .68rem; padding: 2px 7px; }
  /* Phones: label + number float to the right edge (v3.24) — avatar on the
     far left, identity on the far right, so the top row is balanced. */
  .vault-identity-text { margin-left: auto; align-items: flex-end; text-align: right; }
  .vault-identity-text .vault-number { justify-content: flex-end; }
}

/* =========================================================================
   JAZZ ESL PRO v3.16 — DARK-THEME TILES + SCHEDULE MODAL REDESIGN (2026-11-15)
   (a) The bright solid icon tiles looked neon against dark cards: harsh
   coloured halos and a washed-out white top edge. Light theme keeps the
   bright gradients; dark theme now uses deeper, richer gradients with a
   softer glow and a subtler border, so the same tiles look good in both.
   (b) The Daily Schedule modal was flat and plain. Now: gradient title,
   a tinted Enable card with a glowing gradient switch, icon labels, a
   bigger centred time picker with a proper AM/PM pill toggle, Rounds on
   its own line, Claim Daily Streak as a bordered chip, a soft Cancel and
   a shining Save button, and a close button that is visible in both
   themes (white X in dark, tinted tile in light).
   v3.15 backed up on the VPS as *.bak-20261115-0010.
   ========================================================================= */

/* --- Dark-theme icon tiles: deeper gradients, softer glow --- */
body:not(.theme-light) .vault-icon-btn { border-color: rgba(255, 255, 255, .14); }
body:not(.theme-light) .vault-icon-indigo {
  background: linear-gradient(135deg, #4f46e5, #3730a3);
  box-shadow: 0 8px 18px -6px rgba(79, 70, 229, .35);
}
body:not(.theme-light) .vault-icon-indigo:hover { background: linear-gradient(135deg, #6366f1, #4338ca); }
body:not(.theme-light) .vault-icon-cyan {
  background: linear-gradient(135deg, #0891b2, #155e75);
  box-shadow: 0 8px 18px -6px rgba(8, 145, 178, .35);
}
body:not(.theme-light) .vault-icon-cyan:hover { background: linear-gradient(135deg, #06b6d4, #0e7490); }
body:not(.theme-light) .vault-icon-violet {
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
  box-shadow: 0 8px 18px -6px rgba(124, 58, 237, .35);
}
body:not(.theme-light) .vault-icon-violet:hover { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
body:not(.theme-light) .vault-icon-danger {
  background: linear-gradient(135deg, #dc2626, #991b1b);
  box-shadow: 0 8px 18px -6px rgba(220, 38, 38, .35);
}
body:not(.theme-light) .vault-icon-danger:hover { background: linear-gradient(135deg, #ef4444, #b91c1c); }

/* --- Daily Schedule modal: gradient title --- */
#accountScheduleModal .modal-title-text > span:first-child {
  background: linear-gradient(90deg, #6366f1, #c084fc 50%, #f472b6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
body.theme-light #accountScheduleModal .modal-title-text > span:first-child {
  background: linear-gradient(90deg, #4f46e5, #7c3aed 50%, #db2777);
  -webkit-background-clip: text;
  background-clip: text;
}

/* --- Enable card: tinted, accent edge, glowing switch --- */
.sched-enable-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(99, 102, 241, .09), rgba(99, 102, 241, .02));
  border: 1px solid rgba(139, 92, 246, .3);
  border-radius: 16px;
  padding: 16px 18px;
}
.sched-enable-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #6366f1, #ec4899);
}
.sched-enable-card .form-check-input { width: 3.1em; height: 1.65em; cursor: pointer; }
.sched-enable-card .form-check-input:checked {
  background-color: #8b5cf6;
  border-color: #8b5cf6;
  box-shadow: 0 0 0 4px rgba(139, 92, 246, .25);
}

/* --- Dark theme: switches must stay visible when OFF (light theme is fine) --- */
/* The OFF track was dark-on-dark in dark theme, so the toggle vanished when off.
   :not(:checked) keeps the violet ON state of the Enable card untouched. */
body:not(.theme-light) .form-switch .form-check-input:not(:checked) {
  background-color: rgba(255, 255, 255, .18);
  border-color: rgba(255, 255, 255, .35);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23ffffff'/%3e%3c/svg%3e");
}

/* --- Section labels with violet icons --- */
.sched-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 800;
  color: var(--text-main);
}
.sched-label i { color: #8b5cf6; font-size: .95rem; }
body:not(.theme-light) .sched-label i { color: #a78bfa; }

/* --- Time picker: bigger, centred, proper AM/PM pills --- */
#accountScheduleModal .ampm-picker-group {
  display: flex;
  width: 100%;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 14px;
  background:
    linear-gradient(var(--bg-input), var(--bg-input)) padding-box,
    linear-gradient(135deg, rgba(99, 102, 241, .5), rgba(236, 72, 153, .4)) border-box;
  border: 1px solid transparent;
  box-shadow: 0 10px 24px -10px rgba(99, 102, 241, .5);
}
#accountScheduleModal .ampm-select { font-size: 1.15rem; padding: 6px 8px; }
#accountScheduleModal .ampm-colon { font-size: 1.35rem; font-weight: 800; color: #8b5cf6; }
body:not(.theme-light) #accountScheduleModal .ampm-colon { color: #a78bfa; }
#accountScheduleModal .ampm-toggle { padding: 3px; border-radius: 10px; margin-left: 6px; }
#accountScheduleModal .ampm-toggle button {
  padding: 8px 14px;
  font-size: .88rem;
  font-weight: 800;
  border-radius: 8px;
}
#accountScheduleModal .ampm-toggle button.active {
  background: linear-gradient(135deg, #6366f1, #8b5cf6 55%, #ec4899);
  color: #fff;
  box-shadow: 0 6px 14px rgba(139, 92, 246, .5);
}

/* --- Streak chip inside the modal (two-column row with Rounds) --- */
#accountScheduleModal .streak-toggle-chip { width: 100%; }
#accountScheduleModal .streak-toggle-chip .form-check-label {
  white-space: normal;
  line-height: 1.25;
  flex: 1 1 auto;
  min-width: 0;
}

/* --- Shining Save button --- */
.sched-save-btn { position: relative; overflow: hidden; box-shadow: 0 12px 26px rgba(124, 58, 237, .5); }
.sched-save-btn::after {
  content: "";
  position: absolute;
  top: 0; left: -80%;
  width: 50%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .45), transparent);
  transform: skewX(-20deg);
  animation: heroShine 3.2s ease-in-out infinite;
}

/* --- Close button visible in both themes --- */
.modal-pro .btn-close {
  background-color: rgba(239, 68, 68, .1);
  border: 1px solid rgba(239, 68, 68, .25);
}
body:not(.theme-light) .modal-pro .btn-close { filter: invert(1) grayscale(1); }
body:not(.theme-light) .modal-pro .btn-close:hover { background-color: rgba(239, 68, 68, .35); }

/* =========================================================================
   JAZZ ESL PRO v3.28 — SCHEDULE RUN LOGS MODAL, PHONE LAYOUT (2026-11-15)
   Phones only (<=575px): the header was crammed — long title, number and
   Refresh button all fighting on one row — so the header wraps with the
   title on its own full-width line and Refresh + close below it; the
   "NEXT SCHEDULED RUN" line gets its own row; the three filter tabs get
   smaller centred text so "All Logs (4)" fits on one line; the Close
   button becomes a gradient button. Desktop is untouched.
   (The technical `last_schedule_run` code chip is gone from the markup
   everywhere — plain text now, per the no-technical-texts rule.)
   ========================================================================= */
@media (max-width: 575px) {
  #accountLogsModal .modal-header { flex-wrap: wrap; row-gap: 8px; }
  #accountLogsModal .modal-title { flex: 1 1 100%; font-size: 1.08rem; }
  #accountLogsModal .logs-next-run { flex: 1 1 100%; margin-left: 0 !important; }
  #accountLogsModal .btn-group .btn {
    font-size: .8rem;
    padding: 8px 4px;
    line-height: 1.25;
    white-space: normal;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  #accountLogsModal .modal-footer .btn-secondary {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    border: none;
    color: #fff;
    font-weight: 700;
    border-radius: 10px;
  }
}

/* =========================================================================
   PANEL LOGIN + SPLASH LOADER + TOOLS TAB (added 2026-11-20)
   ========================================================================= */

/* ---- Splash loader (visible before JS runs) ---- */
.esl-loader {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(1200px 600px at 50% -10%, rgba(139, 92, 246, .28), transparent 60%),
    radial-gradient(900px 500px at 90% 110%, rgba(236, 72, 153, .18), transparent 60%),
    var(--bg-main);
}
body.theme-light .esl-loader {
  background: radial-gradient(1200px 600px at 50% -10%, rgba(99, 102, 241, .16), transparent 60%),
    radial-gradient(900px 500px at 90% 110%, rgba(236, 72, 153, .12), transparent 60%),
    var(--bg-main);
}
.esl-loader-inner { text-align: center; padding: 24px; animation: eslLoaderFade .5s ease both; }
@keyframes eslLoaderFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.esl-loader-ring {
  width: 92px; height: 92px; margin: 0 auto 18px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--grad-brand);
  color: #fff; font-size: 2.4rem;
  box-shadow: 0 0 0 6px rgba(139, 92, 246, .18), 0 0 44px rgba(139, 92, 246, .55);
  animation: eslLoaderPulse 1.6s ease-in-out infinite;
  position: relative;
}
.esl-loader-ring::after {
  content: ""; position: absolute; inset: -9px; border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: #ec4899; border-right-color: #8b5cf6;
  animation: eslLoaderSpin 1.1s linear infinite;
}
@keyframes eslLoaderSpin { to { transform: rotate(360deg); } }
@keyframes eslLoaderPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.esl-loader-brand {
  font-weight: 900; letter-spacing: .14em; font-size: 1.5rem; color: var(--text-main);
  background: var(--grad-brand); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.esl-loader-sub { color: var(--text-muted); font-size: .85rem; margin-top: 4px; letter-spacing: .04em; }
.esl-loader-bar {
  width: 220px; height: 6px; margin: 20px auto 10px; border-radius: 99px;
  background: var(--border-color); overflow: hidden;
}
.esl-loader-bar span {
  display: block; height: 100%; width: 40%; border-radius: 99px;
  background: var(--grad-brand);
  animation: eslLoaderShimmer 1.2s ease-in-out infinite;
}
@keyframes eslLoaderShimmer { 0% { transform: translateX(-110%); } 100% { transform: translateX(560%); } }
.esl-loader-status { color: var(--text-dim); font-size: .8rem; }

/* ---- Login overlay + glass card ---- */
.login-overlay {
  position: fixed; inset: 0; z-index: 1900;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: radial-gradient(1000px 520px at 50% -10%, rgba(139, 92, 246, .30), transparent 60%),
    radial-gradient(800px 480px at 95% 110%, rgba(6, 182, 212, .16), transparent 60%),
    rgba(9, 11, 18, .88);
  backdrop-filter: blur(10px);
}
body.theme-light .login-overlay {
  background: radial-gradient(1000px 520px at 50% -10%, rgba(99, 102, 241, .18), transparent 60%),
    radial-gradient(800px 480px at 95% 110%, rgba(6, 182, 212, .12), transparent 60%),
    rgba(238, 242, 247, .88);
}
.login-card {
  width: 100%; max-width: 400px;
  background: var(--bg-panel);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), 0 0 60px rgba(139, 92, 246, .25);
  padding: 34px 30px 26px;
  text-align: center;
  animation: eslLoaderFade .45s ease both;
}
.login-card.shake { animation: eslLoginShake .45s ease both; }
@keyframes eslLoginShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-9px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(4px); }
}
.login-logo {
  width: 64px; height: 64px; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 18px; background: var(--grad-brand); color: #fff; font-size: 1.8rem;
  box-shadow: 0 10px 28px rgba(139, 92, 246, .45);
}
.login-brand {
  font-weight: 900; letter-spacing: .12em; font-size: 1.35rem; color: var(--text-main); margin: 0;
  background: var(--grad-brand); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.login-sub { color: var(--text-muted); font-size: .9rem; margin: 6px 0 22px; }
.login-card .form-label { color: var(--text-muted); font-size: .82rem; font-weight: 700; }
.login-card .form-control { background: var(--bg-input); color: var(--text-main); border-color: var(--border-color); }
.login-card .form-control:focus { border-color: var(--accent-violet); box-shadow: 0 0 0 .2rem rgba(139, 92, 246, .25); }
.login-note { color: var(--text-dim); font-size: .8rem; margin-top: 14px; }

/* ---- Tools tab ---- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.tool-card:hover { background: var(--bg-card-hover); border-color: var(--border-strong); transform: translateY(-2px); }
.tool-card-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 1.35rem;
}
.tool-card-title { font-weight: 800; color: var(--text-main); font-size: 1.02rem; }
.tool-card-desc { color: var(--text-muted); font-size: .86rem; margin: 0; flex: 1; }
.tool-result { color: var(--text-muted); font-size: .8rem; min-height: 1.1em; }
.tool-result:empty { display: none; }

@media (max-width: 575px) {
  .login-card { padding: 26px 20px 20px; }
  .esl-loader-ring { width: 76px; height: 76px; font-size: 2rem; }
  .tools-grid { grid-template-columns: 1fr; }
}

/* =========================================================================
   JAZZ ESL PRO v3.30 — 4 TABS IN ONE ROW (2026-11-20)
   The v3.11 block forced repeat(3, 1fr), so the 4th tab (Tools) wrapped to
   a second row, and the <=991px block turned the bar into a horizontal
   scroller. This final block wins over all of them: 4 equal columns at
   every width. On phones the labels wrap to two lines under the icon
   instead of the tab itself dropping to a new row.
   ========================================================================= */
.workspace-tabs.tabs-pro {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  overflow: visible;
}
.workspace-tabs.tabs-pro button {
  min-width: 0;
  padding: 12px 6px;
  font-size: .88rem;
  gap: 6px;
  white-space: nowrap;
}
@media (max-width: 991px) {
  .workspace-tabs.tabs-pro {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: visible;
  }
  .workspace-tabs.tabs-pro button {
    flex: none;
    padding: 11px 4px;
    font-size: .8rem;
    gap: 5px;
  }
  .workspace-tabs.tabs-pro button i { font-size: 1rem; }
}
@media (max-width: 575px) {
  .workspace-tabs.tabs-pro { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 5px; }
  .workspace-tabs.tabs-pro button {
    font-size: .68rem;
    padding: 9px 2px;
    gap: 3px;
    flex-wrap: wrap;
    white-space: normal;
    line-height: 1.25;
    text-align: center;
  }
  .workspace-tabs.tabs-pro button i { font-size: .95rem; }
}

/* =========================================================================
   JAZZ ESL PRO v3.31 — MOBILE HEADER + KPI POLISH (2026-11-20)
   Phones only; desktop is untouched. The header actions were a loose
   flex-wrap: "Update Games" and "Add Account" came out uneven and
   "Logout" sat alone on its own row, and the KPI labels/numbers wrapped
   awkwardly in the 2-column phone grid. This final block makes the
   header actions a tidy 2-column grid (equal buttons, full-width Next
   pill, centred sound/theme pair, full-width Logout) and compacts the
   KPI cards so titles and numbers sit cleanly on phones.
   ========================================================================= */
@media (max-width: 767px) {
  .top-navbar { padding: 10px 0; }
  .top-navbar .container-xxl { gap: 10px !important; }
  .brand-logo { width: 38px; height: 38px; font-size: 1.15rem; border-radius: 11px; }
  .brand-heading { font-size: 1.05rem; }
  /* Actions: grid beats the old flex-wrap (Bootstrap d-flex needs !important). */
  .top-navbar .container-xxl > div:last-child {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }
  .top-navbar .status-chip {
    grid-column: 1 / -1;
    justify-content: center;
    text-align: center;
    padding: 8px 12px;
  }
  .top-navbar .btn {
    min-height: 44px;
    font-size: .85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  #openGamesModalBtn { grid-column: 1; grid-row: 2; text-align: center; }
  .top-navbar [data-bs-target="#addAccountModal"] { grid-column: 2; grid-row: 2; text-align: center; }
  #soundToggleBtn { grid-column: 1; grid-row: 3; justify-self: end; width: 44px; min-height: 44px; }
  #themeToggleBtn { grid-column: 2; grid-row: 3; justify-self: start; width: 44px; min-height: 44px; }
  /* text-align centres the label even though jQuery .show() sets display:block inline. */
  #panelLogoutBtn { grid-column: 1 / -1; grid-row: 4; width: 100%; text-align: center; }
}
@media (max-width: 575px) {
  .kpi-box { padding: 13px 14px; overflow: hidden; }
  .kpi-box .d-flex > div:first-child { min-width: 0; }
  .kpi-title { font-size: .66rem; letter-spacing: .35px; line-height: 1.35; min-height: 1.8em; }
  .kpi-num { font-size: 1.3rem; white-space: nowrap; }
  #kpiSchedStatus { font-size: 1.02rem !important; }
  .kpi-foot { font-size: .72rem; line-height: 1.35; }
  .kpi-badge-icon { width: 34px; height: 34px; font-size: 1.05rem; border-radius: 9px; }
}
@media (max-width: 380px) {
  .kpi-num { font-size: 1.15rem; }
  #kpiSchedStatus { font-size: .92rem !important; }
  .top-navbar .btn { font-size: .8rem; }
}

/* =========================================================================
   JAZZ ESL PRO v3.32 — LOGOUT TOP-RIGHT ON MOBILE (2026-11-20)
   Phones only; desktop untouched. The Logout button sat as a full-width
   row at the bottom of the header actions. On phones it now floats at
   the top-right corner, on the same row as the JAZZ ESL PRO name
   (absolutely positioned against .top-navbar, so it leaves the grid
   flow and the other header rows close up underneath it).
   ========================================================================= */
@media (max-width: 767px) {
  #panelLogoutBtn {
    position: absolute;
    top: 10px;
    right: 12px;
    z-index: 5;
    width: auto;
    min-height: 38px;
    padding: 8px 12px;
    font-size: .8rem;
  }
}
@media (max-width: 380px) {
  .brand-heading { font-size: .95rem; }
  #panelLogoutBtn { font-size: .75rem; padding: 7px 10px; }
}

/* =========================================================================
   JAZZ ESL PRO v3.33 — SMALLER HEADER BUTTONS + ICONS ON THE RIGHT (2026-11-20)
   Phones only; desktop untouched. Update Games / Add Account are a
   little smaller now, and the sound + theme icons move up into the same
   row as those two buttons, at the right side — instead of sitting as a
   centred pair on their own row underneath.
   ========================================================================= */
@media (max-width: 767px) {
  .top-navbar .container-xxl > div:last-child {
    grid-template-columns: 1fr 1fr auto auto;
  }
  .top-navbar .btn { min-height: 40px; font-size: .8rem; padding: 8px 6px; }
  #openGamesModalBtn { grid-column: 1; grid-row: 2; }
  .top-navbar [data-bs-target="#addAccountModal"] { grid-column: 2; grid-row: 2; }
  #soundToggleBtn { grid-column: 3; grid-row: 2; justify-self: end; width: 40px; min-height: 40px; }
  #themeToggleBtn { grid-column: 4; grid-row: 2; justify-self: start; width: 40px; min-height: 40px; }
}
@media (max-width: 380px) {
  .top-navbar .btn { font-size: .75rem; }
}
