/* ==========================================================================
   RodDede CARcompareSpec - Premium Dark Cyberpunk & Glassmorphism Design System
   ========================================================================== */

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

:root {
  --bg-main: #070a13;
  --bg-card: rgba(16, 23, 41, 0.75);
  --bg-card-hover: rgba(22, 33, 58, 0.85);
  --bg-surface: #0f172a;
  --bg-glass: rgba(15, 23, 42, 0.65);
  
  --color-primary: #00f2fe;
  --color-primary-rgb: 0, 242, 254;
  --color-secondary: #4facfe;
  --color-accent: #ff2a74;
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-purple: #a855f7;
  --color-indigo: #6366f1;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 242, 254, 0.35);
  --border-active: rgba(0, 242, 254, 0.8);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-neon: 0 0 25px rgba(0, 242, 254, 0.25);
  --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.45);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Prompt', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(0, 242, 254, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(168, 85, 247, 0.06) 0%, transparent 50%),
    linear-gradient(180deg, #070a13 0%, #0d1322 100%);
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

/* App Wrapper */
.compare-app-container {
  max-width: 1480px;
  margin: 0 auto;
  padding: 20px 24px 60px 24px;
}

/* Ecosystem Top Bar */
.ecosystem-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 20px;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}

.eco-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 700;
  font-size: 1.15rem;
}
.eco-logo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-primary);
  box-shadow: 0 0 10px var(--color-primary);
}

.eco-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.eco-link-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition);
}
.eco-link-pill:hover, .eco-link-pill.active {
  color: #fff;
  background: rgba(0, 242, 254, 0.12);
  border-color: rgba(0, 242, 254, 0.4);
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.2);
}

/* Hero Section */
.hero-header {
  text-align: center;
  padding: 30px 16px 24px 16px;
  position: relative;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid rgba(0, 242, 254, 0.3);
  border-radius: var(--radius-full);
  color: var(--color-primary);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.15);
}
.hero-title {
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}
.text-gradient {
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 50%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-desc {
  color: var(--text-muted);
  font-size: 1.02rem;
  max-width: 760px;
  margin: 0 auto 20px auto;
}

/* Matchup Presets Carousel / Quick Badges */
.presets-section {
  margin-bottom: 24px;
}
.presets-title {
  font-size: 0.88rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.presets-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
}
.btn-preset {
  white-space: nowrap;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-preset:hover {
  background: rgba(0, 242, 254, 0.12);
  border-color: var(--color-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.2);
}

/* Controls Toolbar */
.toolbar-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  margin-bottom: 24px;
}
.toolbar-left, .toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Switches & Toggles */
.toggle-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
}
.toggle-item:hover {
  color: var(--text-main);
}
.switch-input {
  display: none;
}
.switch-slider {
  width: 42px;
  height: 22px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  position: relative;
  transition: var(--transition);
}
.switch-slider::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: var(--transition);
}
.switch-input:checked + .switch-slider {
  background: var(--color-primary);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.5);
}
.switch-input:checked + .switch-slider::after {
  transform: translateX(20px);
  background: #070a13;
}

/* Action Buttons */
.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  color: #070a13;
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.3);
}
.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(0, 242, 254, 0.5);
  transform: translateY(-2px);
}
.btn-outline {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-glass);
  color: var(--text-main);
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.2);
}
.btn-danger-outline {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}
.btn-danger-outline:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: #ef4444;
  color: #fff;
}

/* Dual Cascading Dropdown Selector (Car 1 VS Car 2) */
.dual-selector-panel {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
}
.selector-card {
  background: rgba(10, 14, 26, 0.65);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: var(--transition);
}
.selector-card:hover {
  border-color: rgba(0, 242, 254, 0.35);
}
.selector-card-header {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.selector-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
}
.badge-car-1 {
  background: rgba(0, 242, 254, 0.15);
  border: 1px solid rgba(0, 242, 254, 0.4);
  color: var(--color-primary);
}
.badge-car-2 {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #fb7185;
}
.selector-fields-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}
.selector-field label {
  display: block;
  font-size: 0.76rem;
  color: var(--text-dim);
  margin-bottom: 4px;
  font-weight: 500;
}
.custom-select {
  width: 100%;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}
.custom-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.25);
  background: #0f172a;
}
.custom-select option {
  background: #0f172a;
  color: #fff;
  padding: 6px;
}
.vs-action-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.vs-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.2), rgba(244, 63, 94, 0.2));
  border: 2px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  color: #fff;
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.2);
}
.btn-swap-cars {
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.btn-swap-cars:hover {
  background: var(--color-primary);
  color: #070a13;
  border-color: var(--color-primary);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.4);
}

/* Comparison Layout & Grid */
.comparison-wrapper {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

/* Sticky Header Row */
.compare-header-row {
  display: grid;
  grid-template-columns: 240px 1fr 1fr;
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 19, 34, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 2px solid var(--border-glass);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.spec-label-col-header {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--border-glass);
  background: rgba(10, 14, 26, 0.5);
}
.spec-label-col-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}
.spec-label-col-header p {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Car Header Cards */
.car-header-card {
  padding: 20px;
  border-right: 1px solid var(--border-glass);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
}
.car-header-card:last-child {
  border-right: none;
}
.car-header-card:hover {
  background: rgba(0, 242, 254, 0.02);
}

.car-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}
.car-badge-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: #fff;
}
.car-header-actions {
  display: flex;
  gap: 6px;
}
.btn-icon-action {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  transition: var(--transition);
}
.btn-icon-action:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-color: #ef4444;
}

.car-thumb-wrap {
  width: 100%;
  height: 140px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  margin-bottom: 12px;
  background: #090e1a;
  border: 1px solid var(--border-glass);
}
.car-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.car-thumb-wrap:hover .car-thumb-img {
  transform: scale(1.05);
}
.car-fuel-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  backdrop-filter: blur(6px);
}
.fuel-badge-ev {
  background: rgba(0, 242, 254, 0.85);
  color: #070a13;
}
.fuel-badge-hev {
  background: rgba(16, 185, 129, 0.85);
  color: #070a13;
}
.fuel-badge-diesel {
  background: rgba(245, 158, 11, 0.85);
  color: #070a13;
}
.fuel-badge-petrol {
  background: rgba(99, 102, 241, 0.85);
  color: #fff;
}

.car-brand-name {
  font-size: 0.82rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}
.car-model-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin: 2px 0;
}
.car-variant-name {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.car-price-tag {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.car-price-unit {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-dim);
}

.btn-change-car {
  width: 100%;
  padding: 7px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}
.btn-change-car:hover {
  background: rgba(0, 242, 254, 0.15);
  border-color: var(--color-primary);
  color: #fff;
}

/* Empty Card Slot */
.car-header-card.empty-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  border: 2px dashed rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.15);
  cursor: pointer;
}
.car-header-card.empty-slot:hover {
  border-color: var(--color-primary);
  background: rgba(0, 242, 254, 0.03);
}
.empty-slot-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 12px;
  color: var(--color-primary);
  transition: var(--transition);
}
.car-header-card.empty-slot:hover .empty-slot-icon {
  background: var(--color-primary);
  color: #070a13;
  transform: scale(1.1);
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.5);
}
.empty-slot-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}
.empty-slot-hint {
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* Spec Matrix Section Rows */
.spec-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: linear-gradient(90deg, rgba(0, 242, 254, 0.12) 0%, rgba(16, 23, 41, 0.8) 100%);
  border-top: 1px solid var(--border-glass);
  border-bottom: 1px solid var(--border-glass);
  color: #fff;
  font-size: 1.02rem;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  transition: var(--transition);
}
.spec-section-header:hover {
  background: linear-gradient(90deg, rgba(0, 242, 254, 0.2) 0%, rgba(16, 23, 41, 0.9) 100%);
}
.spec-section-icon {
  font-size: 1.2rem;
}
.section-toggle-arrow {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--text-dim);
  transition: var(--transition);
}
.spec-section-header.collapsed .section-toggle-arrow {
  transform: rotate(-90deg);
}

/* Spec Value Grid Row */
.spec-row {
  display: grid;
  grid-template-columns: 240px 1fr 1fr;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: var(--transition);
}
.spec-row:nth-child(even) {
  background: rgba(255, 255, 255, 0.015);
}
.spec-row:hover {
  background: rgba(0, 242, 254, 0.04);
}

.spec-name-col {
  padding: 14px 20px;
  border-right: 1px solid var(--border-glass);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  background: rgba(10, 14, 26, 0.4);
}
.spec-val-col {
  padding: 14px 20px;
  border-right: 1px solid var(--border-glass);
  color: var(--text-main);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  position: relative;
  word-break: break-word;
}
.spec-val-col:last-child {
  border-right: none;
}

/* Highlighting Difference & Best in Class */
.diff-highlight {
  background: rgba(245, 158, 11, 0.06);
}
.diff-highlight .spec-name-col {
  color: #fde047;
  font-weight: 600;
}

/* Hide Identical Mode */
.hide-identical .spec-row:not(.is-different) {
  display: none !important;
}

/* Winner / Best in Class Badge */
.best-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  padding: 2px 8px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}
.best-cell {
  background: rgba(16, 185, 129, 0.08) !important;
  color: #fff !important;
  font-weight: 600 !important;
}

/* Loan Calculator Simulator Section */
.loan-calc-section {
  margin-top: 36px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-card);
}
.loan-calc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-glass);
}
.loan-calc-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}
.loan-controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
  background: rgba(10, 14, 26, 0.5);
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
}
.calc-control-group label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 500;
}
.calc-control-group label span.val-display {
  color: var(--color-primary);
  font-weight: 700;
}
.calc-range-slider {
  width: 100%;
  accent-color: var(--color-primary);
  cursor: pointer;
}
.calc-select {
  width: 100%;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
}
.calc-select option {
  background: var(--bg-surface);
  color: #fff;
}

.loan-results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.loan-result-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(10, 14, 26, 0.7) 100%);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}
.loan-result-card:hover {
  border-color: rgba(0, 242, 254, 0.4);
  box-shadow: 0 4px 20px rgba(0, 242, 254, 0.15);
}
.loan-card-car-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}
.loan-card-price {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 16px;
}
.loan-monthly-amount {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 4px;
}
.loan-monthly-label {
  font-size: 0.78rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}
.loan-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--border-glass);
  padding-top: 12px;
  font-size: 0.82rem;
}
.loan-breakdown-item {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
}
.loan-breakdown-item span:last-child {
  color: #fff;
  font-weight: 600;
}

/* Modal Selector */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.modal-backdrop.open {
  display: flex;
  opacity: 1;
}
.modal-content {
  background: #0d1322;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  animation: modalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modalPop {
  0% { transform: scale(0.95); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-close-modal {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: var(--transition);
}
.btn-close-modal:hover {
  color: #fff;
}

.modal-filter-bar {
  padding: 16px 24px;
  background: rgba(10, 14, 26, 0.6);
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.modal-search-input {
  width: 100%;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: inherit;
  font-size: 0.92rem;
  outline: none;
  transition: var(--transition);
}
.modal-search-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.2);
}
.modal-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-pill {
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}
.filter-pill:hover, .filter-pill.active {
  background: rgba(0, 242, 254, 0.15);
  border-color: var(--color-primary);
  color: #fff;
}

.modal-cars-grid {
  padding: 20px 24px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.car-picker-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: var(--transition);
}
.car-picker-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 242, 254, 0.2);
}
.car-picker-card.already-selected {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  border-color: transparent;
}

/* Toast Notifications */
.toast-box {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--color-primary);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  box-shadow: 0 10px 30px rgba(0, 242, 254, 0.3);
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.toast-box.show {
  transform: translateY(0);
  opacity: 1;
}

/* Responsive & Mobile */
@media (max-width: 900px) {
  .compare-app-container {
    padding: 12px 10px 40px 10px;
  }
  .compare-header-row, .spec-row {
    grid-template-columns: 140px minmax(200px, 1fr) minmax(200px, 1fr);
  }
  .spec-label-col-header, .spec-name-col {
    padding: 12px 10px;
    font-size: 0.8rem;
  }
  .car-header-card, .spec-val-col {
    padding: 12px 10px;
  }
  .car-price-tag {
    font-size: 1.15rem;
  }
  .loan-results-grid {
    grid-template-columns: 1fr;
  }
}

/* Print Stylesheet for clean export / hard copy */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }
  .ecosystem-nav-bar, .toolbar-panel, .presets-section, .btn-action, .btn-icon-action, .btn-change-car, .empty-slot, .loan-calc-section {
    display: none !important;
  }
  .comparison-wrapper {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }
  .compare-header-row {
    position: static !important;
    background: #f8fafc !important;
    border-bottom: 2px solid #000 !important;
  }
  .car-model-title, .car-price-tag, .spec-val-col, .spec-section-header {
    color: #000 !important;
  }
  .spec-name-col {
    color: #333 !important;
    background: #f1f5f9 !important;
  }
  .spec-row {
    border-bottom: 1px solid #e2e8f0 !important;
  }
}

/* ==========================================================================
   Smart Silhouette & Inventory Sourcing Engine Styles
   ========================================================================== */

.smart-silhouette-card {
  width: 100%;
  height: 165px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  margin-bottom: 14px;
  background: radial-gradient(circle at 50% 25%, #0f1c30 0%, #060a14 100%);
  border: 1px solid rgba(0, 242, 254, 0.25);
  box-shadow: inset 0 0 25px rgba(0, 242, 254, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 12px;
  transition: all 0.3s ease;
}

.smart-silhouette-card:hover {
  border-color: rgba(0, 242, 254, 0.6) !important;
  box-shadow: inset 0 0 35px rgba(0, 242, 254, 0.12), 0 8px 24px rgba(0, 0, 0, 0.4);
}

.silhouette-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
}

.silhouette-brand-tag {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: var(--color-primary);
  text-transform: uppercase;
  background: rgba(0, 242, 254, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(0, 242, 254, 0.25);
}

.silhouette-drivetrain-tag {
  font-size: 0.68rem;
  font-weight: 700;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.85);
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.silhouette-art-wrap {
  width: 100%;
  height: 85px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.car-silhouette-svg {
  width: 90%;
  height: 100%;
  filter: drop-shadow(0 4px 14px rgba(0, 242, 254, 0.28));
  transition: transform 0.4s ease;
}

.smart-silhouette-card:hover .car-silhouette-svg {
  transform: translateY(-2px) scale(1.03);
}

.silhouette-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  padding-top: 6px;
}

.roddede-stock-badge {
  font-size: 0.68rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.roddede-stock-in {
  color: #10b981;
}

.roddede-stock-order {
  color: #38bdf8;
}

.roddede-cta-btn {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 5px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.roddede-cta-view {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.45);
}

.roddede-cta-view:hover {
  background: #10b981;
  color: #070a13;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.roddede-cta-alert {
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.roddede-cta-alert:hover {
  background: #38bdf8;
  color: #070a13;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}

/* Sourcing Lead Modal */
.sourcing-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 16, 0.8);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.sourcing-modal-overlay.active {
  display: flex;
}

.sourcing-modal-box {
  background: #0b1326;
  border: 1px solid rgba(0, 242, 254, 0.35);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(0, 242, 254, 0.15);
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  padding: 24px;
  position: relative;
  animation: modalFadeIn 0.3s ease;
}

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

.sourcing-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.sourcing-modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
}

.sourcing-modal-header {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.sourcing-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(0, 242, 254, 0.15);
  border: 1px solid rgba(0, 242, 254, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.sourcing-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
}

.sourcing-subtitle {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin: 2px 0 0;
}

.sourcing-car-preview {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.sourcing-car-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
}

.sourcing-car-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  margin: 2px 0;
}

.sourcing-car-variant {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.sourcing-info-note {
  font-size: 0.8rem;
  line-height: 1.6;
  color: #94a3b8;
  background: rgba(56, 189, 248, 0.06);
  border-left: 3px solid var(--color-primary);
  padding: 10px 14px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 20px;
}

.sourcing-action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.sourcing-btn-line {
  background: #06c755;
  color: #fff;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 11px 14px;
  border-radius: 8px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.sourcing-btn-line:hover {
  background: #05b34c;
  box-shadow: 0 0 16px rgba(6, 199, 85, 0.4);
}

.sourcing-btn-tel {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 11px 14px;
  border-radius: 8px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.sourcing-btn-tel:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #fff;
}
