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

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --bg-primary: #06060e;
  --bg-surface: #0c0c18;
  --bg-elevated: #12121f;
  --bg-card: #161625;
  --bg-input: #0f0f1c;

  --gold: #D4AF37;
  --gold-light: #F0C93A;
  --gold-dim: rgba(212, 175, 55, 0.5);
  --gold-glow: rgba(212, 175, 55, 0.12);
  --gold-border: rgba(212, 175, 55, 0.22);
  --gold-border-hover: rgba(212, 175, 55, 0.55);

  --platinum: #E8E0D0;
  --text-primary: #F0EAD6;
  --text-secondary: #9898A8;
  --text-muted: #4e4e5e;

  --success: #2ecc71;
  --success-bg: rgba(46, 204, 113, 0.1);
  --success-border: rgba(46, 204, 113, 0.3);
  --danger: #e74c3c;
  --danger-bg: rgba(231, 76, 60, 0.1);
  --danger-border: rgba(231, 76, 60, 0.3);
  --warning: #f39c12;
  --warning-bg: rgba(243, 156, 18, 0.1);
  --warning-border: rgba(243, 156, 18, 0.3);
  --info: #3498db;
  --info-bg: rgba(52, 152, 219, 0.1);
  --info-border: rgba(52, 152, 219, 0.3);

  --border: rgba(212, 175, 55, 0.15);
  --border-subtle: rgba(255, 255, 255, 0.05);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-gold: 0 0 40px rgba(212, 175, 55, 0.08);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.5);
  --shadow-elevated: 0 8px 48px rgba(0, 0, 0, 0.7);

  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}
a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-light); }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; outline: none; }
input, select, textarea { font-family: inherit; outline: none; }
ul { list-style: none; }

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-surface); }
::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5 { font-family: 'Outfit', sans-serif; font-weight: 700; line-height: 1.2; }
h1 { font-size: 2.4rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }
.text-gold { color: var(--gold); }
.text-muted { color: var(--text-secondary); }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.75rem; }
.font-mono { font-family: 'Courier New', monospace; }

/* ============================================================
   BACKGROUND EFFECTS
   ============================================================ */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(212, 175, 55, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 175, 55, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 0;
}
.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}
.bg-orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.06), transparent 70%);
  top: -100px; right: -100px;
}
.bg-orb-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(100, 60, 200, 0.04), transparent 70%);
  bottom: -100px; left: -100px;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.page-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}
.container { max-width: 1400px; margin: 0 auto; padding: 0 24px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.grid { display: grid; }
.w-full { width: 100%; }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}
.login-card {
  background: linear-gradient(135deg, rgba(22, 22, 37, 0.95), rgba(12, 12, 24, 0.98));
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-xl);
  padding: 56px 48px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-elevated), var(--shadow-gold);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.6s ease;
}
.login-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.login-logo {
  text-align: center;
  margin-bottom: 40px;
}
.login-logo .logo-icon {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, var(--gold), #8B6914);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 16px;
  box-shadow: 0 8px 32px rgba(212, 175, 55, 0.3);
}
.login-logo h1 {
  font-size: 1.8rem;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.login-logo p { color: var(--text-secondary); font-size: 0.9rem; margin-top: 4px; }

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.form-control {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  padding: 13px 16px;
  font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus {
  border-color: var(--gold-border-hover);
  box-shadow: 0 0 0 3px var(--gold-glow);
}
.form-control::placeholder { color: var(--text-muted); }
.form-control option { background: var(--bg-elevated); }

.input-icon-wrap { position: relative; }
.input-icon-wrap .form-control { padding-left: 44px; }
.input-icon-wrap .icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
}
.input-icon-wrap .toggle-pass {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border: none;
  font-size: 1rem;
  transition: color var(--transition);
}
.input-icon-wrap .toggle-pass:hover { color: var(--gold); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold-light), #b8930a);
  color: #0a0a0a;
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(212, 175, 55, 0.5);
  filter: brightness(1.1);
}
.btn-primary:active { transform: translateY(0); }
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--gold-border);
}
.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}
.btn-danger:hover { background: var(--danger); color: white; }
.btn-success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success-border);
}
.btn-success:hover { background: var(--success); color: white; }
.btn-sm { padding: 7px 14px; font-size: 0.82rem; border-radius: var(--radius-sm); }
.btn-xs { padding: 4px 10px; font-size: 0.75rem; border-radius: 6px; }
.btn-lg { padding: 16px 32px; font-size: 1rem; }
.btn-icon { padding: 10px; aspect-ratio: 1; }
.btn-full { width: 100%; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  background: rgba(6, 6, 14, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  height: 64px;
  display: flex;
  align-items: center;
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
}
.navbar-brand .brand-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--gold), #8B6914);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.navbar-brand span { color: var(--gold); }
.navbar-brand small { color: var(--text-secondary); font-size: 0.7rem; font-weight: 400; display: block; line-height: 1; }
.navbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 16px 6px 6px;
}
.user-avatar {
  width: 30px; height: 30px;
  background: linear-gradient(135deg, var(--gold), #8B6914);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #0a0a0a;
}
.user-pill .user-name { font-size: 0.85rem; font-weight: 600; }
.user-pill .user-role {
  font-size: 0.7rem;
  color: var(--gold);
  display: block;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================================
   DASHBOARD LAYOUT
   ============================================================ */
.dashboard-layout {
  display: flex;
  min-height: calc(100vh - 64px);
}
.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: rgba(12, 12, 24, 0.8);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid transparent;
  background: none;
  width: 100%;
  text-align: left;
}
.sidebar-item:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}
.sidebar-item.active {
  background: var(--gold-glow);
  color: var(--gold);
  border-color: var(--gold-border);
  font-weight: 600;
}
.sidebar-item .item-icon { font-size: 1.1rem; width: 20px; text-align: center; }
.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 12px 8px;
}
.sidebar-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 8px 16px 4px;
}

.main-content {
  flex: 1;
  padding: 32px;
  overflow-x: hidden;
}

/* ============================================================
   PAGE SECTIONS (TAB PANELS)
   ============================================================ */
.panel { display: none; animation: fadeIn 0.3s ease; }
.panel.active { display: block; }

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 16px;
  flex-wrap: wrap;
}
.page-header-left h2 {
  font-size: 1.6rem;
  margin-bottom: 4px;
}
.page-header-left p { color: var(--text-secondary); font-size: 0.9rem; }

/* ============================================================
   SEARCH BAR
   ============================================================ */
.search-bar-wrap {
  position: relative;
  flex: 1;
  max-width: 480px;
}
.search-bar {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 12px 20px 12px 46px;
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: all var(--transition);
}
.search-bar:focus {
  border-color: var(--gold-border-hover);
  box-shadow: 0 0 0 3px var(--gold-glow);
}
.search-bar::placeholder { color: var(--text-muted); }
.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.95rem;
}
.search-count {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 2px 8px;
  border-radius: 100px;
}

/* ============================================================
   FILTERS
   ============================================================ */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.filter-chip {
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.filter-chip:hover { border-color: var(--gold-border); color: var(--text-primary); }
.filter-chip.active { background: var(--gold-glow); border-color: var(--gold-border); color: var(--gold); }

/* ============================================================
   CAR CARDS GRID
   ============================================================ */
.cars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.car-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
}
.car-card:hover {
  border-color: var(--gold-border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card), 0 0 30px rgba(212, 175, 55, 0.1);
}
.car-card-image {
  width: 100%;
  height: 170px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--bg-elevated) 0%, #1a1a30 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.car-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.car-card:hover .car-card-image img { transform: scale(1.06); }
.car-card-image .placeholder-icon {
  font-size: 3.5rem;
  opacity: 0.25;
}
.car-card-image .car-category-badge {
  position: absolute;
  top: 10px;
  left: 10px;
}
.car-card-body { padding: 16px; }
.car-card-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 12px;
  color: var(--text-primary);
}
.price-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.price-box {
  flex: 1;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  border: 1px solid var(--border-subtle);
}
.price-box .price-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 3px;
}
.price-box .price-value {
  font-size: 0.9rem;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
}
.price-box.inkoop .price-value { color: var(--danger); }
.price-box.verkoop .price-value { color: var(--success); }
.price-box.dealer .price-value { color: var(--gold); }
.profit-badge {
  margin-top: 10px;
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  border-radius: 6px;
  padding: 5px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
}
.profit-badge .label { color: var(--text-secondary); }
.profit-badge .value { color: var(--success); font-weight: 700; }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-gold { background: rgba(212,175,55,0.15); color: var(--gold); border: 1px solid var(--gold-border); }
.badge-success { background: var(--success-bg); color: var(--success); border: 1px solid var(--success-border); }
.badge-danger { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-border); }
.badge-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning-border); }
.badge-info { background: var(--info-bg); color: var(--info); border: 1px solid var(--info-border); }
.badge-muted { background: var(--bg-elevated); color: var(--text-secondary); border: 1px solid var(--border); }
.badge-admin { background: linear-gradient(135deg, rgba(212,175,55,0.2), rgba(212,175,55,0.05)); color: var(--gold); border: 1px solid var(--gold-border); }

/* ============================================================
   STAT CARDS
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
}
.stat-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--stat-color, var(--gold)), transparent);
}
.stat-card:hover {
  border-color: var(--gold-border);
  transform: translateY(-2px);
}
.stat-card .stat-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 16px;
  background: var(--stat-bg, var(--gold-glow));
  color: var(--stat-color, var(--gold));
}
.stat-card .stat-value {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-card .stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ============================================================
   TABLE
   ============================================================ */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
}
.table th {
  padding: 14px 20px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table td {
  padding: 14px 20px;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background var(--transition); }
.table tbody tr:hover { background: rgba(212, 175, 55, 0.03); }

/* ============================================================
   SHOWROOM GRID
   ============================================================ */
.showroom-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.showroom-spot {
  background: var(--bg-card);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  min-height: 160px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.showroom-spot.occupied {
  border-style: solid;
  border-color: var(--gold-border);
  background: linear-gradient(135deg, var(--bg-card), rgba(212, 175, 55, 0.03));
}
.showroom-spot.occupied::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.showroom-spot:hover { border-color: var(--gold-border-hover); }
.spot-number {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.spot-car-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--gold);
  margin-bottom: 8px;
}
.spot-employee {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.spot-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.spot-empty-icon {
  font-size: 2rem;
  opacity: 0.15;
  margin-bottom: 8px;
}
.spot-empty-text {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.spot-actions {
  display: flex;
  gap: 6px;
  margin-top: 12px;
}
.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--success);
  font-weight: 600;
}
.live-dot {
  width: 8px; height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse-green 1.5s ease-in-out infinite;
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.modal {
  background: var(--bg-elevated);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-elevated);
  transform: scale(0.95) translateY(10px);
  transition: transform var(--transition);
  position: relative;
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }
.modal::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.modal-header {
  padding: 28px 28px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h3 { font-size: 1.2rem; }
/* Star Toggle Button */
.star-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all var(--transition);
  z-index: 10;
  flex-shrink: 0;
}
.modal-close {
  width: 32px; height: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 1rem;
}
.modal-close:hover { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }
.modal-body { padding: 24px 28px; }
.modal-footer {
  padding: 0 28px 28px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* ============================================================
   SECTION CARD
   ============================================================ */
.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
}
.section-card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.section-card-header h3 {
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-card-body { padding: 24px; }

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
}
.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: var(--shadow-card);
  animation: slideInRight 0.3s ease;
  position: relative;
  overflow: hidden;
}
.toast::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--toast-color, var(--gold));
  border-radius: 3px 0 0 3px;
}
.toast-icon { font-size: 1.1rem; margin-top: 1px; color: var(--toast-color, var(--gold)); flex-shrink: 0; }
.toast-content { flex: 1; }
.toast-title { font-weight: 600; font-size: 0.88rem; margin-bottom: 2px; }
.toast-message { font-size: 0.8rem; color: var(--text-secondary); }
.toast.success { --toast-color: var(--success); }
.toast.danger { --toast-color: var(--danger); }
.toast.warning { --toast-color: var(--warning); }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.3; }
.empty-state h3 { font-size: 1rem; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state p { font-size: 0.85rem; }

/* ============================================================
   SUGGESTION CARD
   ============================================================ */
.suggestion-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 12px;
  transition: all var(--transition);
}
.suggestion-card:hover { border-color: var(--gold-border); }
.suggestion-card .suggestion-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}
.suggestion-card .suggestion-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 8px;
}
.suggestion-card .suggestion-actions { display: flex; gap: 8px; margin-top: 12px; }

/* ============================================================
   PERMISSION GUARD
   ============================================================ */
.access-denied {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 64px);
  text-align: center;
  gap: 16px;
}
.access-denied .icon { font-size: 4rem; opacity: 0.3; }

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress { height: 4px; background: var(--bg-elevated); border-radius: 2px; overflow: hidden; }
.progress-bar {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transition: width 0.6s ease;
}

/* ============================================================
   CHART PLACEHOLDER
   ============================================================ */
.mini-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 40px;
}
.mini-chart-bar {
  flex: 1;
  background: var(--gold-glow);
  border-radius: 2px 2px 0 0;
  border: 1px solid var(--gold-border);
  min-height: 4px;
  transition: background var(--transition);
}
.mini-chart-bar:hover { background: var(--gold-dim); }

/* ============================================================
   FORM IN CARD
   ============================================================ */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.form-grid-full { grid-column: 1 / -1; }
.form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.form-row > * { flex: 1; min-width: 200px; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes pulse-green {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.animate-spin { animation: spin 1s linear infinite; }

/* Skeleton loader */
.skeleton {
  background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-card) 50%, var(--bg-elevated) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .sidebar { width: 200px; }
  .main-content { padding: 24px; }
}
@media (max-width: 768px) {
  .sidebar { display: none; }
  .main-content { padding: 16px; }
  .cars-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .login-card { padding: 36px 24px; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .cars-grid { grid-template-columns: 1fr; }
  .showroom-grid { grid-template-columns: 1fr; }
  h2 { font-size: 1.4rem; }
}

/* ============================================================
   MISC UTILITIES
   ============================================================ */
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.p-6 { padding: 24px; }
.hidden { display: none !important; }
.opacity-50 { opacity: 0.5; }
.cursor-pointer { cursor: pointer; }
.select-none { user-select: none; }
.border-top { border-top: 1px solid var(--border); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rounded { border-radius: var(--radius-md); }

/* Image upload area */
.image-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-muted);
}
.image-upload-area:hover { border-color: var(--gold-border); color: var(--gold); }
.image-upload-area input { display: none; }

/* Number highlight */
.number-highlight {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
}
