/* ============================================================
   REFRACTION APP - STYLE SYSTEM
   Font: Prompt | Colors from Style Guide
   ============================================================ */

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

:root {
  --purple: #5928E5;
  --purple-dark: #3D1A9E;
  --green: #00E1B4;
  --pink: #FF36A6;
  --yellow: #FFDE59;
  --cyan: #36D6FF;
  --orange: #FF5C35;
  --black: #121212;
  --white: #FFFFFF;
  --light: #F5F5F5;
  --light-2: #FAFAFA;
  --gray-100: #F0F0F0;
  --gray-200: #E0E0E0;
  --gray-300: #C0C0C0;
  --gray-400: #999999;
  --gray-500: #666666;
  --gray-600: #444444;
  --font: 'Prompt', sans-serif;
  --radius: 8px;
  --radius-lg: 16px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --transition: 0.2s ease;
}

html { scroll-behavior: smooth; }

#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body {
  font-family: var(--font);
  font-size: 14px;
  color: var(--black);
  background: var(--white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: var(--font); outline: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ============================================================
   TOP ANNOUNCEMENT BAR
   ============================================================ */
.top-bar {
  background: var(--purple);
  color: var(--white);
  font-size: 12px;
  padding: 8px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.top-bar a { color: var(--white); text-decoration: underline; font-weight: 600; margin-left: 12px; }
.top-bar-right a { text-decoration: none; }

/* ============================================================
   HEADER / NAVBAR
   ============================================================ */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  border-bottom: 1px solid var(--gray-200);
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
}
.app-header .logo {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.app-header .logo svg { width: 28px; height: 28px; }
.app-header .logo-text {
  font-size: 22px;
  font-weight: 700;
  color: var(--black);
}
.app-header .logo-sub {
  font-size: 11px;
  color: var(--gray-400);
  margin-top: -4px;
  letter-spacing: 0.5px;
}
.header-search {
  flex: 1 1 500px;
  max-width: 560px;
  position: relative;
  display: flex;
  align-items: center;
}
.header-search input {
  width: 100%;
  padding: 10px 44px 10px 40px;
  border: 1px solid var(--gray-200);
  border-radius: 24px;
  font-size: 14px;
  background: var(--light);
}
.header-search > svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--gray-400);
}
.header-filter-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  color: var(--gray-500);
  transition: all 0.15s ease;
}
.header-filter-btn:hover {
  background: var(--gray-200);
  color: var(--black);
}
.header-filter-btn svg {
  width: 16px;
  height: 16px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.header-actions .trade-in-btn {
  background: var(--white);
  border: 2px solid var(--purple);
  color: var(--purple);
  padding: 8px 16px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.header-actions .trade-in-btn:hover {
  background: var(--purple);
  color: var(--white);
}
.header-actions .settings-btn {
  font-size: 13px;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.header-compare-btn {
  position: relative;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.15s ease;
  color: var(--gray-500);
}
.header-compare-btn:hover {
  background: var(--gray-100);
  color: var(--pink);
}
.header-compare-btn svg {
  width: 18px;
  height: 18px;
}
.compare-count {
  position: absolute;
  top: 0;
  right: 0;
  width: 16px;
  height: 16px;
  background: var(--purple);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  color: var(--gray-500);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.hamburger {
  width: 40px;
  height: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--black);
}

/* ============================================================
   CATEGORY TABS
   ============================================================ */
.category-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  border-bottom: 1px solid var(--gray-200);
  overflow-x: auto;
  white-space: nowrap;
}
.category-tabs .tab-arrow {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gray-300);
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 14px;
}
.category-tabs button {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-500);
  transition: var(--transition);
  white-space: nowrap;
}
.category-tabs button:hover { color: var(--black); }
.category-tabs button.active {
  background: var(--purple);
  color: var(--white);
}

/* ============================================================
   FILTER BAR
   ============================================================ */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
}
.filter-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
.filter-toggle svg { width: 18px; height: 18px; }
.filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}
.filter-chip.active {
  background: var(--purple);
  color: var(--white);
}
.filter-chip .remove {
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}
.show-used-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.toggle-switch {
  width: 44px;
  height: 24px;
  background: var(--gray-300);
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  transition: var(--transition);
}
.toggle-switch.on { background: var(--green); }
.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: var(--white);
  border-radius: 50%;
  transition: var(--transition);
}
.toggle-switch.on::after { left: 22px; }

/* ============================================================
   VEHICLE GRID
   ============================================================ */
.vehicle-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 0 32px 32px;
}
.vehicle-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  background: var(--white);
}
.vehicle-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.vehicle-card .card-image {
  position: relative;
  width: 100%;
  padding-top: 66%;
  background: var(--gray-100);
  overflow: hidden;
}
.vehicle-card .card-image img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.vehicle-card .card-badges {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  gap: 4px;
}
.badge-shipping {
  background: var(--black);
  color: var(--white);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 4px;
}
.card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 20px;
  z-index: 2;
}
.badge-sold {
  background: var(--black);
  color: var(--white);
}
.badge-sale-pending {
  background: var(--purple);
  color: var(--white);
}
.badge-test-drive {
  background: var(--cyan);
  color: var(--black);
}
.card-heart {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: var(--transition);
}
.card-heart:hover, .card-heart.liked { color: var(--pink); }
.card-info {
  padding: 12px 8px;
}
.card-info .card-year-make {
  font-size: 11px;
  color: var(--gray-400);
}
.card-info .card-title {
  font-size: 14px;
  font-weight: 600;
  margin: 2px 0 6px;
  line-height: 1.3;
}
.card-info .card-price {
  font-size: 18px;
  font-weight: 700;
}
.card-info .card-dealer {
  font-size: 11px;
  color: var(--gray-400);
  margin-top: 2px;
}

/* ============================================================
   WHY REFRACTION BANNER
   ============================================================ */
.why-banner {
  margin: 24px 32px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #2d5a3d 0%, #4a8a5c 30%, #8ab68d 60%, #c8d8c0 100%);
  padding: 48px 56px;
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.why-banner::before {
  content: '';
  position: absolute;
  bottom: 0; right: 0;
  width: 60%;
  height: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.1), transparent);
  pointer-events: none;
}
.why-banner h2 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 24px;
}
.why-banner-cols {
  display: flex;
  gap: 48px;
}
.why-banner-cols .col {
  flex: 1;
  font-size: 16px;
  line-height: 1.6;
  font-weight: 300;
}
.why-banner .learn-btn {
  margin-top: 24px;
  display: inline-block;
  padding: 12px 24px;
  border: 2px solid var(--white);
  border-radius: 24px;
  color: var(--white);
  font-weight: 600;
  font-size: 13px;
  transition: var(--transition);
}
.why-banner .learn-btn:hover {
  background: var(--white);
  color: var(--black);
}

/* Trade-in CTA Banner (inline in grid) */
.tradein-cta-card {
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #FFE5F0, #FFF5CC, #E5F0FF);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 200px;
}
.tradein-cta-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}
.tradein-cta-card p {
  font-size: 13px;
  color: var(--gray-500);
}

/* ============================================================
   FILTER MODAL OVERLAY
   ============================================================ */
.filter-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}
.filter-modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px 48px;
}
.filter-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 32px;
}
.filter-modal-header .close-x {
  font-size: 20px;
  cursor: pointer;
  font-weight: 700;
}
.filter-section {
  padding: 24px 0;
  border-bottom: 1px solid var(--gray-200);
}
.filter-section:last-of-type { border-bottom: none; }
.filter-section h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
}
.filter-section .filter-desc {
  font-size: 13px;
  color: var(--gray-400);
  margin-bottom: 16px;
}
.filter-section .filter-row {
  display: flex;
  gap: 16px;
  align-items: center;
}
.filter-section .filter-row label {
  font-size: 13px;
  font-weight: 600;
  min-width: 40px;
}
.filter-section .filter-row input,
.filter-section .filter-row select {
  flex: 1;
  padding: 14px 16px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 14px;
  background: var(--light-2);
}
.filter-section .body-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.filter-section .body-chip {
  padding: 10px 24px;
  border: 1px solid var(--gray-200);
  border-radius: 24px;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
}
.filter-section .body-chip:hover,
.filter-section .body-chip.active {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}
.filter-section .color-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.filter-section .color-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--gray-200);
  border-radius: 24px;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
}
.filter-section .color-chip:hover,
.filter-section .color-chip.active {
  border-color: var(--black);
  background: var(--gray-100);
}
.color-swatch {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
}
.filter-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--gray-200);
  margin-top: 16px;
}
.filter-modal-footer .clear-link {
  font-size: 14px;
  text-decoration: underline;
  cursor: pointer;
}
.filter-modal-footer .submit-btn {
  padding: 16px 48px;
  background: var(--black);
  color: var(--white);
  border-radius: 32px;
  font-size: 16px;
  font-weight: 600;
}

/* ============================================================
   VEHICLE DETAIL PAGE (VDP)
   ============================================================ */
.vdp-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 32px;
}
.vdp-back {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray-500);
  cursor: pointer;
  margin-bottom: 8px;
}
.vdp-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.vdp-title-area h1 {
  font-size: 12px;
  font-weight: 400;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.vdp-price-area {
  text-align: right;
}
.vdp-price-area .price {
  font-size: 28px;
  font-weight: 700;
}
.vdp-price-area .deposit-btn {
  margin-top: 8px;
  padding: 10px 24px;
  background: var(--black);
  color: var(--white);
  border-radius: 24px;
  font-size: 13px;
  font-weight: 600;
}
.vdp-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.vdp-gallery {
  width: 100%;
}
.vdp-gallery .main-image {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 12px;
  background: var(--gray-100);
}
.vdp-gallery .main-image img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}
.vdp-gallery .thumb-row {
  display: flex;
  gap: 8px;
}
.vdp-gallery .thumb {
  width: 64px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--gray-200);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
}
.vdp-gallery .thumb.active { border-color: var(--black); }
.vdp-gallery .thumb img { width: 100%; height: 100%; object-fit: cover; }
.vdp-gallery-nav {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.vdp-gallery-nav button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--gray-300);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.vdp-info {
  position: relative;
}
.vdp-save-btn {
  position: absolute;
  top: 0;
  right: 0;
  width: 44px;
  height: 44px;
  background: var(--gray-100);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.vdp-save-btn:hover {
  background: var(--gray-200);
}
.vdp-save-btn.liked {
  background: rgba(255, 54, 166, 0.1);
}
.vdp-info h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
}
.vdp-engagement {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--gray-500);
}
.vdp-engagement span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.vdp-engagement svg {
  width: 14px;
  height: 14px;
  opacity: 0.6;
}
.vdp-info .vdp-subtitle {
  font-size: 13px;
  color: var(--gray-400);
  margin-bottom: 16px;
}
.vdp-info .vdp-big-price {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 4px;
}
.vdp-info .vdp-big-price sup {
  font-size: 14px;
  font-weight: 400;
  color: var(--gray-400);
}
.vdp-info .vdp-stats {
  display: flex;
  gap: 24px;
  margin: 16px 0;
}
.vdp-info .vdp-stat {
  text-align: center;
}
.vdp-info .vdp-stat .stat-val {
  font-size: 18px;
  font-weight: 700;
}
.vdp-info .vdp-stat .stat-label {
  font-size: 11px;
  color: var(--gray-400);
}
.vdp-deposit-btn {
  max-width: 320px;
  width: 100%;
  padding: 14px;
  background: var(--black);
  color: var(--white);
  border-radius: 32px;
  font-size: 15px;
  font-weight: 600;
  margin: 24px 0 16px;
  transition: var(--transition);
}
.vdp-deposit-btn:hover { background: var(--gray-600); }
.vdp-how-link {
  font-size: 13px;
  color: var(--gray-400);
  margin-top: 20px;
  margin-bottom: 24px;
  display: block;
}
.vdp-how-link a { text-decoration: underline; color: var(--black); }

/* VDP Details Section */
.vdp-details-section {
  margin-top: 32px;
}
.vdp-details-section h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
}
.vdp-details-section .detail-text {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.8;
  margin-bottom: 24px;
}
.vdp-specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 32px;
}
.vdp-specs-grid .spec-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 13px;
}
.vdp-specs-grid .spec-row .spec-label { color: var(--gray-400); }
.vdp-specs-grid .spec-row .spec-val { font-weight: 600; }

/* VDP Accordion */
.vdp-accordion {
  margin-top: 24px;
  border-top: 1px solid var(--gray-200);
}
.vdp-accordion-item {
  border-bottom: 1px solid var(--gray-200);
}
.vdp-accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
.vdp-accordion-header .arrow { transition: transform 0.2s; }
.vdp-accordion-header.open .arrow { transform: rotate(180deg); }
.vdp-accordion-body {
  padding: 0 0 16px;
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.8;
}
.feature-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.feature-list li::before {
  content: '✓ ';
  color: var(--green);
  font-weight: 700;
}

/* Similar Vehicles */
.similar-section {
  margin-top: 48px;
}
.similar-section h4 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 16px;
}
.similar-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* ============================================================
   ORDER SUMMARY / CHECKOUT
   ============================================================ */
.summary-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 32px;
}
.summary-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.summary-left h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}
.summary-left .summary-subtitle {
  font-size: 13px;
  color: var(--gray-400);
  margin-bottom: 16px;
}
.summary-left .summary-image {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.summary-left .summary-image img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}
.summary-right h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}
.summary-right .summary-desc {
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 24px;
}
.checkout-step {
  margin-bottom: 24px;
}
.checkout-step .step-num {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}
.checkout-step label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 8px;
  cursor: pointer;
}
.checkout-step input[type="checkbox"],
.checkout-step input[type="radio"] {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  accent-color: var(--black);
}
.checkout-step input[type="text"] {
  padding: 12px 16px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  width: 100%;
  font-size: 14px;
}
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.checkout-due {
  background: var(--light);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 8px;
}
.checkout-due .due-title {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
}
.checkout-due .due-desc {
  font-size: 11px;
  color: var(--gray-400);
  margin-bottom: 8px;
}
.checkout-due .due-amount {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}
.make-payment-btn {
  width: 100%;
  padding: 16px;
  background: var(--pink);
  color: var(--white);
  border-radius: 32px;
  font-size: 16px;
  font-weight: 600;
  transition: var(--transition);
}
.make-payment-btn:hover { opacity: 0.9; }

/* ============================================================
   ORDER CONFIRMATION
   ============================================================ */
.confirm-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 32px;
}
.confirm-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.confirm-left h1 {
  font-size: 36px;
  font-weight: 700;
  color: var(--purple);
  margin-bottom: 16px;
}
.confirm-left .confirm-text {
  font-size: 14px;
  color: var(--gray-500);
  line-height: 1.8;
  margin-bottom: 24px;
}
.confirm-left .track-btn {
  padding: 14px 32px;
  background: var(--black);
  color: var(--white);
  border-radius: 32px;
  font-size: 15px;
  font-weight: 600;
  display: inline-block;
}
.confirm-expect {
  margin-top: 48px;
}
.confirm-expect h4 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.confirm-expect p {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.8;
  margin-bottom: 16px;
}
.confirm-expect .contact-info {
  font-size: 13px;
  color: var(--gray-500);
}
.confirm-expect .contact-info strong {
  display: block;
  color: var(--black);
}
.confirm-right {
  text-align: center;
}
.confirm-right img {
  width: 100%;
  max-width: 400px;
  border-radius: var(--radius-lg);
  margin: 0 auto 16px;
}
.confirm-right h3 {
  font-size: 24px;
  font-weight: 700;
}

/* ============================================================
   TRADE-IN FLOW
   ============================================================ */
.tradein-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.tradein-hero {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.tradein-hero .hero-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 8px;
}
.tradein-hero h1 {
  font-size: 48px;
  font-weight: 300;
  font-style: italic;
  line-height: 1.15;
  margin-bottom: 16px;
}
.tradein-hero .hero-desc {
  font-size: 16px;
  color: var(--gray-500);
  margin-bottom: 32px;
}
/* Trade-in Input Toggle */
.tradein-input-toggle {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-radius: 999px;
  overflow: hidden;
  border: 1.5px solid #e5e7eb;
}
.tradein-input-toggle button {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: #f9fafb;
  color: #6b7280;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.tradein-input-toggle button.active {
  background: linear-gradient(135deg, #7c3aed, #8B5CF6);
  color: #fff;
}
.tradein-input-toggle button:not(.active):hover {
  background: #f3f4f6;
}

/* VIN Input Row */
.tradein-vin-row {
  display: flex;
  gap: 10px;
}
.tradein-vin-row input {
  flex: 1;
}
.tradein-vin-decode-btn {
  padding: 10px 24px;
  background: linear-gradient(135deg, #7c3aed, #8B5CF6);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.tradein-vin-decode-btn:hover {
  opacity: 0.9;
}
.tradein-vin-decode-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.tradein-vin-error {
  color: #ef4444;
  font-size: 13px;
  margin-top: 6px;
}
.tradein-vin-success {
  color: #22c55e;
  font-size: 13px;
  margin-top: 6px;
  font-weight: 500;
}

/* Slide-in animation for decoded form fields */
.tradein-form-decoded {
  animation: tradeinSlideIn 0.4s ease-out;
}
@keyframes tradeinSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Trade-in Form Grid */
.tradein-form-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}
.tradein-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--black);
}
.tradein-field label .req {
  color: var(--purple);
}
.tradein-field select,
.tradein-field input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  background: var(--white);
  appearance: auto;
  transition: border-color 0.2s;
}
.tradein-field select:focus,
.tradein-field input:focus {
  outline: none;
  border-color: var(--purple);
}
.tradein-field select:disabled {
  background: var(--light);
  color: var(--gray-400);
  cursor: not-allowed;
}
.tradein-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.tradein-condition-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.condition-option {
  background: var(--light);
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.2s;
}
.condition-option:hover {
  border-color: var(--gray-300);
}
.condition-option.selected {
  border-color: var(--purple);
  background: rgba(102, 51, 153, 0.05);
}
.condition-option strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}
.condition-option span {
  font-size: 12px;
  color: var(--gray-500);
}
.tradein-checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-size: 14px !important;
  font-weight: 400 !important;
  cursor: pointer;
}
.tradein-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--purple);
}
.tradein-submit-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--purple), #8B5CF6);
  color: var(--white);
  border-radius: 32px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  border: none;
}
.tradein-submit-btn:hover {
  opacity: 0.9;
}
/* Trade-in Details accordion expanded */
.tradein-accordion-item .item-details {
  padding: 12px 0 0 28px;
}
.tradein-accordion-item .detail-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--gray-100);
}
.tradein-accordion-item .detail-row:last-child {
  border-bottom: none;
}
.tradein-accordion-item .detail-row span:first-child {
  color: var(--gray-500);
}
.tradein-accordion-item .detail-row span:last-child {
  font-weight: 600;
}
/* Trade-in Result details */
.tradein-result-box .result-details {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 8px;
  font-size: 12px;
  color: var(--gray-500);
  flex-wrap: wrap;
}
/* Result warning (salvage title, etc.) */
.result-warning {
  color: #d32f2f;
  font-weight: 600;
}
/* Brand trim label on details/result pages */
.brand-trim {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-500);
  margin-top: 4px;
  letter-spacing: 0.5px;
}
/* EV Battery health slider */
.tradein-ev-field input[type="range"] {
  width: 100%;
  margin: 8px 0 4px;
  accent-color: var(--purple);
}
.battery-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--gray-400);
}
/* Aftermarket modifications section */
.tradein-mods-section {
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  overflow: hidden;
}
.tradein-mods-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--white);
  border: none;
  cursor: pointer;
  font-size: 13px;
  color: var(--gray-600);
  text-align: left;
}
.tradein-mods-toggle:hover {
  background: var(--gray-50);
}
.tradein-mods-toggle svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s;
}
.tradein-mods-section.expanded .tradein-mods-toggle svg {
  transform: rotate(180deg);
}
.tradein-mods-grid {
  padding: 8px 16px 16px;
  border-top: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.mod-category-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-500);
  margin-bottom: 6px;
}
.mod-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.15s;
}
.mod-item:hover {
  background: var(--gray-50);
}
.mod-item.selected {
  background: rgba(109, 40, 217, 0.06);
}
.mod-item input[type="checkbox"] {
  accent-color: var(--purple);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.mod-name {
  flex: 1;
}
.mod-impact {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}
.mod-impact.positive {
  color: #16a34a;
  background: rgba(22, 163, 74, 0.08);
}
.mod-impact.negative {
  color: #d32f2f;
  background: rgba(211, 47, 47, 0.08);
}
.tradein-hero > div:first-child {
  padding: 48px 64px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 80px;
}
.tradein-hero .hero-image {
  position: relative;
  overflow: hidden;
}
.tradein-hero .hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Trade-in Details */
.tradein-details-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 32px;
}
.tradein-details-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
}
.tradein-vehicle-info h1 {
  font-size: 48px;
  font-weight: 300;
  line-height: 1.1;
  margin-bottom: 24px;
}
.tradein-vehicle-info .brand-logo {
  font-size: 28px;
  font-weight: 700;
  font-style: italic;
  color: var(--gray-400);
}
.tradein-questionnaire h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}
.tradein-questionnaire .q-desc {
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 24px;
}
.tradein-accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tradein-accordion-item {
  background: var(--light);
  border-radius: var(--radius);
  padding: 16px 20px;
  cursor: pointer;
}
.tradein-accordion-item .item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tradein-accordion-item .item-num {
  font-size: 14px;
  color: var(--gray-400);
  margin-right: 8px;
}
.tradein-accordion-item .item-title {
  font-size: 14px;
  font-weight: 500;
}
.tradein-accordion-item .edit-link {
  color: var(--orange);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.tradein-ack {
  background: var(--light);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-top: 16px;
}
.tradein-ack .ack-num {
  font-size: 14px;
  color: var(--gray-400);
  margin-bottom: 8px;
}
.tradein-ack h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}
.tradein-ack p {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
}
.reveal-btn {
  width: 100%;
  max-width: 400px;
  margin: 24px auto 0;
  display: block;
  padding: 16px;
  background: var(--black);
  color: var(--white);
  border-radius: 32px;
  font-size: 16px;
  font-weight: 600;
}

/* Trade-in Result */
.tradein-result-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
}
.tradein-result-right h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
}
.tradein-result-box {
  background: var(--light);
  border-radius: var(--radius);
  padding: 20px 24px;
  text-align: center;
  margin-bottom: 24px;
}
.tradein-result-box .result-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 8px;
}
.tradein-result-box .result-price {
  font-size: 32px;
  font-weight: 700;
}
.create-account-cta {
  width: 100%;
  padding: 14px;
  background: var(--black);
  color: var(--white);
  border-radius: 32px;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 32px;
}
.recommended-section h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
}
.recommended-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

/* ============================================================
   LIKED VEHICLES PANEL
   ============================================================ */
.liked-panel {
  position: fixed;
  top: 0; right: 0;
  width: 480px;
  height: 100%;
  background: var(--white);
  box-shadow: -4px 0 24px rgba(0,0,0,0.15);
  z-index: 250;
  padding: 32px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}
.liked-panel.open { transform: translateX(0); }
.liked-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.liked-panel-header .close-liked {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
}
.liked-panel-header .compare-btn {
  padding: 10px 20px;
  border: 2px solid var(--black);
  border-radius: 24px;
  font-size: 13px;
  font-weight: 600;
}
.liked-panel h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
}
.liked-panel .liked-subtitle {
  font-size: 13px;
  color: var(--gray-400);
  margin-bottom: 24px;
}
.liked-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.liked-slot {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--gray-100);
  min-height: 180px;
  position: relative;
}
.liked-slot img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}
.liked-slot .slot-info {
  padding: 8px;
}
.liked-slot .slot-info .slot-title {
  font-size: 13px;
  font-weight: 600;
}
.liked-slot .slot-info .slot-price {
  font-size: 16px;
  font-weight: 700;
}
.liked-slot.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--gray-400);
}
.liked-slot-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  background: rgba(0, 0, 0, 0.6);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  z-index: 2;
  transition: background 0.15s ease;
}
.liked-slot-remove:hover {
  background: rgba(0, 0, 0, 0.85);
}

/* Liked Panel CTA */
.liked-panel-cta {
  margin-top: 24px;
  padding: 24px;
  background: linear-gradient(135deg, #f5f3ff, #ede9fe);
  border-radius: 16px;
  text-align: center;
}
.liked-panel-cta-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 12px;
  background: var(--purple);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.liked-panel-cta-icon svg {
  width: 20px;
  height: 20px;
}
.liked-panel-cta h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--black);
}
.liked-panel-cta p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--gray-500);
  margin-bottom: 16px;
}
.liked-panel-cta-btn {
  display: inline-block;
  padding: 10px 28px;
  background: linear-gradient(135deg, #7c3aed, #8B5CF6);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.liked-panel-cta-btn:hover {
  opacity: 0.9;
}

/* ============================================================
   COMPARE PAGE
   ============================================================ */
.compare-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: var(--white);
  z-index: 300;
  overflow-y: auto;
  padding: 32px;
}
.compare-overlay ~ .prizm-float-wrap {
  display: none;
}
.compare-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}
.compare-header .close-compare {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
}
.compare-header h2 {
  font-size: 32px;
  font-weight: 700;
  font-style: italic;
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
}
.compare-table th, .compare-table td {
  padding: 12px 16px;
  text-align: center;
  border-bottom: 1px solid var(--gray-100);
  font-size: 13px;
}
.compare-table th {
  font-weight: 400;
  color: var(--gray-400);
}
.compare-table td:first-child {
  text-align: left;
  font-weight: 600;
  color: var(--gray-600);
}
.compare-vehicle-header {
  text-align: center;
  padding: 16px;
}
.compare-vehicle-header img {
  width: 100%;
  max-width: 200px;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius);
  margin: 0 auto 8px;
}
.compare-vehicle-header .remove-link {
  font-size: 11px;
  color: var(--gray-400);
  cursor: pointer;
  display: block;
  margin-bottom: 4px;
}
.compare-vehicle-header .cv-name {
  font-size: 14px;
  font-weight: 600;
}
.compare-vehicle-header .cv-price {
  font-size: 18px;
  font-weight: 700;
}
.compare-vehicle-header .cv-price sup {
  font-size: 10px;
  color: var(--gray-400);
}
.compare-table td.best-in-class {
  color: var(--purple);
  font-weight: 600;
  position: relative;
}
.best-badge {
  display: inline-block;
  margin-left: 6px;
  background: rgba(89, 40, 229, 0.1);
  color: var(--purple);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 10px;
  vertical-align: middle;
}

/* ---- AI Compare Assistant ---- */
.ai-compare-section {
  margin-top: 32px;
  display: flex;
  justify-content: center;
}
.ai-compare-section .ai-chat-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  max-height: 70vh;
  width: 90%;
  max-width: 700px;
}
.ai-compare-section .ai-chat-messages {
  flex: 1;
  min-height: 0;
  max-height: none;
}
.ai-compare-section .ai-chat-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 999;
}
.ai-compare-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 36px;
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  color: var(--white);
  border: none;
  border-radius: 999px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(89, 40, 229, 0.3);
}
.ai-compare-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(89, 40, 229, 0.4);
}
.ai-compare-btn .ai-icon,
.ai-chat-title .ai-icon {
  font-size: 16px;
}
.ai-chat-panel {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}
.ai-chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  color: var(--white);
}
.ai-chat-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}
.ai-chat-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ai-chat-mute {
  cursor: pointer;
  font-size: 16px;
  opacity: 0.8;
  transition: var(--transition);
}
.ai-chat-mute:hover { opacity: 1; }
.ai-chat-close {
  cursor: pointer;
  font-size: 16px;
  opacity: 0.8;
  transition: var(--transition);
}
.ai-chat-close:hover { opacity: 1; }
.ai-chat-messages {
  padding: 20px;
  max-height: 480px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--light-2);
}
.ai-chat-welcome {
  text-align: center;
  padding: 12px 0;
  color: var(--gray-500);
  font-size: 13px;
  line-height: 1.6;
}
.ai-chat-welcome p { margin-bottom: 8px; }
.ai-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
}
.ai-suggestions button {
  padding: 8px 14px;
  font-family: var(--font);
  font-size: 12px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 20px;
  cursor: pointer;
  color: var(--purple);
  font-weight: 500;
  transition: var(--transition);
}
.ai-suggestions button:hover {
  background: rgba(89, 40, 229, 0.06);
  border-color: var(--purple);
}
.ai-followups {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
  padding: 4px 0 8px 36px;
}
.ai-followups button {
  padding: 6px 14px;
  font-family: var(--font);
  font-size: 12px;
  background: var(--white);
  border: 1px solid var(--purple);
  border-radius: 20px;
  cursor: pointer;
  color: var(--purple);
  font-weight: 500;
  transition: var(--transition);
}
.ai-followups button:hover {
  background: rgba(89, 40, 229, 0.08);
}
.ai-context-notice {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  padding: 6px 12px;
  margin: 4px 0;
  font-size: 11px;
  color: var(--gray-500);
  font-weight: 500;
}
.ai-context-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--purple);
  flex-shrink: 0;
}
.ai-msg {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.ai-msg-user {
  justify-content: flex-end;
}
.ai-msg-user .ai-msg-content {
  background: var(--purple);
  color: var(--white);
  border-radius: 16px 16px 4px 16px;
  padding: 10px 16px;
  font-size: 13px;
  line-height: 1.5;
  max-width: 80%;
}
.ai-msg-assistant .ai-msg-content {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: 16px 16px 16px 4px;
  padding: 10px 16px;
  font-size: 13px;
  line-height: 1.5;
  max-width: 85%;
  color: var(--gray-600);
}
.ai-msg-icon {
  color: var(--purple);
  font-size: 14px;
  margin-top: 4px;
  flex-shrink: 0;
}
.ai-typing {
  display: flex;
  gap: 4px;
  padding: 14px 18px !important;
}
.ai-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gray-300);
  animation: aiBounce 1.2s infinite;
}
.ai-typing span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes aiBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}
.ai-chat-input-wrap {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--gray-100);
  background: var(--white);
}
.ai-chat-input-wrap input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--gray-200);
  border-radius: 50px;
  font-family: var(--font);
  font-size: 13px;
  outline: none;
  transition: var(--transition);
}
.ai-chat-input-wrap input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(89, 40, 229, 0.1);
}
.ai-chat-input-wrap button {
  padding: 10px 20px;
  background: var(--purple);
  color: var(--white);
  border: none;
  border-radius: 50px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.ai-chat-input-wrap button:hover { background: var(--purple-dark); }
.ai-chat-input-wrap button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.ai-chat-disclaimer {
  padding: 8px 16px 12px;
  font-size: 10px;
  color: var(--gray-400);
  text-align: center;
  background: var(--white);
  line-height: 1.5;
}
.ai-chat-disclaimer a {
  color: var(--purple);
  text-decoration: underline;
}
@media (max-width: 600px) {
  .ai-chat-panel { border-radius: 0; }
  .ai-chat-messages { max-height: 360px; }
  .ai-suggestions { flex-direction: column; }
  .ai-suggestions button { width: 100%; }
}

/* ============================================================
   PRIZM FLOATING AI CHAT
   ============================================================ */
.prizm-float-wrap {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.prizm-float-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  background: linear-gradient(135deg, #5928E5, #4318B5);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(89, 40, 229, 0.35);
  transition: all 0.2s ease;
  animation: prizmPulse 2.5s ease-in-out infinite;
}
.prizm-float-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 28px rgba(89, 40, 229, 0.45);
}
.prizm-float-icon {
  font-size: 18px;
}
@keyframes prizmPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(89, 40, 229, 0.35); }
  50% { box-shadow: 0 4px 28px rgba(89, 40, 229, 0.55); }
}
.prizm-chat-panel {
  position: relative;
  width: 380px;
  max-height: 560px;
  border-radius: 16px;
  overflow: clip;
  background: var(--white);
  box-shadow: 0 8px 40px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
}
.prizm-chat-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 1.5px;
  background: conic-gradient(
    from var(--prizm-shimmer-angle, 0deg),
    transparent 0%,
    transparent 30%,
    rgba(89, 40, 229, 0.35) 36%,
    rgba(168, 130, 255, 0.55) 40%,
    rgba(255, 255, 255, 0.7) 42%,
    rgba(168, 130, 255, 0.55) 44%,
    rgba(89, 40, 229, 0.35) 48%,
    transparent 54%,
    transparent 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  animation: prizm-shimmer 4s linear infinite;
  pointer-events: none;
  z-index: 1;
  opacity: 0.6;
}
.prizm-chat-panel > * {
  position: relative;
  z-index: 2;
}
@property --prizm-shimmer-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
@keyframes prizm-shimmer {
  to { --prizm-shimmer-angle: 360deg; }
}
.prizm-chat-panel .ai-chat-header { border-radius: 16px 16px 0 0; }
.prizm-chat-panel .ai-chat-messages { max-height: 360px; }
.prizm-chat-panel .ai-chat-disclaimer { font-size: 10px; padding: 8px 16px; }
@media (max-width: 600px) {
  .prizm-float-wrap {
    bottom: 0;
    right: 0;
    left: 0;
    align-items: stretch;
  }
  .prizm-float-btn {
    position: fixed;
    bottom: 16px;
    right: 16px;
  }
  .prizm-float-wrap.prizm-open .prizm-float-btn { display: none; }
  .prizm-chat-panel {
    width: 100%;
    max-height: 80vh;
    border-radius: 16px 16px 0 0;
    margin-bottom: 0;
  }
}

/* Prizm Review Cards */
.prizm-review-section { margin: 8px 0 4px; }
.prizm-review-section strong { font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--gray-500); }
.prizm-review-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 6px 0;
}
.prizm-review-source {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-500);
  margin-bottom: 2px;
}
.prizm-review-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue-600, #2563eb);
  text-decoration: none;
  display: block;
  line-height: 1.3;
}
.prizm-review-title:hover { text-decoration: underline; }
.prizm-review-snippet {
  font-size: 12px;
  color: var(--gray-600);
  margin-top: 4px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.prizm-video-card .prizm-review-title { color: #dc2626; }
.prizm-play-icon { font-size: 11px; }
.prizm-more-link {
  font-size: 12px;
  color: var(--gray-500);
  text-decoration: none;
  display: block;
  margin-top: 4px;
}
.prizm-more-link:hover { text-decoration: underline; color: var(--gray-700); }

/* ============================================================
   NAV OVERLAY
   ============================================================ */
.nav-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  z-index: 300;
  display: flex;
}
.nav-overlay-dark {
  width: 40%;
  background: var(--black);
  padding: 40px;
  color: var(--white);
}
.nav-overlay-dark h4 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 24px;
  color: var(--gray-300);
}
.nav-overlay-dark .nav-cats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
.nav-overlay-dark .nav-cats a {
  font-size: 16px;
  font-weight: 500;
  color: var(--white);
  cursor: pointer;
}
.nav-overlay-dark .nav-cats a:hover { color: var(--green); }
.nav-overlay-dark .nav-links {
  margin-top: 40px;
}
.nav-overlay-dark .nav-links a {
  display: block;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  cursor: pointer;
}
.nav-overlay-dark .nav-links a:hover { color: var(--green); }
.nav-overlay-light {
  flex: 1;
  background: var(--white);
  padding: 40px;
  position: relative;
}
.nav-overlay-light .close-nav {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.nav-overlay-light .nav-promo {
  margin-top: 60px;
}
.nav-overlay-light .nav-promo .promo-label {
  font-size: 11px;
  color: var(--gray-400);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.nav-overlay-light .nav-promo h3 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 24px;
}
.nav-featured-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.nav-featured-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
}
.nav-featured-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}
.nav-featured-card .nf-info {
  padding: 8px 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-featured-card .nf-title {
  font-size: 13px;
  font-weight: 500;
}
.nav-featured-card .nf-price {
  font-size: 15px;
  font-weight: 700;
}

/* ============================================================
   HOW IT WORKS OVERLAY
   ============================================================ */
.hiw-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: var(--white);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}
.hiw-content {
  max-width: 900px;
  width: 100%;
}
.hiw-close {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  margin-bottom: 32px;
}
.hiw-content h2 {
  font-size: 40px;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 16px;
}
.hiw-cols {
  display: flex;
  gap: 24px;
  margin-bottom: 8px;
}
.hiw-cols p {
  font-size: 14px;
  color: var(--gray-500);
  line-height: 1.8;
}
.hiw-steps {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  margin-top: 32px;
}
.hiw-step img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
}
.hiw-step h4 {
  font-size: 16px;
  font-weight: 700;
  font-style: italic;
  margin-bottom: 4px;
}
.hiw-step p {
  font-size: 12px;
  color: var(--gray-500);
  line-height: 1.6;
}
.hiw-disclaimer {
  margin-top: 32px;
  font-size: 11px;
  color: var(--gray-400);
}

/* ============================================================
   AUTH PAGES (DEALER + CUSTOMER)
   ============================================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.auth-layout {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.auth-form-side {
  padding: 48px 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-image-side {
  position: relative;
  overflow: hidden;
}
.auth-image-side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.auth-breadcrumb {
  font-size: 12px;
  color: var(--gray-400);
  margin-bottom: 16px;
}
.auth-breadcrumb a { cursor: pointer; }
.auth-breadcrumb .active { color: var(--black); font-weight: 600; }
.auth-form-side h1 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 8px;
}
.auth-form-side .auth-subtitle {
  font-size: 16px;
  color: var(--gray-500);
  margin-bottom: 32px;
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
}
.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-bottom: 2px solid var(--gray-200);
  font-size: 14px;
  background: transparent;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus {
  border-bottom-color: var(--black);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group .upload-area {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  cursor: pointer;
  color: var(--gray-400);
  font-size: 13px;
}
.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--gray-200);
}
.auth-tab {
  padding: 10px 24px;
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-400);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.auth-tab:hover { color: var(--gray-600); }
.auth-tab.active {
  color: var(--black);
  border-bottom-color: var(--black);
}
.auth-submit-btn {
  padding: 14px 32px;
  background: var(--black);
  color: var(--white);
  border-radius: 32px;
  font-size: 15px;
  font-weight: 600;
  margin-top: 16px;
  cursor: pointer;
}
.auth-link {
  font-size: 13px;
  margin-top: 12px;
}
.auth-link a {
  color: var(--black);
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

/* Welcome / Landing Auth */
.auth-welcome {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-welcome-left {
  padding: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-welcome-left .welcome-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 12px;
}
.auth-welcome-left h1 {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 16px;
}
.auth-welcome-left .welcome-desc {
  font-size: 18px;
  color: var(--gray-500);
  margin-bottom: 32px;
}
.auth-welcome-btns {
  display: flex;
  gap: 16px;
}
.auth-welcome-btns .btn-signup {
  padding: 14px 32px;
  background: var(--black);
  color: var(--white);
  border-radius: 32px;
  font-size: 15px;
  font-weight: 600;
}
.auth-welcome-btns .btn-signin {
  padding: 14px 32px;
  border: 2px solid var(--black);
  border-radius: 32px;
  font-size: 15px;
  font-weight: 600;
}
.hiw-section {
  margin-top: 48px;
}
.hiw-section .hiw-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gray-400);
  cursor: pointer;
}
.auth-welcome-right {
  overflow: hidden;
}
.auth-welcome-right img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Completion Page */
.auth-complete {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-complete-image {
  overflow: hidden;
}
.auth-complete-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.auth-complete-content {
  padding: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-complete-content h1 {
  font-size: 48px;
  font-weight: 300;
  font-style: italic;
  line-height: 1.15;
  margin-bottom: 16px;
}
.auth-complete-content p {
  font-size: 16px;
  color: var(--gray-500);
  margin-bottom: 8px;
}
.auth-complete-content .resend-link {
  font-size: 13px;
  color: var(--gray-400);
  margin-bottom: 32px;
}
.auth-complete-content .resend-link a {
  color: var(--black);
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

/* Customer Account Details */
.account-details-form .skip-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray-400);
  margin-bottom: 24px;
}
.account-details-form .skip-toggle input { width: 16px; height: 16px; }
.account-details-form .ad-subtitle {
  font-size: 14px;
  color: var(--gray-500);
  margin-bottom: 24px;
  font-style: italic;
}
.ad-dropdown-group {
  margin-bottom: 16px;
}
.ad-dropdown-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
}
.ad-dropdown-group select {
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-bottom: 2px solid var(--gray-200);
  font-size: 14px;
  background: transparent;
  appearance: auto;
}

/* ============================================================
   DEALER DASHBOARD
   ============================================================ */
.dealer-dashboard {
  padding: 24px 32px;
}
.dash-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 12px;
}
.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.dash-stat {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}
.dash-stat .stat-label {
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 6px;
  font-weight: 500;
}
.dash-stat .stat-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.dash-stat .stat-num {
  font-size: 32px;
  font-weight: 700;
}
.dash-stat .stat-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
}
.stat-badge.positive { background: #E8F5E9; color: #2E7D32; }
.stat-badge.negative { background: #FFF3E0; color: #E65100; }

/* Dashboard 2-column grid */
.dash-grid-2col {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 20px;
}
.dash-col-left {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.dash-col-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Dashboard Panels */
.dash-panel {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 24px;
}
.dash-panel-full {
  flex: 1;
}
.dash-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.dash-panel-header h3 {
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--black);
}
.dash-panel-header h3 svg {
  width: 16px;
  height: 16px;
  color: var(--purple);
}
.dash-panel-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--purple);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.dash-panel-link:hover {
  text-decoration: underline;
}

/* Metric Row */
.dash-metric-row {
  display: flex;
  align-items: center;
  gap: 0;
}
.dash-metric {
  flex: 1;
  text-align: center;
  padding: 8px 0;
}
.dash-metric-num {
  font-size: 28px;
  font-weight: 700;
  color: var(--black);
  line-height: 1;
  margin-bottom: 4px;
}
.dash-metric-unit {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-400);
  margin-left: 3px;
}
.dash-metric-label {
  font-size: 12px;
  color: var(--gray-500);
  font-weight: 500;
}
.dash-metric-warn {
  color: #E65100;
}
.dash-metric-divider {
  width: 1px;
  height: 40px;
  background: var(--gray-200);
  flex-shrink: 0;
}

/* Pipeline */
.dash-pipeline {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.dash-pipeline-stage {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dash-pipeline-track {
  height: 6px;
  background: #f3f4f6;
  border-radius: 3px;
  overflow: hidden;
}
.dash-pipeline-bar {
  height: 100%;
  border-radius: 3px;
  min-width: 4px;
  transition: width 0.4s ease;
}
.dash-pipeline-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray-500);
}
.dash-pipeline-info strong {
  margin-left: auto;
  font-size: 14px;
  color: var(--black);
}
.dash-pipeline-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Aging Alert */
.dash-aging-alert {
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--light);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  font-size: 13px;
  color: var(--gray-700);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.dash-aging-alert strong {
  color: var(--gray-800);
}
.dash-aging-days {
  margin-left: auto;
  font-weight: 600;
  color: var(--gray-500);
}

/* Trending List */
.dash-trending-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.dash-trending-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
}
.dash-trending-item:last-child {
  border-bottom: none;
}
.dash-trending-rank {
  width: 24px;
  height: 24px;
  background: var(--light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-500);
  flex-shrink: 0;
}
.dash-trending-img {
  width: 52px;
  height: 36px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: var(--light);
}
.dash-trending-info {
  min-width: 0;
}
.dash-trending-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--black);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-trending-meta {
  font-size: 11px;
  color: var(--gray-400);
  margin-top: 1px;
}

/* Dashboard Up Rotation */
.dash-up-current {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--light);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  margin-bottom: 8px;
}
.dash-up-next {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
}

/* ============================================================
   DEALER INVENTORY PAGE
   ============================================================ */
.inventory-page {
  padding: 24px 32px;
}
.inventory-breadcrumb {
  font-size: 12px;
  color: var(--gray-400);
  margin-bottom: 24px;
}
.inventory-breadcrumb a { cursor: pointer; }
.inventory-breadcrumb .active { color: var(--black); font-weight: 600; }
.inventory-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.inventory-search {
  position: relative;
  width: 300px;
}
.inventory-search input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  border: 1px solid var(--gray-200);
  border-radius: 24px;
  font-size: 14px;
}
.inventory-search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--gray-400);
}
.upload-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--black);
  color: var(--white);
  border-radius: 24px;
  font-size: 13px;
  font-weight: 600;
}
.inventory-table {
  width: 100%;
  border-collapse: collapse;
}
.inventory-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-500);
  border-bottom: 2px solid var(--gray-200);
}
.inventory-table td {
  padding: 10px 12px;
  font-size: 13px;
  border-bottom: 1px solid var(--gray-100);
}
.inventory-table tr:hover { background: var(--light-2); }
.trend-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
}
.trend-badge.up { background: #E8F5E9; color: #2E7D32; }
.trend-badge.down { background: #FFEBEE; color: #C62828; }
.manage-link {
  color: var(--black);
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}
.inventory-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  font-size: 13px;
}
.pagination-nums {
  display: flex;
  gap: 4px;
}
.pagination-nums button {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pagination-nums button.active {
  background: var(--black);
  color: var(--white);
}
.pagination-nav {
  padding: 8px 20px;
  border: 1px solid var(--gray-200);
  border-radius: 24px;
  font-size: 13px;
  font-weight: 600;
}

/* ============================================================
   FOOTER
   ============================================================ */
.app-footer {
  border-top: 1px solid var(--gray-200);
  padding: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}
.app-footer .footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}
.app-footer .footer-logo svg { width: 24px; height: 24px; }
.app-footer .footer-logo-text {
  font-size: 18px;
  font-weight: 700;
}
.app-footer .footer-links {
  display: flex;
  gap: 24px;
  font-size: 13px;
}
.app-footer .footer-links a { cursor: pointer; }
.app-footer .footer-links a:hover { color: var(--purple); }
.app-footer .footer-copy {
  font-size: 12px;
  color: var(--gray-400);
}
.app-footer .footer-legal {
  display: flex;
  gap: 16px;
  font-size: 12px;
}
.app-footer .footer-legal a { cursor: pointer; color: var(--gray-400); }

/* ============================================================
   STRIPE MOCK MODAL
   ============================================================ */
.stripe-modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stripe-modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  width: 420px;
  padding: 32px;
}
.stripe-modal .stripe-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.stripe-modal .stripe-logo {
  font-size: 24px;
  font-weight: 700;
  color: #635BFF;
}
.stripe-modal .stripe-close {
  font-size: 20px;
  cursor: pointer;
}
.stripe-modal .stripe-amount {
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 24px;
}
.stripe-modal .stripe-field {
  margin-bottom: 16px;
}
.stripe-modal .stripe-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.stripe-modal .stripe-field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  font-size: 14px;
}
.stripe-modal .stripe-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.stripe-pay-btn {
  width: 100%;
  padding: 14px;
  background: #635BFF;
  color: var(--white);
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  margin-top: 16px;
  transition: background 0.2s;
}
.stripe-pay-btn:hover { background: #4B45C6; }
.stripe-modal .stripe-footer {
  text-align: center;
  margin-top: 16px;
  font-size: 11px;
  color: var(--gray-400);
}
.stripe-processing {
  text-align: center;
  padding: 48px;
}
.stripe-processing .spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--gray-200);
  border-top-color: #635BFF;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.stripe-success {
  text-align: center;
  padding: 48px;
}
.stripe-success .checkmark {
  width: 64px;
  height: 64px;
  background: #E8F5E9;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #2E7D32;
  margin: 0 auto 16px;
}

/* ============================================================
   DEALER HEADER (alternate for dashboard)
   ============================================================ */
.dealer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  border-bottom: 1px solid var(--gray-200);
}
.dealer-header .logo {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
}
.dealer-header .logo-text {
  font-size: 22px;
  font-weight: 700;
}
.dealer-header .logo-sub {
  font-size: 11px;
  color: var(--gray-400);
  margin-top: -2px;
}
.dealer-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Notification Bell */
.notif-bell-wrap {
  position: relative;
}
.notif-bell {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--gray-200);
  background: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-600);
  transition: all 0.15s;
  position: relative;
}
.notif-bell:hover {
  border-color: var(--purple);
  color: var(--purple);
}
.notif-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  background: #EF4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--white);
}

/* Notification Dropdown */
.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 380px;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
  z-index: 1000;
  overflow: hidden;
}
.notif-dropdown-header {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.notif-dropdown-header h3 {
  font-size: 16px;
  font-weight: 700;
}
.notif-mark-read {
  font-size: 12px;
  font-weight: 600;
  color: var(--purple);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.notif-mark-read:hover { text-decoration: underline; }
.notif-dropdown-list {
  max-height: 380px;
  overflow-y: auto;
}
.notif-item {
  display: flex;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer;
  transition: background 0.1s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--light); }
.notif-item.unread { background: #FAFAFE; }
.notif-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}
.notif-item-icon svg { width: 14px; height: 14px; }
.notif-item-body { min-width: 0; }
.notif-item-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--black);
}
.notif-item-name {
  font-size: 13px;
  color: var(--gray-600);
}
.notif-item-detail {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 1px;
}
.notif-item-time {
  font-size: 11px;
  color: var(--gray-400);
  margin-top: 3px;
}
.notif-item-body { cursor: pointer; min-width: 0; flex: 1; }
.notif-item-dismiss {
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  color: var(--gray-400);
  font-size: 12px;
  cursor: pointer;
  border-radius: 6px;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.notif-item-dismiss:hover {
  background: var(--gray-100);
  color: var(--black);
}
.notif-empty {
  padding: 32px 20px;
  text-align: center;
  font-size: 13px;
  color: var(--gray-400);
}
.notif-dropdown-tabs {
  display: flex;
  border-top: 1px solid var(--gray-200);
}
.notif-dropdown-tabs button {
  flex: 1;
  padding: 12px;
  border: none;
  background: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
  cursor: pointer;
  transition: color 0.15s;
}
.notif-dropdown-tabs button:hover {
  color: var(--purple);
}

/* ============================================================
   UTILITIES
   ============================================================ */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .vehicle-grid { grid-template-columns: repeat(3, 1fr); }
  .similar-row { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .vehicle-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 0 12px 16px; }
  .vdp-main { grid-template-columns: 1fr; }
  .auth-layout, .auth-welcome, .auth-complete { grid-template-columns: 1fr; }
  .auth-image-side, .auth-welcome-right, .auth-complete-image { display: none; }
  .summary-layout, .confirm-layout { grid-template-columns: 1fr; }
  .dash-grid-2col { grid-template-columns: 1fr; }
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
  .tradein-hero, .tradein-details-layout, .tradein-result-layout { grid-template-columns: 1fr; }
  .why-banner-cols { flex-direction: column; gap: 16px; }
  .app-header { padding: 12px 16px; }
  .category-tabs { padding: 8px 12px; gap: 6px; }
  .filter-bar { padding: 12px 16px; }
  .similar-row { grid-template-columns: repeat(2, 1fr); }
  .liked-panel { width: 100%; }
  .nav-overlay-dark { width: 50%; }

  /* Header: hide trade-in button text on tablet, show compact */
  .header-actions .trade-in-btn { padding: 6px 12px; font-size: 12px; }
  .header-actions { gap: 10px; }
  .header-search { flex: 1 1 300px; max-width: 360px; }

  /* Vehicle cards: tighter padding */
  .card-info { padding: 8px 6px; }
  .card-info .card-title { font-size: 13px; }
  .card-info .card-price { font-size: 16px; }
  .card-info .card-year-make { font-size: 10px; }
  .price-sale-sm { font-size: 16px !important; }
  .price-original-sm { font-size: 11px !important; }
  .price-savings-sm { font-size: 10px !important; }

  /* VDP: constrain gallery image height on mobile */
  .vdp-gallery .main-image img { aspect-ratio: 16/9; }
  /* VDP action buttons: shorter text handled via JS, tighter sizing */
  .vdp-action-buttons button { padding: 11px 16px; font-size: 13px; }
  .vdp-deposit-btn { font-size: 14px; padding: 12px; max-width: 100%; }
  .vdp-container { padding: 16px 12px; }

  /* Why banner */
  .why-banner { margin: 16px 12px; padding: 32px 24px; }
  .why-banner h2 { font-size: 24px; }

  /* Top bar */
  .top-bar { padding: 6px 12px; font-size: 11px; }
}

@media (max-width: 480px) {
  /* Ensure 2 columns stay on very small screens */
  .vehicle-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 0 8px 12px; }

  /* Header: hide trade-in text, icon only wouldn't work, so make it very compact */
  .header-actions .trade-in-btn { display: none; }
  .app-header { padding: 10px 10px; gap: 8px; }
  .header-search input { padding: 8px 36px 8px 32px; font-size: 13px; }
  .header-actions { gap: 8px; }
  .avatar { width: 34px; height: 34px; font-size: 14px; }
  .header-compare-btn { width: 32px; height: 32px; }

  /* Logo */
  .app-header .logo-text { font-size: 18px; }
  .app-header .logo-sub { display: none; }

  /* Card info: compact for 2-column fit */
  .card-info { padding: 6px 4px; }
  .card-info .card-title { font-size: 12px; margin: 1px 0 4px; }
  .card-info .card-price { font-size: 14px; }
  .card-info .card-year-make { font-size: 9px; }
  .card-info .card-dealer { font-size: 9px; }
  .price-sale-sm { font-size: 14px !important; }
  .price-original-sm { font-size: 10px !important; }
  .price-savings-sm { font-size: 9px !important; }

  /* Category tabs: smaller pills */
  .category-tabs { padding: 6px 8px; gap: 4px; }
  .category-tabs button { padding: 5px 10px; font-size: 11px; }

  /* Filter bar */
  .filter-bar { padding: 8px 10px; }
  .filter-toggle { font-size: 14px; }

  /* VDP */
  .vdp-container { padding: 12px 8px; }
  .vdp-info h2 { font-size: 20px; }
  .vdp-big-price { font-size: 22px; }
  .vdp-action-buttons button { padding: 10px 12px; font-size: 13px; max-width: 100%; }
  .vdp-deposit-btn { max-width: 100%; font-size: 14px; }
  .vdp-stats { gap: 16px; }

  /* Top bar compact */
  .top-bar { padding: 5px 8px; font-size: 10px; }

  /* Why banner */
  .why-banner { margin: 12px 8px; padding: 24px 16px; }
  .why-banner h2 { font-size: 20px; margin-bottom: 16px; }
  .why-banner-cols .col { font-size: 13px; }
  .why-banner .learn-btn { padding: 10px 18px; font-size: 12px; }

  /* Card badges: smaller on mobile */
  .card-badge { font-size: 8px; padding: 4px 8px; letter-spacing: 0.5px; }
  .badge-shipping { font-size: 7px; padding: 3px 6px; letter-spacing: 1px; }

  /* Nav overlay */
  .nav-overlay-dark { width: 75%; padding: 24px 16px; }
  .nav-overlay-dark .nav-cats { grid-template-columns: 1fr 1fr; }

  /* Footer compact */
  .app-footer { padding: 16px 12px; flex-direction: column; gap: 12px; align-items: flex-start; }
}

/* Customer login page how it works section */
.customer-hiw-section {
  margin-top: 48px;
  padding-top: 32px;
}
.customer-hiw-section .hiw-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gray-400);
  cursor: pointer;
  margin-bottom: 32px;
}
.customer-hiw-section h2 {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 16px;
}
.customer-hiw-section .hiw-desc {
  font-size: 15px;
  color: var(--gray-500);
  line-height: 1.8;
  max-width: 400px;
  margin-bottom: 32px;
}
.customer-hiw-steps {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  margin-top: 32px;
}
.customer-hiw-step img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
}
.customer-hiw-step h4 {
  font-size: 15px;
  font-weight: 700;
  font-style: italic;
  margin-bottom: 4px;
}
.customer-hiw-step p {
  font-size: 12px;
  color: var(--gray-500);
  line-height: 1.5;
}

/* Dealer welcome: How it works section at bottom */
.dealer-hiw-section {
  padding: 48px 64px;
}
.dealer-hiw-section .hiw-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gray-400);
  cursor: pointer;
  margin-bottom: 32px;
}
.dealer-hiw-section h2 {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 8px;
}
.dealer-hiw-section .hiw-desc-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-bottom: 32px;
}
.dealer-hiw-section .hiw-desc-row p {
  font-size: 15px;
  color: var(--gray-500);
  line-height: 1.8;
}
.dealer-hiw-steps {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
}
.dealer-hiw-step img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
}
.dealer-hiw-step h4 {
  font-size: 15px;
  font-weight: 700;
  font-style: italic;
  margin-bottom: 4px;
}
.dealer-hiw-step p {
  font-size: 12px;
  color: var(--gray-500);
  line-height: 1.5;
}

/* ============================================================
   DEALER SIDEBAR NAVIGATION
   ============================================================ */
.dealer-layout {
  display: flex;
  min-height: calc(100vh - 70px);
}

.dealer-sidebar {
  width: 220px;
  background: var(--white);
  border-right: 1px solid var(--gray-200);
  padding: 20px 0;
  flex-shrink: 0;
  position: sticky;
  top: 70px;
  height: calc(100vh - 70px);
  overflow-y: auto;
}

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

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

.sidebar-link:hover {
  background: var(--light);
  color: var(--black);
}

.sidebar-link.active {
  background: #EDE7F6;
  color: var(--purple);
  font-weight: 600;
}

.sidebar-link.active svg {
  stroke: var(--purple);
}

.sidebar-link svg {
  flex-shrink: 0;
}

.dealer-content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  background: var(--light-2);
}

/* ============================================================
   MODAL OVERLAYS (Test Drive, Payment Calculator)
   ============================================================ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease;
}

.modal-content {
  background: var(--white);
  border-radius: 16px;
  padding: 32px;
  max-width: 520px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* ============================================================
   PROFILE PAGE
   ============================================================ */
.profile-page {
  max-width: 800px;
  margin: 32px auto;
  padding: 0 24px;
}

.profile-section {
  background: var(--white);
  border-radius: 12px;
  padding: 24px;
  border: 1px solid var(--gray-200);
  margin-bottom: 24px;
}

.profile-section h3 {
  font-size: 16px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-100);
}
.profile-tab {
  padding: 10px 20px;
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-500);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s ease;
}
.profile-tab:hover {
  color: var(--black);
}
.profile-tab.active {
  color: var(--purple);
  border-bottom-color: var(--purple);
  font-weight: 600;
}

/* ============================================================
   VDP ACTION BUTTONS
   ============================================================ */
.vdp-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 0;
}

.vdp-action-buttons button {
  padding: 13px 24px;
  border: none;
  border-radius: 32px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  max-width: 320px;
  width: 100%;
}

.vdp-action-buttons button:nth-child(1) {
  background: rgba(89, 40, 229, 0.08);
  color: var(--purple);
}
.vdp-action-buttons button:nth-child(1):hover {
  background: rgba(89, 40, 229, 0.15);
}

.vdp-action-buttons button:nth-child(2) {
  background: rgba(54, 214, 255, 0.1);
  color: #0a9fc2;
}
.vdp-action-buttons button:nth-child(2):hover {
  background: rgba(54, 214, 255, 0.18);
}

.vdp-action-buttons button:nth-child(3) {
  background: rgba(0, 225, 180, 0.1);
  color: #0a967d;
}
.vdp-action-buttons button:nth-child(3):hover {
  background: rgba(0, 225, 180, 0.18);
}

/* ============================================================
   SIGN OUT BUTTON
   ============================================================ */
.sign-out-btn {
  background: none;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  color: var(--gray-600);
  transition: all 0.15s ease;
}

.sign-out-btn:hover {
  border-color: var(--gray-500);
  color: var(--black);
}

/* ============================================================
   DATA TABLES (Test Drives, Reservations)
   ============================================================ */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.data-table thead tr {
  text-align: left;
  border-bottom: 2px solid var(--gray-200);
  background: var(--light);
}

.data-table th {
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
}

.data-table td {
  padding: 12px 16px;
  font-size: 14px;
}

.data-table tbody tr {
  border-bottom: 1px solid var(--gray-100);
}

.data-table tbody tr:hover {
  background: var(--light-2);
}

/* Status Badges */
.status-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}

.status-badge.pending {
  background: #FFF3E0;
  color: #E65100;
}

.status-badge.confirmed {
  background: #E3F2FD;
  color: #1565C0;
}

.status-badge.completed {
  background: #E8F5E9;
  color: #2E7D32;
}

.status-badge.active {
  background: #E8F5E9;
  color: #2E7D32;
}

.status-badge.inactive {
  background: #F5F5F5;
  color: #757575;
}

.status-badge.lead {
  background: #E3F2FD;
  color: #1565C0;
}

/* ============================================================
   KPI CARDS (Analytics)
   ============================================================ */
.dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.kpi-card {
  background: var(--white);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--gray-200);
  transition: box-shadow 0.15s ease;
}

.kpi-card:hover {
  box-shadow: var(--shadow);
}

/* ============================================================
   CHART BARS
   ============================================================ */
.chart-bar-group {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  height: 200px;
}

.chart-bar {
  background: var(--purple);
  border-radius: 4px 4px 0 0;
  transition: height 0.3s ease;
}

.channel-bar {
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* ============================================================
   CUSTOMER GRID & CARDS
   ============================================================ */
.customer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.customer-card {
  background: var(--white);
  border-radius: 10px;
  padding: 16px;
  border: 1px solid var(--gray-200);
  cursor: pointer;
  transition: all 0.15s ease;
}

.customer-card:hover {
  border-color: var(--gray-300);
  box-shadow: var(--shadow);
}

.customer-detail-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 360px;
  height: 100vh;
  background: var(--white);
  border-left: 1px solid var(--gray-200);
  box-shadow: -4px 0 20px rgba(0,0,0,0.08);
  padding: 24px;
  flex-shrink: 0;
  z-index: 100;
  overflow-y: auto;
  animation: slideIn 0.2s ease;
}

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

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

@keyframes barGrow {
  from { opacity: 0; transform: scaleY(0); }
  to { opacity: 1; transform: scaleY(1); }
}

@keyframes donutSpin {
  from { opacity: 0; transform: rotate(-90deg) scale(0.8); }
  to { opacity: 1; transform: rotate(0) scale(1); }
}

/* Line chart animations */
.line-chart-path {
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: lineDraw 1.2s ease forwards;
}

.line-chart-dot {
  opacity: 0;
  animation: dotFadeIn 0.3s ease forwards;
}

@keyframes lineDraw {
  to { stroke-dashoffset: 0; }
}

@keyframes dotFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ============================================================
   SPECIAL PRICING DISPLAY
   ============================================================ */
.price-original {
  text-decoration: line-through;
  color: var(--gray-400);
  font-size: 14px;
  font-weight: 400;
}

.price-original-sm {
  font-size: 12px;
}

.price-sale {
  font-weight: 700;
  color: #22C55E;
  font-size: 28px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.price-sale-label {
  font-size: 16px;
  font-weight: 600;
}

.price-sale-sm {
  font-weight: 700;
  color: #22C55E;
  font-size: 18px;
}

.price-savings {
  display: inline-block;
  background: #ECFDF5;
  color: #16A34A;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 4px;
}

.price-savings-sm {
  font-size: 11px;
  color: #16A34A;
  font-weight: 600;
  margin-top: 2px;
}

/* ============================================================
   TEAM GRID & CARDS
   ============================================================ */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.team-card {
  background: var(--white);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--gray-200);
  transition: box-shadow 0.15s ease;
}

.team-card:hover {
  box-shadow: var(--shadow);
}

/* Team Page Layout */
.team-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.team-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  overflow: hidden;
}
.team-list-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100);
  transition: background 0.1s;
}
.team-list-row:last-child { border-bottom: none; }
.team-list-row:hover { background: var(--light); }
.team-role-badge {
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.team-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.team-action-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  background: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  transition: all 0.15s;
}
.team-action-btn:hover {
  border-color: var(--purple);
  color: var(--purple);
}
.team-action-btn svg { width: 14px; height: 14px; }

/* Up Rotation */
.up-rotation-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  margin-bottom: 2px;
  transition: background 0.15s;
}
.up-rotation-row.current {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
}
.up-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #16A34A;
  background: #DCFCE7;
  padding: 2px 8px;
  border-radius: 10px;
}

/* Team Modal */
.team-modal {
  background: var(--white);
  border-radius: 16px;
  width: 520px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.team-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-100);
}
.team-modal-header h2 {
  font-size: 18px;
  font-weight: 700;
}
.team-modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--gray-400);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.team-modal-close:hover { background: var(--light); }
.team-modal-body {
  padding: 24px;
}
.team-modal-body .form-group label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  display: block;
}
.team-modal-body .form-group input,
.team-modal-body .form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
}
.team-modal-body .form-group input:focus,
.team-modal-body .form-group select:focus {
  outline: none;
  border-color: var(--purple);
}
.team-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--gray-100);
}

/* Status Toggle */
.status-toggle {
  display: flex;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  overflow: hidden;
}
.status-btn {
  flex: 1;
  padding: 9px 16px;
  border: none;
  background: var(--white);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--gray-500);
  transition: all 0.2s;
}
.status-btn.active {
  background: #E8F5E9;
  color: #2E7D32;
}

/* Avatar Color Swatches */
.color-swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.15s, transform 0.15s;
}
.color-swatch:hover { transform: scale(1.15); }
.color-swatch.selected { border-color: var(--black); transform: scale(1.15); }

/* Toggle Switch (team/settings) */
.tm-toggle {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
}
.tm-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.tm-toggle .tm-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #D1D5DB;
  border-radius: 22px;
  transition: background 0.2s;
}
.tm-toggle .tm-slider:before {
  content: '';
  position: absolute;
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
}
.tm-toggle input:checked + .tm-slider {
  background: var(--purple);
}
.tm-toggle input:checked + .tm-slider:before {
  transform: translateX(16px);
}

/* Notification Card in Modal */
.team-notif-card {
  background: var(--light);
  border-radius: 12px;
  padding: 16px 20px;
}
.team-notif-table {
  width: 100%;
  border-collapse: collapse;
}
.team-notif-table th {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-400);
  padding: 6px 0;
  text-align: left;
}
.team-notif-table td {
  padding: 8px 0;
  font-size: 13px;
  border-top: 1px solid var(--gray-200);
}

/* ============================================================
   ROLE-BASED PERMISSIONS
   ============================================================ */
.permissions-panel {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  overflow: hidden;
}
.permissions-role-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--gray-200);
  overflow-x: auto;
}
.perm-role-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-500);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.perm-role-tab:hover {
  color: var(--black);
  background: var(--light);
}
.perm-role-tab.active {
  color: var(--black);
  font-weight: 600;
  border-bottom-color: var(--purple);
}
.perm-role-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.permissions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.perm-section {
  border-right: 1px solid var(--gray-100);
  border-bottom: 1px solid var(--gray-100);
}
.perm-section:nth-child(2n) {
  border-right: none;
}
.perm-section:nth-last-child(-n+2) {
  border-bottom: none;
}
.perm-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  cursor: pointer;
  transition: background 0.1s;
}
.perm-section-header:hover {
  background: var(--light);
}
.perm-section.expanded .perm-section-header {
  background: var(--light);
  border-bottom: 1px solid var(--gray-100);
}
.perm-chevron {
  color: var(--gray-400);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.perm-section.expanded .perm-chevron {
  transform: rotate(180deg);
}
.perm-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
}
.perm-count {
  font-size: 11px;
  font-weight: 500;
  color: var(--gray-400);
  background: var(--gray-100);
  padding: 1px 8px;
  border-radius: 10px;
}
.perm-section-icon {
  display: flex;
  align-items: center;
  color: var(--gray-400);
}
.perm-section-icon svg {
  width: 16px;
  height: 16px;
}
.perm-sub-list {
  padding: 4px 0;
}
.perm-sub-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px 10px 46px;
  transition: background 0.1s;
}
.perm-sub-row:hover {
  background: var(--light);
}
.perm-sub-label {
  font-size: 13px;
  color: var(--gray-600);
}

/* ============================================================
   INTEGRATION CARDS
   ============================================================ */
.integration-card {
  background: var(--white);
  border-radius: 12px;
  padding: 24px;
  border: 1px solid var(--gray-200);
  transition: box-shadow 0.15s ease;
}

.integration-card:hover {
  box-shadow: var(--shadow);
}

/* ============================================================
   SETTINGS & ABOUT EDITOR
   ============================================================ */
.settings-form {
  background: var(--white);
  border-radius: 12px;
  padding: 24px;
  border: 1px solid var(--gray-200);
}

.about-editor textarea {
  transition: border-color 0.15s ease;
}

.about-editor textarea:focus {
  border-color: var(--purple);
}

/* ============================================================
   PILL TABS (Sub-tab navigation)
   ============================================================ */
.pill-tabs {
  display: flex;
  gap: 4px;
  background: var(--gray-100);
  border-radius: 999px;
  padding: 4px;
  width: fit-content;
}

.pill-tab {
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-500);
  cursor: pointer;
  transition: all 0.15s ease;
  background: none;
  border: none;
  white-space: nowrap;
}

.pill-tab:hover {
  color: var(--black);
}

.pill-tab.active {
  background: var(--purple);
  color: var(--white);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(89, 40, 229, 0.3);
}

/* ============================================================
   TAB FILTER BAR
   ============================================================ */
.tab-filter-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: none;
  padding-bottom: 0;
}

.tab-filter-bar > button {
  padding: 8px 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-500);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.tab-filter-bar > button:hover {
  color: var(--black);
}

.tab-filter-bar > button.active {
  color: var(--purple);
  border-bottom-color: var(--purple);
  font-weight: 600;
}

/* ============================================================
   BUTTON VARIANTS
   ============================================================ */
.btn-primary-sm {
  padding: 8px 16px;
  background: var(--purple);
  color: var(--white);
  border: none;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-primary-sm:hover {
  background: var(--purple-dark);
}

.btn-outline-sm {
  padding: 8px 16px;
  background: var(--white);
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-outline-sm:hover {
  border-color: var(--gray-400);
  color: var(--black);
}

/* ============================================================
   AVATAR SIZES
   ============================================================ */
.avatar-sm {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--purple);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}

.avatar-md {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--purple);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}

.avatar-lg {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--purple);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  flex-shrink: 0;
}

/* ============================================================
   KPI CARD INNER ELEMENTS
   ============================================================ */
.kpi-label {
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 4px;
  font-weight: 500;
}

.kpi-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--black);
  line-height: 1.2;
}

/* ============================================================
   OVERVIEW QUICK CARDS
   ============================================================ */
.overview-quick-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.overview-quick-card:hover {
  border-color: var(--purple);
  box-shadow: 0 2px 8px rgba(89, 40, 229, 0.1);
}

.overview-quick-card h4 {
  font-size: 13px;
  font-weight: 600;
  margin-top: 8px;
}

.overview-quick-card p {
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 2px;
}

/* ============================================================
   SETTINGS TWO-COLUMN LAYOUT
   ============================================================ */
.settings-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.settings-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 24px;
}

.settings-card-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-100);
}

.settings-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.settings-form-grid .form-group input,
.settings-form-grid .form-group select {
  max-width: 100%;
}

/* ============================================================
   HOLDING COST BREAKDOWN (Settings > Costs)
   ============================================================ */
.holding-cost-breakdown { display: flex; flex-direction: column; gap: 10px; }
.hc-row { display: flex; align-items: center; gap: 10px; }
.hc-row-label { flex: 0 0 140px; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.hc-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.hc-row-bar { flex: 1; background: var(--gray-100); border-radius: 4px; height: 8px; overflow: hidden; }
.hc-row-bar-fill { height: 100%; border-radius: 4px; transition: width 0.4s ease; }
.hc-row-value { flex: 0 0 60px; text-align: right; font-size: 13px; font-weight: 600; }

/* ============================================================
   LOGO UPLOAD COMPACT
   ============================================================ */
.logo-upload-compact {
  width: 120px;
  height: 120px;
  border: 2px dashed var(--gray-200);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s ease;
  background: var(--light-2);
}

.logo-upload-compact:hover {
  border-color: var(--purple);
}

/* ============================================================
   HOURS TABLE
   ============================================================ */
.hours-table {
  width: 100%;
  border-collapse: collapse;
}

.hours-table td {
  padding: 8px 4px;
  font-size: 13px;
  border-bottom: 1px solid var(--gray-100);
}

.hours-table td:first-child {
  font-weight: 600;
  width: 100px;
  color: var(--gray-600);
}

.hours-input {
  width: 80px;
  padding: 6px 8px;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  font-size: 13px;
  text-align: center;
}

.hours-input:focus {
  border-color: var(--purple);
  outline: none;
}

/* ============================================================
   CUSTOMER DETAIL PANEL (Enhanced)
   ============================================================ */
.stage-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.stage-chip {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-500);
  background: none;
  border: 1px solid var(--gray-200);
  cursor: pointer;
  transition: all 0.15s ease;
  margin: -0.5px;
}

.stage-chip:first-child {
  border-radius: 6px 0 0 6px;
}

.stage-chip:last-child {
  border-radius: 0 6px 6px 0;
}

.stage-chip:hover {
  color: var(--black);
  background: var(--gray-50, #f9fafb);
}

.stage-chip.active {
  color: var(--chip-color, var(--purple));
  border-color: var(--chip-color, var(--purple));
  background: color-mix(in srgb, var(--chip-color, var(--purple)) 8%, transparent);
  font-weight: 600;
  z-index: 1;
  position: relative;
}

.note-type-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.note-type-tabs {
  display: flex;
  gap: 0;
  flex: 1;
}

.note-type-btn {
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 500;
  color: var(--gray-500);
  background: var(--white);
  border: 1px solid var(--gray-200);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  margin: -0.5px;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.note-type-btn:first-child {
  border-radius: 6px 0 0 6px;
}

.note-type-btn:last-child {
  border-radius: 0 6px 6px 0;
}

.note-type-btn:hover {
  color: var(--black);
  background: var(--gray-50, #f9fafb);
}

.note-type-btn.active {
  background: var(--purple);
  color: var(--white);
  border-color: var(--purple);
  font-weight: 600;
  z-index: 1;
  position: relative;
}

.note-type-btn.active svg {
  stroke: var(--white);
}

.detail-info-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.detail-info-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
  color: var(--gray-600);
}

.detail-info-row span:first-child {
  color: var(--gray-500);
  font-weight: 500;
}

.detail-info-row span:last-child {
  font-weight: 600;
  color: var(--black);
}

.detail-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--gray-200);
}

.detail-tab {
  padding: 8px 14px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-500);
  cursor: pointer;
  transition: all 0.15s ease;
}

.detail-tab:hover {
  color: var(--black);
}

.detail-tab.active {
  color: var(--purple);
  border-bottom-color: var(--purple);
  font-weight: 600;
}

/* ============================================================
   PIPELINE / KANBAN VIEW
   ============================================================ */
.pipeline-view {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 16px;
}

.pipeline-col {
  min-width: 220px;
  flex: 1;
  background: var(--light);
  border-radius: 10px;
  padding: 12px;
}

.pipeline-col-collapsed {
  min-width: 40px;
  flex: 0;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  cursor: pointer;
  padding: 12px 6px;
  opacity: 0.7;
  transition: opacity 0.15s ease;
}

.pipeline-col-collapsed:hover {
  opacity: 1;
}

.pipeline-col-collapsed .pipeline-col-header {
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.pipeline-col-header {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-500);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pipeline-col-header span {
  background: var(--gray-200);
  color: var(--gray-600);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
}

.pipeline-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pipeline-card:hover {
  border-color: var(--purple);
  box-shadow: 0 2px 6px rgba(89, 40, 229, 0.08);
}

.pipeline-card h4 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}

.pipeline-card p {
  font-size: 12px;
  color: var(--gray-400);
  margin: 0;
}

/* ============================================================
   SIDEBAR SPACER & SIGN OUT
   ============================================================ */
.sidebar-spacer {
  flex: 1;
}

.sidebar-signout {
  padding: 0 8px;
  margin-top: 8px;
  border-top: 1px solid var(--gray-200);
  padding-top: 8px;
}

/* ============================================================
   ADDITIONAL STATUS BADGES
   ============================================================ */
.status-badge.new-lead {
  background: #EDE7F6;
  color: var(--purple);
}

.status-badge.contacted {
  background: #E3F2FD;
  color: #1565C0;
}

.status-badge.test-drive {
  background: #E0F7FA;
  color: #00838F;
}

.status-badge.reserved {
  background: #FFF3E0;
  color: #E65100;
}

.status-badge.in-finance {
  background: #FCE4EC;
  color: #AD1457;
}

.status-badge.sold {
  background: #E8F5E9;
  color: #2E7D32;
}

.status-badge.approved {
  background: #E8F5E9;
  color: #2E7D32;
}

.status-badge.denied {
  background: #FFEBEE;
  color: #C62828;
}

.status-badge.in-review {
  background: #E3F2FD;
  color: #1565C0;
}

.status-badge.cancelled {
  background: #FFEBEE;
  color: #C62828;
}

/* ============================================================
   RESPONSIVE: Dealer Sidebar
   ============================================================ */
@media (max-width: 900px) {
  .dealer-sidebar {
    width: 60px;
    padding: 12px 0;
  }
  .sidebar-link span {
    display: none;
  }
  .sidebar-link {
    justify-content: center;
    padding: 10px;
  }
  .dealer-content {
    padding: 16px;
  }
  .dash-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .customer-detail-panel {
    width: 100%;
  }
  .settings-two-col {
    grid-template-columns: 1fr;
  }
  .settings-form-grid {
    grid-template-columns: 1fr;
  }
  .pipeline-view {
    flex-direction: column;
  }
  .pipeline-col {
    min-width: 100%;
  }
  .pill-tabs {
    overflow-x: auto;
    width: 100%;
  }
}

@media (max-width: 600px) {
  .dealer-sidebar {
    display: none;
  }
  .dash-kpi-grid {
    grid-template-columns: 1fr;
  }
  .dash-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .tab-filter-bar {
    overflow-x: auto;
  }
}

/* ============================================================
   CREDIT APPLICATION - Consumer Side
   ============================================================ */

.credit-app-container {
  max-width: 500px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

.credit-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 4px;
}

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  border: 2px solid var(--gray-300);
  color: var(--gray-400);
  background: var(--white);
  flex-shrink: 0;
}

.step-circle.active {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
}

.step-circle.completed {
  background: #22c55e;
  color: #fff;
  border-color: #22c55e;
}

.step-connector {
  width: 40px;
  height: 2px;
  background: var(--gray-300);
  flex-shrink: 0;
}

.step-connector.completed {
  background: #22c55e;
}

.credit-vehicle-label {
  font-size: 13px;
  color: var(--gray-500);
  margin: 12px 0 20px;
}

.credit-section-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 20px;
}

.credit-form .form-group {
  margin-bottom: 16px;
}

.credit-form .form-group label {
  display: block;
  font-size: 13px;
  color: var(--gray-600);
  margin-bottom: 6px;
  font-weight: 500;
}

.credit-form .form-group input,
.credit-form .form-group select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  font-size: 14px;
  background: var(--light);
  box-sizing: border-box;
}

.credit-form .form-group input:focus,
.credit-form .form-group select:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.credit-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.credit-btn-row {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}

.credit-btn-primary {
  flex: 1;
  padding: 14px 24px;
  background: var(--purple);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.credit-btn-primary:hover {
  opacity: 0.9;
}

.credit-btn-back {
  flex: 0 0 auto;
  padding: 14px 24px;
  background: var(--white);
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.credit-btn-submit {
  flex: 1;
  padding: 14px 24px;
  background: var(--purple);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.credit-notice {
  background: var(--light);
  border-radius: 10px;
  padding: 16px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--gray-600);
  margin-bottom: 12px;
}

.credit-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.5;
}

.credit-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--purple);
  flex-shrink: 0;
}

.signature-input {
  font-family: 'Brush Script MT', 'Segoe Script', cursive !important;
  font-size: 24px !important;
  padding: 14px !important;
  background: var(--light) !important;
}

/* ============================================================
   CREDIT APPLICATIONS - Dealer Dashboard
   ============================================================ */

.credit-apps-page {
  position: relative;
}

.credit-apps-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.credit-apps-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #fef3c7;
  color: #92400e;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}

.credit-apps-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.ca-stat {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}

.ca-stat-num {
  font-size: 24px;
  font-weight: 700;
  color: var(--purple);
}

.ca-stat-label {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 2px;
}

.credit-filter-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--gray-200);
  padding-bottom: 0;
}

.credit-filter-tabs button {
  padding: 8px 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-500);
  cursor: pointer;
  white-space: nowrap;
}

.credit-filter-tabs button.active {
  color: var(--purple);
  border-bottom-color: var(--purple);
  font-weight: 600;
}

.credit-apps-table-wrap {
  overflow-x: auto;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
}

.credit-apps-table {
  width: 100%;
  border-collapse: collapse;
}

.credit-apps-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--gray-500);
  border-bottom: 1px solid var(--gray-200);
}

.credit-apps-table td {
  padding: 14px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--gray-100);
}

.credit-apps-table tr:hover {
  background: var(--light);
}

.credit-apps-table tr.selected {
  background: #f3e8ff;
}

.ca-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}

/* Detail Panel (slides in from right) */
.ca-detail-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 480px;
  height: 100vh;
  background: var(--white);
  border-left: 1px solid var(--gray-200);
  box-shadow: -4px 0 20px rgba(0,0,0,0.08);
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.ca-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-200);
}

.ca-detail-tabs {
  display: flex;
  border-bottom: 1px solid var(--gray-200);
  padding: 0 24px;
}

.ca-detail-tabs button {
  padding: 10px 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-500);
  cursor: pointer;
}

.ca-detail-tabs button.active {
  color: var(--purple);
  border-bottom-color: var(--purple);
  font-weight: 600;
}

.ca-detail-body {
  padding: 20px 24px;
  flex: 1;
  overflow-y: auto;
}

.ca-detail-approval,
.ca-detail-conditional {
  background: var(--light);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 20px;
}

.ca-approval-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 10px;
}

.ca-label {
  display: block;
  font-size: 11px;
  color: var(--gray-500);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.ca-value {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.ca-conditions {
  margin-top: 12px;
  padding: 12px;
  background: #fff7ed;
  border-radius: 8px;
  border: 1px solid #fed7aa;
}

.ca-pipeline-section {
  margin-bottom: 20px;
}

.ca-pipeline-section h4 {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--gray-500);
  margin: 0 0 10px;
}

.ca-pipeline-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ca-pipeline-btn {
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--gray-200);
  background: var(--white);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  color: var(--gray-600);
  transition: all 0.15s ease;
}

.ca-pipeline-btn:hover {
  border-color: var(--purple);
  color: var(--purple);
}

.ca-pipeline-btn.active {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
}

.ca-lender-section {
  margin-bottom: 20px;
  padding-top: 12px;
  border-top: 1px solid var(--gray-200);
}

.ca-lender-section .form-group label {
  font-size: 12px;
  color: var(--gray-500);
  display: block;
  margin-bottom: 4px;
}

.ca-timeline-section {
  border-top: 1px solid var(--gray-200);
  padding-top: 16px;
}

.ca-timeline-section h4 {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--gray-500);
  margin: 0 0 12px;
}

.ca-timeline-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 13px;
}

.ca-timeline-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--purple);
  flex-shrink: 0;
}

/* Application Tab */
.ca-app-section {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gray-100);
}

.ca-app-section h4 {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--gray-500);
  margin: 0 0 10px;
}

.ca-app-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Notes Tab */
.ca-notes-input {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gray-200);
}

.ca-note-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-100);
}

.ca-note-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ca-note-badge {
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  background: #fee2e2;
  color: #991b1b;
}

@media (max-width: 768px) {
  .credit-apps-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .ca-detail-panel {
    width: 100%;
  }
  .credit-filter-tabs {
    overflow-x: auto;
  }
}

/* ============================================================
   TEST DRIVE CALENDAR VIEW
   ============================================================ */
.td-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  overflow: hidden;
  background: var(--white);
}

.td-cal-header {
  padding: 10px 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
  text-align: center;
  background: var(--gray-50, #f9fafb);
  border-bottom: 1px solid var(--gray-200);
}

.td-cal-cell {
  min-height: 110px;
  padding: 6px 8px;
  border-right: 1px solid var(--gray-100);
  border-bottom: 1px solid var(--gray-100);
  vertical-align: top;
  font-size: 12px;
}

.td-cal-cell:nth-child(7n) {
  border-right: none;
}

.td-cal-empty {
  background: var(--gray-50, #f9fafb);
}

.td-cal-day {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-600);
  margin-bottom: 4px;
}

.td-cal-today {
  background: rgba(89, 40, 229, 0.04);
}

.td-cal-today-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--purple);
  color: var(--white);
  font-weight: 600;
}

.td-cal-event {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  margin-bottom: 3px;
  border-radius: 4px;
  background: var(--gray-50, #f9fafb);
  cursor: pointer;
  transition: background 0.15s ease;
}

.td-cal-event:hover {
  background: var(--gray-100);
}

.avatar-xs {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--purple);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 600;
  flex-shrink: 0;
  margin-left: auto;
}

.td-view-active {
  background: var(--purple) !important;
  color: var(--white) !important;
  border-color: var(--purple) !important;
}

.td-view-active svg {
  stroke: var(--white);
}

/* --- Embed Mode --- */
.embed-mode .top-bar,
.embed-mode .app-header,
.embed-mode .app-footer {
  display: none !important;
}

.embed-storefront {
  padding: 16px 24px;
}

.embed-search-bar {
  display: flex;
  justify-content: center;
  padding: 8px 0 16px;
}

.embed-search-bar .header-search {
  max-width: 480px;
  width: 100%;
}

/* EULA Page */
.eula-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 24px 80px;
  color: var(--gray-800);
  line-height: 1.7;
}
.eula-page h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--gray-900);
}
.eula-page h2 {
  font-size: 22px;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 16px;
  color: var(--gray-900);
}
.eula-page h3 {
  font-size: 18px;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--gray-900);
}
.eula-page h4 {
  font-size: 16px;
  font-weight: 600;
  margin-top: 16px;
  margin-bottom: 8px;
  color: var(--gray-800);
}
.eula-page p {
  margin-bottom: 16px;
  font-size: 15px;
}
.eula-page strong {
  font-weight: 600;
  color: var(--gray-900);
}

/* --- Toast notifications (demo-friendly replacement for alert()) --- */
.app-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--gray-900, #1a1a2e);
  color: #fff;
  padding: 14px 22px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  max-width: min(420px, calc(100vw - 40px));
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  border-left: 4px solid var(--purple, #5928E5);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 10000;
  pointer-events: none;
}
.app-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.app-toast-error {
  border-left-color: #D32F2F;
}

/* --- Compare overlay CTAs --- */
.compare-cta-row td {
  padding-top: 16px !important;
  border-bottom: none !important;
}
.compare-cta-cell {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}
.compare-cta-view,
.compare-cta-deposit {
  padding: 9px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.compare-cta-view {
  background: none;
  border: 1px solid var(--purple, #5928E5);
  color: var(--purple, #5928E5);
}
.compare-cta-deposit {
  background: var(--purple, #5928E5);
  border: 1px solid var(--purple, #5928E5);
  color: #fff;
}
.compare-cta-view:hover,
.compare-cta-deposit:hover {
  opacity: 0.85;
}

/* --- Prizm brand mark (matches landing page conic-gradient icon) --- */
.prizm-gradient-dot {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: conic-gradient(from 210deg, #5928E5, #FF36A6, #36D6FF, #5928E5);
  display: inline-block;
  flex-shrink: 0;
  vertical-align: middle;
}
.prizm-gradient-dot-sm {
  width: 18px;
  height: 18px;
  border-radius: 6px;
}
