/* LinkTruck - Professional Design System v2.0 */
/* Palette: Authority Blue / Action Orange / Clean White */
:root {
  /* Primary Authority Layer */
  --blue-deep:    #1E3A8A;   /* navbar, sidebar, hero bg */
  --blue-primary: #2563EB;   /* UI surfaces, links, active states */
  --blue-mid:     #3B82F6;   /* hover accents */
  --blue-light:   #DBEAFE;   /* backgrounds, chips */
  --blue-xlight:  #EFF6FF;   /* subtle surfaces */

  /* Action Layer — Orange used ONLY for CTAs & alerts */
  --orange:       #F97316;
  --orange-dark:  #EA580C;
  --orange-light: #FFF7ED;

  /* Neutral System */
  --bg:           #F8FAFC;   /* page background */
  --surface:      #FFFFFF;   /* cards, modals */
  --border:       #E2E8F0;   /* dividers, outlines */
  --border-mid:   #CBD5E1;
  --text-dark:    #0F172A;   /* headings */
  --text-body:    #334155;   /* body copy */
  --text-muted:   #64748B;   /* captions, labels */
  --text-subtle:  #94A3B8;   /* placeholders */

  /* Semantic */
  --success:      #059669;
  --success-bg:   #ECFDF5;
  --danger:       #DC2626;
  --danger-bg:    #FEF2F2;
  --warning:      #D97706;
  --warning-bg:   #FFFBEB;

  /* Depth */
  --shadow-sm:    0 1px 3px rgba(15,23,42,0.08), 0 1px 2px rgba(15,23,42,0.04);
  --shadow-md:    0 4px 12px rgba(15,23,42,0.08), 0 2px 4px rgba(15,23,42,0.04);
  --shadow-lg:    0 10px 30px rgba(15,23,42,0.12), 0 4px 8px rgba(15,23,42,0.06);
  --shadow-blue:  0 4px 16px rgba(37,99,235,0.18);
  --shadow-orange:0 4px 16px rgba(249,115,22,0.25);

  /* Radius */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;

  /* Transitions */
  --t-fast: 0.15s ease;
  --t-med:  0.25s ease;
}

/* ========== RESET & BASE ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text-body);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--blue-primary); border-radius: 10px; }

/* ========== ANIMATIONS ========== */
@keyframes fadeIn   { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
@keyframes slideIn  { from { transform:translateX(-20px); opacity:0; } to { transform:translateX(0); opacity:1; } }
@keyframes pulse    { 0%,100% { opacity:1; } 50% { opacity:0.45; } }
@keyframes spin     { from { transform:rotate(0deg); } to { transform:rotate(360deg); } }
@keyframes floatY   { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-8px); } }
@keyframes shimmer  {
  0%   { background-position: -400px 0; }
  100% { background-position:  400px 0; }
}

.animate-fade   { animation: fadeIn 0.35s ease forwards; }
.animate-slide  { animation: slideIn 0.3s ease forwards; }
.spinner        { animation: spin 0.9s linear infinite; }

/* ========== NAVBAR ========== */
.navbar {
  background: var(--blue-deep);
  padding: 0 2rem;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06), 0 4px 20px rgba(15,23,42,0.25);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
}

.navbar-logo {
  width: 38px;
  height: 38px;
  background: var(--orange);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: white;
  font-size: 15px;
  letter-spacing: -0.5px;
  box-shadow: 0 2px 8px rgba(249,115,22,0.35);
  flex-shrink: 0;
}

.navbar-title {
  color: white;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.navbar-title span { color: var(--orange); }

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

.nav-link {
  color: rgba(255,255,255,0.75);
  padding: 7px 14px;
  border-radius: var(--r-sm);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--t-fast);
  border: none;
  background: none;
  letter-spacing: 0.1px;
}
.nav-link:hover { color: white; background: rgba(255,255,255,0.08); }
.nav-link.active { color: white; background: rgba(255,255,255,0.12); }

/* Nav separator */
.nav-sep {
  width: 1px;
  height: 20px;
  background: rgba(255,255,255,0.12);
  margin: 0 6px;
}

.btn-nav {
  background: var(--orange);
  color: white;
  padding: 8px 18px;
  border-radius: var(--r-md);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all var(--t-fast);
  box-shadow: var(--shadow-orange);
  letter-spacing: 0.2px;
}
.btn-nav:hover {
  background: var(--orange-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(249,115,22,0.35);
}

/* ========== HERO ========== */
.hero {
  background:
    radial-gradient(ellipse at 70% 20%, rgba(37,99,235,0.18) 0%, transparent 60%),
    radial-gradient(ellipse at 10% 80%, rgba(30,58,138,0.5) 0%, transparent 55%),
    linear-gradient(145deg, #0F1F5C 0%, #1E3A8A 45%, #1D4ED8 100%);
  padding: 5.5rem 2rem 4.5rem;
  position: relative;
  overflow: hidden;
}

/* Subtle grid overlay */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
}

/* Route line decoration */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent 0%, var(--orange) 30%, var(--orange) 70%, transparent 100%);
  opacity: 0.5;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 3rem; text-align: center; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-visual { display: none; }
}

.hero-content {}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.9);
  border: 1px solid rgba(255,255,255,0.14);
  padding: 5px 14px;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  backdrop-filter: blur(4px);
}

.hero h1 {
  color: white;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.25rem;
  letter-spacing: -1px;
}

/* Only ONE word highlighted */
.hero h1 .accent {
  color: var(--orange);
  position: relative;
}

.hero-sub {
  color: rgba(255,255,255,0.68);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 2.25rem;
  max-width: 480px;
  font-weight: 400;
  text-align: left;
}

.hero-actions {
  display: flex;
  gap: 0.875rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  flex-wrap: wrap;
}

.hero-stat {}
.hero-stat-num {
  font-size: 1.75rem;
  font-weight: 800;
  color: white;
  line-height: 1;
  letter-spacing: -0.5px;
}
.hero-stat-num span { color: var(--orange); }
.hero-stat-label {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.55);
  margin-top: 3px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Hero Visual — Dashboard Preview Mockup */
.hero-visual {
  position: relative;
}

.dashboard-mockup {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--r-xl);
  padding: 1.25rem;
  backdrop-filter: blur(8px);
  box-shadow: 0 25px 60px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.06);
  animation: floatY 5s ease-in-out infinite;
}

.mockup-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.mockup-dot { width: 8px; height: 8px; border-radius: 50%; }
.mockup-dot.red   { background: #ef4444; }
.mockup-dot.yel   { background: #f59e0b; }
.mockup-dot.grn   { background: #22c55e; }
.mockup-title { color: rgba(255,255,255,0.5); font-size: 0.7rem; margin-left: auto; letter-spacing: 0.5px; }

.mockup-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.mockup-stat {
  background: rgba(255,255,255,0.06);
  border-radius: var(--r-md);
  padding: 0.875rem;
  border: 1px solid rgba(255,255,255,0.07);
}
.mockup-stat-val { font-size: 1.4rem; font-weight: 800; color: white; }
.mockup-stat-val.orange { color: var(--orange); }
.mockup-stat-lab { font-size: 0.68rem; color: rgba(255,255,255,0.45); margin-top: 2px; text-transform: uppercase; letter-spacing: 0.5px; }

.mockup-route {
  background: rgba(255,255,255,0.05);
  border-radius: var(--r-md);
  padding: 0.75rem 1rem;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid rgba(255,255,255,0.06);
}
.mockup-route-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.mockup-route-dot.active { background: var(--orange); box-shadow: 0 0 6px var(--orange); }
.mockup-route-dot.done   { background: #22c55e; }
.mockup-route-text { font-size: 0.75rem; color: rgba(255,255,255,0.75); flex: 1; }
.mockup-route-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(249,115,22,0.2);
  color: #fed7aa;
}
.mockup-route-badge.done { background: rgba(34,197,94,0.15); color: #86efac; }

.mockup-progress {
  margin-top: 1rem;
}
.mockup-prog-label { font-size: 0.68rem; color: rgba(255,255,255,0.4); margin-bottom: 4px; display: flex; justify-content: space-between; }
.mockup-prog-bar { height: 4px; background: rgba(255,255,255,0.08); border-radius: 10px; overflow: hidden; }
.mockup-prog-fill { height: 100%; background: linear-gradient(90deg, var(--orange), #fbbf24); border-radius: 10px; }

/* Floating badge */
.hero-float-badge {
  position: absolute;
  bottom: -16px;
  right: -16px;
  background: white;
  border-radius: var(--r-lg);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-lg);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-dark);
  white-space: nowrap;
}
.hero-float-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; animation: pulse 1.5s infinite; }

/* ========== TRUST STRIP ========== */
.trust-strip {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 2rem;
}
.trust-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.trust-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
  flex-shrink: 0;
}
.trust-logos {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.trust-logo {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  opacity: 0.7;
  transition: opacity var(--t-fast);
}
.trust-logo:hover { opacity: 1; }
.trust-logo i { font-size: 1.1rem; color: var(--blue-primary); }
.trust-sep { width: 1px; height: 24px; background: var(--border); }

/* ========== HOW IT WORKS ========== */
.how-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  position: relative;
}
@media (max-width: 768px) { .how-steps { grid-template-columns: 1fr; } }

.how-steps::before {
  content: '';
  position: absolute;
  top: 40px;
  left: calc(16.67% + 24px);
  right: calc(16.67% + 24px);
  height: 2px;
  background: linear-gradient(90deg, var(--blue-primary), var(--orange));
  z-index: 0;
}
@media (max-width: 768px) { .how-steps::before { display: none; } }

.how-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

.how-step-num {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1.25rem;
  position: relative;
  flex-shrink: 0;
}
.how-step-num.s1 { background: var(--blue-xlight); color: var(--blue-primary); border: 3px solid var(--blue-light); }
.how-step-num.s2 { background: var(--orange-light); color: var(--orange); border: 3px solid #fed7aa; }
.how-step-num.s3 { background: var(--success-bg); color: var(--success); border: 3px solid #a7f3d0; }

.how-step-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--blue-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.4rem;
}
.how-step h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 0.6rem;
  letter-spacing: -0.2px;
}
.how-step p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  font-weight: 400;
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: var(--r-md);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all var(--t-fast);
  text-decoration: none;
  letter-spacing: 0.1px;
  white-space: nowrap;
}

/* Primary — Blue (system actions) */
.btn-primary {
  background: var(--blue-primary);
  color: white;
  box-shadow: 0 1px 3px rgba(37,99,235,0.25);
}
.btn-primary:hover {
  background: var(--blue-deep);
  transform: translateY(-1px);
  box-shadow: var(--shadow-blue);
}

/* CTA — Orange (conversion only) */
.btn-orange {
  background: var(--orange);
  color: white;
  box-shadow: var(--shadow-orange);
}
.btn-orange:hover {
  background: var(--orange-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(249,115,22,0.35);
}

/* Outline — Ghost on dark bg */
.btn-outline {
  background: transparent;
  color: rgba(255,255,255,0.9);
  border: 1.5px solid rgba(255,255,255,0.3);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.6);
}

/* Outline Blue — on light bg */
.btn-outline-blue {
  background: transparent;
  color: var(--blue-primary);
  border: 1.5px solid var(--blue-primary);
}
.btn-outline-blue:hover {
  background: var(--blue-xlight);
}

.btn-white {
  background: white;
  color: var(--blue-deep);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}
.btn-white:hover { background: var(--bg); box-shadow: var(--shadow-md); }

.btn-sm  { padding: 6px 14px; font-size: 0.8rem; border-radius: var(--r-sm); }
.btn-lg  { padding: 13px 28px; font-size: 1rem; border-radius: var(--r-lg); }
.btn-xl  { padding: 15px 36px; font-size: 1.05rem; border-radius: var(--r-lg); }

.btn-danger  { background: var(--danger);  color: white; }
.btn-danger:hover { background: #B91C1C; transform: translateY(-1px); }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #047857; transform: translateY(-1px); }
.btn-gray    { background: var(--border);  color: var(--text-body); }
.btn-gray:hover { background: var(--border-mid); }

.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ========== CARDS ========== */
.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  transition: box-shadow var(--t-med);
  border: 1px solid var(--border);
}
.card:hover { box-shadow: var(--shadow-md); }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.card-title    { font-size: 0.975rem; font-weight: 800; color: var(--text-dark); letter-spacing: -0.2px; }
.card-subtitle { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }

/* ========== STAT CARDS ========== */
.stat-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all var(--t-med);
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
}
.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.stat-card.blue   { border-left-color: var(--blue-primary); }
.stat-card.orange { border-left-color: var(--orange); }
.stat-card.green  { border-left-color: var(--success); }
.stat-card.red    { border-left-color: var(--danger); }
.stat-card.purple { border-left-color: #7C3AED; }

.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}
.stat-icon.blue   { background: var(--blue-xlight); color: var(--blue-primary); }
.stat-icon.orange { background: var(--orange-light); color: var(--orange); }
.stat-icon.green  { background: var(--success-bg);  color: var(--success); }
.stat-icon.red    { background: var(--danger-bg);   color: var(--danger); }
.stat-icon.purple { background: #FAF5FF;            color: #7C3AED; }

.stat-num   { font-size: 1.55rem; font-weight: 900; color: var(--text-dark); line-height: 1; letter-spacing: -0.5px; }
.stat-label { font-size: 0.78rem; color: var(--text-muted); margin-top: 3px; font-weight: 500; }

/* ========== FORMS ========== */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
  letter-spacing: 0.1px;
}
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  font-size: 0.9rem;
  color: var(--text-dark);
  background: var(--surface);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  outline: none;
  font-family: inherit;
}
.form-control:focus {
  border-color: var(--blue-primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.form-control::placeholder { color: var(--text-subtle); font-weight: 400; }
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  padding-right: 36px;
  cursor: pointer;
}
.form-error { color: var(--danger); font-size: 0.78rem; margin-top: 4px; font-weight: 500; }
.form-hint  { color: var(--text-muted); font-size: 0.78rem; margin-top: 4px; }
.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

/* ========== BADGES ========== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.2px;
}
.badge-open      { background: var(--blue-xlight); color: var(--blue-primary); }
.badge-matched   { background: #FAF5FF; color: #7C3AED; }
.badge-warning   { background: var(--warning-bg); color: var(--warning); }
.badge-confirmed { background: var(--success-bg); color: var(--success); }
.badge-transit   { background: var(--orange-light); color: var(--orange); }
.badge-success   { background: var(--success-bg); color: var(--success); }
.badge-danger    { background: var(--danger-bg); color: var(--danger); }
.badge-info      { background: #F0F9FF; color: #0369A1; }
.badge-bronze    { background: #FEF3C7; color: #92400E; }
.badge-silver    { background: #F1F5F9; color: #475569; }
.badge-gold      { background: #FFFBEB; color: #B45309; }
.badge-elite     { background: #FAF5FF; color: #6D28D9; }

/* ========== TABLES ========== */
.table-wrapper { overflow-x: auto; border-radius: var(--r-md); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
thead th {
  background: var(--bg);
  padding: 11px 16px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody td { padding: 13px 16px; font-size: 0.875rem; border-bottom: 1px solid var(--border); color: var(--text-body); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg); }

/* ========== SIDEBAR / DASHBOARD ========== */
.dashboard-layout { display: flex; min-height: calc(100vh - 66px); }
.sidebar {
  width: 248px;
  background: var(--blue-deep);
  padding: 1.25rem 0;
  flex-shrink: 0;
  position: sticky;
  top: 66px;
  height: calc(100vh - 66px);
  overflow-y: auto;
  border-right: 1px solid rgba(255,255,255,0.05);
}

.sidebar-user {
  padding: 0 1rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 0.75rem;
}
.sidebar-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 8px;
  box-shadow: 0 2px 8px rgba(249,115,22,0.3);
}
.sidebar-name { color: white; font-weight: 800; font-size: 0.9rem; letter-spacing: -0.2px; }
.sidebar-role { color: rgba(255,255,255,0.5); font-size: 0.72rem; text-transform: capitalize; margin-top: 1px; }

.sidebar-nav { padding: 0 0.625rem; }
.sidebar-section { margin-bottom: 0.25rem; }
.sidebar-section-label {
  color: rgba(255,255,255,0.3);
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 0.6rem 0.625rem 0.25rem;
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: var(--r-sm);
  color: rgba(255,255,255,0.65);
  font-size: 0.855rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--t-fast);
  margin-bottom: 1px;
}
.sidebar-item:hover { background: rgba(255,255,255,0.07); color: white; }
.sidebar-item.active {
  background: rgba(249,115,22,0.15);
  color: white;
  font-weight: 700;
  border-left: 2px solid var(--orange);
  padding-left: 8px;
}
.sidebar-item i { width: 18px; text-align: center; font-size: 0.95rem; flex-shrink: 0; }

.main-content { flex: 1; padding: 2rem; overflow-y: auto; min-width: 0; background: var(--bg); }

/* ========== LOAD CARDS ========== */
.load-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 1.25rem;
  border: 1px solid var(--border);
  transition: all var(--t-med);
  cursor: pointer;
}
.load-card:hover {
  border-color: var(--blue-primary);
  box-shadow: 0 4px 20px rgba(37,99,235,0.1);
  transform: translateY(-1px);
}
.load-route { display: flex; align-items: center; gap: 10px; margin-bottom: 0.75rem; }
.route-point { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 0.9rem; color: var(--text-dark); }
.route-arrow { color: var(--orange); font-size: 1rem; }
.load-meta { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.load-meta-item { font-size: 0.8rem; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }

/* ========== MODALS ========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.55);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(6px);
}
.modal {
  background: var(--surface);
  border-radius: var(--r-xl);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  animation: fadeIn 0.2s ease;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}
.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title { font-size: 1.05rem; font-weight: 800; color: var(--text-dark); letter-spacing: -0.2px; }
.modal-close {
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  background: var(--border);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: background var(--t-fast);
}
.modal-close:hover { background: var(--border-mid); }
.modal-body   { padding: 1.5rem; }
.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

/* ========== ALERTS ========== */
.alert {
  padding: 12px 16px;
  border-radius: var(--r-md);
  font-size: 0.875rem;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 1rem;
  font-weight: 500;
}
.alert-error   { background: var(--danger-bg);  color: #991B1B; border: 1px solid #FECACA; }
.alert-success { background: var(--success-bg); color: #065F46; border: 1px solid #A7F3D0; }
.alert-warning { background: var(--warning-bg); color: #92400E; border: 1px solid #FDE68A; }
.alert-info    { background: var(--blue-xlight); color: #1E40AF; border: 1px solid var(--blue-light); }

/* ========== AUTH PAGES ========== */
.auth-container {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(37,99,235,0.2) 0%, transparent 50%),
    linear-gradient(145deg, #0F1F5C 0%, #1E3A8A 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.auth-card {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 2.5rem;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.25);
  animation: fadeIn 0.3s ease;
}
.auth-logo { text-align: center; margin-bottom: 2rem; }
.auth-logo-icon {
  width: 58px; height: 58px;
  background: var(--blue-deep);
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 900;
  color: white;
  margin: 0 auto 12px;
  position: relative;
}
.auth-logo-icon::after {
  content: '';
  position: absolute;
  bottom: -3px; right: -3px;
  width: 16px; height: 16px;
  background: var(--orange);
  border-radius: 50%;
  border: 2px solid white;
}
.auth-title    { font-size: 1.45rem; font-weight: 900; color: var(--text-dark); margin-bottom: 4px; letter-spacing: -0.4px; }
.auth-subtitle { color: var(--text-muted); font-size: 0.875rem; }

/* ========== RATINGS ========== */
.stars  { display: flex; gap: 2px; }
.star   { color: var(--border-mid); font-size: 1rem; }
.star.filled { color: #F59E0B; }

/* ========== DRIVER VETTING ========== */
.vetting-stage {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 9px 14px;
  border-radius: var(--r-md);
  margin-bottom: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.vetting-indicator { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.vetting-indicator.done   { background: var(--success); }
.vetting-indicator.active { background: var(--orange); animation: pulse 1.5s infinite; }
.vetting-indicator.pending{ background: var(--border-mid); }

/* ========== TOAST ========== */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.toast {
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 12px 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 360px;
  animation: slideIn 0.3s ease;
  border-left: 3px solid var(--blue-primary);
}
.toast.success { border-left-color: var(--success); }
.toast.error   { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
.toast-msg { font-size: 0.875rem; font-weight: 600; color: var(--text-dark); }

/* ========== LOADING ========== */
.loading-screen {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  color: var(--text-muted);
}
.loading-spinner {
  width: 38px; height: 38px;
  border: 3px solid var(--border);
  border-top-color: var(--blue-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ========== EMPTY STATE ========== */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-muted); }
.empty-state i { font-size: 2.75rem; color: var(--border-mid); margin-bottom: 1rem; }
.empty-state h3 { font-size: 1.05rem; font-weight: 700; color: var(--text-body); margin-bottom: 0.5rem; }
.empty-state p  { font-size: 0.875rem; }

/* ========== TABS ========== */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1.5rem;
  overflow-x: auto;
}
.tab-item {
  padding: 10px 18px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: all var(--t-fast);
}
.tab-item:hover { color: var(--blue-primary); }
.tab-item.active { color: var(--blue-primary); border-bottom-color: var(--blue-primary); }

/* ========== SECTION STYLES ========== */
.section { padding: 5rem 2rem; }
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-label {
  display: inline-block;
  background: var(--blue-xlight);
  color: var(--blue-primary);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 0.875rem;
  border: 1px solid var(--blue-light);
}
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 900;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
  letter-spacing: -0.5px;
  line-height: 1.2;
}
.section-desc { color: var(--text-muted); max-width: 580px; margin: 0 auto; font-size: 0.95rem; font-weight: 400; line-height: 1.7; }

/* ========== FEATURE CARDS ========== */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }
.feature-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 1.75rem;
  border: 1px solid var(--border);
  transition: all var(--t-med);
  text-align: left;
}
.feature-card:hover {
  border-color: var(--blue-primary);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(37,99,235,0.1);
}
.feature-icon {
  width: 52px; height: 52px;
  border-radius: var(--r-md);
  background: var(--blue-xlight);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1.1rem;
  color: var(--blue-primary);
  border: 1px solid var(--blue-light);
}
.feature-card h3 {
  font-size: 0.975rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
  letter-spacing: -0.2px;
}
.feature-card p { font-size: 0.855rem; color: var(--text-muted); line-height: 1.65; font-weight: 400; }

/* Role cards in "Who uses" */
.role-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 2rem;
  border: 2px solid var(--border);
  transition: all var(--t-med);
  text-align: center;
  cursor: pointer;
}
.role-card:hover, .role-card.selected { border-color: var(--blue-primary); }
.role-card.selected { background: var(--blue-xlight); }
.role-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.role-name { font-size: 1.05rem; font-weight: 800; margin-bottom: 0.5rem; color: var(--text-dark); }
.role-desc { font-size: 0.855rem; color: var(--text-muted); line-height: 1.6; }

/* ========== INSURANCE BANNER ========== */
.insurance-banner {
  background: linear-gradient(135deg, var(--blue-deep), var(--blue-primary));
  border-radius: var(--r-xl);
  padding: 2.5rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.insurance-banner h3 { color: white; font-size: 1.3rem; font-weight: 800; margin-bottom: 0.4rem; }
.insurance-banner p  { color: rgba(255,255,255,0.75); font-size: 0.9rem; }

/* ========== CTA SECTION ========== */
.cta-section {
  background: linear-gradient(145deg, #0F1F5C 0%, #1E3A8A 50%, #1D4ED8 100%);
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 40px 40px;
}
.cta-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
  padding: 5.5rem 2rem;
}
.cta-inner h2 {
  color: white;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 900;
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
  line-height: 1.15;
}
.cta-inner p {
  color: rgba(255,255,255,0.7);
  margin-bottom: 2.25rem;
  font-size: 1rem;
  line-height: 1.7;
}

/* ========== FOOTER ========== */
.footer {
  background: #0B1224;
  color: white;
  padding: 4rem 2rem 1.75rem;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
  max-width: 1160px;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 900px)  { .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; } }
@media (max-width: 480px)  { .footer-grid { grid-template-columns: 1fr; } }

.footer-brand h3 { font-size: 1.4rem; font-weight: 900; margin-bottom: 0.875rem; letter-spacing: -0.3px; }
.footer-brand h3 span { color: var(--orange); }
.footer-brand p { color: #6B7E9A; font-size: 0.875rem; line-height: 1.75; max-width: 300px; }
.footer-tagline {
  margin-top: 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255,255,255,0.2);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.footer-col h4 {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,0.35);
  margin-bottom: 1.1rem;
}
.footer-link {
  display: block;
  color: #6B7E9A;
  font-size: 0.875rem;
  margin-bottom: 0.6rem;
  cursor: pointer;
  transition: color var(--t-fast);
  font-weight: 400;
}
.footer-link:hover { color: white; }

.footer-contact {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #6B7E9A;
  font-size: 0.875rem;
  margin-bottom: 0.6rem;
}
.footer-contact i { color: var(--orange); font-size: 0.9rem; width: 16px; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: 1160px;
  margin: 0 auto;
}
.footer-bottom p { color: #3D5068; font-size: 0.78rem; }
.footer-legal { display: flex; gap: 1.25rem; }
.footer-legal a { color: #3D5068; font-size: 0.78rem; cursor: pointer; transition: color var(--t-fast); }
.footer-legal a:hover { color: #6B7E9A; }

/* ========== NOTIFICATIONS PANEL ========== */
.notif-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 340px;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  z-index: 500;
  max-height: 420px;
  overflow-y: auto;
}
.notif-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--t-fast);
  display: flex;
  gap: 10px;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg); }
.notif-item.unread { background: var(--blue-xlight); }
.notif-icon {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--blue-xlight);
  color: var(--blue-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.notif-content {}
.notif-title { font-size: 0.82rem; font-weight: 700; color: var(--text-dark); margin-bottom: 2px; }
.notif-msg   { font-size: 0.78rem; color: var(--text-muted); line-height: 1.4; }
.notif-time  { font-size: 0.7rem; color: var(--text-subtle); margin-top: 3px; }

/* ========== RESPONSIVE ========== */

/* Desktop nav shown, mobile hidden by default */
.nav-desktop-links { display: flex; align-items: center; gap: 4px; }
.nav-mobile-links  { display: none; align-items: center; gap: 6px; }

@media (max-width: 820px) {
  /* Hide desktop nav links, show mobile */
  .nav-desktop-links { display: none; }
  .nav-mobile-links  { display: flex; }

  /* Navbar */
  .navbar { padding: 0 1rem; height: 60px; }
  .navbar-title { font-size: 1.2rem; }

  /* Hero — fix padding and alignment */
  .hero { padding: 3.5rem 1.25rem 3rem; }
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: left;
  }
  .hero-actions { justify-content: flex-start; }
  .hero-stats   { justify-content: flex-start; gap: 1.5rem; }
  .hero-visual  { display: none; }

  /* Hero badge text size */
  .hero-badge { font-size: 0.68rem; }

  /* Hero heading */
  .hero h1 { font-size: clamp(1.75rem, 7vw, 2.5rem); letter-spacing: -0.5px; }
  .hero-sub { font-size: 0.9rem; max-width: 100%; }

  /* Buttons full width on small hero */
  .hero-actions .btn { width: 100%; justify-content: center; max-width: 320px; }

  /* Trust strip — scroll horizontally */
  .trust-strip { padding: 1rem; overflow-x: auto; }
  .trust-inner { flex-wrap: nowrap; justify-content: flex-start; gap: 1rem; min-width: max-content; }
  .trust-sep { display: none; }

  /* How-it-works */
  .how-steps { grid-template-columns: 1fr; gap: 2.5rem; }
  .how-steps::before { display: none; }
  .how-step { padding: 0; flex-direction: row; text-align: left; align-items: flex-start; gap: 1.25rem; }
  .how-step-num { width: 56px; height: 56px; font-size: 1.25rem; flex-shrink: 0; margin-bottom: 0; }

  /* Dashboard layout */
  .dashboard-layout { flex-direction: column; }
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    top: 0;
    padding: 0.5rem 0.75rem;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .sidebar-nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 2px;
    padding: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .sidebar-nav::-webkit-scrollbar { display: none; }
  .sidebar-section { display: contents; }
  .sidebar-section-label { display: none; }
  .sidebar-item {
    flex-direction: column;
    gap: 3px;
    font-size: 0.68rem;
    padding: 8px 12px;
    white-space: nowrap;
    flex-shrink: 0;
    border-radius: 8px;
  }
  .sidebar-item i { width: auto; font-size: 1.15rem; }
  .sidebar-item.active {
    border-left: none;
    border-bottom: 2px solid var(--orange);
    background: rgba(249,115,22,0.12);
    padding-left: 12px;
  }
  .sidebar-user { display: none; }

  /* Main content */
  .main-content { padding: 1rem; }

  /* Sections */
  .section { padding: 3rem 1.25rem; }
  .section-title { font-size: 1.5rem; }

  /* Features grid */
  .features-grid { grid-template-columns: 1fr; }

  /* Insurance banner */
  .insurance-banner { padding: 1.75rem; flex-direction: column; text-align: center; gap: 1.5rem; }
  .insurance-banner h3 { font-size: 1.1rem; }

  /* CTA */
  .cta-inner { padding: 3.5rem 1.25rem; }
  .cta-inner h2 { font-size: 1.6rem; }

  /* Footer */
  .footer { padding: 3rem 1.25rem 1.5rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 0.75rem; }

  /* Cards */
  .card { padding: 1.25rem; }
  .modal { border-radius: var(--r-lg); }

  /* Form row */
  .form-row { grid-template-columns: 1fr; }

  /* Tables */
  thead th { font-size: 0.68rem; padding: 9px 10px; }
  tbody td  { padding: 10px; font-size: 0.82rem; }
}

@media (max-width: 480px) {
  .hero { padding: 3rem 1rem 2.5rem; }
  .hero h1 { font-size: 1.65rem; }
  .hero-stat-num { font-size: 1.4rem; }
  .hero-stats { gap: 1.25rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 1.75rem 1.25rem; }
  .how-step-num { width: 48px; height: 48px; font-size: 1.1rem; }
  .btn-xl { padding: 12px 22px; font-size: 0.95rem; }
}

/* ========== UTILITY ========== */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Skeleton loader */
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, var(--bg) 50%, var(--border) 75%);
  background-size: 400px 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: var(--r-sm);
}
