/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Framer Design System — Bold Black & Blue, Motion-First ── */
:root {
  /* Surfaces */
  --bg-primary:       #080808;
  --bg-secondary:     #0d0d0d;
  --bg-card:          #111111;
  --bg-card-hover:    #161616;

  /* Text */
  --text-primary:     #ffffff;
  --text-secondary:   #888888;
  --text-muted:       #444444;

  /* Accent — Framer Electric Blue */
  --accent:           #0066ff;
  --accent-light:     #3385ff;
  --accent-dim:       #0050cc;
  --accent-glow:      rgba(0, 102, 255, 0.18);
  --accent-glow-lg:   rgba(0, 102, 255, 0.28);

  /* Borders */
  --border:           rgba(255, 255, 255, 0.07);
  --border-subtle:    rgba(255, 255, 255, 0.04);
  --border-active:    rgba(0, 102, 255, 0.55);

  /* Sidebar */
  --sidebar-bg:       #080808;
  --sidebar-text:     #555555;
  --sidebar-active:   rgba(0, 102, 255, 0.12);

  /* Semantic */
  --success:          #00d06c;
  --green:            #00d06c;
  --green-bg:         rgba(0, 208, 108, 0.10);
  --warning:          #ffb800;
  --orange:           #ff6b00;
  --orange-bg:        rgba(255, 107, 0, 0.10);
  --danger:           #ff3b3b;
  --red:              #ff3b3b;
  --red-bg:           rgba(255, 59, 59, 0.10);
  --blue:             #0066ff;
  --blue-bg:          rgba(0, 102, 255, 0.10);

  /* Shape */
  --radius:           10px;
  --radius-lg:        16px;
  --radius-xl:        20px;

  /* Depth */
  --shadow:           0 0 0 1px rgba(255,255,255,0.04), 0 8px 32px rgba(0,0,0,0.5);
  --shadow-lg:        0 0 0 1px rgba(255,255,255,0.06), 0 24px 64px rgba(0,0,0,0.7);
  --shadow-blue:      0 0 0 1px var(--border-active), 0 8px 32px rgba(0,102,255,0.2);

  /* Motion */
  --ease-out:         cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring:      cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition:       all 0.25s var(--ease-out);
  --transition-fast:  all 0.15s var(--ease-out);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ── Typography ────────────────────────────────────────────── */
h1, h2, h3, h4 {
  letter-spacing: -0.03em;
  font-weight: 700;
  color: var(--text-primary);
}

/* ── Forms ─────────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}
.form-group label .optional {
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 6px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}
.form-group textarea {
  min-height: 132px;
  resize: vertical;
  line-height: 1.6;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: var(--bg-card-hover);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }

.field-help {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: var(--transition);
}
.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 0 0 1px rgba(0,102,255,0.3), 0 4px 16px rgba(0,102,255,0.3);
}
.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(0,102,255,0.4), 0 8px 24px rgba(0,102,255,0.4);
}
.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 0 0 1px rgba(0,102,255,0.3), 0 2px 8px rgba(0,102,255,0.3);
}
.btn-primary:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.14);
}

.btn-accent {
  background: var(--blue-bg);
  color: var(--accent-light);
  border: 1px solid rgba(0,102,255,0.25);
}
.btn-accent:hover {
  background: rgba(0,102,255,0.15);
  border-color: rgba(0,102,255,0.4);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--bg-card);
  border-color: rgba(255,255,255,0.12);
}

.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 8px; }

/* Launch button special */
.btn-launch {
  padding: 14px 32px;
  font-size: 15px;
  border-radius: 12px;
  background: var(--accent);
  box-shadow: 0 0 0 1px rgba(0,102,255,0.4), 0 8px 32px rgba(0,102,255,0.35);
  position: relative;
  overflow: hidden;
}
.btn-launch::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 60%);
  pointer-events: none;
}
.btn-launch:hover {
  box-shadow: 0 0 0 1px rgba(0,102,255,0.5), 0 12px 40px rgba(0,102,255,0.45);
  transform: translateY(-2px);
}

/* ── Auth Screen ───────────────────────────────────────────── */
.auth-screen {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  z-index: 100;
  background: var(--bg-primary);
  background-image:
    radial-gradient(ellipse 60% 50% at 50% -10%, rgba(0,102,255,0.15) 0%, transparent 70%);
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 44px;
  width: 100%; max-width: 420px;
  box-shadow: var(--shadow-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.auth-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,102,255,0.6), transparent);
}

.auth-logo {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  font-size: 22px; font-weight: 800; letter-spacing: -0.04em;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.auth-logo .logo-icon {
  width: 42px; height: 42px;
  background: var(--accent);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 16px rgba(0,102,255,0.4);
}
.auth-logo span em { color: var(--accent-light); font-style: normal; }
.auth-subtitle { color: var(--text-muted); margin-bottom: 36px; font-size: 14px; }

.auth-error {
  background: var(--red-bg); color: var(--red);
  padding: 12px; border-radius: 8px; font-size: 13px;
  margin-bottom: 20px; border: 1px solid rgba(255,59,59,0.2);
  text-align: left;
}

.auth-toggle { margin-top: 24px; font-size: 14px; color: var(--text-muted); }
.auth-toggle-btn {
  background: none; border: none; color: var(--accent-light); font-weight: 600;
  cursor: pointer; padding-left: 4px; font-size: inherit;
}
.auth-toggle-btn:hover { text-decoration: underline; }

/* ── Layout & Sidebar ──────────────────────────────────────── */
.app-container {
  display: flex;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-primary);
}

.sidebar {
  width: 72px;
  min-width: 72px;
  background-color: var(--sidebar-bg);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
  z-index: 50;
  transition: width 0.3s var(--ease-out);
  flex-shrink: 0;
}

.sidebar.expanded {
  width: 300px;
  min-width: 300px;
  align-items: flex-start;
}
.sidebar.expanded .sidebar-group {
  align-items: flex-start;
  padding: 0 14px;
}
.sidebar.expanded .nav-link {
  width: 100%;
  justify-content: flex-start;
  padding: 0 14px;
  gap: 12px;
}

.nav-label {
  display: block;
  white-space: nowrap;
  font-weight: 500;
  font-size: 14px;
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  transition: opacity 0.2s ease, max-width 0.3s ease;
  color: var(--text-secondary);
}
.sidebar.expanded .nav-label {
  opacity: 1;
  max-width: 200px;
  transition: opacity 0.25s ease 0.15s, max-width 0.3s ease;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 36px;
  cursor: pointer;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.04em;
  width: 100%;
  color: var(--text-primary);
}
.sidebar-logo span {
  display: inline;
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: opacity 0.2s ease, max-width 0.3s ease;
}
.sidebar.expanded .sidebar-logo span {
  opacity: 1;
  max-width: 160px;
  transition: opacity 0.25s ease 0.15s, max-width 0.3s ease;
}
.sidebar-logo .logo-icon {
  width: 36px; height: 36px;
  background: var(--accent);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,102,255,0.35);
}

.sidebar-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  align-items: center;
  margin-bottom: 12px;
}

.sidebar-divider {
  width: 40%;
  height: 1px;
  background-color: var(--border-subtle);
  border: none;
  margin: 8px 0;
}
.sidebar.expanded .sidebar-divider { width: 80%; margin: 8px 16px; }

.nav-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sidebar-text);
  border-radius: 10px;
  transition: var(--transition-fast);
  position: relative;
  cursor: pointer;
  text-decoration: none;
  background: transparent;
  border: none;
  font-size: 17px;
}
.nav-link:hover {
  background-color: rgba(255,255,255,0.06);
  color: var(--text-primary);
}
.nav-link.active {
  background-color: var(--sidebar-active);
  color: var(--accent-light);
}

/* Sidebar collapse button */
.sidebar-collapse-btn {
  margin-top: auto;
  margin-bottom: 16px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1;
  transition: var(--transition-fast);
  flex-shrink: 0;
}
.sidebar-collapse-btn:hover {
  background: var(--blue-bg);
  border-color: rgba(0,102,255,0.3);
  color: var(--accent-light);
}
.sidebar.expanded .sidebar-collapse-btn {
  align-self: flex-end;
  margin-right: 16px;
}

/* History Pane */
.history-pane {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 16px;
  flex: 1;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.sidebar.expanded .history-pane {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.25s ease 0.15s, visibility 0.25s ease 0.15s;
}
.history-pane h4 {
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 1.5px;
  margin-bottom: 16px;
  font-weight: 600;
}

.sidebar-search { margin-bottom: 12px; }
.sidebar-search input {
  width: 100%; padding: 8px 12px; font-size: 13px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text-primary); outline: none; transition: var(--transition-fast);
}
.sidebar-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-glow); }
.sidebar-search input::placeholder { color: var(--text-muted); }

.sidebar-list { flex: 1; overflow-y: auto; overflow-x: hidden; }

/* ── History card with 3-dot menu ────────────────────────── */
.history-item {
  position: relative;
  padding: 10px 12px;
  padding-right: 32px;  /* make room for kebab button */
  background: transparent;
  border-radius: 10px;
  margin-bottom: 3px;
  cursor: pointer;
  transition: var(--transition-fast);
  border: 1px solid transparent;
}
.history-item:hover  { background: rgba(255,255,255,0.04); border-color: var(--border); }
.history-item.active { background: var(--sidebar-active); border-color: rgba(0,102,255,0.2); }

.history-item-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 5px; }
.history-company {
  font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; flex: 1; margin-right: 10px; color: var(--text-primary);
}
.history-date { font-size: 11px; color: var(--text-muted); flex-shrink: 0; }
.history-badges { display: flex; gap: 6px; }

/* Kebab (⋮) button — always visible */
.history-kebab {
  position: absolute;
  right: 6px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
  opacity: 0.6;
  z-index: 2;
  line-height: 1;
  letter-spacing: 1px;
}
.history-item:hover .history-kebab,
.history-kebab.open { opacity: 1; }
.history-kebab:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
}

/* Dropdown menu */
.history-menu {
  position: absolute;
  right: 4px; top: calc(50% + 14px);
  min-width: 160px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.04) inset;
  z-index: 20;
  padding: 4px;
  opacity: 0;
  transform: scale(0.92) translateY(-6px);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.history-menu.show {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

.history-menu-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 8px 12px;
  background: none; border: none;
  color: var(--text-secondary);
  font-size: 13px; font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border-radius: 7px;
  transition: var(--transition-fast);
  white-space: nowrap;
}
.history-menu-item:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text-primary);
}
.history-menu-item.danger { color: #ff4444; }
.history-menu-item.danger:hover { background: rgba(255,60,60,0.1); color: #ff6b6b; }
.history-menu-icon { font-size: 15px; width: 20px; text-align: center; flex-shrink: 0; }



/* ── Bin Pane ─────────────────────────────────────────────── */
.bin-pane { border-top: 1px solid var(--border-subtle); padding-top: 0 !important; margin-top: 4px; }
.bin-heading {
  display: flex; align-items: center; gap: 6px;
  cursor: pointer;
  padding: 10px 0 6px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 11px; letter-spacing: 1.5px; font-weight: 600;
  transition: color 0.15s;
  user-select: none;
}
.bin-heading:hover { color: var(--text-secondary); }
.bin-toggle-icon { margin-left: auto; font-size: 14px; transition: transform 0.2s ease; display: inline-block; }
.bin-toggle-icon.open { transform: rotate(90deg); }

.bin-count-badge {
  background: rgba(255,60,60,0.15); color: #ff4444;
  font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 99px;
  border: 1px solid rgba(255,60,60,0.25);
  letter-spacing: 0;
  text-transform: none;
}

.bin-list { overflow: hidden; }

.bin-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  background: rgba(255,60,60,0.04);
  border: 1px solid rgba(255,60,60,0.12);
  border-radius: 8px;
  margin-bottom: 5px;
  transition: var(--transition-fast);
}
.bin-item:hover { background: rgba(255,60,60,0.08); }
.bin-item-info { flex: 1; min-width: 0; }
.bin-item-name {
  font-size: 12px; font-weight: 600; color: var(--text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px;
}
.bin-item-date { font-size: 10px; color: var(--text-muted); }
.bin-item-actions { display: flex; gap: 4px; flex-shrink: 0; }
.btn-bin-restore {
  font-size: 11px; padding: 3px 8px; border-radius: 5px;
  background: rgba(0,208,108,0.1); color: var(--green);
  border: 1px solid rgba(0,208,108,0.2); cursor: pointer; font-weight: 600;
  transition: var(--transition-fast); white-space: nowrap;
}
.btn-bin-restore:hover { background: rgba(0,208,108,0.2); }
.btn-bin-perm-del {
  width: 22px; height: 22px; border-radius: 5px; border: none;
  background: rgba(255,60,60,0.12); color: #ff4444; font-size: 12px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: var(--transition-fast);
}
.btn-bin-perm-del:hover { background: rgba(255,60,60,0.28); color: #ff6b6b; }



/* ── In-Progress Pane ─────────────────────────────────────── */
.in-progress-pane { flex: 0 0 auto !important; overflow-y: visible !important; }
.in-progress-list { flex: none !important; }

.in-progress-heading {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
  font-weight: 600;
}
.in-progress-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  animation: pulse-dot 2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.inprogress-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  background: rgba(0, 102, 255, 0.06);
  border: 1px solid rgba(0, 102, 255, 0.18);
  border-radius: 10px;
  margin-bottom: 6px;
  transition: var(--transition-fast);
}
.inprogress-item:hover {
  background: rgba(0, 102, 255, 0.11);
  border-color: rgba(0, 102, 255, 0.35);
}
.inprogress-info { flex: 1; min-width: 0; }
.inprogress-company {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}
.inprogress-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}
.inprogress-status {
  font-size: 10px;
  color: var(--accent-light);
  background: rgba(0, 102, 255, 0.12);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 500;
  white-space: nowrap;
}
.inprogress-date {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
}
.inprogress-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.btn-resume {
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}
.btn-resume:hover { background: var(--accent-light); }
.btn-job-stop,
.btn-job-delete {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 11px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: var(--transition-fast);
  flex-shrink: 0;
}
.btn-job-stop {
  background: rgba(255, 160, 0, 0.12);
  color: #ffa500;
}
.btn-job-stop:hover {
  background: rgba(255, 160, 0, 0.25);
  color: #ffb733;
}
.btn-job-stop:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-job-delete {
  background: rgba(255, 60, 60, 0.12);
  color: #ff4444;
}
.btn-job-delete:hover {
  background: rgba(255, 60, 60, 0.25);
  color: #ff6666;
}
.btn-job-delete:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Main Content ──────────────────────────────────────────── */
.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px;
  background: var(--bg-primary);
  position: relative;
  display: flex;
  flex-direction: column;
}

.main-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-bottom: 20px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border-subtle);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.header-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--accent-light);
  background: var(--blue-bg);
  border: 1px solid rgba(0,102,255,0.25);
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
}
.user-email { font-size: 13px; color: var(--text-muted); font-weight: 500; }

/* ── Wizard ────────────────────────────────────────────────── */
.wizard-section { max-width: 680px; margin: 0 auto; }

.wizard-steps-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 44px;
}

.wizard-step-indicator {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  position: relative; z-index: 2;
}

.step-num {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg-card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: var(--text-muted);
  transition: var(--transition);
}
.wizard-step-indicator span {
  font-size: 11px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1px; transition: var(--transition);
}
.wizard-step-indicator.active .step-num {
  background: var(--accent); border-color: var(--accent); color: white;
  box-shadow: 0 0 20px rgba(0,102,255,0.5);
}
.wizard-step-indicator.active span { color: var(--text-primary); }
.wizard-step-indicator.passed .step-num {
  background: var(--blue-bg); border-color: rgba(0,102,255,0.4); color: var(--accent-light);
}
.wizard-step-indicator.passed span { color: var(--text-secondary); }

.wizard-step-line {
  flex: 1; height: 1px; background: var(--border);
  margin: 0 10px; margin-bottom: 24px; position: relative; z-index: 1;
  transition: background 0.4s;
}
.wizard-step-line.active { background: var(--accent); box-shadow: 0 0 8px rgba(0,102,255,0.4); }

.wizard-panel { display: none; animation: fadeIn 0.3s var(--ease-out); }
.wizard-panel.active { display: block; }

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

.wizard-panel h2 {
  font-size: 28px; font-weight: 800; margin-bottom: 8px;
  letter-spacing: -0.04em; color: var(--text-primary);
}
.wizard-panel .subtitle { color: var(--text-muted); margin-bottom: 32px; font-size: 15px; }

.wizard-actions {
  display: flex; justify-content: space-between; margin-top: 40px;
  padding-top: 24px; border-top: 1px solid var(--border-subtle);
}

/* Dropzone */
.dropzone {
  border: 1px dashed rgba(0,102,255,0.3); border-radius: var(--radius-lg);
  padding: 52px 32px; background: var(--bg-card);
  transition: var(--transition); cursor: pointer; position: relative; overflow: hidden; text-align: center;
}
.dropzone::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(0,102,255,0.05) 0%, transparent 70%);
  pointer-events: none;
}
.dropzone:hover,
.dropzone.dragover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  box-shadow: 0 0 0 3px var(--accent-glow), inset 0 0 60px rgba(0,102,255,0.04);
}
.dropzone-icon {
  width: 60px; height: 60px; margin: 0 auto 20px;
  background: var(--blue-bg); border: 1px solid rgba(0,102,255,0.2);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center; font-size: 26px;
}
.dropzone h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; letter-spacing: -0.02em; }
.dropzone p { color: var(--text-muted); font-size: 13px; }
.dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* File List */
.file-list { margin-top: 20px; }
.file-item {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  background: var(--blue-bg); border: 1px solid rgba(0,102,255,0.15);
  border-radius: var(--radius); margin-bottom: 8px; font-size: 14px;
}
.file-item .file-name { flex: 1; font-weight: 500; color: var(--text-primary); }
.file-item .file-size { color: var(--text-muted); font-size: 12px; }
.file-remove {
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; font-size: 16px; border-radius: 4px; padding: 2px 6px;
  transition: var(--transition-fast);
}
.file-remove:hover { color: var(--red); background: var(--red-bg); }

/* Options Grid */
.options-grid { display: flex; flex-direction: column; gap: 10px; }

.option-card { display: block; position: relative; cursor: pointer; }
.option-card input { position: absolute; opacity: 0; }

.option-body {
  display: flex; align-items: center; padding: 16px 20px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  transition: var(--transition-fast);
}
.option-card:hover .option-body { background: var(--bg-card-hover); border-color: rgba(255,255,255,0.12); }
.option-card input:checked + .option-body {
  border-color: rgba(0,102,255,0.5);
  background: rgba(0,102,255,0.06);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.option-card input:checked + .option-body::after {
  content: '✓'; position: absolute; right: 20px;
  color: var(--accent-light); font-weight: 700; font-size: 16px;
}
.option-icon { font-size: 22px; margin-right: 16px; width: 32px; text-align: center; }
.option-label { font-weight: 600; font-size: 14px; color: var(--text-primary); flex: 1; }
.option-desc { font-size: 13px; color: var(--text-muted); flex: 2; }

/* Review Card */
.review-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  box-shadow: var(--shadow);
}
.review-row { display: flex; padding: 12px 0; border-bottom: 1px solid var(--border-subtle); }
.review-row:last-child { border-bottom: none; }
.review-label { width: 140px; font-weight: 500; color: var(--text-muted); font-size: 13px; }
.review-value { flex: 1; font-weight: 500; color: var(--text-primary); font-size: 14px; }

/* ── Progress Section ──────────────────────────────────────── */
.progress-section { max-width: 600px; margin: 40px auto; }
.progress-header { text-align: center; margin-bottom: 40px; }
.progress-header h2 { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.progress-header p { color: var(--text-secondary); }

.progress-steps { display: flex; flex-direction: column; gap: 8px; }

.progress-step {
  display: flex; align-items: center; gap: 16px; padding: 14px 18px;
  background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius);
  transition: var(--transition);
}
.progress-step.active {
  border-color: rgba(0,102,255,0.4);
  background: rgba(0,102,255,0.06);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.progress-step.done {
  border-color: rgba(0,208,108,0.15);
  background: var(--bg-card);
}

.step-indicator {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; flex-shrink: 0; transition: var(--transition);
}
.step-indicator.pending { background: var(--bg-secondary); border: 1px solid var(--border); color: var(--text-muted); }
.step-indicator.active { background: var(--blue-bg); border: 1.5px solid var(--accent); color: var(--accent-light); animation: pulsate 1.5s infinite; }
.step-indicator.done { background: var(--green-bg); border: 1.5px solid var(--green); color: var(--green); }

.step-text { flex: 1; }
.step-label { font-weight: 600; font-size: 14px; color: var(--text-primary); }
.step-detail { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

@keyframes pulsate {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,102,255,0.4); }
  50%       { box-shadow: 0 0 0 8px rgba(0,102,255,0); }
}

.spinner {
  width: 15px; height: 15px;
  border: 2px solid rgba(0,102,255,0.2); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.55s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Results Section ───────────────────────────────────────── */
#resultsSection { max-width: 900px; margin: 0 auto 48px; }

.results-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px;
}
.results-header h2 { font-size: 28px; font-weight: 800; letter-spacing: -0.04em; }
.results-actions { display: flex; gap: 10px; }

/* Verdict Card */
.verdict-card {
  text-align: center; padding: 44px; border-radius: var(--radius-xl);
  background: var(--bg-card); border: 1px solid var(--border);
  margin-bottom: 24px; position: relative; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.verdict-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
}
.verdict-card.buy::before  { background: linear-gradient(90deg, var(--green), #00ff88); }
.verdict-card.hold::before { background: linear-gradient(90deg, #e59f00, var(--warning)); }
.verdict-card.sell::before,
.verdict-card.avoid::before { background: linear-gradient(90deg, #cc2200, var(--red)); }

/* Ambient glow beneath header line */
.verdict-card::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 200px;
  pointer-events: none;
}
.verdict-card.buy::after  { background: radial-gradient(ellipse 60% 30% at 50% 0%, rgba(0,208,108,0.08) 0%, transparent 80%); }
.verdict-card.hold::after { background: radial-gradient(ellipse 60% 30% at 50% 0%, rgba(255,184,0,0.08) 0%, transparent 80%); }
.verdict-card.sell::after,
.verdict-card.avoid::after { background: radial-gradient(ellipse 60% 30% at 50% 0%, rgba(255,59,59,0.08) 0%, transparent 80%); }

.verdict-label {
  font-size: 11px; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 2px; font-weight: 600;
}
.verdict-value {
  font-size: 64px; font-weight: 900; letter-spacing: -0.04em; margin: 16px 0;
  line-height: 1;
}
.verdict-value.buy  { color: var(--green); text-shadow: 0 0 40px rgba(0,208,108,0.3); }
.verdict-value.hold { color: var(--warning); text-shadow: 0 0 40px rgba(255,184,0,0.3); }
.verdict-value.sell,
.verdict-value.avoid { color: var(--red); text-shadow: 0 0 40px rgba(255,59,59,0.3); }

.verdict-meta { display: flex; justify-content: center; gap: 48px; margin-top: 28px; }
.v-meta-item { text-align: center; }
.v-meta-item .label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.v-meta-item .value { font-size: 16px; font-weight: 700; margin-top: 6px; letter-spacing: -0.02em; }

/* Section Cards */
.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 20px;
  transition: var(--transition-fast);
  box-shadow: var(--shadow);
}
.section-card:hover { border-color: rgba(255,255,255,0.1); }
.section-card h3 {
  font-size: 17px; font-weight: 700; margin-bottom: 20px;
  display: flex; align-items: center; gap: 8px; letter-spacing: -0.02em;
}
.section-card h3 .icon { font-size: 20px; }

.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.info-item {
  padding: 16px; background: var(--bg-secondary); border-radius: 12px;
  border: 1px solid var(--border-subtle);
}
.info-item .label {
  font-size: 11px; color: var(--text-muted); text-transform: uppercase;
  font-weight: 600; letter-spacing: 0.5px;
}
.info-item .value { font-size: 14px; font-weight: 500; margin-top: 8px; color: var(--text-primary); }

/* Excel / Data Table */
.excel-table-container {
  overflow-x: auto;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.excel-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.84rem; color: var(--text-primary);
}
.excel-table th,
.excel-table td { border: 1px solid var(--border-subtle); padding: 9px 14px; text-align: left; }
.excel-table th {
  background-color: var(--bg-secondary); font-weight: 600;
  position: sticky; top: 0; z-index: 10;
  text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.06em;
  color: var(--text-muted);
}
.excel-table tr:nth-child(even) { background-color: rgba(255,255,255,0.015); }
.excel-table tr:hover td { background-color: rgba(0,102,255,0.05) !important; }

.status-pass    { color: var(--success); font-weight: 600; }
.status-caution { color: var(--warning); font-weight: 600; }
.status-fail    { color: var(--danger);  font-weight: 600; }

/* Badges */
.badge {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-block;
  letter-spacing: 0.02em;
}
.badge-green, .badge-success { background: var(--green-bg); color: var(--green); }
.badge-orange, .badge-warning { background: var(--orange-bg); color: var(--warning); }
.badge-red, .badge-danger { background: var(--red-bg); color: var(--red); }
.badge-blue { background: var(--blue-bg); color: var(--accent-light); }

/* Bullet List */
.bullet-list { list-style: none; }
.bullet-list li {
  padding: 8px 0 8px 22px; position: relative;
  font-size: 14px; color: var(--text-secondary); line-height: 1.65;
}
.bullet-list li::before {
  content: ''; position: absolute; left: 0; top: 16px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
}

/* Split View Progress / Validation */
.progress-split-layout {
  display: flex; gap: 20px;
  height: calc(100vh - 160px);
  overflow: hidden; width: 100%;
}
.progress-left-pane {
  flex: 1; display: flex; flex-direction: column;
  overflow-y: auto; padding-right: 8px;
}
.validation-right-pane {
  flex: 2; display: flex; flex-direction: column;
  background: var(--bg-card); border-radius: var(--radius-lg);
  border: 1px solid var(--border); padding: 24px;
  box-shadow: var(--shadow); overflow: hidden;
}

.projection-upload-card {
  border: 1px dashed rgba(0,102,255,0.3);
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 20px;
}
.projection-help { font-size: 13px; color: var(--text-muted); margin-top: 10px; }

.field-cell { display: flex; flex-direction: column; gap: 6px; }

.source-btn {
  align-self: flex-start; padding: 4px 10px;
  border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text-muted);
  font-size: 11px; font-weight: 600; cursor: pointer;
  transition: var(--transition-fast);
}
.source-btn:hover { border-color: var(--accent); color: var(--accent-light); }

/* Risk Items */
.risk-item {
  padding: 16px; background: var(--bg-secondary);
  border-radius: 12px; margin-bottom: 10px; border-left: 3px solid var(--text-muted);
}
.risk-item.high   { border-left-color: var(--red); }
.risk-item.medium { border-left-color: var(--warning); }
.risk-item.low    { border-left-color: var(--green); }
.risk-header { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.risk-category { font-weight: 600; font-size: 14px; color: var(--text-primary); }
.risk-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.55; }
.risk-mitigation {
  font-size: 13px; color: var(--text-muted); margin-top: 8px; font-style: italic;
  background: rgba(255,255,255,0.03); padding: 8px 12px; border-radius: 6px;
  border-left: 2px solid var(--border);
}

.summary-text { font-size: 15px; line-height: 1.85; color: var(--text-secondary); }

/* ── Modals & Toasts ───────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center; z-index: 100;
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 36px;
  width: 440px; max-width: 92vw;
  box-shadow: var(--shadow-lg);
  animation: fadeIn 0.25s var(--ease-out);
  position: relative;
}
.modal::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,102,255,0.5), transparent);
}
.source-modal { width: min(920px, 92vw); }
.modal h3 { font-size: 18px; font-weight: 700; margin-bottom: 12px; letter-spacing: -0.03em; }
.modal p { color: var(--text-secondary); font-size: 14px; margin-bottom: 24px; }
.modal-actions { display: flex; gap: 12px; margin-top: 24px; justify-content: flex-end; }

.source-image-container {
  min-height: 220px; max-height: 70vh; overflow: auto;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--bg-secondary); display: flex;
  align-items: center; justify-content: center; padding: 12px;
}
.source-image-container img { max-width: 100%; height: auto; border-radius: 8px; }

.toast {
  position: fixed; bottom: 32px; right: 32px;
  padding: 14px 24px; border-radius: 12px;
  font-size: 14px; font-weight: 600; z-index: 200;
  transform: translateY(100px); opacity: 0;
  transition: all 0.35s var(--ease-spring);
  backdrop-filter: blur(12px);
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success {
  background: rgba(0,208,108,0.15);
  color: var(--green);
  border: 1px solid rgba(0,208,108,0.3);
  box-shadow: 0 8px 32px rgba(0,208,108,0.15);
}
.toast.error {
  background: rgba(255,59,59,0.15);
  color: var(--red);
  border: 1px solid rgba(255,59,59,0.3);
  box-shadow: 0 8px 32px rgba(255,59,59,0.15);
}

/* ── Step Detail Inspector ─────────────────────────────────── */
.step-clickable {
  cursor: pointer;
  border-radius: var(--radius);
  transition: var(--transition-fast);
  position: relative;
}
.step-clickable:hover { background: rgba(255,255,255,0.04); }
.step-clickable:hover .step-inspect-hint { opacity: 1; }
.step-clickable.step-selected {
  background: rgba(0,102,255,0.07);
  outline: 1px solid rgba(0,102,255,0.3);
}

.step-inspect-hint {
  position: absolute; right: 14px; top: 50%;
  transform: translateY(-50%);
  font-size: 16px; color: var(--accent-light);
  opacity: 0; transition: opacity 0.15s; pointer-events: none;
}

.step-detail-panel {
  margin-top: 12px;
  border: 1px solid rgba(0,102,255,0.3);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: 0 -4px 24px rgba(0,102,255,0.12), 0 0 0 4px rgba(0,102,255,0.06);
  animation: fadeSlideIn 0.2s var(--ease-out);
  overflow: hidden;
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.step-detail-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px;
  background: rgba(0,102,255,0.06);
  border-bottom: 1px solid rgba(0,102,255,0.15);
}

.step-detail-content {
  padding: 16px;
  max-height: 300px;
  overflow-y: auto;
}

/* ── Scrollbar Styling ─────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }
html[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); }
html[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.22); }

/* ── Selection ─────────────────────────────────────────────── */
::selection { background: var(--accent-glow); color: var(--text-primary); }


/* ════════════════════════════════════════════════════════════
   APPLE HIG — LIGHT MODE  (data-theme="light")
   "Premium white space · SF Pro · Cinematic imagery"
   ════════════════════════════════════════════════════════════ */
html[data-theme="light"] {
  /* Surfaces */
  --bg-primary:       #ffffff;
  --bg-secondary:     #f5f5f7;
  --bg-card:          #ffffff;
  --bg-card-hover:    #f5f5f7;

  /* Text — Apple's exact dark system label colors */
  --text-primary:     #1d1d1f;
  --text-secondary:   #6e6e73;
  --text-muted:       #aeaeb2;

  /* Accent — Apple's macOS / web blue */
  --accent:           #0071e3;
  --accent-light:     #147ce5;
  --accent-dim:       #0058b0;
  --accent-glow:      rgba(0, 113, 227, 0.14);
  --accent-glow-lg:   rgba(0, 113, 227, 0.22);

  /* Borders — Apple uses very subtle separators */
  --border:           rgba(0, 0, 0, 0.10);
  --border-subtle:    rgba(0, 0, 0, 0.06);
  --border-active:    rgba(0, 113, 227, 0.45);

  /* Sidebar */
  --sidebar-bg:       #f5f5f7;
  --sidebar-text:     #86868b;
  --sidebar-active:   rgba(0, 113, 227, 0.08);

  /* Semantic — Apple system colors */
  --success:          #34c759;
  --green:            #34c759;
  --green-bg:         rgba(52, 199, 89, 0.10);
  --warning:          #ff9f0a;
  --orange:           #ff9500;
  --orange-bg:        rgba(255, 149, 0, 0.10);
  --danger:           #ff3b30;
  --red:              #ff3b30;
  --red-bg:           rgba(255, 59, 48, 0.10);
  --blue:             #0071e3;
  --blue-bg:          rgba(0, 113, 227, 0.07);

  /* Depth — Apple's signature featherweight shadows */
  --shadow:           0 1px 0 rgba(0,0,0,0.04), 0 4px 20px rgba(0,0,0,0.06);
  --shadow-lg:        0 1px 0 rgba(0,0,0,0.04), 0 20px 60px rgba(0,0,0,0.10);
  --shadow-blue:      0 0 0 1px rgba(0,113,227,0.3), 0 4px 16px rgba(0,113,227,0.14);
}

/* ── Light mode body base ──────────────────────────────────── */
html[data-theme="light"] body {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  font-family: -apple-system, 'SF Pro Display', 'SF Pro Text', 'Inter', system-ui, sans-serif;
}

/* ── Light mode headings ───────────────────────────────────── */
html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] h4 {
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

/* ── Light mode form inputs ─────────────────────────────────── */
html[data-theme="light"] .form-group input,
html[data-theme="light"] .form-group textarea {
  background: #ffffff;
  border-color: rgba(0,0,0,0.12);
  color: var(--text-primary);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04) inset;
}
html[data-theme="light"] .form-group input:focus,
html[data-theme="light"] .form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow), 0 1px 2px rgba(0,0,0,0.04) inset;
  background: #ffffff;
}
html[data-theme="light"] .form-input {
  background: #ffffff;
  border-color: rgba(0,0,0,0.12);
  color: var(--text-primary);
}

/* ── Light mode buttons ─────────────────────────────────────── */
html[data-theme="light"] .btn-primary {
  box-shadow: 0 1px 0 rgba(0,0,0,0.08), 0 4px 16px rgba(0,113,227,0.25);
}
html[data-theme="light"] .btn-primary:hover {
  box-shadow: 0 1px 0 rgba(0,0,0,0.08), 0 8px 24px rgba(0,113,227,0.32);
}
html[data-theme="light"] .btn-ghost {
  border-color: rgba(0,0,0,0.15);
  color: var(--text-secondary);
}
html[data-theme="light"] .btn-ghost:hover {
  background: rgba(0,0,0,0.04);
  color: var(--text-primary);
  border-color: rgba(0,0,0,0.2);
}

/* ── Light mode auth card ──────────────────────────────────── */
html[data-theme="light"] .auth-screen {
  background: var(--bg-secondary);
  background-image: radial-gradient(ellipse 70% 40% at 50% -5%, rgba(0,113,227,0.08) 0%, transparent 70%);
}
html[data-theme="light"] .auth-card {
  background: #ffffff;
  border-color: rgba(0,0,0,0.08);
  box-shadow: 0 2px 0 rgba(0,0,0,0.04), 0 24px 64px rgba(0,0,0,0.08);
}
html[data-theme="light"] .auth-card::before {
  background: linear-gradient(90deg, transparent, rgba(0,113,227,0.4), transparent);
}
html[data-theme="light"] .auth-logo .logo-icon {
  box-shadow: 0 2px 8px rgba(0,113,227,0.28);
}

/* ── Light mode sidebar ────────────────────────────────────── */
html[data-theme="light"] .sidebar {
  border-right-color: rgba(0,0,0,0.08);
}
html[data-theme="light"] .nav-link:hover {
  background: rgba(0,0,0,0.05);
  color: var(--text-primary);
}
html[data-theme="light"] .sidebar-collapse-btn {
  background: #ffffff;
  border-color: rgba(0,0,0,0.12);
}
html[data-theme="light"] .sidebar-collapse-btn:hover {
  background: var(--blue-bg);
  border-color: rgba(0,113,227,0.25);
  color: var(--accent);
}
html[data-theme="light"] .sidebar-search input {
  background: #ffffff;
  border-color: rgba(0,0,0,0.1);
}
html[data-theme="light"] .history-item:hover {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.08);
}
html[data-theme="light"] .history-item.active {
  background: var(--sidebar-active);
  border-color: rgba(0,113,227,0.2);
}
html[data-theme="light"] .inprogress-item {
  background: rgba(0, 113, 227, 0.05);
  border-color: rgba(0, 113, 227, 0.18);
}
html[data-theme="light"] .inprogress-item:hover {
  background: rgba(0, 113, 227, 0.10);
  border-color: rgba(0, 113, 227, 0.35);
}
html[data-theme="light"] .inprogress-status {
  background: rgba(0, 113, 227, 0.10);
  color: var(--accent);
}
html[data-theme="light"] .btn-job-stop {
  background: rgba(200, 120, 0, 0.10);
  color: #c07800;
}
html[data-theme="light"] .btn-job-stop:hover {
  background: rgba(200, 120, 0, 0.20);
}
html[data-theme="light"] .btn-job-delete {
  background: rgba(200, 30, 30, 0.10);
  color: #cc2222;
}
html[data-theme="light"] .btn-job-delete:hover {
  background: rgba(200, 30, 30, 0.20);
}

/* ── Light mode main content ───────────────────────────────── */
html[data-theme="light"] .main-content {
  background: var(--bg-secondary);
}
html[data-theme="light"] .main-header {
  border-bottom-color: rgba(0,0,0,0.07);
}
html[data-theme="light"] .header-badge {
  color: var(--accent);
  background: var(--blue-bg);
  border-color: rgba(0,113,227,0.2);
}

/* ── Light mode wizard ─────────────────────────────────────── */
html[data-theme="light"] .dropzone {
  background: #ffffff;
  border-color: rgba(0,113,227,0.2);
}
html[data-theme="light"] .dropzone:hover,
html[data-theme="light"] .dropzone.dragover {
  background: #f5f5f7;
  box-shadow: 0 0 0 3px var(--accent-glow);
}
html[data-theme="light"] .dropzone-icon {
  background: var(--blue-bg);
  border-color: rgba(0,113,227,0.15);
}
html[data-theme="light"] .file-item {
  background: var(--blue-bg);
  border-color: rgba(0,113,227,0.12);
}
html[data-theme="light"] .option-body {
  background: #ffffff;
  border-color: rgba(0,0,0,0.1);
}
html[data-theme="light"] .option-card:hover .option-body {
  background: #f5f5f7;
  border-color: rgba(0,0,0,0.15);
}
html[data-theme="light"] .option-card input:checked + .option-body {
  border-color: var(--accent);
  background: rgba(0,113,227,0.05);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
html[data-theme="light"] .review-card {
  background: #ffffff;
  border-color: rgba(0,0,0,0.08);
}
html[data-theme="light"] .review-row { border-bottom-color: rgba(0,0,0,0.06); }
html[data-theme="light"] .wizard-actions { border-top-color: rgba(0,0,0,0.07); }

/* ── Light mode progress steps ──────────────────────────────── */
html[data-theme="light"] .progress-step {
  background: #ffffff;
  border-color: rgba(0,0,0,0.08);
}
html[data-theme="light"] .progress-step.active {
  background: rgba(0,113,227,0.04);
  border-color: rgba(0,113,227,0.35);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
html[data-theme="light"] .progress-step.done {
  background: #ffffff;
  border-color: rgba(52,199,89,0.2);
}
html[data-theme="light"] .step-indicator.pending {
  background: var(--bg-secondary);
  border-color: rgba(0,0,0,0.1);
}
html[data-theme="light"] .step-clickable:hover { background: rgba(0,0,0,0.03); }
html[data-theme="light"] .step-clickable.step-selected {
  background: rgba(0,113,227,0.05);
  outline-color: rgba(0,113,227,0.25);
}
html[data-theme="light"] .step-detail-panel {
  border-color: rgba(0,113,227,0.2);
  background: rgba(0,113,227,0.03);
  box-shadow: 0 0 0 3px rgba(0,113,227,0.05), var(--shadow);
}
html[data-theme="light"] .step-detail-header {
  background: rgba(0,113,227,0.04);
  border-bottom-color: rgba(0,113,227,0.1);
}

/* ── Light mode results ─────────────────────────────────────── */
html[data-theme="light"] .section-card {
  background: #ffffff;
  border-color: rgba(0,0,0,0.08);
}
html[data-theme="light"] .section-card:hover { border-color: rgba(0,0,0,0.13); }
html[data-theme="light"] .verdict-card {
  background: #ffffff;
  border-color: rgba(0,0,0,0.08);
}
html[data-theme="light"] .info-item {
  background: var(--bg-secondary);
  border-color: rgba(0,0,0,0.06);
}
html[data-theme="light"] .risk-item { background: #f5f5f7; }
html[data-theme="light"] .risk-mitigation {
  background: rgba(0,0,0,0.03);
  border-left-color: rgba(0,0,0,0.1);
}
html[data-theme="light"] .bullet-list li::before { background: var(--accent); }

/* ── Light mode tables ──────────────────────────────────────── */
html[data-theme="light"] .excel-table-container {
  border-color: rgba(0,0,0,0.08);
  background: #ffffff;
}
html[data-theme="light"] .excel-table th { background: var(--bg-secondary); }
html[data-theme="light"] .excel-table th,
html[data-theme="light"] .excel-table td { border-color: rgba(0,0,0,0.06); }
html[data-theme="light"] .excel-table tr:nth-child(even) { background: rgba(0,0,0,0.015); }
html[data-theme="light"] .excel-table tr:hover td { background: rgba(0,113,227,0.04) !important; }

/* ── Light mode validation pane ─────────────────────────────── */
html[data-theme="light"] .validation-right-pane {
  background: #ffffff;
  border-color: rgba(0,0,0,0.08);
}
html[data-theme="light"] .projection-upload-card {
  background: var(--bg-secondary);
  border-color: rgba(0,113,227,0.2);
}
html[data-theme="light"] .source-btn {
  background: #ffffff;
  border-color: rgba(0,0,0,0.1);
  color: var(--text-secondary);
}
html[data-theme="light"] .source-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Light mode modals ──────────────────────────────────────── */
html[data-theme="light"] .modal-overlay { background: rgba(0,0,0,0.45); }
html[data-theme="light"] .modal {
  background: #ffffff;
  border-color: rgba(0,0,0,0.08);
  box-shadow: 0 2px 0 rgba(0,0,0,0.04), 0 32px 80px rgba(0,0,0,0.14);
}
html[data-theme="light"] .modal::before {
  background: linear-gradient(90deg, transparent, rgba(0,113,227,0.35), transparent);
}
html[data-theme="light"] .source-image-container {
  background: var(--bg-secondary);
  border-color: rgba(0,0,0,0.08);
}

/* ── Light mode toasts ──────────────────────────────────────── */
html[data-theme="light"] .toast.success {
  background: rgba(52,199,89,0.12);
  color: #1a8c3a;
  border-color: rgba(52,199,89,0.25);
  box-shadow: 0 4px 20px rgba(52,199,89,0.12);
}
html[data-theme="light"] .toast.error {
  background: rgba(255,59,48,0.10);
  color: #cc1a12;
  border-color: rgba(255,59,48,0.22);
  box-shadow: 0 4px 20px rgba(255,59,48,0.10);
}

/* ── Light mode spinner / pulse ─────────────────────────────── */
html[data-theme="light"] .spinner {
  border-color: rgba(0,113,227,0.2);
  border-top-color: var(--accent);
}


/* ════════════════════════════════════════════════════════════
   THEME TOGGLE PILL — Modern Sun / Moon Switcher
   ════════════════════════════════════════════════════════════ */
.theme-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  user-select: none;
  padding: 4px 6px;
  border-radius: 999px;
  transition: background 0.2s;
}
.theme-toggle-wrap:hover { background: rgba(128,128,128,0.08); }

.theme-toggle-icon {
  font-size: 13px;
  line-height: 1;
  display: flex;
  align-items: center;
  transition: opacity 0.25s;
}
.theme-icon-sun  { opacity: 0.5; }
.theme-icon-moon { opacity: 0.5; }

/* In light mode: sun is active */
html[data-theme="light"] .theme-icon-sun  { opacity: 1; }
html[data-theme="light"] .theme-icon-moon { opacity: 0.4; }

/* In dark mode: moon is active */
html[data-theme="dark"] .theme-icon-sun  { opacity: 0.4; }
html[data-theme="dark"] .theme-icon-moon { opacity: 1; }

.theme-toggle-track {
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: rgba(120, 120, 128, 0.25);
  border: 1px solid rgba(120, 120, 128, 0.18);
  transition: background 0.3s ease, border-color 0.3s ease;
  flex-shrink: 0;
}

html[data-theme="dark"] .theme-toggle-track {
  background: var(--accent);
  border-color: rgba(0,102,255,0.4);
}
html[data-theme="light"] .theme-toggle-track {
  background: rgba(120, 120, 128, 0.22);
  border-color: rgba(0,0,0,0.1);
}

.theme-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
html[data-theme="dark"] .theme-toggle-thumb {
  transform: translateX(18px);
  background: #ffffff;
}
html[data-theme="light"] .theme-toggle-thumb {
  transform: translateX(0px);
  background: #ffffff;
}
