/* ═══════════════════════════════════════════════
   SCRAPSCORE — MAIN STYLESHEET
   Industrial / utilitarian aesthetic with bold typography
   Color: Dark steel + electric yellow accent
════════════════════════════════════════════════ */

:root {
  --bg: #0a0a0a;
  --bg2: #111111;
  --bg3: #1a1a1a;
  --bg4: #222222;
  --border: #2a2a2a;
  --border2: #333333;
  --text: #f0f0f0;
  --text2: #a0a0a0;
  --text3: #666666;
  --accent: #f5c518;
  --accent2: #e6b800;
  --green: #4ade80;
  --red: #f87171;
  --blue: #60a5fa;
  --radius: 8px;
  --radius-lg: 14px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'DM Mono', monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
}

.hidden { display: none !important; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #000;
  font-weight: 600;
}
.btn-primary:hover { background: var(--accent2); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border2);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-ghost {
  background: transparent;
  color: var(--text2);
}
.btn-ghost:hover { color: var(--text); }

.btn-xl {
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 600;
  background: var(--accent);
  color: #000;
  border-radius: var(--radius-lg);
}
.btn-xl:hover { background: var(--accent2); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(245,197,24,0.3); }

.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-danger { background: transparent; color: var(--red); border: 1px solid var(--red); }
.btn-danger:hover { background: var(--red); color: white; }

/* ─── NAV ─── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: 64px;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  cursor: pointer;
}

.logo-icon { font-size: 20px; }

.logo-text {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--text);
  letter-spacing: 2px;
}

.logo-accent { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  color: var(--text2);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 12px;
  transition: color 0.15s;
}
.nav-link:hover { color: var(--text); }

/* ─── HERO ─── */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
  padding: 120px 60px 80px;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
}

.hero-bg {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(245,197,24,0.04) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.hero-content { position: relative; z-index: 1; }

.hero-badge {
  display: inline-block;
  background: rgba(245,197,24,0.12);
  border: 1px solid rgba(245,197,24,0.3);
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 24px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(64px, 8vw, 100px);
  line-height: 0.95;
  letter-spacing: 4px;
  color: var(--text);
  margin-bottom: 24px;
}

.hero-accent { color: var(--accent); }

.hero-sub {
  font-size: 17px;
  color: var(--text2);
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: 36px;
}

.hero-cta { margin-bottom: 48px; }

.hero-note {
  font-size: 13px;
  color: var(--text3);
  margin-top: 12px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
}

.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-num { font-family: var(--font-display); font-size: 36px; color: var(--accent); letter-spacing: 2px; line-height: 1; }
.stat-label { font-size: 12px; color: var(--text3); text-transform: uppercase; letter-spacing: 1px; }
.stat-div { width: 1px; height: 40px; background: var(--border); }

/* ─── MOCK CARD ─── */
.hero-visual {
  position: relative;
  z-index: 1;
}

.mock-card {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.mock-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
}

.mock-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.mock-vin {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text3);
}

.mock-badge {
  font-size: 12px;
  background: rgba(74,222,128,0.12);
  color: var(--green);
  border: 1px solid rgba(74,222,128,0.3);
  padding: 3px 10px;
  border-radius: 20px;
}

.mock-yield {
  background: var(--bg3);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.mock-yield-label { font-size: 13px; color: var(--text2); }
.mock-yield-val { font-family: var(--font-display); font-size: 36px; color: var(--accent); letter-spacing: 2px; }

.mock-parts { display: flex; flex-direction: column; gap: 10px; }

.mock-part {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg3);
  border-radius: var(--radius);
  font-size: 13px;
}

.mock-tier { color: var(--text3); font-size: 11px; }
.mock-pname { color: var(--text); font-weight: 500; }
.mock-profit { color: var(--green); font-weight: 600; font-family: var(--font-mono); font-size: 12px; }

.mock-blur { filter: blur(4px); opacity: 0.5; }

.mock-fade {
  text-align: center;
  padding: 12px;
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
  margin-top: 8px;
}

/* ─── SECTIONS ─── */
.how, .features, .pricing {
  padding: 100px 0;
}

.how { background: var(--bg2); }
.features { background: var(--bg); }
.pricing { background: var(--bg2); }

.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 56px);
  letter-spacing: 2px;
  color: var(--text);
  margin-bottom: 60px;
  line-height: 1.1;
}

/* ─── STEPS ─── */
.steps {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.step-card {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: border-color 0.2s;
}
.step-card:hover { border-color: var(--accent); }

.step-num {
  font-family: var(--font-display);
  font-size: 48px;
  color: var(--border2);
  letter-spacing: 2px;
  line-height: 1;
  margin-bottom: 12px;
}

.step-icon { font-size: 28px; margin-bottom: 12px; display: block; }

.step-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.step-card p { font-size: 14px; color: var(--text2); line-height: 1.6; }

.step-arrow {
  color: var(--accent);
  font-size: 24px;
  padding-top: 60px;
  flex-shrink: 0;
}

/* ─── FEATURES GRID ─── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color 0.2s, transform 0.2s;
}
.feature-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.feature-large {
  grid-column: span 2;
}

.feature-icon { font-size: 28px; margin-bottom: 12px; display: block; }

.feature-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.feature-card p { font-size: 14px; color: var(--text2); line-height: 1.6; }

.feature-example {
  margin-top: 20px;
  background: var(--bg3);
  border-radius: var(--radius);
  overflow: hidden;
}

.calc-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.calc-row:last-child { border-bottom: none; }
.calc-row.neg span:last-child { color: var(--red); }
.calc-row.profit { background: rgba(74,222,128,0.06); }
.calc-row.profit span { color: var(--green); font-weight: 600; }

/* ─── PRICING GRID ─── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

.price-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  transition: border-color 0.2s;
}
.price-card:hover { border-color: var(--border2); }

.price-popular {
  border-color: var(--accent) !important;
  background: rgba(245,197,24,0.04);
}

.price-ultimate {
  border-color: var(--blue) !important;
  background: rgba(96,165,250,0.04);
}

.price-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #000;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 20px;
  white-space: nowrap;
  letter-spacing: 1px;
}

.price-ultimate .price-badge {
  background: var(--blue);
  color: #000;
}

.price-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.price-amt {
  font-family: var(--font-display);
  font-size: 52px;
  color: var(--text);
  letter-spacing: 2px;
  line-height: 1;
}

.price-mo {
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 400;
  color: var(--text2);
}

.price-desc { font-size: 13px; color: var(--text3); }

.price-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.price-features li { font-size: 13px; color: var(--text2); }

.referral-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  background: rgba(245,197,24,0.06);
  border: 1px solid rgba(245,197,24,0.2);
  border-radius: var(--radius-lg);
  padding: 20px 28px;
}

.referral-icon { font-size: 32px; }
.referral-text { display: flex; flex-direction: column; gap: 4px; }
.referral-text strong { color: var(--text); font-size: 16px; }
.referral-text span { color: var(--text2); font-size: 14px; }

/* ─── FOOTER ─── */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copy { font-size: 13px; color: var(--text3); }

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text3);
  text-decoration: none;
}
.footer-links a:hover { color: var(--text2); }

/* ─── APP LAYOUT ─── */
.app-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--bg2);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 260px;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 0 20px 24px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.sidebar-user {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-email { font-size: 13px; color: var(--text); font-weight: 500; }
.user-credits { font-size: 12px; color: var(--accent); margin-top: 2px; }

.sidebar-nav {
  flex: 1;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--text2);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}

.sidebar-link:hover { background: var(--bg3); color: var(--text); }
.sidebar-link.active { background: rgba(245,197,24,0.1); color: var(--accent); }
.sidebar-link i { font-size: 18px; }

.sidebar-plan {
  margin: 16px 16px 8px;
  padding: 16px;
  background: var(--bg3);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.plan-name { font-size: 13px; font-weight: 600; color: var(--text); }

.sidebar-logout {
  margin: 8px 16px 0;
  background: none;
  border: none;
  color: var(--text3);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius);
  width: calc(100% - 32px);
  font-family: var(--font-body);
  transition: color 0.15s;
}
.sidebar-logout:hover { color: var(--red); }

.app-main {
  margin-left: 260px;
  padding: 40px;
  min-height: 100vh;
}

.app-header {
  margin-bottom: 32px;
}

.app-title {
  font-family: var(--font-display);
  font-size: 40px;
  letter-spacing: 2px;
  color: var(--text);
}

.app-subtitle { font-size: 14px; color: var(--text2); margin-top: 6px; }

/* ─── VIN FORM ─── */
.vin-form-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
}

.vin-form-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.form-input {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.15s;
}
.form-input:focus { border-color: var(--accent); }
.form-input.mono { font-family: var(--font-mono); letter-spacing: 0.05em; text-transform: uppercase; }

.vin-form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* ─── ANALYSIS STATUS ─── */
.analysis-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--text2);
}

.status-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── RESULTS ─── */
.results-wrapper { display: flex; flex-direction: column; gap: 24px; }

.vehicle-summary-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}

.vs-left h2 {
  font-family: var(--font-display);
  font-size: 32px;
  letter-spacing: 2px;
  color: var(--text);
  margin-bottom: 4px;
}

.vs-details { font-size: 13px; color: var(--text3); font-family: var(--font-mono); }

.vs-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.vs-verdict {
  font-size: 18px;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 8px;
}

.vs-verdict.yes { background: rgba(74,222,128,0.12); color: var(--green); border: 1px solid rgba(74,222,128,0.3); }
.vs-verdict.no { background: rgba(248,113,113,0.12); color: var(--red); border: 1px solid rgba(248,113,113,0.3); }

.vs-yield {
  font-family: var(--font-display);
  font-size: 42px;
  color: var(--accent);
  letter-spacing: 2px;
  line-height: 1;
}

.vs-yield-label { font-size: 12px; color: var(--text3); text-align: right; }

.vs-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

/* ─── TIER SECTIONS ─── */
.tier-section { margin-bottom: 8px; }

.tier-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: var(--bg3);
  border-radius: var(--radius) var(--radius) 0 0;
  border: 1px solid var(--border);
  border-bottom: none;
}

.tier-emoji { font-size: 20px; }
.tier-title { font-size: 15px; font-weight: 600; color: var(--text); }
.tier-subtitle { font-size: 13px; color: var(--text3); margin-left: auto; }
.tier-profit { font-family: var(--font-mono); font-size: 14px; color: var(--green); font-weight: 600; }

.tier-parts { display: flex; flex-direction: column; }

/* ─── PART CARD ─── */
.part-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-top: none;
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: start;
  transition: background 0.15s;
}
.part-card:last-child { border-radius: 0 0 var(--radius) var(--radius); }
.part-card:hover { background: var(--bg3); }

.part-left { display: flex; flex-direction: column; gap: 8px; }

.part-name { font-size: 16px; font-weight: 600; color: var(--text); }
.part-reason { font-size: 13px; color: var(--text2); line-height: 1.5; }

.part-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.ptag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
}

.ptag-demand { background: rgba(96,165,250,0.1); color: var(--blue); border: 1px solid rgba(96,165,250,0.2); }
.ptag-sold { background: rgba(74,222,128,0.1); color: var(--green); border: 1px solid rgba(74,222,128,0.2); }
.ptag-condition { background: rgba(160,160,160,0.1); color: var(--text2); border: 1px solid var(--border); }
.ptag-compat { background: rgba(245,197,24,0.08); color: var(--accent); border: 1px solid rgba(245,197,24,0.2); }
.ptag-ship { background: rgba(167,139,250,0.1); color: #a78bfa; border: 1px solid rgba(167,139,250,0.2); }

.part-score {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.score-bar {
  display: flex;
  gap: 3px;
}

.score-pip {
  width: 16px;
  height: 6px;
  border-radius: 2px;
  background: var(--border2);
}

.score-pip.active { background: var(--accent); }

.score-label { font-size: 12px; color: var(--text3); }

.part-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  min-width: 200px;
}

.part-profit-box {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  width: 100%;
}

.profit-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  padding: 2px 0;
  color: var(--text2);
}
.profit-row.total {
  border-top: 1px solid var(--border);
  margin-top: 6px;
  padding-top: 6px;
  font-weight: 600;
  font-size: 14px;
  color: var(--green);
}

.profit-neg { color: var(--red) !important; }

.part-ship-info {
  font-size: 12px;
  color: var(--text3);
  text-align: right;
}

.part-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ─── LISTING MODAL CONTENT ─── */
.listing-section {
  margin-bottom: 20px;
}

.listing-section h4 {
  font-size: 12px;
  font-weight: 600;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.listing-box {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
  position: relative;
  white-space: pre-wrap;
  font-family: var(--font-mono);
}

.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--bg4);
  border: 1px solid var(--border2);
  color: var(--text2);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--font-body);
}
.copy-btn:hover { color: var(--accent); border-color: var(--accent); }

.specifics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.spec-item {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.spec-key { font-size: 11px; color: var(--text3); }
.spec-val { font-size: 13px; color: var(--text); font-weight: 500; }

/* ─── MODAL ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text3);
  font-size: 18px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.modal-close:hover { background: var(--bg3); color: var(--text); }

.modal-body h2 {
  font-family: var(--font-display);
  font-size: 32px;
  letter-spacing: 2px;
  color: var(--text);
  margin-bottom: 8px;
}

.modal-body p {
  font-size: 14px;
  color: var(--text2);
  margin-bottom: 24px;
}

.modal-form { display: flex; flex-direction: column; gap: 16px; }
.modal-actions { display: flex; gap: 10px; margin-top: 8px; }

.auth-switch {
  text-align: center;
  font-size: 13px;
  color: var(--text3);
  margin-top: 16px;
}

.auth-switch a {
  color: var(--accent);
  cursor: pointer;
  text-decoration: none;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text3);
  font-size: 12px;
  margin: 4px 0;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.error-msg {
  background: rgba(248,113,113,0.1);
  border: 1px solid rgba(248,113,113,0.3);
  color: var(--red);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
}

.success-msg {
  background: rgba(74,222,128,0.1);
  border: 1px solid rgba(74,222,128,0.3);
  color: var(--green);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
}

/* ─── REFERRAL & ACCOUNT ─── */
.referral-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.referral-rewards {
  display: flex;
  align-items: center;
  gap: 24px;
}

.reward-box {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.reward-icon { font-size: 36px; }
.reward-title { font-size: 12px; color: var(--text3); text-transform: uppercase; letter-spacing: 1px; }
.reward-val { font-family: var(--font-display); font-size: 28px; color: var(--accent); letter-spacing: 2px; }
.reward-desc { font-size: 13px; color: var(--text2); }
.reward-plus { font-family: var(--font-display); font-size: 48px; color: var(--border2); }

.referral-link-row {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  margin-bottom: 20px;
}

.referral-stats {
  display: flex;
  gap: 24px;
}

.ref-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ref-stat span { font-family: var(--font-display); font-size: 36px; color: var(--text); letter-spacing: 2px; }
.ref-stat label { font-size: 12px; color: var(--text3); }

.loyalty-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.loyalty-card h3 { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 16px; }

.loyalty-tiers { display: flex; flex-direction: column; gap: 12px; }

.loyalty-tier {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text2);
  padding: 12px 16px;
  background: var(--bg2);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.loyalty-tier.achieved { border-color: var(--green); background: rgba(74,222,128,0.04); }
.loyalty-tier.achieved .loyalty-check { color: var(--green); }
.loyalty-check { font-size: 16px; }
.loyalty-reward { margin-left: auto; color: var(--accent); font-weight: 600; font-size: 13px; }

.account-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.account-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.account-row:last-of-type { border-bottom: none; }
.account-row label { color: var(--text3); }
.account-row span { color: var(--text); font-weight: 500; }

.account-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* ─── HISTORY ─── */
.history-list { display: flex; flex-direction: column; gap: 12px; }

.history-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 20px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.history-item:hover { border-color: var(--accent); }

.history-vehicle { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.history-vin { font-family: var(--font-mono); font-size: 12px; color: var(--text3); }
.history-date { font-size: 12px; color: var(--text3); text-align: right; margin-bottom: 4px; }
.history-yield { font-family: var(--font-display); font-size: 24px; color: var(--accent); letter-spacing: 2px; text-align: right; }

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 60px 20px;
  color: var(--text3);
  text-align: center;
}

/* ─── BULK MODAL ─── */
#bulkVins {
  width: 100%;
  resize: vertical;
}

/* ─── TOAST ─── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 14px 20px;
  font-size: 14px;
  color: var(--text);
  z-index: 999;
  animation: slideUp 0.3s ease;
  box-shadow: var(--shadow);
}
.toast.success { border-color: var(--green); }
.toast.error { border-color: var(--red); }

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