@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

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

:root {
  --bg: #f5f5f7;
  --white: #ffffff;
  --border: rgba(0,0,0,0.07);
  --border2: rgba(0,0,0,0.12);
  --text: #1d1d1f;
  --muted: #6e6e73;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-dim: rgba(0,113,227,0.08);
  --green: #30d158;
  --green-dim: rgba(48,209,88,0.1);
  --red: #ff453a;
  --red-dim: rgba(255,69,58,0.1);
  --yellow: #ff9f0a;
  --yellow-dim: rgba(255,159,10,0.1);
  --cyan: #32ade6;
  --surface: var(--white);
  --surface2: var(--bg);
  --sidebar-w: 240px;
  --sidebar-collapsed: 64px;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}


/* ── GRADIENT TOP BAR ── */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #0071e3, #32ade6, #30d158, #0071e3);
  background-size: 200% 100%;
  animation: top-bar-slide 4s linear infinite;
  z-index: 999;
}
@keyframes top-bar-slide {
  0%   { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

/* ── BACKGROUND ORBS ── */
.bg-orb {
  position: fixed; border-radius: 50%; pointer-events: none; z-index: 0;
}
.bg-orb-1 {
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(0,113,227,0.055) 0%, transparent 70%);
  top: -200px; right: -200px;
  animation: orb-drift 20s ease-in-out infinite;
}
.bg-orb-2 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(50,173,230,0.04) 0%, transparent 70%);
  bottom: -100px; left: 100px;
  animation: orb-drift 26s ease-in-out infinite reverse;
}
@keyframes orb-drift {
  0%,100% { transform: translate(0,0); }
  33%     { transform: translate(-40px, 30px); }
  66%     { transform: translate(30px, -20px); }
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px) scale(0.99); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.fade-up { opacity: 0; animation: fadeUp 0.7s var(--ease) forwards; }
.d1 { animation-delay: 0.05s; } .d2 { animation-delay: 0.15s; }
.d3 { animation-delay: 0.25s; } .d4 { animation-delay: 0.35s; }
.d5 { animation-delay: 0.45s; } .d6 { animation-delay: 0.55s; }

/* ── LAYOUT ── */
.layout { display: flex; min-height: 100vh; position: relative; z-index: 1; }

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-w);
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 28px 0 24px;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: width 0.3s var(--ease);
  overflow: hidden;
}
.sidebar.collapsed { width: var(--sidebar-collapsed); }

/* ── TOGGLE BUTTON ── */
.sidebar-toggle {
  position: absolute;
  top: 22px; right: -14px;
  width: 28px; height: 28px;
  background: var(--accent);
  border: 2px solid white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,113,227,0.4);
  transition: all 0.2s var(--ease);
  z-index: 10;
  color: white;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
.sidebar-toggle:hover { background: var(--accent-hover); transform: scale(1.12); box-shadow: 0 4px 16px rgba(0,113,227,0.5); }
.sidebar.collapsed .sidebar-toggle { right: -14px; }

/* ── BRAND ── */
.sidebar-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 0 14px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
  white-space: nowrap;
  min-width: var(--sidebar-w);
}
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--text);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.brand-mark svg { width: 20px; height: 20px; }
.brand-text { overflow: hidden; transition: opacity 0.2s var(--ease), width 0.3s var(--ease); }
.brand-name { font-size: 14px; font-weight: 700; color: var(--text); letter-spacing: -0.3px; white-space: nowrap; }
.brand-sub  { font-size: 11px; color: var(--muted); margin-top: 1px; white-space: nowrap; }
.sidebar.collapsed .brand-text { opacity: 0; width: 0; }

/* ── NAV ── */
.sidebar-nav { flex: 1; padding: 0 10px; display: flex; flex-direction: column; gap: 2px; }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px;
  border-radius: 10px;
  color: var(--muted); text-decoration: none;
  font-size: 13.5px; font-weight: 500;
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
  white-space: nowrap;
  min-width: calc(var(--sidebar-w) - 20px);
  position: relative;
}
.nav-item:hover { background: rgba(0,0,0,0.04); color: var(--text); }
.nav-item.active { background: rgba(0,113,227,0.08); color: var(--accent); font-weight: 600; }

.nav-icon {
  width: 32px; height: 32px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0;
  background: rgba(0,0,0,0.04);
  transition: background 0.2s;
}
.nav-item.active .nav-icon { background: rgba(0,113,227,0.1); }
.nav-label { transition: opacity 0.15s var(--ease); }
.sidebar.collapsed .nav-label { opacity: 0; }

/* Tooltip on collapsed */
.nav-item[data-tip] { position: relative; }
.sidebar.collapsed .nav-item[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute;
  left: calc(var(--sidebar-collapsed) - 4px);
  top: 50%; transform: translateY(-50%);
  background: var(--text);
  color: white;
  font-size: 12px; font-weight: 500;
  padding: 6px 12px; border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 200;
  animation: fadeUp 0.15s var(--ease) forwards;
}

/* ── SIDEBAR FOOTER ── */
.sidebar-footer {
  padding: 16px 10px 0;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; border-radius: 12px;
  background: rgba(0,0,0,0.03);
  cursor: pointer; transition: background 0.2s;
  white-space: nowrap;
  min-width: calc(var(--sidebar-w) - 20px);
}
.user-chip:hover { background: rgba(0,0,0,0.06); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #0071e3, #32ade6);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: white; flex-shrink: 0;
}
.user-info { overflow: hidden; transition: opacity 0.15s var(--ease); }
.user-name  { font-size: 12.5px; font-weight: 600; color: var(--text); white-space: nowrap; }
.user-email { font-size: 11px; color: var(--muted); white-space: nowrap; }
.sidebar.collapsed .user-info { opacity: 0; }

/* ── MAIN ── */
.main {
  margin-left: var(--sidebar-w);
  flex: 1; padding: 48px;
  transition: margin-left 0.3s var(--ease);
  position: relative; z-index: 1;
}
.main.collapsed { margin-left: var(--sidebar-collapsed); }

/* ── PAGE HEADER ── */
.page-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 36px;
}
.page-title { font-size: 32px; font-weight: 800; letter-spacing: -0.8px; line-height: 1; }
.page-subtitle { color: var(--muted); font-size: 14px; margin-top: 6px; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 20px; border-radius: 980px; border: none;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all 0.2s var(--ease);
  text-decoration: none; white-space: nowrap;
  letter-spacing: -0.1px; font-family: inherit;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--accent); color: white;
  position: relative; overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute; top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  animation: btn-shimmer 3s ease-in-out infinite;
}
@keyframes btn-shimmer { 0%{left:-100%} 40%{left:160%} 100%{left:160%} }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); box-shadow: 0 4px 20px rgba(0,113,227,0.35); }
.btn-primary:hover:not(:disabled)::after { animation: none; }

.btn-secondary { background: rgba(0,0,0,0.06); color: var(--text); }
.btn-secondary:hover:not(:disabled) { background: rgba(0,0,0,0.1); }

.btn-stop { background: rgba(255,69,58,0.1); color: var(--red); border: none; }
.btn-stop:hover:not(:disabled) { background: rgba(255,69,58,0.18); }

.btn-sm { padding: 7px 14px; font-size: 12.5px; }
.btn-lg { padding: 12px 26px; font-size: 15px; }

/* ── STATUS DOT ── */
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(0,0,0,0.15); flex-shrink: 0; }
.status-dot.running { background: var(--green); box-shadow: 0 0 0 2px rgba(48,209,88,0.25); animation: dp 2s ease infinite; }
@keyframes dp { 0%,100%{opacity:1;}50%{opacity:0.5;} }

/* ── STATS GRID ── */
.stats-grid, .stats-grid-5 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 18px; padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,0.1); }

.stat-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 17px; margin-bottom: 16px; }
.si-accent { background: rgba(0,113,227,0.08); }
.si-green  { background: rgba(48,209,88,0.08); }
.si-cyan   { background: rgba(50,173,230,0.08); }
.si-amber  { background: rgba(255,159,10,0.08); }

.stat-label { font-size: 12px; color: var(--muted); font-weight: 500; margin-bottom: 6px; }
.stat-value { font-size: 36px; font-weight: 800; line-height: 1; letter-spacing: -1.5px; }
.stat-value.accent, .c-accent { color: var(--accent); }
.stat-value.green,  .c-green  { color: #1a7a3a; }
.stat-value.blue { color: var(--cyan); }
.stat-value.red,    .c-red    { color: var(--red); }
.c-amber  { color: #b05000; }
.c-cyan   { color: #0077a4; }

@keyframes num-flip { from{opacity:0;transform:translateY(10px);}to{opacity:1;transform:translateY(0);} }
.stat-value.flip { animation: num-flip 0.3s var(--ease); }

/* ── CONTENT GRID ── */
.content-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 20px; }

/* ── CARDS ── */
.card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 20px; padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.card-header, .card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.card-title { font-size: 15px; font-weight: 700; letter-spacing: -0.2px; }

.pill {
  font-size: 11.5px; font-weight: 600; padding: 4px 12px; border-radius: 980px;
  background: var(--bg); color: var(--muted); transition: all 0.3s;
}
.pill.live { background: rgba(48,209,88,0.1); color: #1a7a3a; }

/* ── LOG PANEL ── */
.log-panel {
  background: var(--bg); border-radius: 12px; padding: 16px;
  height: 220px; overflow-y: auto;
  font-family: 'SF Mono', 'Fira Code', ui-monospace, 'Courier New', monospace;
  font-size: 12px; line-height: 1.9;
  border: 1px solid var(--border);
}
.log-panel::-webkit-scrollbar { width: 4px; }
.log-panel::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 4px; }
.log-line { display: flex; gap: 10px; animation: log-in 0.3s var(--ease) forwards; }
@keyframes log-in { from{opacity:0;transform:translateY(4px);}to{opacity:1;transform:translateY(0);} }
.log-ts      { color: rgba(0,0,0,0.25); flex-shrink: 0; font-size: 11px; }
.log-info    { color: var(--accent); }
.log-success { color: #1a7a3a; }
.log-error   { color: var(--red); }
.log-warn    { color: #b05000; }
.log-muted   { color: var(--muted); }
.log-empty   { color: var(--muted); font-style: italic; }

/* ── JOB LIST ── */
.job-list { display: flex; flex-direction: column; gap: 10px; max-height: 460px; overflow-y: auto; padding-right: 2px; }
.job-list::-webkit-scrollbar { width: 4px; }
.job-list::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 4px; }

.job-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px; cursor: pointer;
  transition: all 0.25s var(--ease);
}
.job-card:hover { background: var(--white); box-shadow: 0 4px 16px rgba(0,0,0,0.08); transform: translateY(-1px); }
.job-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.job-title { font-size: 13.5px; font-weight: 600; letter-spacing: -0.2px; margin-bottom: 3px; }
.job-company { font-size: 12px; color: var(--muted); }
.job-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
.job-meta-item { font-size: 11.5px; color: var(--muted); }
.job-actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }

/* ── INLINE DIAGNOSTICS ── */
.inline-diag { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.mini-score {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 6px; padding: 3px 8px; font-size: 12px; font-weight: 600;
  color: var(--text);
}

/* ── BADGES ── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 980px;
  font-size: 11.5px; font-weight: 600; flex-shrink: 0;
}
.badge-applied, .b-green  { background: rgba(48,209,88,0.1);  color: #1a7a3a; }
.badge-pending, .b-blue   { background: rgba(0,113,227,0.1);  color: var(--accent); }
.badge-failed,  .b-red    { background: rgba(255,69,58,0.1);  color: var(--red); }
.badge-manual, .badge-needs_manual_apply { background: rgba(255,159,10,0.1); color: #b05000; }
.badge-source { background: var(--bg); color: var(--muted); border: 1px solid var(--border); font-weight: 500; text-transform: none; letter-spacing: 0; }

/* ATS bar */
.ats-row   { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.ats-label { font-size: 11px; color: var(--muted); min-width: 26px; }
.ats-track { flex: 1; height: 3px; background: rgba(0,0,0,0.07); border-radius: 100px; overflow: hidden; }
.ats-fill  { height: 100%; border-radius: 100px; background: var(--accent); transition: width 1s var(--ease); }
.ats-pct   { font-size: 11px; color: var(--muted); min-width: 28px; text-align: right; font-weight: 500; }

/* ── EMPTY STATE ── */
.empty, .tab-empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-icon, .tab-empty-icon { font-size: 32px; margin-bottom: 8px; opacity: 0.4; }
.empty-title, .tab-empty-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 4px; opacity: 0.6; }
.empty-sub, .tab-empty-sub { font-size: 13px; }

/* ── FORM ── */
.form-group { margin-bottom: 16px; }
label { display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.03em; }

input[type=text], input[type=email], input[type=tel], input[type=number],
input[type=password], input[type=url], textarea, select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,113,227,0.1);
}
input::placeholder, textarea::placeholder { color: rgba(0,0,0,0.25); }
textarea { resize: vertical; min-height: 90px; line-height: 1.6; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ── FILE UPLOAD ── */
.file-drop {
  border: 2px dashed var(--border2);
  border-radius: 14px;
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg);
}
.file-drop:hover, .file-drop.over { border-color: var(--accent); background: rgba(0,113,227,0.04); }
.file-drop-icon { font-size: 28px; margin-bottom: 10px; }
.file-drop-title { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.file-drop-sub { font-size: 12px; color: var(--muted); }
.file-chosen { color: var(--accent); font-weight: 600; font-size: 13px; margin-top: 8px; }

/* ── ALERT ── */
.alert { padding: 12px 16px; border-radius: 10px; font-size: 13px; margin-bottom: 14px; }
.alert-success { background: rgba(48,209,88,0.08); color: #1a7a3a; border: 1px solid rgba(48,209,88,0.25); }
.alert-error   { background: rgba(255,69,58,0.08); color: #c0392b; border: 1px solid rgba(255,69,58,0.25); }

/* ── DIVIDER ── */
.divider { height: 1px; background: var(--border); margin: 20px 0; }

/* ── STEPS (onboarding) ── */
.steps { display: flex; align-items: center; gap: 0; margin-bottom: 36px; }
.step-item { display: flex; align-items: center; gap: 10px; }
.step-circle {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
  transition: all 0.2s;
  color: var(--muted);
}
.step-item.active .step-circle { background: var(--accent); border-color: var(--accent); color: white; }
.step-item.done .step-circle { background: var(--green); border-color: var(--green); color: white; }
.step-name { font-size: 13px; color: var(--muted); white-space: nowrap; }
.step-item.active .step-name { color: var(--text); font-weight: 500; }
.step-line { flex: 1; height: 1px; background: var(--border2); margin: 0 12px; }

/* ── CHIP INPUT ── */
.chip-wrap {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 6px 10px;
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  cursor: text; position: relative; min-height: 44px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.chip-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,113,227,0.1); }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(0,113,227,0.1); color: var(--accent);
  border-radius: 100px; padding: 4px 8px 4px 12px;
  font-size: 12px; font-weight: 500; line-height: 1;
}
.chip-x {
  background: none; border: none; color: var(--accent);
  cursor: pointer; font-size: 15px; line-height: 1;
  padding: 0; opacity: 0.7;
}
.chip-x:hover { opacity: 1; }
.chip-field {
  border: none; background: transparent; color: var(--text);
  font-size: 13px; outline: none; flex: 1; min-width: 140px;
  padding: 3px 2px; font-family: inherit;
}
.chip-field::placeholder { color: rgba(0,0,0,0.25); }
.chip-suggestions {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: var(--white); border: 1px solid var(--border);
  border-radius: 10px; z-index: 30; max-height: 200px; overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1); display: none;
}
.chip-sugg-item { padding: 9px 14px; cursor: pointer; font-size: 13px; color: var(--text); }
.chip-sugg-item:hover { background: var(--bg); }

/* ── TOGGLE BUTTON GROUP ── */
.toggle-group { display: flex; gap: 6px; flex-wrap: wrap; }
.toggle-btn {
  padding: 8px 16px; border-radius: 980px; border: 1px solid var(--border);
  background: var(--bg); color: var(--muted); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all 0.15s; font-family: inherit;
}
.toggle-btn:hover { border-color: var(--accent); color: var(--text); }
.toggle-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── DATE SEPARATOR ── */
.date-separator { display: flex; align-items: center; gap: 10px; margin: 18px 0 10px; }
.date-separator span { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px; white-space: nowrap; }
.date-separator::before, .date-separator::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── PREFS / MODAL OVERLAY ── */
.prefs-overlay, .diag-modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.4); backdrop-filter: blur(4px);
  z-index: 200; align-items: center; justify-content: center;
}
.prefs-overlay.open, .diag-modal-overlay.open { display: flex; }
.prefs-modal {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 20px; width: 480px; max-width: 95vw;
  padding: 28px; box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

/* ── DIAGNOSTICS MODAL ── */
.diag-modal {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 20px; width: 640px; max-width: 95vw;
  max-height: 88vh; overflow-y: auto; padding: 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.diag-modal::-webkit-scrollbar { width: 4px; }
.diag-modal::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 4px; }
.diag-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.diag-title { font-size: 16px; font-weight: 700; letter-spacing: -0.3px; }
.diag-close { background: rgba(0,0,0,0.06); border: none; color: var(--muted); cursor: pointer; font-size: 16px; padding: 6px 10px; border-radius: 8px; line-height: 1; transition: all 0.2s; }
.diag-close:hover { background: rgba(0,0,0,0.1); color: var(--text); }

.score-ring-wrap { text-align: center; margin-bottom: 20px; }
.score-ring {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100px; height: 100px; border-radius: 50%; border: 6px solid var(--border);
  font-size: 28px; font-weight: 800; line-height: 1;
}
.score-ring .score-label-sm { font-size: 11px; color: var(--muted); margin-top: 2px; }
.score-ring.high { border-color: var(--green); color: #1a7a3a; }
.score-ring.mid  { border-color: var(--yellow); color: #b05000; }
.score-ring.low  { border-color: var(--red); color: var(--red); }

.diag-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.diag-tile { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.diag-tile-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 5px; }
.diag-tile-value { font-size: 14px; font-weight: 600; }

.diag-section { margin-bottom: 16px; }
.diag-section-title { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.diag-list { display: flex; flex-direction: column; gap: 5px; }
.diag-list-item { display: flex; align-items: flex-start; gap: 8px; background: var(--bg); border-radius: 8px; padding: 8px 10px; font-size: 13px; }

.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 3px 10px; border-radius: 100px; font-size: 12px; font-weight: 500; background: var(--bg); color: var(--muted); border: 1px solid var(--border); }
.tag.matched { background: rgba(48,209,88,0.1);  color: #1a7a3a; border-color: transparent; }
.tag.missing  { background: rgba(255,69,58,0.1);   color: var(--red); border-color: transparent; }

.rec-banner { border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; font-size: 14px; font-weight: 600; }
.rec-apply   { background: rgba(48,209,88,0.08);  color: #1a7a3a; border: 1px solid rgba(48,209,88,0.25); }
.rec-caution { background: rgba(255,159,10,0.08); color: #b05000; border: 1px solid rgba(255,159,10,0.25); }
.rec-skip    { background: rgba(255,69,58,0.08);  color: var(--red); border: 1px solid rgba(255,69,58,0.25); }
.rec-summary { font-size: 13px; font-weight: 400; margin-top: 4px; opacity: .9; }

.severity-Dealbreaker { color: var(--red); }
.severity-Important   { color: #b05000; }
.severity-Minor       { color: var(--muted); }
.likelihood-High      { color: var(--red); }
.likelihood-Medium    { color: #b05000; }
.likelihood-Low       { color: var(--muted); }

/* ── TRACKER CARDS ── */
.tabs {
  display: flex; gap: 4px; margin-bottom: 20px;
  background: var(--white); border: 1px solid var(--border);
  border-radius: 12px; padding: 4px; width: fit-content;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.tab-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: 9px; border: none;
  font-size: 13px; font-weight: 600; cursor: pointer;
  background: transparent; color: var(--muted);
  transition: all 0.15s; font-family: inherit;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { background: var(--bg); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.tab-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; border-radius: 100px;
  font-size: 11px; font-weight: 700; padding: 0 5px;
}
.tab-count.manual  { background: rgba(255,159,10,0.12); color: #b05000; }
.tab-count.applied { background: rgba(48,209,88,0.12);  color: #1a7a3a; }
.tab-count.skipped { background: rgba(0,0,0,0.06);      color: var(--muted); }

.tracker-grid { display: flex; flex-direction: column; gap: 10px; }

.tracker-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 16px; padding: 20px 22px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: all 0.2s var(--ease);
}
.tracker-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.08); transform: translateY(-1px); }
.tracker-card.manual  { border-left: 3px solid var(--yellow); }
.tracker-card.applied { border-left: 3px solid var(--green); }
.tracker-card.skipped { border-left: 3px solid rgba(0,0,0,0.12); }

.tc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.tc-title { font-size: 15px; font-weight: 700; margin-bottom: 3px; letter-spacing: -0.2px; }
.tc-company { font-size: 13px; color: var(--muted); }
.tc-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.tc-meta-item { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.tc-scores { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.score-pill {
  display: flex; align-items: center; gap: 5px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 4px 10px; font-size: 12px; font-weight: 600;
}
.score-pill .label { color: var(--muted); font-weight: 400; font-size: 11px; }
.tc-note { font-size: 12px; color: var(--muted); background: var(--bg); border-radius: 8px; padding: 8px 10px; margin-bottom: 12px; line-height: 1.5; }
.tc-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.live-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(48,209,88,0.1); border: 1px solid rgba(48,209,88,0.25);
  border-radius: 100px; padding: 4px 12px; font-size: 12px; font-weight: 600;
  color: #1a7a3a;
}
.live-dot-anim { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: dp 1.5s ease infinite; }

/* ── HERO ── */
.hero { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; padding: 40px 24px; text-align: center; }
.hero-pill { display: inline-flex; align-items: center; gap: 6px; background: rgba(0,113,227,0.08); border: 1px solid rgba(0,113,227,0.2); color: var(--accent); border-radius: 100px; padding: 6px 14px; font-size: 12px; font-weight: 600; margin-bottom: 24px; }
.hero h1 { font-size: 48px; font-weight: 800; line-height: 1.1; margin-bottom: 16px; max-width: 600px; letter-spacing: -1.5px; }
.hero h1 span { color: var(--accent); }
.hero p { color: var(--muted); font-size: 16px; max-width: 480px; line-height: 1.6; margin-bottom: 36px; }
.hero-btns { display: flex; gap: 12px; }
.hero-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 60px; max-width: 700px; }
.feature-card { background: var(--white); border: 1px solid var(--border); border-radius: 16px; padding: 20px; text-align: left; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.feature-icon { font-size: 22px; margin-bottom: 10px; }
.feature-title { font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.feature-desc { font-size: 12px; color: var(--muted); line-height: 1.5; }

/* ── MOBILE NAV ── */
.mob-top { display: none; }
.mob-nav { display: none; }

/* ── MOBILE ── */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .sidebar-toggle { display: none; }
  .bg-orb { display: none; }

  .main {
    margin-left: 0 !important;
    padding: 16px 16px 88px;
  }

  .mob-top {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 16px; height: 52px;
    background: rgba(255,255,255,0.9); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 40;
  }
  .mob-top-brand {
    display: flex; align-items: center; gap: 8px;
    font-weight: 700; font-size: 15px; color: var(--text);
    text-decoration: none;
  }
  .mob-top-brand .mob-brand-icon {
    width: 28px; height: 28px;
    background: var(--text); border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; flex-shrink: 0;
  }
  .mob-top-right { display: flex; align-items: center; gap: 10px; }
  .mob-top-status { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }

  .mob-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0;
    background: rgba(255,255,255,0.9); backdrop-filter: blur(12px);
    border-top: 1px solid var(--border); z-index: 50;
    padding: 6px 0 calc(6px + env(safe-area-inset-bottom, 0px));
  }
  .mob-nav-item {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; gap: 3px; padding: 6px 4px;
    text-decoration: none; color: var(--muted);
    font-size: 10px; font-weight: 500; border: none;
    background: none; cursor: pointer; transition: color 0.15s;
  }
  .mob-nav-item.active { color: var(--accent); }
  .mob-nav-icon { font-size: 22px; line-height: 1; }

  .stats-grid, .stats-grid-5 { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
  .content-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }

  .page-header { flex-direction: column; align-items: stretch; gap: 10px; margin-bottom: 16px; }
  .page-header > div:last-child { display: flex; flex-wrap: wrap; gap: 8px; }
  .page-title { font-size: 22px; }
  .page-subtitle { font-size: 12px; }

  .stat-card { padding: 16px; border-radius: 14px; }
  .stat-value { font-size: 28px; }
  .log-panel { height: 140px; font-size: 11px; }
  .card { padding: 16px; border-radius: 16px; }

  .tabs { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }

  .diag-modal { width: 100% !important; max-width: 100vw; border-radius: 20px 20px 0 0; margin-top: auto; }
  .diag-modal-overlay.open { align-items: flex-end; }
  .prefs-modal { width: 100%; border-radius: 20px 20px 0 0; margin-top: auto; }
  .prefs-overlay.open { align-items: flex-end; }

  .step-name { font-size: 11px; }
  .steps { margin-bottom: 24px; }

  #run-btn, #stop-btn { flex: 1; justify-content: center; }
}
