:root {
  --gold:        #C9A84C;
  --gold-light:  #D9BA6A;
  --gold-dim:    rgba(201,168,76,0.18);
  --gold-border: rgba(201,168,76,0.28);
  --gold-glow:   rgba(201,168,76,0.08);
  --navy:        #070D1A;
  --navy-2:      #0D1525;
  --navy-3:      #131E30;
  --navy-4:      #192540;
  --white:       #F4F1EC;
  --gray-2:      #C8C0B4;
  --gray-4:      #7A7268;
  --gray-6:      #3A3530;
  --green:       #4ADE80;
  --green-bg:    rgba(34,120,70,0.12);
  --green-border:rgba(34,120,70,0.3);
  --green-text:  #22C55E;
  --red:         #F87171;
  --red-bg:      rgba(180,40,40,0.10);
  --red-border:  rgba(180,40,40,0.25);
  --red-text:    #EF4444;
  --orange-text: #F97316;
  --font-display:'Bebas Neue', sans-serif;
  --font-body:   'DM Sans', sans-serif;
  --font-mono:   'DM Mono', monospace;
  --radius:      6px;
  --radius-lg:   10px;
  --transition:  0.15s ease;
}

/* ── LIGHT MODE VARS ── */
html.light {
  --navy:   #F0EDE6;
  --navy-2: #FFFFFF;
  --navy-3: #E8E3D8;
  --navy-4: #DDD8CE;
  --white:  #1A1410;
  --gray-2: #4A4540;
  --gray-4: #6A6258;
  --gray-6: #C8C0B4;
  --gold-glow:   rgba(160,120,40,0.10);
  --gold-border: rgba(160,120,40,0.30);
  --gold-dim:    rgba(160,120,40,0.12);
  --green-bg:    rgba(34,120,70,0.08);
  --red-bg:      rgba(180,40,40,0.07);
}

/* ── LIGHT MODE — COMPREHENSIVE OVERRIDES ── */
html.light body { background: var(--navy); color: var(--white); }
html.light .admin-topbar { background: #FFFFFF; border-bottom-color: rgba(0,0,0,0.08); }
html.light .admin-topbar::after { background: linear-gradient(90deg, transparent, rgba(201,168,76,0.15), transparent); }
html.light .admin-nav { background: #FFFFFF; border-right-color: rgba(0,0,0,0.08); }
html.light .admin-nav-item { color: #4A4540; }
html.light .admin-nav-item:hover { background: rgba(0,0,0,0.04); color: #1A1410; }
html.light .nav-section-label { color: #8A8278; }
html.light .nav-store-scope { background: #F0EDE6; border-color: rgba(160,120,40,0.3); }
html.light .nav-store-name { color: #1A1410; }
html.light .admin-main { background: var(--navy); }
html.light .page-title { color: #1A1410; }
html.light .page-sub { color: #6A6258; }
html.light .stat-card { background: #FFFFFF; border-color: rgba(0,0,0,0.07); }
html.light .stat-label { color: #6A6258; }
html.light .stat-value { color: #1A1410; }
html.light .stat-sub { color: #8A8278; }
html.light .data-panel { background: #FFFFFF; border-color: rgba(0,0,0,0.07); }
html.light .panel-header { border-bottom-color: rgba(0,0,0,0.07); }
html.light .panel-title { color: #1A1410; }
html.light .data-table th { color: #6A6258; border-bottom-color: rgba(0,0,0,0.07); }
html.light .data-table td { color: #4A4540; border-bottom-color: rgba(0,0,0,0.05); }
html.light .data-table tr:hover td { background: rgba(0,0,0,0.03); }
html.light .td-name { color: #1A1410; }
html.light .leaderboard-row { border-bottom-color: rgba(0,0,0,0.05); }
html.light .leaderboard-row:hover { background: rgba(0,0,0,0.03); }
html.light .lb-rank { color: #8A8278; }
html.light .lb-name { color: #1A1410; }
html.light .lb-store { color: #6A6258; }
html.light .lb-bar-track { background: rgba(0,0,0,0.08); }
html.light .lb-count { color: #1A1410; }
html.light .loading-state { color: #6A6258; }
html.light .empty-state { color: #6A6258; }
html.light .empty-state h4 { color: rgba(0,0,0,0.2); }
html.light .topbar-user { color: #4A4540; }
html.light .badge.gray { background: rgba(0,0,0,0.06); color: #6A6258; border-color: rgba(0,0,0,0.1); }
html.light .field-input,
html.light .field-select {
  background: #F0EDE6;
  border-color: rgba(0,0,0,0.12);
  color: #1A1410;
}
html.light .field-input::placeholder { color: #8A8278; }
html.light .field-select option { background: #FFFFFF; color: #1A1410; }
html.light .modal-overlay { background: rgba(0,0,0,0.5); }
html.light .modal { background: #FFFFFF; border-color: rgba(0,0,0,0.1); }
html.light .modal-header { border-bottom-color: rgba(0,0,0,0.08); }
html.light .modal-footer { border-top-color: rgba(0,0,0,0.08); }
html.light .modal-title { color: #1A1410; }
html.light .field-label { color: #4A4540; }
html.light .no-data-text { color: rgba(0,0,0,0.2) !important; }
html.light [style*="rgba(255,255,255"] { color: #1A1410 !important; }
html.light .chart-bar-label { color: #6A6258 !important; }
html.light .day-label { color: #6A6258 !important; }
html.light .period-bar { background: #F0EDE6; border-color: rgba(0,0,0,0.08); }
html.light .period-btn { color: #6A6258; }
html.light .period-btn:hover { background: rgba(0,0,0,0.04); color: #1A1410; }
html.light .period-btn.active { background: #1A1410; color: #F4F1EC; }
html.light .outcome-item { border-bottom-color: rgba(0,0,0,0.05); }
html.light .outcome-item:hover { background: rgba(0,0,0,0.02); }
html.light .filter-bar { background: #F0EDE6; border-color: rgba(0,0,0,0.08); }
html.light .filter-btn { color: #6A6258; }
html.light .filter-btn.active { background: #1A1410; color: #F4F1EC; }
html.light .adoption-grid-wrap { border-color: rgba(0,0,0,0.07); }
html.light .adoption-header { background: #F0EDE6; border-bottom-color: rgba(0,0,0,0.07); }
html.light .adoption-row:hover .adoption-rep { background: rgba(0,0,0,0.03); }
html.light .adoption-rep { color: #4A4540; border-right-color: rgba(0,0,0,0.07); }
html.light .adoption-cell { border-bottom-color: rgba(0,0,0,0.04); }
html.light .adoption-cell.used { background: rgba(160,120,40,0.12); color: #9A7A30; }
html.light .adoption-cell.unused { background: transparent; }
html.light .rep-panel { background: #FFFFFF; border-left-color: rgba(0,0,0,0.08); }
html.light .rep-panel-header { background: #FFFFFF; border-bottom-color: rgba(0,0,0,0.07); }
html.light .rep-panel-name { color: #1A1410; }
html.light .rep-panel-stats { background: rgba(0,0,0,0.04); }
html.light .rep-stat { background: #FFFFFF; }
html.light .rep-tool-row { color: #4A4540; border-bottom-color: rgba(0,0,0,0.04); }
html.light .rep-timeline-item { border-bottom-color: rgba(0,0,0,0.04); }
html.light .rep-timeline-event { color: #4A4540; }
html.light .rep-section-title { color: #4A4540; }
html.light .notes-area { background: #F0EDE6; border-color: rgba(0,0,0,0.12); color: #1A1410; }
html.light .traffic-light-bar { background: #F0EDE6; border-color: rgba(0,0,0,0.07); }
html.light .objection-item { border-bottom-color: rgba(0,0,0,0.05); }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-body);
  background: var(--navy);
  color: var(--white);
  font-size: 14px;
  line-height: 1.5;
  overflow: hidden;
}

/* ── BOOT OVERLAY ────────────────────────────────────────────────────────── */
#bootOverlay {
  position: fixed;
  inset: 0;
  background: var(--navy);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  transition: opacity 0.2s ease;
}
#bootOverlay.fade-out {
  opacity: 0;
  pointer-events: none;
}
#bootOverlay .boot-logo {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 4px;
  color: var(--white);
}
#bootOverlay .boot-logo span {
  color: var(--gold);
}
#bootOverlay .boot-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(201,168,76,0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: bootSpin 0.8s linear infinite;
}
@keyframes bootSpin { to { transform: rotate(360deg); } }

/* ── LOGIN SCREEN ─────────────────────────────────────────────────────────── */
#loginScreen {
  position: fixed;
  inset: 0;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  flex-direction: column;
  gap: 8px;
}

.login-box {
  width: 100%;
  max-width: 400px;
  padding: 0 20px;
}

.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 36px;
}

.login-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 32px;
}

.login-bar {
  width: 5px;
  background: var(--gold);
  border-radius: 2px 2px 0 0;
  animation: breathe 2.4s ease-in-out infinite;
}
.login-bar:nth-child(1) { height: 25%; opacity: 0.3; animation-delay: 0s; }
.login-bar:nth-child(2) { height: 50%; opacity: 0.55; animation-delay: 0.2s; }
.login-bar:nth-child(3) { height: 75%; opacity: 0.78; animation-delay: 0.4s; }
.login-bar:nth-child(4) { height: 100%; animation-delay: 0.6s; }

@keyframes breathe {
  0%,100% { transform: scaleY(1); }
  50% { transform: scaleY(0.7); }
}

.login-wordmark {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 3px;
  color: var(--white);
  line-height: 1;
}
.login-wordmark span { color: var(--gold); }

.login-badge {
  text-align: center;
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gray-4);
  margin-bottom: 32px;
}

.login-field { margin-bottom: 12px; }

.login-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gray-4);
  margin-bottom: 6px;
}

.login-input {
  width: 100%;
  background: var(--navy-2);
  border: 1px solid var(--gray-6);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition);
}
.login-input:focus { border-color: var(--gold); }
.login-input::placeholder { color: var(--gray-4); }

.login-btn {
  width: 100%;
  margin-top: 8px;
  background: linear-gradient(135deg, var(--gold), #9A7A30);
  border: none;
  border-radius: var(--radius);
  padding: 14px;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 2px;
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition);
}
.login-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.login-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.login-error {
  margin-top: 10px;
  font-size: 12px;
  color: var(--red-text);
  text-align: center;
  min-height: 18px;
}

.login-support-action {
  background: none;
  border: none;
  color: #D9BA6A;
  font-size: 12px;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  letter-spacing: 0.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.login-support-action:hover { color: #E8CE90; }
.login-support-action:focus-visible { outline: 2px solid #D9BA6A; outline-offset: 3px; border-radius: 4px; }
html.light .login-support-action { color: #6B4F13; }
html.light .login-support-action:focus-visible { outline-color: #6B4F13; }

/* ── APP SHELL ────────────────────────────────────────────────────────────── */
#appShell {
  display: none;
  height: 100vh;
  flex-direction: column;
}
#appShell.show { display: flex; }

/* Top bar */
.admin-topbar {
  height: 52px;
  min-height: 52px;
  background: var(--navy-2);
  border-bottom: 1px solid var(--gold-border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 14px;
  flex-shrink: 0;
  position: relative;
}

.admin-topbar::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--gold) 30%, var(--gold-light) 50%, var(--gold) 70%, transparent 100%);
  opacity: 0.4;
}

.topbar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.topbar-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 22px;
}
.topbar-bar {
  width: 4px;
  background: var(--gold);
  border-radius: 1px 1px 0 0;
}
.topbar-bar:nth-child(1) { height: 25%; opacity: 0.3; }
.topbar-bar:nth-child(2) { height: 50%; opacity: 0.55; }
.topbar-bar:nth-child(3) { height: 75%; opacity: 0.78; }
.topbar-bar:nth-child(4) { height: 100%; }

.topbar-wordmark {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 2px;
  color: var(--white);
  line-height: 1;
}
.topbar-wordmark span { color: var(--gold); }

.topbar-badge {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--gold-glow);
  border: 1px solid var(--gold-border);
  border-radius: 4px;
  padding: 2px 7px;
}

/* Period selector bar in topbar */
.topbar-period {
  display: none;
  align-items: center;
  gap: 4px;
  background: var(--navy-3);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 3px;
}
.topbar-period.visible { display: flex; }
.period-btn {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 500;
  color: var(--gray-4);
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.period-btn:hover { color: var(--white); background: rgba(255,255,255,0.04); }
.period-btn.active { background: var(--navy-4); color: var(--white); }

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-user {
  font-size: 12px;
  color: var(--gray-2);
  font-weight: 500;
}

.topbar-role {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--gold-glow);
  border: 1px solid var(--gold-border);
  border-radius: 10px;
  padding: 2px 8px;
}

.btn-logout {
  background: transparent;
  border: 1px solid var(--gray-6);
  border-radius: var(--radius);
  padding: 5px 12px;
  color: var(--gray-4);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-logout:hover { color: var(--red-text); border-color: var(--red-border); background: var(--red-bg); }

.btn-launch-app {
  background: transparent;
  border: 1px solid var(--gold-border);
  border-radius: var(--radius);
  padding: 5px 12px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
}
.btn-launch-app:hover { background: var(--gold-glow); border-color: var(--gold); }
html.light .btn-launch-app { border-color: rgba(160,120,40,0.4); color: #9A7A30; }
html.light .btn-launch-app:hover { background: rgba(160,120,40,0.08); }

.btn-theme-toggle {
  background: transparent;
  border: 1px solid var(--gray-6);
  border-radius: var(--radius);
  padding: 5px 10px;
  color: var(--gray-4);
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition);
  line-height: 1;
}
.btn-theme-toggle:hover { border-color: var(--gold-border); color: var(--gold); }

/* Layout */
.admin-body {
  flex: 1;
  display: flex;
  overflow: hidden;
  min-height: 0;
}

/* Sidebar nav */
.admin-nav {
  width: 200px;
  min-width: 200px;
  background: var(--navy-2);
  border-right: 1px solid rgba(255,255,255,0.04);
  display: flex;
  flex-direction: column;
  padding: 16px 0;
  overflow-y: auto;
  flex-shrink: 0;
}

.nav-section-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gray-4);
  padding: 8px 16px 4px;
  margin-top: 8px;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  cursor: pointer;
  color: var(--gray-2);
  font-size: 13px;
  font-weight: 500;
  transition: all var(--transition);
  border-left: 2px solid transparent;
  user-select: none;
}
.admin-nav-item:hover { background: rgba(255,255,255,0.03); color: var(--white); }
.admin-nav-item.active { color: var(--gold); border-left-color: var(--gold); background: var(--gold-glow); }
.nav-icon { font-size: 15px; width: 20px; text-align: center; flex-shrink: 0; }

.nav-store-scope {
  margin: 12px 10px 4px;
  background: var(--navy-3);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius);
  padding: 8px 10px;
}
.nav-store-label { font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: 2px; }
.nav-store-name  { font-size: 12px; color: var(--white); font-weight: 500; }

/* Main content */
.admin-main {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

/* Pages */
.admin-page { display: none; flex-direction: column; gap: 20px; }
.admin-page.active { display: flex; }

/* Page header */
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.page-title {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 2px;
  color: var(--white);
  line-height: 1;
}
.page-sub {
  font-size: 12px;
  color: var(--gray-4);
  margin-top: 4px;
  letter-spacing: 0.5px;
}
.page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--gold), #9A7A30);
  border: none;
  border-radius: var(--radius);
  padding: 8px 18px;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition);
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }

.btn-secondary {
  background: var(--navy-3);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 7px 16px;
  color: var(--gray-2);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  color-scheme: dark;
}
.btn-secondary:hover { border-color: rgba(255,255,255,0.2); color: var(--white); }

select.btn-secondary,
input[type="date"].btn-secondary {
  background: var(--navy-3);
  color: var(--white);
  -webkit-appearance: none;
  appearance: none;
  color-scheme: dark;
}
select.btn-secondary option {
  background: var(--navy-2);
  color: var(--white);
}

html.light .btn-secondary {
  background: #FFFFFF;
  border-color: rgba(0,0,0,0.15);
  color: #1A1410;
  color-scheme: light;
}
html.light .btn-secondary:hover { border-color: rgba(0,0,0,0.3); color: #000; }
html.light select.btn-secondary,
html.light input[type="date"].btn-secondary {
  background: #FFFFFF;
  color: #1A1410;
  color-scheme: light;
}
html.light select.btn-secondary option {
  background: #FFFFFF;
  color: #1A1410;
}

.btn-danger {
  background: transparent;
  border: 1px solid var(--red-border);
  border-radius: var(--radius);
  padding: 5px 12px;
  color: var(--red-text);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-danger:hover { background: var(--red-bg); }

.btn-sm {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 4px 10px;
  color: var(--gray-2);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-sm:hover { border-color: rgba(255,255,255,0.25); color: var(--white); }
.btn-sm.danger { border-color: var(--red-border); color: var(--red-text); }
.btn-sm.danger:hover { background: var(--red-bg); }
html.light .btn-sm { border-color: rgba(0,0,0,0.12); color: #4A4540; }
html.light .btn-sm:hover { border-color: rgba(0,0,0,0.25); color: #1A1410; }
html.light .btn-sm.danger { border-color: var(--red-border); color: var(--red-text); }

/* Stat cards */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.stat-card {
  background: var(--navy-2);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat-card.green { border-color: var(--green-border); background: var(--green-bg); }
.stat-card.red   { border-color: var(--red-border); background: var(--red-bg); }
.stat-card.gold  { border-color: var(--gold-border); background: var(--gold-glow); }

.stat-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gray-4);
}

.stat-value {
  font-family: var(--font-display);
  font-size: 32px;
  letter-spacing: 1px;
  color: var(--white);
  line-height: 1;
}

.stat-value.gold  { color: var(--gold); }
.stat-value.green { color: var(--green-text); }
.stat-value.red   { color: var(--red-text); }

.stat-sub {
  font-size: 11px;
  color: var(--gray-4);
}

/* Data panels */
.data-panel {
  background: var(--navy-2);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.panel-header {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-title {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 1.5px;
  color: var(--white);
}

.panel-body { padding: 0; }

/* Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gray-4);
  padding: 10px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  white-space: nowrap;
}

.data-table td {
  padding: 11px 16px;
  font-size: 13px;
  color: var(--gray-2);
  border-bottom: 1px solid rgba(255,255,255,0.03);
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255,255,255,0.02); }

.td-name { color: var(--white); font-weight: 500; }
.td-mono { font-family: var(--font-mono); font-size: 12px; }
.td-link { color: var(--gold); cursor: pointer; font-weight: 500; }
.td-link:hover { text-decoration: underline; }

/* Status badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 10px;
  padding: 2px 9px;
}
.badge.active   { background: var(--green-bg); color: var(--green-text); border: 1px solid var(--green-border); }
.badge.inactive { background: var(--red-bg); color: var(--red-text); border: 1px solid var(--red-border); }
.badge.gold     { background: var(--gold-glow); color: var(--gold); border: 1px solid var(--gold-border); }
.badge.gray     { background: rgba(255,255,255,0.05); color: var(--gray-4); border: 1px solid rgba(255,255,255,0.08); }
.badge.green    { background: var(--green-bg); color: var(--green-text); border: 1px solid var(--green-border); }
.badge.red      { background: var(--red-bg); color: var(--red-text); border: 1px solid var(--red-border); }

/* Role badges */
.role-badge {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 4px;
  padding: 2px 6px;
}
.role-super_admin { background: rgba(201,168,76,0.15); color: var(--gold); }
.role-store_admin { background: rgba(59,130,246,0.15); color: #60A5FA; }
.role-manager     { background: rgba(168,85,247,0.15); color: #C084FC; }
.role-sales       { background: rgba(34,197,94,0.12); color: #4ADE80; }
.role-bdc         { background: rgba(249,115,22,0.12); color: var(--orange-text); }

/* Status dot */
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.status-dot.green  { background: var(--green-text); box-shadow: 0 0 6px rgba(34,197,94,0.5); }
.status-dot.yellow { background: var(--gold); box-shadow: 0 0 6px rgba(201,168,76,0.5); }
.status-dot.gray   { background: var(--gray-6); }

/* Leaderboard */
.leaderboard-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: background var(--transition);
}
.leaderboard-row:last-child { border-bottom: none; }
.leaderboard-row:hover { background: rgba(255,255,255,0.02); }

.lb-rank {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 1px;
  color: var(--gray-4);
  width: 28px;
  flex-shrink: 0;
}
.lb-rank.gold { color: var(--gold); }

.lb-name { flex: 1; font-weight: 500; color: var(--white); }
.lb-store { font-size: 11px; color: var(--gray-4); }

.lb-bar-wrap { width: 120px; flex-shrink: 0; }
.lb-bar-track { height: 4px; background: rgba(255,255,255,0.06); border-radius: 2px; }
.lb-bar-fill  { height: 4px; background: var(--gold); border-radius: 2px; transition: width 0.4s ease; }

.lb-count {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--gold);
  font-weight: 500;
  width: 40px;
  text-align: right;
  flex-shrink: 0;
}

/* Tool breakdown bars */
.tool-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.tool-bar-row:last-child { border-bottom: none; }
.tool-name { flex: 1; font-size: 12px; color: var(--gray-2); }
.tool-bar-wrap { width: 140px; flex-shrink: 0; }
.tool-bar-track { height: 6px; background: rgba(255,255,255,0.05); border-radius: 3px; }
.tool-bar-fill  { height: 6px; background: linear-gradient(90deg, var(--gold), var(--gold-light)); border-radius: 3px; }
.tool-count { font-family: var(--font-mono); font-size: 12px; color: var(--gray-4); width: 36px; text-align: right; flex-shrink: 0; }

/* Two-col grid */
.two-col { display: grid; grid-template-columns: 60fr 40fr; gap: 16px; align-items: stretch; }
.two-col-even { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .two-col, .two-col-even { grid-template-columns: 1fr; } }

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.show { display: flex; }

.modal {
  background: var(--navy-2);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 460px;
  overflow: hidden;
  animation: modalIn 0.2s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 1.5px;
  color: var(--white);
}
.modal-close {
  background: none;
  border: none;
  color: var(--gray-4);
  font-size: 18px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color var(--transition);
}
.modal-close:hover { color: var(--white); }

.modal-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.field-group { display: flex; flex-direction: column; gap: 5px; }
.field-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gray-4);
}
.field-input, .field-select {
  background: var(--navy-3);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 9px 12px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition);
  width: 100%;
}
.field-input:focus, .field-select:focus { border-color: var(--gold); }
.field-input::placeholder { color: var(--gray-4); }
.field-select option { background: var(--navy-2); color: var(--white); }

/* Loading / empty states */
.loading-state {
  padding: 40px;
  text-align: center;
  color: var(--gray-4);
  font-size: 13px;
}
.empty-state {
  padding: 40px;
  text-align: center;
  color: var(--gray-4);
}
.empty-state h4 {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.2);
  margin-bottom: 8px;
}
.empty-state p { font-size: 12px; color: rgba(255,255,255,0.12); }
html.light .empty-state h4 { color: rgba(0,0,0,0.2); }
html.light .empty-state p  { color: rgba(0,0,0,0.3); }

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--navy-3);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius);
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--white);
  z-index: 9999;
  animation: toastIn 0.2s ease;
  pointer-events: none;
}
.toast.error { border-color: var(--red-border); color: var(--red-text); background: var(--red-bg); pointer-events: auto; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Scrollbar */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--navy-4); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ── Rep Drill-Down Panel ── */
.rep-panel-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.rep-panel-overlay.open { display: block; opacity: 1; }
.rep-panel {
  position: fixed;
  top: 0; right: -520px;
  width: 500px;
  height: 100vh;
  background: var(--navy-2);
  border-left: 1px solid rgba(255,255,255,0.06);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transition: right 0.28s cubic-bezier(0.4,0,0.2,1);
  overflow-y: auto;
}
.rep-panel.open { right: 0; }
.rep-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: sticky; top: 0;
  background: var(--navy-2);
  z-index: 1;
}
.rep-panel-name {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 1.5px;
  color: var(--white);
}
.rep-panel-sub { font-size: 12px; color: var(--gray-4); margin-top: 2px; }
.rep-panel-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 1px;
  background: rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.rep-stat {
  background: var(--navy-2);
  padding: 14px 16px;
  text-align: center;
}
.rep-stat-val {
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--gold);
  line-height: 1;
}
.rep-stat-label { font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gray-4); margin-top: 4px; }
.rep-panel-section { padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.rep-section-title { font-family: var(--font-display); font-size: 13px; letter-spacing: 1px; color: var(--gray-4); margin-bottom: 12px; }
.rep-tool-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  font-size: 13px;
  color: var(--gray-2);
}
.rep-tool-row:last-child { border-bottom: none; }
.rep-tool-count { font-family: var(--font-mono); color: var(--gold); font-size: 13px; }
.rep-timeline-item {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  font-size: 12px;
}
.rep-timeline-item:last-child { border-bottom: none; }
.rep-timeline-time { color: var(--gray-4); white-space: nowrap; min-width: 80px; font-family: var(--font-mono); font-size: 11px; }
.rep-timeline-event { color: var(--gray-2); }
.rep-ratio-warning {
  margin: 0 20px 0;
  padding: 10px 14px;
  background: rgba(201,168,76,0.08);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius);
  font-size: 12px;
  color: var(--gold);
}
.notes-area {
  width: 100%;
  background: var(--navy-3);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 13px;
  resize: vertical;
  outline: none;
  min-height: 80px;
  transition: border-color var(--transition);
}
.notes-area:focus { border-color: var(--gold); }
.notes-area::placeholder { color: var(--gray-4); }

/* Outcome pills */
.result-pill {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  border-radius: 10px;
  padding: 2px 8px;
  white-space: nowrap;
}
.result-pill.green { background: var(--green-bg); color: var(--green-text); border: 1px solid var(--green-border); }
.result-pill.gold  { background: var(--gold-glow); color: var(--gold); border: 1px solid var(--gold-border); }
.result-pill.gray  { background: rgba(255,255,255,0.05); color: var(--gray-4); border: 1px solid rgba(255,255,255,0.08); }
.result-pill.red   { background: var(--red-bg); color: var(--red-text); border: 1px solid var(--red-border); }

/* Outcome feed */
.outcome-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: background var(--transition);
  cursor: default;
}
.outcome-item:last-child { border-bottom: none; }
.outcome-item:hover { background: rgba(255,255,255,0.02); }
.outcome-rep { font-size: 12px; font-weight: 600; color: var(--gold); cursor: pointer; white-space: nowrap; }
.outcome-rep:hover { text-decoration: underline; }
.outcome-snippet { font-size: 12px; color: var(--gray-2); line-height: 1.4; flex: 1; }
.outcome-time { font-family: var(--font-mono); font-size: 10px; color: var(--gray-4); white-space: nowrap; }
.outcome-tool { font-size: 10px; color: var(--gray-4); margin-top: 2px; }

/* Filter bar */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--navy-3);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius);
  padding: 3px;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 500;
  color: var(--gray-4);
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.filter-btn:hover { color: var(--white); background: rgba(255,255,255,0.04); }
.filter-btn.active { background: var(--navy-4); color: var(--white); }

/* Traffic light summary */
.traffic-light-bar {
  background: var(--navy-2);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--gray-2);
}
.tl-item { display: flex; align-items: center; gap: 8px; }
.tl-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.tl-dot.green  { background: var(--green-text); }
.tl-dot.yellow { background: var(--gold); }
.tl-dot.gray   { background: var(--gray-6); }

/* Adoption grid */
.adoption-grid-wrap {
  overflow-x: auto;
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius-lg);
}
.adoption-grid {
  border-collapse: collapse;
  min-width: 100%;
}
.adoption-grid th {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gray-4);
  padding: 10px 14px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  white-space: nowrap;
  background: var(--navy-3);
}
.adoption-grid th.rep-header {
  text-align: left;
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--navy-3);
  min-width: 140px;
}
.adoption-rep {
  font-size: 12px;
  color: var(--gray-2);
  padding: 9px 14px;
  border-right: 1px solid rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.03);
  position: sticky;
  left: 0;
  background: var(--navy-2);
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--transition);
}
.adoption-rep:hover { color: var(--gold); }
.adoption-cell {
  padding: 6px 10px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  white-space: nowrap;
  vertical-align: middle;
  line-height: 1.3;
}
.adoption-cell.used { background: var(--gold-dim); color: var(--gold); font-weight: 600; }
.adoption-cell.unused { color: var(--navy-4); }

/* Objection items */
.objection-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.objection-item:last-child { border-bottom: none; }
.objection-rank { font-family: var(--font-display); font-size: 22px; color: var(--gray-6); width: 32px; flex-shrink: 0; line-height: 1.3; }
.objection-rank.gold { color: var(--gold); }
.objection-text { flex: 1; font-size: 13px; color: var(--gray-2); line-height: 1.5; }
.objection-count { font-family: var(--font-mono); font-size: 12px; color: var(--gray-4); white-space: nowrap; }

/* Horizontal bar for outcomes breakdown */
.h-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.h-bar-row:last-child { border-bottom: none; }
.h-bar-label { width: 160px; flex-shrink: 0; font-size: 12px; color: var(--gray-2); }
.h-bar-wrap { flex: 1; }
.h-bar-track { height: 8px; background: rgba(255,255,255,0.05); border-radius: 4px; overflow: hidden; }
.h-bar-fill { height: 8px; border-radius: 4px; transition: width 0.4s ease; }
.h-bar-fill.green { background: var(--green-text); }
.h-bar-fill.gold  { background: var(--gold); }
.h-bar-fill.gray  { background: var(--gray-6); }
.h-bar-fill.red   { background: var(--red-text); }
.h-bar-count { font-family: var(--font-mono); font-size: 12px; color: var(--gray-4); width: 40px; text-align: right; flex-shrink: 0; }

/* Billing placeholder */
.billing-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  min-height: 300px;
}
.billing-logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.billing-logo-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 40px;
}
.billing-logo-bar {
  width: 6px;
  background: var(--gold);
  border-radius: 2px 2px 0 0;
  opacity: 0.3;
}
.billing-logo-bar:nth-child(1) { height: 25%; opacity: 0.2; }
.billing-logo-bar:nth-child(2) { height: 50%; opacity: 0.4; }
.billing-logo-bar:nth-child(3) { height: 75%; opacity: 0.6; }
.billing-logo-bar:nth-child(4) { height: 100%; opacity: 1; }
.billing-wordmark { font-family: var(--font-display); font-size: 36px; letter-spacing: 4px; color: var(--white); }
.billing-wordmark span { color: var(--gold); }
.billing-soon { font-family: var(--font-display); font-size: 14px; letter-spacing: 4px; color: var(--gray-4); text-transform: uppercase; }
.billing-desc { font-size: 14px; color: var(--gray-4); max-width: 380px; text-align: center; line-height: 1.7; }
.billing-badge { background: var(--gold-glow); border: 1px solid var(--gold-border); border-radius: var(--radius); padding: 6px 16px; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); }

/* ── ONBOARDING WIZARD v2 — FULL-PAGE LAYOUT ─────────────────────────────── */
.wizard-overlay {
  position: fixed;
  inset: 0;
  background: var(--navy);
  z-index: 1000;
  display: flex;
  overflow: hidden;
}

.wizard-container {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 280px 1fr;
  background: var(--navy);
  position: relative;
}

/* ── LEFT RAIL ── */
.wizard-rail {
  width: 280px;
  height: 100vh;
  background: var(--navy-2);
  border-right: 1px solid rgba(201,168,76,0.12);
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow-y: auto;
}

.wizard-rail-header {
  padding: 28px 22px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.wizard-title {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 3px;
  color: var(--gold);
  line-height: 1;
}

.wizard-subtitle {
  font-size: 11px;
  color: var(--gray-4);
  margin-top: 6px;
  letter-spacing: 0.3px;
}

.wizard-rail-steps {
  flex: 1;
  padding: 16px 0;
}

.wizard-rail-step {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 0 12px;
  padding: 12px 22px;
  cursor: pointer;
  transition: background 0.15s ease;
  position: relative;
}
.wizard-rail-step:hover {
  background: rgba(255,255,255,0.03);
}

.wizard-rail-icon {
  grid-row: 1 / 3;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 12px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Upcoming step: empty circle */
.wizard-rail-step .wizard-rail-icon {
  border: 2px solid rgba(255,255,255,0.15);
  background: transparent;
  color: transparent;
}

/* Active step: filled gold dot */
.wizard-rail-step.active .wizard-rail-icon {
  border: 2px solid var(--gold);
  background: var(--gold);
  color: transparent;
  box-shadow: 0 0 8px rgba(201,168,76,0.3);
}

/* Completed step: green checkmark */
.wizard-rail-step.complete .wizard-rail-icon {
  border: 2px solid var(--green-text);
  background: var(--green-bg);
  color: var(--green-text);
  font-size: 11px;
  font-weight: 700;
}
.wizard-rail-step.complete .wizard-rail-icon::after {
  content: '\2713';
}

.wizard-rail-step-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-2);
  line-height: 1.3;
}
.wizard-rail-step.active .wizard-rail-step-title {
  color: var(--white);
}
.wizard-rail-step.complete .wizard-rail-step-title {
  color: var(--gray-2);
}

.wizard-rail-step-desc {
  font-size: 13px;
  color: var(--gray-4);
  line-height: 1.4;
  margin-top: 2px;
}

/* Save & Exit pinned to rail bottom */
.wizard-rail-exit {
  padding: 18px 22px;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: auto;
}
.wizard-rail-exit .btn-secondary {
  width: 100%;
  text-align: center;
}

/* ── RIGHT PANE ── */
.wizard-right-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 780px;
  overflow: hidden;
}

.wizard-context-bar {
  flex-shrink: 0;
  padding: 32px 48px 20px;
  background: #0A0F1C;
  border-bottom: 1px solid var(--gold-border);
}
.wizard-context-bar > * + * {
  margin-top: 12px;
}
html.light .wizard-context-bar {
  background: #FFFFFF;
  border-bottom-color: rgba(0,0,0,0.08);
}

.wizard-scroll-area {
  flex: 1;
  overflow-y: auto;
  padding: 24px 48px 48px;
}

.wizard-step-number {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--gray-4);
  text-transform: uppercase;
}

.wizard-step-title {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 2px;
  color: var(--gold);
  line-height: 1.2;
  margin: 0;
}

@media (max-width: 899px) {
  .wizard-context-bar { padding: 20px 24px 14px; }
  .wizard-scroll-area { padding: 16px 24px 32px; }
  .wizard-step-title { font-size: 18px; }
}

.wizard-step-h1 {
  display: none;
}

.wizard-step-explainer {
  font-size: 16px;
  color: var(--gray-2);
  line-height: 1.65;
  margin-bottom: 28px;
  max-width: 620px;
}

/* Right-pane base typography */
.wizard-right-pane .field-label {
  font-size: 14px;
}
.wizard-right-pane .field-input,
.wizard-right-pane .field-textarea,
.wizard-right-pane .field-select {
  font-size: 16px;
}

/* ── PROGRESS BAR (now inside right pane header area) ── */
.wizard-progress {
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  margin-bottom: 8px;
  overflow: hidden;
}

.wizard-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 2px;
  transition: width 0.35s ease;
}

/* Legacy step label — hidden on desktop, shown on mobile */
.wizard-step-label {
  display: none;
}

/* Legacy step dots — hidden in new layout */
.wizard-step-dots {
  display: none;
}
.wizard-dot {
  display: none;
}

/* ── MOBILE STICKY TOP BAR (<900px) ── */
.wizard-mobile-topbar {
  display: none;
}
.wizard-mobile-drawer {
  display: none;
}

@media (max-width: 899px) {
  .wizard-container {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .wizard-rail {
    display: none;
  }

  .wizard-mobile-topbar {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--navy-2);
    border-bottom: 1px solid rgba(201,168,76,0.12);
    padding: 14px 16px 0;
  }

  .wizard-mobile-topbar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
  }

  .wizard-mobile-step-text {
    font-family: var(--font-display);
    font-size: 16px;
    letter-spacing: 1.5px;
    color: var(--white);
  }

  .wizard-mobile-toggle {
    background: transparent;
    border: 1px solid rgba(201,168,76,0.3);
    border-radius: var(--radius);
    color: var(--gold);
    font-size: 12px;
    font-weight: 500;
    padding: 5px 10px;
    cursor: pointer;
    transition: all var(--transition);
  }
  .wizard-mobile-toggle:hover {
    background: var(--gold-glow);
    border-color: var(--gold);
  }

  /* Thin progress line at bottom of mobile topbar */
  .wizard-mobile-topbar .wizard-progress {
    margin-bottom: 0;
    border-radius: 0;
  }

  /* Mobile step drawer */
  .wizard-mobile-drawer {
    display: none;
    background: var(--navy-2);
    border-bottom: 1px solid rgba(201,168,76,0.12);
    padding: 12px 16px 16px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
  }
  .wizard-mobile-drawer.open {
    display: block;
    max-height: 400px;
    overflow-y: auto;
  }

  .wizard-mobile-drawer .wizard-rail-step {
    padding: 10px 8px;
  }

  /* Right pane mobile adjustments */
  .wizard-right-pane {
    padding: 24px 16px 32px;
  }

  .wizard-step-h1 {
    font-size: 24px;
  }

  .wizard-step-explainer {
    font-size: 15px;
    margin-bottom: 22px;
  }

  .wizard-right-pane .field-input,
  .wizard-right-pane .field-textarea,
  .wizard-right-pane .field-select {
    font-size: 15px;
    min-height: 48px;
  }

  .wizard-right-pane .field-textarea {
    min-height: 80px;
  }

  /* Save & Exit button for mobile — shown at bottom of right pane */
  .wizard-mobile-exit {
    display: block;
    margin-top: 16px;
  }
}

/* Hide mobile exit on desktop */
@media (min-width: 900px) {
  .wizard-mobile-exit {
    display: none;
  }
}

/* ── WIZARD NAV — BOTTOM-RIGHT DESKTOP, STACKED MOBILE ── */

.wizard-step {
  display: none;
  flex-direction: column;
  gap: 16px;
}
.wizard-step.active { display: flex; }

.wizard-step .field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 500px) {
  .wizard-step .field-row { grid-template-columns: 1fr; }
}

.wizard-step .field-note {
  font-size: 12px;
  color: var(--gray-4);
  line-height: 1.6;
  padding: 10px 14px;
  background: rgba(201,168,76,0.04);
  border: 1px solid rgba(201,168,76,0.10);
  border-radius: var(--radius);
}

.wizard-section-title {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 1.5px;
  color: var(--gold);
  text-transform: uppercase;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(201,168,76,0.12);
  margin-top: 4px;
}

.field-textarea {
  background: var(--navy-3);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 9px 12px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition);
  width: 100%;
  resize: vertical;
  min-height: 80px;
  line-height: 1.55;
}
.field-textarea:focus { border-color: var(--gold); }
.field-textarea::placeholder { color: var(--gray-4); }

/* Logo upload */
.logo-upload-area {
  border: 2px dashed rgba(201,168,76,0.25);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(201,168,76,0.03);
  position: relative;
}
.logo-upload-area:hover,
.logo-upload-area.drag-over {
  border-color: var(--gold);
  background: rgba(201,168,76,0.07);
}
.logo-upload-area .upload-icon {
  font-size: 28px;
  margin-bottom: 8px;
  opacity: 0.5;
}
.logo-upload-area .upload-label {
  font-size: 13px;
  color: var(--gray-2);
  font-weight: 500;
}
.logo-upload-area .upload-sub {
  font-size: 11px;
  color: var(--gray-4);
  margin-top: 4px;
}
.logo-upload-area input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
/* Ad / Mailer upload area */
.ad-upload-area {
  border: 2px dashed rgba(100,120,220,0.25);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(100,120,220,0.03);
  position: relative;
}
.ad-upload-area:hover {
  border-color: rgba(100,120,220,0.5);
  background: rgba(100,120,220,0.07);
}
.ad-preview-item {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
}
.ad-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ad-preview-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0,0,0,0.7);
  color: var(--red-text);
  border: none;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.ad-preview-name {
  font-size: 9px;
  color: var(--gray-4);
  text-align: center;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100px;
}

.logo-preview-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: var(--navy-3);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius);
}
.logo-preview-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 4px;
  background: rgba(255,255,255,0.05);
}
.logo-preview-info { flex: 1; }
.logo-preview-name {
  font-size: 12px;
  color: var(--white);
  font-weight: 500;
  margin-bottom: 2px;
}
.logo-preview-status {
  font-size: 11px;
  color: var(--green-text);
}
.logo-preview-remove {
  background: transparent;
  border: 1px solid var(--red-border);
  border-radius: var(--radius);
  color: var(--red-text);
  font-size: 11px;
  padding: 3px 8px;
  cursor: pointer;
  transition: all var(--transition);
}
.logo-preview-remove:hover { background: var(--red-bg); }

/* Checkbox row */
.checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 2px;
}
.checkbox-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--gray-2);
  cursor: pointer;
  user-select: none;
}
.checkbox-item input[type=checkbox] {
  width: 15px;
  height: 15px;
  accent-color: var(--gold);
  cursor: pointer;
}

/* Lead sources grid */
.lead-sources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 6px 12px;
}

/* Interview questions */
.interview-question {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.interview-question-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-2);
  line-height: 1.4;
}

/* Claude loading / results */
.wiz-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 28px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 500;
  background: rgba(201,168,76,0.04);
  border: 1px solid rgba(201,168,76,0.10);
  border-radius: var(--radius);
}
.wiz-loading .wiz-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(201,168,76,0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: wizSpin 0.8s linear infinite;
  flex-shrink: 0;
}
@keyframes wizSpin { to { transform: rotate(360deg); } }

.wiz-generate-wrap {
  text-align: center;
  padding: 16px 0;
}

/* Incentive paste/upload */
.incentive-input-methods {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.incentive-or-divider {
  text-align: center;
  font-size: 11px;
  color: var(--gray-4);
  letter-spacing: 1px;
  text-transform: uppercase;
  position: relative;
}
.incentive-or-divider::before,
.incentive-or-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 42%;
  height: 1px;
  background: rgba(255,255,255,0.07);
}
.incentive-or-divider::before { left: 0; }
.incentive-or-divider::after  { right: 0; }

.btn-upload-file {
  background: var(--navy-3);
  border: 1px dashed rgba(201,168,76,0.3);
  border-radius: var(--radius);
  padding: 10px 18px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
}
.btn-upload-file:hover { border-color: var(--gold); background: rgba(201,168,76,0.07); }
.btn-upload-file input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
}

/* Incentives parsed table */
.parsed-incentives-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.parsed-section-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--gray-4);
  margin-bottom: 6px;
}
.universal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 32px;
}
.universal-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--gold-dim);
  border: 1px solid var(--gold-border);
  border-radius: 20px;
  padding: 3px 10px 3px 12px;
  font-size: 12px;
  color: var(--gold);
}
.universal-chip-remove {
  background: none;
  border: none;
  color: var(--gold);
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  padding: 0;
  opacity: 0.6;
  transition: opacity var(--transition);
}
.universal-chip-remove:hover { opacity: 1; }
.btn-add-chip {
  background: transparent;
  border: 1px dashed rgba(201,168,76,0.3);
  border-radius: 20px;
  padding: 3px 12px;
  color: var(--gold);
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-add-chip:hover { border-color: var(--gold); background: var(--gold-glow); }

/* Per-model incentives table */
.incentive-table-wrap {
  overflow-x: auto;
}
.incentive-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.incentive-table th {
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gray-4);
  padding: 0 8px 8px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.incentive-table td {
  padding: 5px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}
.incentive-table tr:last-child td { border-bottom: none; }
.incentive-table .field-input {
  font-size: 12px;
  padding: 5px 8px;
  height: auto;
}

/* Team roster */
.team-table-wrap {
  overflow-x: auto;
}
.team-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.team-table th {
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gray-4);
  padding: 0 8px 8px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.team-table td {
  padding: 5px 6px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}
.team-table tr:last-child td { border-bottom: none; }
.team-table .field-input,
.team-table .field-select {
  font-size: 12px;
  padding: 5px 8px;
  height: auto;
}
.team-table .btn-remove-row {
  background: transparent;
  border: 1px solid var(--red-border);
  border-radius: var(--radius);
  color: var(--red-text);
  font-size: 13px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.team-table .btn-remove-row:hover { background: var(--red-bg); }

/* Review step */
.review-section {
  background: var(--navy-3);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
}
.review-section-title {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 1.5px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.review-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  gap: 12px;
  font-size: 13px;
}
.review-row:last-child { border-bottom: none; }
.review-label { color: var(--gray-4); font-size: 11px; flex-shrink: 0; }
.review-value { color: var(--gray-2); text-align: right; word-break: break-word; }
.review-text-block {
  font-size: 12px;
  color: var(--gray-2);
  line-height: 1.6;
  margin-top: 4px;
  white-space: pre-wrap;
  max-height: 100px;
  overflow: hidden;
  position: relative;
}

/* Submit confirmation */
.wizard-confirm-screen {
  text-align: center;
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.wizard-confirm-icon {
  font-size: 48px;
  line-height: 1;
}
.wizard-confirm-title {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 2px;
  color: var(--gold);
}
.wizard-confirm-text {
  font-size: 14px;
  color: var(--gray-2);
  line-height: 1.7;
  max-width: 420px;
}

/* Incentive rows (legacy support + new table rows) */
.incentive-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.incentive-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.incentive-row .field-input { flex: 1; }
.incentive-row .field-input:first-child { max-width: 180px; }
.incentive-row .btn-remove-row {
  background: transparent;
  border: 1px solid var(--red-border);
  border-radius: var(--radius);
  color: var(--red-text);
  font-size: 14px;
  width: 32px;
  height: 34px;
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.incentive-row .btn-remove-row:hover { background: var(--red-bg); }

.btn-add-row {
  background: transparent;
  border: 1px dashed rgba(201,168,76,0.3);
  border-radius: var(--radius);
  padding: 7px 14px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  align-self: flex-start;
}
.btn-add-row:hover { border-color: var(--gold); background: var(--gold-glow); }

/* Wizard nav — bottom-right desktop, stacked mobile */
.wizard-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

@media (max-width: 899px) {
  .wizard-nav {
    flex-direction: column-reverse;
    gap: 8px;
  }
  .wizard-nav .btn-primary,
  .wizard-nav .btn-secondary {
    width: 100%;
    text-align: center;
    justify-content: center;
    min-height: 48px;
  }
}

/* Onboarding status badges */
.ob-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 10px;
  padding: 2px 9px;
}
.ob-badge.locked   { background: rgba(255,255,255,0.05); color: var(--gray-4); border: 1px solid rgba(255,255,255,0.08); }
.ob-badge.pending  { background: var(--gold-glow); color: var(--gold); border: 1px solid var(--gold-border); }
.ob-badge.complete { background: var(--green-bg); color: var(--green-text); border: 1px solid var(--green-border); }

/* Store Setup button */
.btn-store-setup {
  background: linear-gradient(135deg, var(--gold), #9A7A30);
  border: none;
  border-radius: var(--radius);
  padding: 6px 14px;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition);
}
.btn-store-setup:hover { opacity: 0.88; transform: translateY(-1px); }

/* Force-reset password modal */
.force-reset-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.force-reset-box {
  width: 100%;
  max-width: 400px;
  background: var(--navy-2);
  border: 1px solid var(--gold-border);
  border-radius: 12px;
  padding: 28px;
  animation: modalIn 0.2s ease;
}
.force-reset-title {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 2px;
  color: var(--gold);
  text-align: center;
  margin-bottom: 6px;
}
.force-reset-sub {
  font-size: 13px;
  color: var(--gray-4);
  text-align: center;
  margin-bottom: 22px;
  line-height: 1.5;
}

/* ── LIGHT MODE — WIZARD v2 OVERRIDES ── */
html.light .wizard-overlay { background: #F0EDE6; }
html.light .wizard-container { background: #F0EDE6; }
html.light .wizard-rail { background: #FFFFFF; border-right-color: rgba(0,0,0,0.08); }
html.light .wizard-rail-header { border-bottom-color: rgba(0,0,0,0.06); }
html.light .wizard-rail-step:hover { background: rgba(0,0,0,0.03); }
html.light .wizard-rail-step .wizard-rail-icon { border-color: rgba(0,0,0,0.15); }
html.light .wizard-rail-step.active .wizard-rail-icon { border-color: #9A7A30; background: #9A7A30; }
html.light .wizard-rail-step.complete .wizard-rail-icon { border-color: var(--green-text); }
html.light .wizard-rail-step-title { color: #4A4540; }
html.light .wizard-rail-step.active .wizard-rail-step-title { color: #1A1410; }
html.light .wizard-rail-step-desc { color: #8A8278; }
html.light .wizard-rail-exit { border-top-color: rgba(0,0,0,0.06); }
html.light .wizard-step-h1 { color: #9A7A30; }
html.light .wizard-step-explainer { color: #4A4540; }
html.light .wizard-mobile-topbar { background: #FFFFFF; border-bottom-color: rgba(0,0,0,0.08); }
html.light .wizard-mobile-step-text { color: #1A1410; }
html.light .wizard-mobile-toggle { border-color: rgba(160,120,40,0.3); color: #9A7A30; }
html.light .wizard-mobile-drawer { background: #FFFFFF; border-bottom-color: rgba(0,0,0,0.08); }
html.light .wizard-title { color: #9A7A30; }
html.light .wizard-subtitle { color: #6A6258; }
html.light .wizard-progress { background: rgba(0,0,0,0.08); }
html.light .wizard-step-label { color: #6A6258; }
html.light .wizard-section-title { color: #9A7A30; }
html.light .wizard-step .field-note { background: rgba(160,120,40,0.04); border-color: rgba(160,120,40,0.1); color: #6A6258; }
html.light .field-textarea { background: #F0EDE6; border-color: rgba(0,0,0,0.12); color: #1A1410; }
html.light .field-textarea::placeholder { color: #8A8278; }
html.light .logo-upload-area { background: rgba(160,120,40,0.04); border-color: rgba(160,120,40,0.2); }
html.light .logo-upload-area:hover { border-color: #9A7A30; background: rgba(160,120,40,0.08); }
html.light .logo-preview-wrap { background: #F0EDE6; border-color: rgba(0,0,0,0.08); }
html.light .logo-preview-name { color: #1A1410; }
html.light .checkbox-item { color: #4A4540; }
html.light .interview-question-label { color: #4A4540; }
html.light .wiz-loading { background: rgba(160,120,40,0.06); border-color: rgba(160,120,40,0.12); color: #9A7A30; }
html.light .btn-upload-file { background: #F0EDE6; border-color: rgba(160,120,40,0.3); color: #9A7A30; }
html.light .btn-upload-file:hover { background: rgba(160,120,40,0.08); border-color: #9A7A30; }
html.light .incentive-table th { color: #6A6258; border-bottom-color: rgba(0,0,0,0.07); }
html.light .incentive-table td { border-bottom-color: rgba(0,0,0,0.05); }
html.light .team-table th { color: #6A6258; border-bottom-color: rgba(0,0,0,0.07); }
html.light .team-table td { border-bottom-color: rgba(0,0,0,0.05); }
html.light .review-section { background: #F0EDE6; border-color: rgba(0,0,0,0.07); }
html.light .review-section-title { color: #9A7A30; }
html.light .review-label { color: #8A8278; }
html.light .review-value { color: #4A4540; }
html.light .review-text-block { color: #4A4540; }
html.light .incentive-row .btn-remove-row { border-color: var(--red-border); }
html.light .btn-add-row { border-color: rgba(160,120,40,0.3); color: #9A7A30; }
html.light .btn-add-row:hover { background: rgba(160,120,40,0.06); }
html.light .btn-add-chip { border-color: rgba(160,120,40,0.3); color: #9A7A30; }
html.light .btn-add-chip:hover { background: rgba(160,120,40,0.06); }
html.light .wizard-nav { border-top-color: rgba(0,0,0,0.08); }
html.light .wiz-loading { color: #9A7A30; }
html.light .ob-badge.locked { background: rgba(0,0,0,0.05); color: #6A6258; border-color: rgba(0,0,0,0.1); }
html.light .ob-badge.pending { background: rgba(160,120,40,0.08); color: #9A7A30; border-color: rgba(160,120,40,0.25); }
html.light .force-reset-box { background: #FFFFFF; border-color: rgba(160,120,40,0.3); }
html.light .force-reset-title { color: #9A7A30; }
html.light .force-reset-sub { color: #6A6258; }
html.light .parsed-section-title { color: #6A6258; }
html.light .universal-chip { background: rgba(160,120,40,0.1); border-color: rgba(160,120,40,0.25); color: #9A7A30; }
html.light .universal-chip-remove { color: #9A7A30; }
html.light .wizard-confirm-title { color: #9A7A30; }
html.light .wizard-confirm-text { color: #4A4540; }

/* ═══════════════════════════════════════════════════
   PRINT STYLES
═══════════════════════════════════════════════════ */
@media print {
  body { background: #fff !important; color: #111 !important; }
  #loginScreen, #adminNav, .topbar-right, .topbar-period, .admin-nav,
  .btn-sm, .btn-secondary, .btn-primary, .page-actions, .modal-overlay,
  .rep-panel-wrapper, .nav-store-scope, .period-btn { display: none !important; }
  #appShell { display: block !important; }
  #appShell.show { display: block !important; }
  .admin-body { display: block !important; grid-template-columns: 1fr !important; }
  .admin-main { padding: 0 !important; overflow: visible !important; }
  .admin-page { display: none !important; }
  .admin-page.active { display: block !important; }
  .topbar { background: #fff !important; border-bottom: 2px solid #C9A84C !important; }
  .topbar::after { display: none !important; }
  .topbar-user, .topbar-role { color: #111 !important; }
  .data-panel { border: 1px solid #ddd !important; background: #fff !important; break-inside: avoid; margin-bottom: 16px; }
  .panel-header { background: #f5f3ee !important; border-bottom: 1px solid #ddd !important; }
  .panel-title { color: #111 !important; }
  .page-title { color: #111 !important; }
  .page-sub { color: #666 !important; }
  .stat-card { background: #f9f8f5 !important; border: 1px solid #ddd !important; break-inside: avoid; }
  .stat-label { color: #666 !important; }
  .stat-value { color: #111 !important; }
  .stat-sub { color: #888 !important; }
  .data-table th { color: #111 !important; background: #f5f3ee !important; border-bottom: 2px solid #ddd !important; }
  .data-table td { color: #333 !important; border-bottom: 1px solid #eee !important; }
  .td-link { color: #333 !important; }
  .result-pill { border: 1px solid #ccc !important; }
  .two-col { display: block !important; }
  .two-col > * { margin-bottom: 16px !important; max-height: none !important; }
  #activityFeedList { max-height: none !important; overflow: visible !important; }
  .outcome-item { border-bottom: 1px solid #eee !important; }
  .outcome-rep { color: #111 !important; }
  .outcome-tool { color: #666 !important; }
  .outcome-time { color: #888 !important; }
  .h-bar-label { color: #333 !important; }
  .h-bar-count { color: #111 !important; }
  .h-bar-fill.green { background: #228846 !important; }
  .h-bar-fill.gold { background: #C9A84C !important; }
  .h-bar-fill.gray { background: #999 !important; }
  .h-bar-fill.red { background: #B42828 !important; }
  /* My Team table — full width, no scroll clip */
  #myteamTable { font-size: 10px !important; }
  #myteamTable th, #myteamTable td { padding: 4px 6px !important; white-space: nowrap !important; }
  [style*="overflow-x"] { overflow: visible !important; }
  .filter-bar { display: none !important; }
  /* Print header and footer */
  .print-header { display: block !important; }
  .print-footer { display: block !important; }
}
.print-header {
  display: none;
  text-align: center;
  padding: 20px 0 10px;
  border-bottom: 2px solid #C9A84C;
  margin-bottom: 20px;
}
.print-header-title {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 3px;
  color: #111;
}
.print-header-title span { color: #C9A84C; }
.print-header-store {
  font-size: 14px;
  color: #666;
  margin-top: 4px;
}
.print-footer {
  display: none;
  text-align: center;
  padding: 16px 0;
  border-top: 1px solid #ddd;
  margin-top: 20px;
  font-size: 11px;
  color: #888;
}

/* Rep Report print overrides */
@media print {
  #repReportControls { display: none !important; }
  #repReportOutput { display: block !important; }
  .rr-section { break-inside: avoid; page-break-inside: avoid; margin-bottom: 12px; }
  .rr-page-break { page-break-before: always; }
  .rr-stat-grid { display: grid !important; grid-template-columns: 1fr 1fr 1fr 1fr !important; }
  .rr-stat { border: 1px solid #ccc !important; background: #fff !important; padding: 16px !important; text-align: center !important; }
  .rr-stat-val { font-size: 24pt !important; font-weight: 700 !important; color: #9A7A30 !important; }
  .rr-stat-label { font-size: 9pt !important; color: #555 !important; }
  .rr-chart-img { width: 100% !important; max-height: 180px !important; object-fit: contain !important; }
  .rr-note-input { display: none !important; }
  #rrPrintHeader { display: block !important; }
  #rrPrintFooter { display: block !important; }
  canvas { display: none !important; }
  @page { size: letter portrait; margin: 0.65in 0.75in 0.75in 0.75in; }
  orphans: 3; widows: 3;
}


.support-overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,0.75); z-index:99999; align-items:center; justify-content:center; }
.support-overlay.active { display:flex; }
.support-modal { background:#0D1525; border:1px solid rgba(201,168,76,0.3); border-radius:16px; width:100%; max-width:420px; margin:16px; display:flex; flex-direction:column; max-height:90vh; overflow:hidden; }
.support-header { padding:18px 20px 14px; border-bottom:1px solid rgba(255,255,255,0.07); display:flex; align-items:center; justify-content:space-between; }
.support-title { font-family:'Bebas Neue',sans-serif; font-size:20px; letter-spacing:2px; color:#F0EDE8; }
.support-subtitle { font-size:12px; color:rgba(240,237,232,0.72); margin-top:2px; }
.support-close { background:none; border:none; color:rgba(255,255,255,0.4); font-size:20px; cursor:pointer; padding:4px; line-height:1; }
.support-close:hover { color:#fff; }
.support-messages { flex:1; overflow-y:auto; padding:16px; display:flex; flex-direction:column; gap:10px; min-height:200px; max-height:340px; }
.support-bubble { max-width:85%; padding:10px 14px; border-radius:12px; font-size:13px; line-height:1.5; }
.support-bubble.bot { background:#111C30; color:#F0EDE8; border-bottom-left-radius:4px; align-self:flex-start; }
.support-bubble.user { background:linear-gradient(135deg,#C9A84C,#9A7A30); color:#060C18; font-weight:600; border-bottom-right-radius:4px; align-self:flex-end; }
.support-bubble.typing { background:#111C30; color:rgba(240,237,232,0.5); font-style:italic; }
.support-options { padding:0 16px 12px; display:flex; flex-wrap:wrap; gap:8px; }
.support-opt { background:rgba(201,168,76,0.1); border:1px solid rgba(201,168,76,0.3); color:#C9A84C; border-radius:8px; padding:7px 12px; font-size:12px; font-weight:600; cursor:pointer; transition:all 0.2s; font-family:'DM Sans',sans-serif; }
.support-opt:hover { background:rgba(201,168,76,0.2); }
.support-input-row { padding:12px 16px; border-top:1px solid rgba(255,255,255,0.07); display:flex; gap:8px; }
.support-input { flex:1; background:#060C18; border:1px solid rgba(255,255,255,0.1); border-radius:8px; padding:10px 12px; color:#F0EDE8; font-size:13px; font-family:'DM Sans',sans-serif; outline:none; }
.support-input:focus { border-color:rgba(201,168,76,0.4); }
.support-send { background:linear-gradient(135deg,#C9A84C,#9A7A30); border:none; border-radius:8px; padding:10px 16px; color:#060C18; font-weight:700; font-size:13px; cursor:pointer; font-family:'DM Sans',sans-serif; }
.support-send:disabled { opacity:0.4; cursor:not-allowed; }
.support-close:focus-visible, .support-opt:focus-visible, .support-input:focus-visible, .support-send:focus-visible { outline:2px solid #D9BA6A; outline-offset:2px; }
