/* ==========================================================================
   JYLTOW FLEET WEB DASHBOARD - REAL PRODUCTION UI STYLE
   Cloned directly from: src/web-dashboard/fleet/FleetWebDashboard.tsx
   Colors:
     - Main Background: #f1f5f9 / #f8fafc (Light slate canvas)
     - Sidebar: #0F172A (Navy slate) with #F97316 (Orange) active navigation icons
     - Cards: #FFFFFF (White) with 1px solid #e2e8f0 border and 12px radius
     - Text: #0F172A / #1E293B (Headings & Values), #64748B (Muted text)
     - Accents: #2563EB (Brand Blue badge), #F97316 (Urgent Orange button),
       #16A34A (Payout green), #1E3A8A (Enterprise badge)
   ========================================================================== */

* {
  box-sizing: border-box;
}

.portal-container {
  display: flex;
  flex-direction: row;
  flex: 1;
  min-height: 0;
  width: 100%;
  background: #f8fafc;
  color: #0f172a;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ==========================================================================
   Sidebar: Deep Navy Slate (#0F172A)
   ========================================================================== */
.portal-sidebar {
  width: 250px;
  background: #0F172A;
  border-right: 1px solid #1e293b;
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  user-select: none;
  flex-shrink: 0;
  height: 100%;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #F97316;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.brand-title {
  font-size: 20px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -1px;
}

.brand-badge {
  background: #2563EB;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  margin-left: 6px;
}

.sidebar-nav {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #94A3B8;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 120ms ease;
  border: 1px solid transparent;
}

.nav-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  font-weight: 700;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  color: #94A3B8;
  flex-shrink: 0;
}

.nav-item.active svg {
  color: #F97316; /* Orange active icon tint as in FleetWebDashboard.tsx */
}

.nav-badge-count {
  margin-left: auto;
  background: #EF4444;
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 9999px;
}

.sidebar-footer {
  border-top: 1px solid #334155;
  padding-top: 16px;
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #EF4444;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  padding-left: 8px;
}

.sidebar-footer:hover {
  opacity: 0.85;
}

/* ==========================================================================
   Main Content Area: Light Slate (#f1f5f9)
   ========================================================================== */
.portal-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #f1f5f9;
  position: relative;
}

/* Top Navigation Bar: Matches renderHeader() from FleetWebDashboard.tsx */
.portal-topbar {
  height: 64px;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  gap: 16px;
  flex-shrink: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-brand-title {
  font-size: 20px;
  font-weight: 900;
  color: #0F172A;
  letter-spacing: -0.5px;
}

.topbar-brand-badge {
  background: #2563EB;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.topbar-search {
  flex: 1;
  max-width: 350px;
  height: 40px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  color: #94a3b8;
  margin: 0 auto 0 20px;
}

.topbar-search input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 13.5px;
  color: #0f172a;
  width: 100%;
}

.topbar-search input::placeholder {
  color: #94a3b8;
}

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

/* GPS Health Indicator */
.topbar-gps-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.5px;
}

.topbar-gps-badge svg {
  width: 14px;
  height: 14px;
  color: #10b981;
}

.gps-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: #10b981;
  animation: pulseBeacon 2s infinite;
}

/* Topbar Icon Button */
.topbar-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  cursor: pointer;
  position: relative;
  transition: all 120ms ease;
}

.topbar-icon-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.topbar-notif-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ef4444;
  color: #fff;
  border-radius: 10px;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  padding: 0 4px;
  border: 2px solid #fff;
}

/* Notification Dropdown */
.notif-dropdown {
  position: absolute;
  top: 52px;
  right: 0;
  width: 360px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  padding: 16px;
  z-index: 200;
  display: none;
}

.notif-dropdown.show {
  display: block;
  animation: fadeInDown 150ms ease-out;
}

.notif-dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 10px;
}

.notif-dropdown-title {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
}

.btn-mark-read {
  background: none;
  border: none;
  font-size: 11px;
  font-weight: 700;
  color: #2563eb;
  cursor: pointer;
}

.btn-mark-read:hover {
  text-decoration: underline;
}

.notif-item {
  display: flex;
  gap: 12px;
  padding: 10px 8px;
  border-radius: 10px;
  border-bottom: 1px solid #f8fafc;
  transition: background 120ms ease;
}

.notif-item:hover {
  background: #f8fafc;
}

.notif-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-item-content {
  flex: 1;
}

.notif-item-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 2px;
}

.notif-item-desc {
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.4;
}

.notif-item-time {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 4px;
}
.topbar-urgent-btn:hover {
  background: #ea580c;
}

.topbar-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  cursor: pointer;
  position: relative;
  transition: all 120ms ease;
}

.topbar-icon-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.icon-dot-badge {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  background: #ef4444;
  border-radius: 50%;
  border: 1.5px solid #fff;
}

.topbar-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 14px;
  border-left: 1px solid #e2e8f0;
}

.profile-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #64748b;
  position: relative;
}

.profile-online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid #ffffff;
}

.profile-info {
  display: flex;
  flex-direction: column;
}

.profile-name {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.profile-status {
  font-size: 11px;
  color: #64748b;
}

/* ==========================================================================
   Views & Scrolling Container
   ========================================================================== */
.portal-scroll-area {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  position: relative;
  width: 100%;
}

.portal-view {
  flex: 1;
  padding: 20px 24px 80px;
  display: none;
  min-height: 100%;
}

.portal-view.active {
  display: block;
}

/* ==========================================================================
   Stat Cards Row (Horizontal white cards with soft tinted icon boxes)
   ========================================================================== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon.blue { background: #eff6ff; color: #3b82f6; }
.stat-icon.green { background: #f0fdf4; color: #22c55e; }
.stat-icon.orange { background: #fff7ed; color: #f97316; }
.stat-icon.purple { background: #fdf4ff; color: #d946ef; }

.stat-icon svg {
  width: 22px;
  height: 22px;
}

.stat-content {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.stat-value {
  font-size: 23px;
  font-weight: 800;
  color: #1e293b;
  letter-spacing: -0.5px;
}

/* ==========================================================================
   Dashboard Two-Column Grid (Left: Queue 480px, Right: Map & Roster)
   ========================================================================== */
.dashboard-grid {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

/* --- Left: Dispatch Queue --- */
.queue-container {
  width: 480px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.queue-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.queue-title {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.queue-badge {
  background: #e2e8f0;
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
}

.queue-tabs-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.priority-toggle-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 120ms ease;
}

.priority-toggle-btn.active {
  background: #fef2f2;
  border-color: #fee2e2;
  color: #ef4444;
}

.queue-nav-tabs {
  display: flex;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 2px;
}

.queue-subtab {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  background: transparent;
  transition: all 120ms ease;
}

.queue-subtab.active {
  background: #fff7ed;
  color: #F97316;
  font-weight: 700;
}

/* Dispatch Queue List & Request Cards */
.queue-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.request-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.request-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.request-card.emergency {
  background: #fef2f2;
  border-color: #fee2e2;
}

.req-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.req-id {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 4px;
}

.req-id.emergency {
  color: #ef4444;
}

.req-more-btn {
  color: #94a3b8;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-size: 14px;
}

.req-client-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.req-client-name {
  font-size: 14.5px;
  font-weight: 800;
  color: #0f172a;
}

.req-enterprise-badge {
  background: #1e3a8a;
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 800;
  padding: 3px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.req-marketplace-badge {
  background: #f1f5f9;
  color: #64748b;
  font-size: 9.5px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 4px;
}

.req-payout-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
}

.req-payout-pill {
  background: #f0fdf4;
  border: 1px solid #dcfce7;
  padding: 4px 10px;
  border-radius: 6px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.req-payout-amount {
  font-size: 14px;
  font-weight: 800;
  color: #16a34a;
}

.req-payout-label {
  font-size: 9px;
  font-weight: 700;
  color: #16a34a;
  text-transform: uppercase;
}

.req-proximity-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  padding: 6px 10px;
  border-radius: 8px;
  border-left: 3px solid #3b82f6;
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
}

.req-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.req-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}

.req-tag.service { background: #e0e7ff; color: #4f46e5; }
.req-tag.vehicle { background: #dbeafe; color: #2563eb; }
.req-tag.status { background: #dcfce7; color: #16a34a; }
.req-tag.highway { background: #fef3c7; color: #d97706; }

.req-location-box {
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
  background: #f8fafc;
  padding: 8px 10px;
  border-radius: 8px;
}

.req-location-box strong {
  color: #334155;
}

.req-bottom-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
}

.req-time-ago {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
}

.req-dispatch-btn {
  background: #0F172A;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 150ms ease;
}

.req-dispatch-btn:hover {
  background: #1e293b;
}

/* Queue Card Styles (matching simulation-engine.js and FleetWebDashboard.tsx) */
.queue-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 140ms ease-out;
}

.queue-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.queue-card.is-emergency {
  background: #fffafa;
  border-color: #fecaca;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.08);
}

.queue-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.queue-id-pill {
  font-size: 11.5px;
  font-weight: 800;
  color: #64748b;
  letter-spacing: 0.3px;
}

.queue-id-pill.emergency {
  color: #ef4444;
  display: flex;
  align-items: center;
  gap: 4px;
}

.queue-price-tag {
  font-size: 14.5px;
  font-weight: 900;
  color: #16a34a;
  background: #f0fdf4;
  border: 1px solid #dcfce7;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: -0.2px;
}

.queue-client-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.queue-client-name {
  font-size: 14.5px;
  font-weight: 800;
  color: #0f172a;
}

.enterprise-tag {
  background: #1e3a8a;
  color: #ffffff;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.queue-vehicle-desc {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}

.queue-route-row {
  background: #f8fafc;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  border: 1px solid #f1f5f9;
}

.route-point {
  display: flex;
  align-items: center;
  gap: 8px;
}

.route-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.route-dot.pickup {
  background: #2563eb;
}

.route-dot.dropoff {
  background: #16a34a;
}

.route-text {
  color: #475569;
}

.route-text strong {
  color: #0f172a;
  font-weight: 700;
}

.queue-proximity-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: #2563eb;
  background: #eff6ff;
  padding: 5px 10px;
  border-radius: 6px;
}

.queue-card-actions {
  margin-top: 4px;
}

.btn-dispatch-action {
  width: 100%;
  height: 38px;
  background: #f97316;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 150ms ease;
  box-shadow: 0 2px 6px rgba(249, 115, 22, 0.25);
}

.btn-dispatch-action:hover {
  background: #ea580c;
}

.queue-assigned-banner {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --- Right Column: Interactive Map & Live Drivers Roster --- */
.right-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.map-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
}

.map-card-header {
  padding: 14px 18px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.map-card-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
}

.map-unit-filters {
  display: flex;
  gap: 6px;
}

.map-unit-filter-btn {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.map-unit-filter-btn.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

.map-display-area {
  height: 440px;
  background: #edf2f7;
  position: relative;
  overflow: hidden;
  background-image: 
    linear-gradient(#e2e8f0 1px, transparent 1px),
    linear-gradient(90deg, #e2e8f0 1px, transparent 1px);
  background-size: 40px 40px;
}

/* Simulated Ontario / Simcoe Road Geometry */
.map-road-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Moving Tow Truck Pins on Map */
.truck-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: left 2.2s ease-in-out, top 2.2s ease-in-out;
  z-index: 10;
}

.truck-pin-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #2563EB;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
  border: 2px solid #ffffff;
}

.truck-pin.status-en_route .truck-pin-icon {
  background: #F97316;
  box-shadow: 0 4px 10px rgba(249, 115, 22, 0.4);
}

.truck-pin.status-available .truck-pin-icon {
  background: #10b981;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.35);
}

.truck-pin-label {
  margin-top: 4px;
  background: #0F172A;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Destination / Incident Pins */
.incident-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 9;
}

.incident-pin-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ef4444;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
  animation: pulsePin 2s infinite;
}

@keyframes pulsePin {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.map-footer-telemetry {
  padding: 10px 16px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #64748b;
}

.telemetry-beacon {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #16a34a;
  font-weight: 700;
}

.beacon-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

/* Active Drivers Quick Roster Card on Dashboard (matching FleetWebDashboard.tsx) */
.drivers-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.drivers-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drivers-card-header h4 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 800;
  color: #0f172a;
}

.drivers-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.driver-mini-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 120ms ease;
}

.driver-mini-card:hover {
  border-color: #cbd5e1;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.driver-mini-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  color: #334155;
  position: relative;
  flex-shrink: 0;
}

.driver-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  position: absolute;
  bottom: 0;
  right: 0;
}

.driver-status-dot.available {
  background: #22c55e;
}

.driver-status-dot.en_route {
  background: #f97316;
}

.driver-status-dot.offline {
  background: #94a3b8;
}

.driver-mini-meta {
  flex: 1;
  min-width: 0;
}

.driver-mini-name {
  font-size: 13.5px;
  font-weight: 800;
  color: #0f172a;
}

.driver-mini-vehicle {
  font-size: 11px;
  font-weight: 700;
  color: #2563eb;
  margin-top: 1px;
}

.driver-mini-activity {
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* ==========================================================================
   Drivers Page: Modern Cards Grid & Active Mission Banners
   ========================================================================== */
.drivers-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.drivers-page-title-wrap h2 {
  font-size: 28px;
  font-weight: 900;
  color: #0f172a;
  margin: 0 0 6px;
  letter-spacing: -0.5px;
}

.drivers-status-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
}

.btn-register-action {
  background: #0F172A;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
  transition: all 150ms ease;
}

.btn-register-action:hover {
  background: #1e293b;
  transform: translateY(-1px);
}

.summary-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.summary-stat-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.summary-stat-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.summary-stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.summary-stat-value {
  font-size: 28px;
  font-weight: 900;
  color: #1e293b;
  margin-bottom: 2px;
}

.summary-stat-label {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
}

.summary-stat-sub {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
}

.page-search-bar {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.page-search-input-wrap {
  flex: 1;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-search-input-wrap input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  color: #0f172a;
  width: 100%;
}

.drivers-cards-grid, .vehicles-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

/* Driver Card */
.driver-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.driver-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.driver-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
}

.driver-card-profile {
  display: flex;
  gap: 14px;
  align-items: center;
}

.driver-card-avatar {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: #64748b;
  overflow: hidden;
}

.driver-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.driver-card-name {
  font-size: 17px;
  font-weight: 800;
  color: #1e293b;
  letter-spacing: -0.3px;
}

.driver-card-phone {
  font-size: 13px;
  color: #94a3b8;
  font-weight: 500;
  margin-top: 2px;
}

.driver-status-badge {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.driver-status-badge.online { background: #ecfdf5; color: #10b981; border: 1px solid rgba(16,185,129,0.2); }
.driver-status-badge.busy { background: #fffbeb; color: #f59e0b; border: 1px solid rgba(245,158,11,0.2); }
.driver-status-badge.offline { background: #f8fafc; color: #94a3b8; border: 1px solid #e2e8f0; }

.driver-mini-stats-row {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}

.driver-mini-stat-cell {
  flex: 1;
  background: #f8fafc;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid #f1f5f9;
  text-align: center;
}

.driver-mini-stat-label {
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.driver-mini-stat-val {
  font-size: 14px;
  font-weight: 800;
  color: #1e293b;
}

.driver-vehicle-box {
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 18px;
}

.driver-vehicle-label {
  font-size: 10.5px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.driver-vehicle-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.driver-vehicle-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
}

.driver-mission-banner {
  background: #0f172a;
  padding: 12px 14px;
  border-radius: 14px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
}

.driver-card-bottom-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
}

.driver-action-icons {
  display: flex;
  gap: 8px;
}

.btn-driver-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  cursor: pointer;
  transition: all 120ms ease;
}

.btn-driver-icon:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.btn-power-toggle {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 120ms ease;
}

.btn-power-toggle.online { background: #fef2f2; color: #ef4444; border-color: #fee2e2; }
.btn-power-toggle.offline { background: #f0fdf4; color: #16a34a; border-color: #dcfce7; }

/* ==========================================================================
   Vehicles Page: Modern Rig Cards with Plate Badges
   ========================================================================== */
.vehicle-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
}

.vehicle-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.vehicle-plate-badge {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.vehicle-plate-pip {
  width: 3px;
  height: 12px;
  border-radius: 1.5px;
  background: #3b82f6;
}

.vehicle-plate-text {
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.vehicle-card-title {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 4px;
}

.vehicle-card-type {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 16px;
}

.vehicle-specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.vehicle-spec-box {
  background: #f8fafc;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid #f1f5f9;
}

.vehicle-spec-label {
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
}

.vehicle-spec-val {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  margin-top: 2px;
}

.vehicle-cvor-box {
  background: #f0fdf4;
  border: 1px solid #dcfce7;
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.vehicle-cvor-text {
  font-size: 12px;
  font-weight: 700;
  color: #16a34a;
}

/* ==========================================================================
   Billing / Accounting Page: Balance Card & Stripe Reload
   ========================================================================== */
.accounting-balance-card {
  background: #0f172a;
  border-radius: 32px;
  padding: 32px;
  box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.4);
  color: #ffffff;
  flex: 1;
  min-width: 320px;
}

.balance-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.balance-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.currency-badge {
  background: rgba(255, 255, 255, 0.1);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
}

.balance-label {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
}

.balance-number {
  font-size: 46px;
  font-weight: 900;
  letter-spacing: -1.5px;
  color: #ffffff;
}

.balance-sub-details {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 28px;
}

.accounting-reload-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 32px;
  padding: 32px;
  flex: 1;
  min-width: 320px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.reload-presets-row {
  display: flex;
  gap: 12px;
  margin: 16px 0;
}

.btn-reload-preset {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  cursor: pointer;
  transition: all 120ms ease;
}

.btn-reload-preset:hover {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

.custom-reload-row {
  display: flex;
  gap: 12px;
}

.custom-reload-input {
  flex: 1;
  height: 48px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0 16px;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
}

.custom-reload-input input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 15px;
  font-weight: 700;
  width: 100%;
}

.btn-do-reload {
  background: #0f172a;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 0 24px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: background 120ms ease;
}

.btn-do-reload:hover {
  background: #1e293b;
}

/* Sub-tabs bar */
.view-subtabs-nav {
  display: flex;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 24px;
  align-self: flex-start;
}

.view-subtab-btn {
  padding: 8px 16px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 120ms ease;
}

.view-subtab-btn.active {
  background: #0f172a;
  color: #ffffff;
}

/* ==========================================================================
   Company Profile: Real Hero Header, Rates, and Performance
   ========================================================================== */
.profile-hero-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  margin-bottom: 32px;
}

.profile-hero-banner {
  height: 140px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  position: relative;
  padding: 24px;
  display: flex;
  justify-content: flex-end;
}

.profile-hero-body {
  padding: 0 36px 36px;
  display: flex;
  align-items: flex-end;
  gap: 28px;
  margin-top: -60px;
  flex-wrap: wrap;
}

.profile-logo-circle {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: #ffffff;
  border: 6px solid #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.rates-box-grid {
  background: #f8fafc;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

.rate-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid #f1f5f9;
}

.rate-item-row:last-child {
  border-bottom: none;
}

/* ==========================================================================
   Verification Flow Cards & Stepper
   ========================================================================== */
.verification-stepper {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
}

.stepper-pill {
  flex: 1;
  padding: 12px 16px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
}

.stepper-pill.active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #2563eb;
}

.stepper-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
}

.stepper-pill.active .stepper-num {
  background: #2563eb;
  color: #ffffff;
}

/* ==========================================================================
   Help Center: Accordion FAQ
   ========================================================================== */
.faq-accordion-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 12px;
}

.faq-header {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.faq-body {
  padding: 0 20px 18px;
  font-size: 13.5px;
  color: #475569;
  line-height: 1.6;
}

/* ==========================================================================
   Floating Status Message Banner (Cloned from FleetWebDashboard.tsx)
   ========================================================================== */
.fleet-toast-container {
  position: absolute;
  top: 76px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.fleet-toast-container.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.fleet-toast-pill {
  background: rgba(16, 185, 129, 0.95);
  backdrop-filter: blur(12px);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
}

.fleet-toast-pill.error {
  background: rgba(239, 68, 68, 0.95);
}

/* ==========================================================================
   Segmented Controls (Cloned from FleetWebSettings.tsx)
   ========================================================================== */
.segmented-container {
  display: flex;
  background: #f1f5f9;
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  margin: 12px 0 16px;
}

.segmented-option {
  flex: 1;
  padding: 10px 0;
  text-align: center;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 120ms ease;
}

.segmented-option:hover {
  color: #0f172a;
}

.segmented-option.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Rate Schedule Inputs */
.rate-inputs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.rate-input-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rate-input-wrap label {
  font-size: 11.5px;
  font-weight: 700;
  color: #475569;
}

.rate-input-box {
  display: flex;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0 12px;
  height: 42px;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.rate-input-box span {
  color: #94a3b8;
  margin-right: 6px;
}

.rate-input-box input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

/* Service Toggles Grid */
.service-toggles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.service-toggle-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 120ms ease;
}

.service-toggle-card:hover {
  border-color: #cbd5e1;
}

.service-toggle-card.active {
  border-color: #2563eb;
  background: #f8fafc;
}

.toggle-switch {
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: #e2e8f0;
  position: relative;
  transition: background 150ms ease;
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 150ms ease;
}

.service-toggle-card.active .toggle-switch,
.toggle-switch.active {
  background: #2563eb;
}

.service-toggle-card.active .toggle-switch::after,
.toggle-switch.active::after {
  transform: translateX(20px);
}

/* ==========================================================================
   Universal Modal Backdrop & Dialog System
   ========================================================================== */
.fleet-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.fleet-modal-backdrop.show {
  display: flex;
  animation: modalFadeIn 180ms ease-out;
}

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

.fleet-modal-dialog {
  background: #ffffff;
  border-radius: 24px;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid #e2e8f0;
}

.fleet-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.fleet-modal-title {
  font-size: 18px;
  font-weight: 900;
  color: #0f172a;
}

.fleet-modal-close {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
}

.fleet-modal-close:hover {
  background: #fee2e2;
  color: #ef4444;
}

.fleet-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.fleet-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: #f8fafc;
}

/* Modal Form Inputs */
.modal-form-group {
  margin-bottom: 16px;
}

.modal-form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.modal-form-group input,
.modal-form-group select {
  width: 100%;
  height: 44px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  outline: none;
}

.modal-form-group input:focus,
.modal-form-group select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn-modal-cancel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 13.5px;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
}

.btn-modal-submit {
  background: #0f172a;
  border: none;
  border-radius: 10px;
  padding: 10px 22px;
  font-size: 13.5px;
  font-weight: 800;
  color: #ffffff;
  cursor: pointer;
  transition: background 120ms ease;
}

.btn-modal-submit:hover {
  background: #1e293b;
}

/* ==========================================================================
   Fleet Audit Modal (Cloned from FleetAuditModal.tsx)
   ========================================================================== */
.audit-timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
  border-left: 2px solid #e2e8f0;
  padding-left: 16px;
  margin-left: 8px;
}

.audit-timeline-step {
  position: relative;
}

.audit-timeline-dot {
  position: absolute;
  left: -22px;
  top: 2px;
  width: 10px;
  height: 10px;
  border-radius: 5px;
  background: #10b981;
}

.audit-timeline-title {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
}

.audit-timeline-sub {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 2px;
}

.audit-invoice-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
}

.audit-invoice-table td {
  padding: 8px 0;
  font-size: 13px;
  color: #475569;
  border-bottom: 1px solid #f1f5f9;
}

.audit-invoice-table td:last-child {
  text-align: right;
  font-weight: 700;
  color: #0f172a;
}

/* ==========================================================================
   Live Coordinator Chat Modal (Cloned from LiveChatScreen.tsx)
   ========================================================================== */
.chat-window {
  height: 320px;
  overflow-y: auto;
  padding: 16px;
  background: #f8fafc;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}

.chat-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.4;
}

.chat-bubble.coordinator {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #1e293b;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.chat-bubble.me {
  background: #2563eb;
  color: #ffffff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.chat-input-row {
  display: flex;
  gap: 10px;
}

.chat-input-row input {
  flex: 1;
  height: 44px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 0 14px;
  font-size: 13.5px;
  outline: none;
}

.btn-send-chat {
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 0 20px;
  font-weight: 700;
  cursor: pointer;
}

