/* =====================================================================
   Kaushik Transport TMS - Professional Enterprise Design System
   Tailored for Delhi NCR Commercial Fleet Management & Dispatch
   ===================================================================== */

:root {
  /* Color Palette - Enterprise Dark Slate & Deep Navy */
  --bg-app: #080d1a;
  --bg-sidebar: #0d1527;
  --bg-surface: #131f37;
  --bg-surface-elevated: #1a2947;
  --bg-surface-hover: #223458;
  --bg-input: #0a1122;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-focus: #6366f1;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --text-inverse: #0f172a;

  /* Restrained Semantic Accents */
  --accent-primary: #6366f1;
  --accent-primary-hover: #4f46e5;
  --accent-primary-glow: rgba(99, 102, 241, 0.25);

  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.2);

  --accent-success: #10b981;
  --accent-success-bg: rgba(16, 185, 129, 0.12);
  --accent-success-border: rgba(16, 185, 129, 0.3);

  --accent-warning: #f59e0b;
  --accent-warning-bg: rgba(245, 158, 11, 0.12);
  --accent-warning-border: rgba(245, 158, 11, 0.3);

  --accent-danger: #f43f5e;
  --accent-danger-bg: rgba(244, 63, 94, 0.12);
  --accent-danger-border: rgba(244, 63, 94, 0.3);

  --accent-purple: #8b5cf6;
  --accent-purple-bg: rgba(139, 92, 246, 0.12);

  /* Typography & Sizing */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Outfit', 'Inter', -apple-system, sans-serif;

  --sidebar-width: 256px;
  --header-height: 60px;

  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-modal: 0 20px 50px rgba(0, 0, 0, 0.7);

  --transition-fast: 0.15s ease;
  --transition-normal: 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* =====================================================================
   App Layout: Sidebar + Main Content Wrapper
   ===================================================================== */
.app-shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* Sidebar */
.app-sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: transform var(--transition-normal);
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-header {
  height: var(--header-height);
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.brand-badge-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 242, 254, 0.35);
  flex-shrink: 0;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  background: #080f20;
}

.brand-badge-logo:hover {
  transform: scale(1.06);
  box-shadow: 0 4px 18px rgba(0, 242, 254, 0.6);
}

.brand-badge-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-title-wrap {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  white-space: nowrap;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 0.64rem;
  color: var(--accent-cyan);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* Sidebar Nav */
.sidebar-nav {
  padding: 1rem 0.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.nav-group-title {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0 0.6rem;
  margin-bottom: 0.35rem;
}

.nav-group-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  background: transparent;
  width: 100%;
  text-align: left;
  transition: all var(--transition-fast);
}

.sidebar-link-content {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.sidebar-link-icon {
  font-size: 1.05rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
}

.sidebar-link:hover {
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.sidebar-link.active {
  background-color: rgba(99, 102, 241, 0.12);
  color: #fff;
  font-weight: 600;
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
}

.sidebar-link.active .sidebar-link-icon {
  color: var(--accent-primary);
}

.sidebar-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.sidebar-badge.badge-danger {
  background: var(--accent-danger-bg);
  color: #fda4af;
  border: 1px solid var(--accent-danger-border);
}

.sidebar-badge.badge-warning {
  background: var(--accent-warning-bg);
  color: #fde68a;
  border: 1px solid var(--accent-warning-border);
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.2);
  font-size: 0.72rem;
  color: var(--text-tertiary);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.system-status-indicator {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-success);
  box-shadow: 0 0 8px var(--accent-success);
  display: inline-block;
  animation: pulseAnimation 2s infinite;
}

@keyframes pulseAnimation {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* =====================================================================
   Main Content Wrapper & Header
   ===================================================================== */
.main-wrapper {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  min-width: 0; /* Prevents flex children from causing overflow */
}

.top-header {
  height: var(--header-height);
  background: rgba(13, 21, 39, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
  gap: 1rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  font-size: 1.15rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.84rem;
}

.breadcrumb-root {
  color: var(--text-tertiary);
}

.breadcrumb-sep {
  color: var(--text-tertiary);
  font-size: 0.75rem;
}

.breadcrumb-current {
  color: var(--text-primary);
  font-weight: 600;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
}

.header-pill strong {
  color: var(--text-primary);
}

.header-pill.pill-alert {
  background: var(--accent-danger-bg);
  border-color: var(--accent-danger-border);
  color: #fda4af;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.header-pill.pill-alert:hover {
  background: rgba(244, 63, 94, 0.2);
}

/* Main Container Area */
.page-container {
  padding: 1.5rem 1.75rem 2.5rem;
  flex: 1;
}

/* =====================================================================
   Cards, Panels, & Grid Systems
   ===================================================================== */
.glass-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

/* Metrics KPI Cards Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.metric-card {
  padding: 1.15rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.metric-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-medium);
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--card-accent, var(--accent-primary));
}

.metric-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.metric-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.metric-icon {
  font-size: 1.1rem;
}

.metric-value {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.metric-sub {
  font-size: 0.74rem;
  color: var(--text-tertiary);
  margin-top: 0.35rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Quick Filter Card for Dispatch Board & Modules */
.filter-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.75rem;
  align-items: flex-end;
}

.filter-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.filter-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* =====================================================================
   Form Controls: Inputs, Selects, Buttons
   ===================================================================== */
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.55rem 0.85rem;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: inherit;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-primary-glow);
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1em;
  padding-right: 2rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), #4338ca);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.55rem 1.15rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  box-shadow: 0 2px 8px var(--accent-primary-glow);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-medium);
}

.btn-success {
  background: linear-gradient(135deg, var(--accent-success), #059669);
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
  transition: all var(--transition-fast);
}

.btn-danger {
  background: linear-gradient(135deg, var(--accent-danger), #be123c);
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 2px 8px rgba(244, 63, 94, 0.3);
}

/* Action button for table rows */
.action-btn-group {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.action-btn {
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.action-btn-dispatch {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border-color: rgba(99, 102, 241, 0.35);
}
.action-btn-dispatch:hover {
  background: rgba(99, 102, 241, 0.3);
  color: #fff;
}

.action-btn-transit {
  background: rgba(245, 158, 11, 0.15);
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.35);
}
.action-btn-transit:hover {
  background: rgba(245, 158, 11, 0.3);
  color: #fff;
}

.action-btn-deliver {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.35);
}
.action-btn-deliver:hover {
  background: rgba(16, 185, 129, 0.3);
  color: #fff;
}

.action-btn-close {
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
  border-color: rgba(139, 92, 246, 0.35);
}
.action-btn-close:hover {
  background: rgba(139, 92, 246, 0.3);
  color: #fff;
}

/* =====================================================================
   Custom Responsive Table Styles
   ===================================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.custom-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
  font-size: 0.84rem;
}

.custom-table th {
  background-color: var(--bg-surface-elevated);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.custom-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: middle;
}

.custom-table tbody tr {
  transition: background-color var(--transition-fast);
}

.custom-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.badge-planned {
  background: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.badge-planned::before { background: #3b82f6; }

.badge-dispatched {
  background: var(--accent-warning-bg);
  color: #fde68a;
  border: 1px solid var(--accent-warning-border);
}
.badge-dispatched::before { background: var(--accent-warning); }

.badge-in-transit, .badge-in_transit {
  background: rgba(6, 182, 212, 0.12);
  color: #67e8f9;
  border: 1px solid rgba(6, 182, 212, 0.3);
}
.badge-in-transit::before, .badge-in_transit::before { background: var(--accent-cyan); }

.badge-delivered {
  background: var(--accent-success-bg);
  color: #6ee7b7;
  border: 1px solid var(--accent-success-border);
}
.badge-delivered::before { background: var(--accent-success); }

.badge-closed {
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.25);
}
.badge-closed::before { background: #94a3b8; }

.badge-available {
  background: var(--accent-success-bg);
  color: #6ee7b7;
  border: 1px solid var(--accent-success-border);
}
.badge-available::before { background: var(--accent-success); }

.badge-on-trip, .badge-on_trip {
  background: var(--accent-warning-bg);
  color: #fde68a;
  border: 1px solid var(--accent-warning-border);
}
.badge-on-trip::before, .badge-on_trip::before { background: var(--accent-warning); }

.badge-maintenance, .badge-in_maintenance, .badge-blocked, .badge-off-duty, .badge-off_duty {
  background: var(--accent-danger-bg);
  color: #fda4af;
  border: 1px solid var(--accent-danger-border);
}
.badge-maintenance::before, .badge-in_maintenance::before, .badge-blocked::before, .badge-off-duty::before { background: var(--accent-danger); }

/* Expense Status Badges */
.badge-submitted {
  background: var(--accent-warning-bg);
  color: #fde68a;
  border: 1px solid var(--accent-warning-border);
}
.badge-submitted::before { background: var(--accent-warning); }

.badge-under_verification, .badge-under-verification {
  background: var(--accent-cyan-glow);
  color: #67e8f9;
  border: 1px solid rgba(6, 182, 212, 0.4);
}
.badge-under_verification::before, .badge-under-verification::before { background: var(--accent-cyan); }

.badge-approved {
  background: var(--accent-purple-bg);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.4);
}
.badge-approved::before { background: var(--accent-purple); }

.badge-paid {
  background: var(--accent-success-bg);
  color: #6ee7b7;
  border: 1px solid var(--accent-success-border);
}
.badge-paid::before { background: var(--accent-success); }

.badge-rejected {
  background: var(--accent-danger-bg);
  color: #fda4af;
  border: 1px solid var(--accent-danger-border);
}
.badge-rejected::before { background: var(--accent-danger); }

/* Expense Ledger Pill & Segment Switcher */
.expense-filter-pills-bar {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.35rem 0;
  scrollbar-width: thin;
}
.expense-cat-pill {
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border-medium);
  background: var(--bg-surface);
  color: var(--text-secondary);
  white-space: nowrap;
  transition: all 0.2s ease;
  user-select: none;
}
.expense-cat-pill:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.25);
}
.expense-cat-pill.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  box-shadow: 0 0 12px var(--accent-primary-glow);
}

.expense-tab-switch {
  display: flex;
  background: var(--bg-surface-elevated);
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  gap: 4px;
}
.expense-tab-btn {
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-xs);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.expense-tab-btn:hover {
  color: var(--text-primary);
}
.expense-tab-btn.active {
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-medium);
}

/* Alert Banners */
.alert-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  margin-bottom: 1.25rem;
}

.alert-danger {
  background: var(--accent-danger-bg);
  border: 1px solid var(--accent-danger-border);
  color: #fda4af;
}

.alert-warning {
  background: var(--accent-warning-bg);
  border: 1px solid var(--accent-warning-border);
  color: #fde68a;
}

.alert-success {
  background: var(--accent-success-bg);
  border: 1px solid var(--accent-success-border);
  color: #6ee7b7;
}

.alert-info {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #c7d2fe;
}

/* =====================================================================
   Modals
   ===================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(4, 7, 14, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999 !important;
  padding: 1rem;
}

.modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-modal);
  padding: 1.5rem;
  position: relative;
  animation: modalEnter 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-large {
  max-width: 860px !important;
}

@keyframes modalEnter {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.2rem;
  transition: color var(--transition-fast);
}

.modal-close:hover {
  color: var(--text-primary);
}

/* =====================================================================
   Driver Phone Simulator (Field View)
   ===================================================================== */
.driver-simulator-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem 0;
}

.smartphone-frame {
  width: 380px;
  height: 740px;
  background: #000;
  border-radius: 46px;
  border: 12px solid #1e293b;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 0 2px rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.phone-notch {
  width: 140px;
  height: 22px;
  background: #1e293b;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
  z-index: 20;
}

.phone-screen {
  flex: 1;
  background: #090e1a;
  padding: 1.75rem 1.15rem 1rem;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.driver-app-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1rem;
}

.driver-badge-live {
  font-size: 0.72rem;
  color: var(--accent-success);
  background: var(--accent-success-bg);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 600;
}

/* Toast Container */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.toast {
  padding: 0.75rem 1.15rem;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-md);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  max-width: 420px;
  animation: toastSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

.toast-success { border-color: rgba(16, 185, 129, 0.4); color: #6ee7b7; }
.toast-error { border-color: rgba(244, 63, 94, 0.4); color: #fda4af; }
.toast-info { border-color: rgba(99, 102, 241, 0.4); color: #c7d2fe; }

/* Voucher Box for Print Invoices & PODs */
.voucher-box {
  background: #ffffff;
  color: #0f172a;
  border-radius: var(--radius-sm);
  padding: 2rem;
  font-family: var(--font-sans);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.voucher-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 2px solid #0f172a;
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.voucher-brand {
  font-size: 1.35rem;
  font-weight: 800;
  color: #1e3a8a;
}

.voucher-meta {
  font-size: 0.85rem;
  color: #475569;
  text-align: right;
}

.voucher-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
}

.voucher-field {
  margin-bottom: 0.5rem;
}

.voucher-label {
  font-weight: 700;
  color: #334155;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.voucher-val {
  font-size: 0.92rem;
  font-weight: 600;
  color: #0f172a;
  margin-top: 0.15rem;
}

.voucher-sign-area {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px dashed #cbd5e1;
}

.voucher-sign-box {
  text-align: center;
  width: 180px;
}

.voucher-sign-line {
  height: 45px;
  border-bottom: 1px solid #0f172a;
  margin-bottom: 0.4rem;
}

/* =====================================================================
   Responsive Breakpoints: Desktop, Tablet, Mobile
   ===================================================================== */
@media (max-width: 1024px) {
  :root {
    --sidebar-width: 220px;
  }
  .page-container {
    padding: 1.25rem 1.25rem 2rem;
  }
}

@media (max-width: 768px) {
  .app-sidebar {
    transform: translateX(-100%);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.7);
  }

  .app-sidebar.sidebar-open {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 95;
  }

  .sidebar-backdrop.active {
    display: block;
  }

  .main-wrapper {
    margin-left: 0;
  }

  .mobile-menu-btn {
    display: inline-flex;
  }

  .top-header {
    padding: 0 1rem;
  }

  .page-container {
    padding: 1rem 0.85rem 2rem;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .filter-grid {
    grid-template-columns: 1fr;
  }

  .smartphone-frame {
    width: 100%;
    max-width: 360px;
    height: 680px;
  }
}

/* =====================================================================
   Master Modules: Fleet, Drivers, Clients Enhancements
   ===================================================================== */
.badge-active {
  background: var(--accent-success-bg);
  color: #6ee7b7;
  border: 1px solid var(--accent-success-border);
}
.badge-active::before { background: var(--accent-success); }

.badge-inactive {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
}
.badge-inactive::before { background: #64748b; }

.badge-danger-soft {
  background: var(--accent-danger-bg);
  color: #fda4af;
  border: 1px solid var(--accent-danger-border);
}
.badge-danger-soft::before { background: var(--accent-danger); }

.badge-warning-soft {
  background: var(--accent-warning-bg);
  color: #fde68a;
  border: 1px solid var(--accent-warning-border);
}
.badge-warning-soft::before { background: var(--accent-warning); }

/* Master Toolbars (Search & Multi-Filters) */
.master-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  background: rgba(19, 31, 55, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
}

.master-toolbar-filters {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  flex: 1;
}

.search-input-box {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-radius: var(--radius-xs);
  padding: 0.45rem 0.75rem;
  font-size: 0.8rem;
  min-width: 200px;
  outline: none;
  transition: border-color var(--transition-fast);
}

.search-input-box:focus {
  border-color: var(--border-focus);
}

.filter-select-box {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius-xs);
  padding: 0.45rem 0.65rem;
  font-size: 0.8rem;
  outline: none;
}

.filter-select-box:focus {
  border-color: var(--border-focus);
  color: var(--text-primary);
}

/* Document Pill Countdown */
.doc-pill-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.75rem;
}

.doc-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-xs);
  font-size: 0.7rem;
  font-weight: 500;
  width: fit-content;
}

.doc-pill-compliant {
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.doc-pill-expiring_soon {
  background: rgba(245, 158, 11, 0.15);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.doc-pill-expired, .doc-pill-missing {
  background: rgba(244, 63, 94, 0.15);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.35);
}

/* Credit Exposure Progress Bar */
.credit-exposure-meter {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 140px;
}

.meter-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  border-radius: 3px;
  transition: width var(--transition-normal);
}

.meter-fill-safe { background: var(--accent-success); }
.meter-fill-warning { background: var(--accent-warning); }
.meter-fill-danger { background: var(--accent-danger); }

/* Detail Card Modal Grid */
.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.detail-meta-item {
  background: rgba(10, 17, 34, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
}

.detail-meta-label {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}

.detail-meta-value {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* =====================================================================
   Transport SaaS & Futuristic Freight Dashboard (Day 1 & Day 2 Videos)
   ===================================================================== */
.saas-hero-banner {
  background: linear-gradient(135deg, rgba(13, 21, 39, 0.95) 0%, rgba(19, 31, 55, 0.85) 60%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  margin-bottom: 1.5rem;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 2rem;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.saas-hero-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 4px; height: 100%;
  background: linear-gradient(180deg, var(--accent-cyan), var(--accent-primary));
}

.saas-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid var(--accent-cyan-glow);
  color: var(--accent-cyan);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
}

.pulse-dot-cyan {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
}

.saas-hero-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.saas-hero-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  max-width: 580px;
}

.saas-hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-hero-action {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all var(--transition-fast);
}

.btn-hero-action:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.btn-hero-action.primary {
  background: linear-gradient(135deg, var(--accent-primary), #4f46e5);
  border-color: rgba(99, 102, 241, 0.4);
  color: #fff;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-hero-action.primary:hover {
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.saas-hero-truck-art {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(0, 242, 254, 0.25);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
  height: 160px;
}

.saas-truck-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  filter: contrast(1.08) brightness(0.95);
  transition: transform 0.4s ease;
}

.saas-hero-truck-art:hover .saas-truck-img {
  transform: scale(1.04);
}

.truck-hud-stat-pill {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  background: rgba(11, 17, 32, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid var(--accent-cyan-glow);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.hud-stat-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 6px var(--accent-emerald);
}

/* Live Route Tracking Card (Day 1 Video 00:06) */
.tracking-map-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.tracking-map-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.tracking-map-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tracking-map-canvas {
  background: #060a12;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  position: relative;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.route-vector-bg {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  opacity: 0.35;
  pointer-events: none;
}

.route-node-badge {
  position: absolute;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  z-index: 5;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

.route-node-badge.origin { top: 20%; left: 10%; border-left: 3px solid var(--accent-cyan); }
.route-node-badge.transit { top: 40%; left: 45%; border-left: 3px solid var(--accent-primary); animation: floatRoutePin 3s ease-in-out infinite; }
.route-node-badge.delivered { bottom: 25%; right: 10%; border-left: 3px solid var(--accent-emerald); }

@keyframes floatRoutePin {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.route-telemetry-strip {
  position: relative;
  z-index: 6;
  background: rgba(11, 17, 32, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.25rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.telemetry-chip {
  display: flex;
  flex-direction: column;
}

.telemetry-chip-lbl {
  font-size: 0.68rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.telemetry-chip-val {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  font-family: var(--font-display);
}

@media (max-width: 900px) {
  .saas-hero-banner { grid-template-columns: 1fr; }
  .saas-hero-truck-art { height: 130px; }
  .route-telemetry-strip { grid-template-columns: 1fr 1fr; }
}

/* =====================================================================
   EXECUTIVE LOGISTICS COMMAND CENTER & DASHBOARD DESIGN SYSTEM
   ===================================================================== */

/* 1. Top Telemetry & Operations Command Bar */
.dashboard-top-telemetry-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(13, 21, 39, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.25rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.telemetry-pills-cluster {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.dashboard-telemetry-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem;
  background: rgba(19, 31, 55, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
  transition: all var(--transition-fast);
}

.dashboard-telemetry-pill:hover {
  border-color: rgba(99, 102, 241, 0.4);
  color: var(--text-primary);
  background: rgba(30, 45, 75, 0.9);
}

.dashboard-telemetry-pill strong {
  color: #fff;
}

.dashboard-telemetry-pill.telemetry-clock {
  font-family: 'Inter', monospace;
  font-weight: 700;
  color: var(--accent-cyan);
  border-color: rgba(0, 242, 254, 0.25);
  background: rgba(0, 242, 254, 0.06);
}

.telemetry-actions-cluster {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-command-action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-command-action.primary {
  background: linear-gradient(135deg, var(--accent-primary), #4f46e5);
  color: #fff;
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}

.btn-command-action.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.5);
}

.btn-command-action.secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.btn-command-action.secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

/* 2. Executive Hero Banner Enhancements */
.saas-hero-banner {
  background: linear-gradient(135deg, rgba(13, 21, 39, 0.95), rgba(8, 13, 26, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  margin-bottom: 1.5rem;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.75rem;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

.saas-hero-banner::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 242, 254, 0.12), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.saas-hero-left {
  position: relative;
  z-index: 1;
}

.saas-hero-title {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0.65rem 0 0.5rem;
}

.saas-hero-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 680px;
  margin-bottom: 1.25rem;
}

.saas-hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}

/* Hero Media Box with AI Video Player & HUD */
.hero-drone-media-frame {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(0, 242, 254, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  height: 200px;
  background: #03060d;
}

.hero-drone-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-drone-hud-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(3, 6, 13, 0.5) 0%, transparent 40%, rgba(3, 6, 13, 0.8) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
}

.hero-hud-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hero-hud-tag {
  background: rgba(13, 21, 39, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 242, 254, 0.35);
  border-radius: var(--radius-full);
  padding: 0.2rem 0.55rem;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent-cyan);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  letter-spacing: 0.04em;
}

.hero-hud-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.hero-media-switch-btn {
  pointer-events: auto;
  background: rgba(13, 21, 39, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all var(--transition-fast);
}

.hero-media-switch-btn:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

/* 3. Enhanced KPI Metric Cards with Visual Glow */
.metric-card-kpi {
  background: rgba(19, 31, 55, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.35rem;
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric-card-kpi:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.metric-card-kpi::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--card-accent, var(--accent-primary));
}

.kpi-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.kpi-title-text {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.kpi-badge-trend {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.kpi-badge-trend.positive {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.kpi-badge-trend.warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.kpi-badge-trend.cyan {
  background: rgba(0, 242, 254, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(0, 242, 254, 0.3);
}

.kpi-value-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0.35rem 0;
}

.kpi-big-value {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.kpi-sub-text {
  font-size: 0.74rem;
  color: var(--text-tertiary);
  margin-top: 0.2rem;
}

.kpi-progress-bar-wrap {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  margin-top: 0.65rem;
  overflow: hidden;
}

.kpi-progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--card-accent, var(--accent-primary));
  transition: width 0.8s ease;
}

/* 4. Delhi NCR Corridor Fleet Radar & Hub Telemetry */
.radar-hub-canvas-wrap {
  background: #040812;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  position: relative;
  min-height: 250px;
  overflow: hidden;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.8);
}

.radar-grid-bg {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-image: 
    linear-gradient(rgba(0, 242, 254, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 242, 254, 0.04) 1px, transparent 1px);
  background-size: 35px 35px;
  pointer-events: none;
}

.corridor-node-marker {
  position: absolute;
  background: rgba(13, 21, 39, 0.95);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.76rem;
  z-index: 10;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7);
  cursor: pointer;
  transition: all 0.2s ease;
}

.corridor-node-marker:hover {
  transform: scale(1.05);
  border-color: var(--accent-cyan);
  box-shadow: 0 8px 25px rgba(0, 242, 254, 0.25);
}

.corridor-node-marker.node-kundli { top: 14%; left: 8%; border-left: 3px solid var(--accent-cyan); }
.corridor-node-marker.node-transit { top: 38%; left: 42%; border-left: 3px solid var(--accent-primary); animation: floatRoutePin 3.5s ease-in-out infinite; }
.corridor-node-marker.node-gurugram { bottom: 22%; left: 24%; border-left: 3px solid #f59e0b; }
.corridor-node-marker.node-okhla { bottom: 20%; right: 12%; border-left: 3px solid #10b981; }

.corridor-stat-pills-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* 5. Executive Visual Analytics Section (Dual Column Charts) */
.charts-executive-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.chart-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.35rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}

.chart-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.chart-card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chart-card-sub {
  font-size: 0.74rem;
  color: var(--text-tertiary);
  margin-top: 0.15rem;
}

.chart-container-box {
  position: relative;
  width: 100%;
  height: 240px;
}

/* 6. Operations Dispatch Matrix & Live Event Stream */
.operations-split-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 1.25rem;
}

.activity-feed-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
}

.activity-feed-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.activity-event-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  background: rgba(10, 17, 34, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.activity-event-card:hover {
  background: rgba(20, 32, 60, 0.7);
  border-color: rgba(255, 255, 255, 0.12);
}

.activity-event-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.activity-event-body {
  flex: 1;
  min-width: 0;
}

.activity-event-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.activity-event-sub {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  margin-top: 0.2rem;
  line-height: 1.4;
  white-space: normal;
}

.activity-event-time {
  font-size: 0.68rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* Route Progress Bar inside Table */
.route-progress-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 140px;
}

.route-progress-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
}

.route-progress-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-cyan));
}

@media (max-width: 1100px) {
  .charts-executive-grid { grid-template-columns: 1fr; }
  .operations-split-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .dashboard-top-telemetry-bar { flex-direction: column; align-items: stretch; }
  .telemetry-pills-cluster { justify-content: flex-start; }
  .telemetry-actions-cluster { justify-content: stretch; }
  .saas-hero-banner { grid-template-columns: 1fr; padding: 1.25rem; }
  .hero-drone-media-frame { height: 160px; }
  .radar-hub-canvas-wrap { min-height: 320px; }
  .corridor-node-marker { position: static; margin-bottom: 0.5rem; }
}

/* =============================================================================
   DAILY ODOMETER & CNG FUEL MANAGEMENT SYSTEM STYLES
   ============================================================================= */
.fuel-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.15rem;
  margin-bottom: 1.75rem;
}

.fuel-heatmap-container {
  background: var(--bg-surface, #0b1329);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg, 14px);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.fuel-calendar-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.fuel-month-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.fuel-month-title {
  font-family: var(--font-display, 'Outfit', sans-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  min-width: 170px;
  text-align: center;
  letter-spacing: -0.01em;
}

.fuel-calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.65rem;
  margin-bottom: 0.65rem;
  text-align: center;
}

.fuel-weekday-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-tertiary, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.35rem 0;
}

.fuel-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.65rem;
}

.fuel-day-cell {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md, 10px);
  min-height: 106px;
  padding: 0.65rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.fuel-day-cell:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  border-color: rgba(0, 242, 254, 0.4);
  z-index: 2;
}

.fuel-day-cell.empty-padding {
  opacity: 0.2;
  cursor: default;
  pointer-events: none;
  background: transparent;
  border-color: transparent;
}

/* Heatmap Intensity Scales */
.fuel-day-cell.intensity-0 {
  background: rgba(15, 23, 42, 0.4);
  border-color: rgba(255, 255, 255, 0.04);
}

.fuel-day-cell.intensity-1 {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.22);
}

.fuel-day-cell.intensity-2 {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.4);
}

.fuel-day-cell.intensity-3 {
  background: rgba(6, 182, 212, 0.22);
  border-color: rgba(6, 182, 212, 0.55);
  box-shadow: inset 0 0 16px rgba(6, 182, 212, 0.12);
}

.fuel-day-cell.intensity-4 {
  background: linear-gradient(145deg, rgba(6, 182, 212, 0.32), rgba(16, 185, 129, 0.25));
  border-color: rgba(0, 242, 254, 0.7);
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.25), inset 0 0 20px rgba(0, 242, 254, 0.15);
}

.fuel-day-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.fuel-day-number {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.fuel-day-distance {
  font-family: var(--font-display, 'Outfit', sans-serif);
  font-size: 0.92rem;
  font-weight: 700;
  color: #38bdf8;
  margin: 0.25rem 0 0.15rem 0;
  line-height: 1.1;
}

.fuel-day-odo-range {
  font-size: 0.65rem;
  color: var(--text-tertiary, #94a3b8);
  letter-spacing: -0.01em;
  margin-bottom: 0.25rem;
}

/* CNG Refill Marker Tag */
.cng-refill-marker {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.45rem;
  border-radius: var(--radius-full, 9999px);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(217, 119, 6, 0.4));
  border: 1px solid rgba(245, 158, 11, 0.65);
  color: #fef08a;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
  margin-top: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.cng-refill-marker .refill-icon {
  font-size: 0.72rem;
}

.cng-refill-marker:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.45), rgba(217, 119, 6, 0.55));
}

.fuel-day-stats-pill {
  font-size: 0.64rem;
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
  margin-top: 0.2rem;
  display: inline-block;
}

/* Heatmap Legend */
.fuel-heatmap-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.75rem;
  color: var(--text-secondary, #94a3b8);
}

.legend-scale-wrap {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.fuel-validation-alert {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md, 8px);
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.fuel-validation-alert.hidden {
  display: none;
}

@media (max-width: 900px) {
  .fuel-calendar-grid, .fuel-calendar-weekdays {
    gap: 0.35rem;
  }
  .fuel-day-cell {
    min-height: 85px;
    padding: 0.45rem;
  }
  .fuel-day-distance {
    font-size: 0.8rem;
  }
  .cng-refill-marker {
    font-size: 0.6rem;
    padding: 0.15rem 0.35rem;
  }
}




/* =====================================================================
   BESPOKE MODERN INDUSTRIAL LOGISTICS DESIGN SYSTEM (2026 EDITION)
   Zinc/Slate Dark Canvas & Crisp Industrial Light Theme
   Deep Navy/Cobalt (#1d4ed8) • Emerald (#059669) • Amber (#d97706)
   ===================================================================== */

:root, body.dark-theme {
  --bg-app: #09090b;
  --bg-sidebar: #0f172a;
  --bg-surface: #18181b;
  --bg-surface-elevated: #27272a;
  --bg-surface-hover: #3f3f46;
  --bg-input: #121215;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.15);
  --border-focus: #1d4ed8;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --text-inverse: #09090b;

  --accent-primary: #1d4ed8;
  --accent-primary-hover: #2563eb;
  --accent-primary-glow: rgba(29, 78, 216, 0.28);

  --accent-success: #059669;
  --accent-success-hover: #10b981;
  --accent-success-bg: rgba(5, 150, 105, 0.12);
  --accent-success-border: rgba(5, 150, 105, 0.32);

  --accent-warning: #d97706;
  --accent-warning-hover: #f59e0b;
  --accent-warning-bg: rgba(217, 119, 6, 0.12);
  --accent-warning-border: rgba(217, 119, 6, 0.32);

  --accent-danger: #e11d48;
  --accent-danger-bg: rgba(225, 29, 72, 0.12);
  --accent-danger-border: rgba(225, 29, 72, 0.32);

  --accent-cyan: #0284c7;
  --accent-purple: #7c3aed;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.6);
  --bento-border-highlight: rgba(255, 255, 255, 0.06);
}

body.light-theme {
  --bg-app: #f1f5f9;
  --bg-sidebar: #ffffff;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f8fafc;
  --bg-surface-hover: #e2e8f0;
  --bg-input: #ffffff;

  --border-subtle: rgba(15, 23, 42, 0.08);
  --border-medium: rgba(15, 23, 42, 0.16);
  --border-focus: #1d4ed8;

  --text-primary: #09090b;
  --text-secondary: #475569;
  --text-tertiary: #64748b;
  --text-inverse: #ffffff;

  --accent-primary: #1d4ed8;
  --accent-primary-hover: #1e40af;
  --accent-primary-glow: rgba(29, 78, 216, 0.15);

  --accent-success: #059669;
  --accent-success-hover: #047857;
  --accent-success-bg: rgba(5, 150, 105, 0.08);
  --accent-success-border: rgba(5, 150, 105, 0.25);

  --accent-warning: #d97706;
  --accent-warning-hover: #b45309;
  --accent-warning-bg: rgba(217, 119, 6, 0.08);
  --accent-warning-border: rgba(217, 119, 6, 0.25);

  --accent-danger: #e11d48;
  --accent-danger-bg: rgba(225, 29, 72, 0.08);
  --accent-danger-border: rgba(225, 29, 72, 0.25);

  --accent-cyan: #0284c7;
  --accent-purple: #7c3aed;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.12);
  --bento-border-highlight: rgba(0, 0, 0, 0.04);
}

/* =====================================================================
   COLLAPSIBLE NAVIGATION SIDEBAR & ROLE ROUTING
   ===================================================================== */
.app-shell {
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-sidebar {
  transition: width 0.28s cubic-bezier(0.16, 1, 0.3, 1), transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  width: var(--sidebar-width);
  overflow-y: auto;
  overflow-x: hidden;
}

/* Ensure main content fills remaining space cleanly */
.main-wrapper {
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  max-width: calc(100% - var(--sidebar-width));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: margin-left 0.28s cubic-bezier(0.16, 1, 0.3, 1), width 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Collapsed rail state */
.app-shell.sidebar-collapsed .app-sidebar {
  width: 76px !important;
  min-width: 76px !important;
}

.app-shell.sidebar-collapsed .main-wrapper {
  margin-left: 76px !important;
  width: calc(100% - 76px) !important;
  max-width: calc(100% - 76px) !important;
}

.app-shell.sidebar-collapsed .brand-title-wrap,
.app-shell.sidebar-collapsed .nav-group-title,
.app-shell.sidebar-collapsed .sidebar-link span:not(.sidebar-link-icon),
.app-shell.sidebar-collapsed .sidebar-badge,
.app-shell.sidebar-collapsed .sidebar-footer-text,
.app-shell.sidebar-collapsed .role-selector-wrap .role-btn-lbl {
  display: none !important;
}

.app-shell.sidebar-collapsed .sidebar-link {
  justify-content: center;
  padding: 0.65rem 0.5rem;
}

.app-shell.sidebar-collapsed .role-selector-wrap {
  flex-direction: column;
  padding: 0.35rem;
}

/* Role Selector Pill Navigation */
.role-selector-wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 4px;
  margin: 0.75rem 0.75rem 0.85rem;
  gap: 3px;
}

.role-tab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 2px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  min-width: 0;
  transition: all 0.2s ease;
  user-select: none;
}

.role-btn-lbl {
  font-size: 0.68rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.role-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

body.light-theme .role-tab-btn:hover {
  background: rgba(0, 0, 0, 0.04);
}

.role-tab-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--accent-primary-glow);
}

/* Smooth filtering for role-based navigation */
.nav-role-item {
  transition: opacity 0.2s ease, max-height 0.25s ease, margin 0.2s ease;
}

.nav-role-item.hidden-by-role {
  display: none !important;
}

/* Header theme and collapse controls */
.header-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.header-icon-btn:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-medium);
  transform: translateY(-1px);
}

.header-role-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: var(--accent-primary-glow);
  color: #60a5fa;
  border: 1px solid rgba(29, 78, 216, 0.35);
}

body.light-theme .header-role-indicator {
  color: var(--accent-primary);
}

/* =====================================================================
   ASYMMETRICAL BENTO-GRID LAYOUT (OVERVIEW DASHBOARD)
   ===================================================================== */
.bento-overview-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.25rem;
  margin-top: 1rem;
}

.bento-col-12 {
  grid-column: span 12;
}

.bento-col-8 {
  grid-column: span 8;
}

.bento-col-4 {
  grid-column: span 4;
}

/* Bento Card Base */
.bento-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease, border-color 0.22s ease;
}

.bento-card:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md);
}

.bento-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.15rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.bento-card-title-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.bento-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--accent-primary);
}

.bento-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-display, inherit);
  letter-spacing: -0.01em;
}

.bento-card-sub {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: 0.15rem;
}

/* Top Ribbon: Fleet Live Status (4-Metric Bento Ribbon) */
.fleet-status-ribbon {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.fleet-status-pill-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
}

.fleet-status-pill-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-medium);
}

.fleet-status-pill-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--pill-accent, var(--accent-primary));
}

.status-card-info {
  display: flex;
  flex-direction: column;
}

.status-card-lbl {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.status-card-count {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font-display, inherit);
  line-height: 1.2;
  margin-top: 0.25rem;
}

.status-card-sub {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  margin-top: 0.15rem;
}

.status-card-badge {
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Status variants */
.status-pill-active {
  --pill-accent: var(--accent-success);
}
.status-pill-active .status-card-badge {
  background: var(--accent-success-bg);
  border: 1px solid var(--accent-success-border);
  color: #34d399;
}

.status-pill-ontrip {
  --pill-accent: var(--accent-primary);
}
.status-pill-ontrip .status-card-badge {
  background: var(--accent-primary-glow);
  border: 1px solid rgba(29, 78, 216, 0.35);
  color: #60a5fa;
}

.status-pill-maintenance {
  --pill-accent: var(--accent-warning);
}
.status-pill-maintenance .status-card-badge {
  background: var(--accent-warning-bg);
  border: 1px solid var(--accent-warning-border);
  color: #fbbf24;
}

.status-pill-refueling {
  --pill-accent: var(--accent-purple);
}
.status-pill-refueling .status-card-badge {
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(124, 58, 237, 0.32);
  color: #c084fc;
}

/* Pure CSS Radar Beacon & Pulse Dots */
.radar-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  position: relative;
  display: inline-block;
}

.radar-pulse-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  opacity: 0.8;
  animation: radar-sweep 2s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

@keyframes radar-sweep {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* =====================================================================
   MAIN BENTO CARD: LIVE NCR OPERATIONS MAP
   ===================================================================== */
.ncr-map-container-wrap {
  width: 100%;
  height: 440px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-subtle);
  background: #09090b;
}

#bento-ncr-map {
  width: 100%;
  height: 100%;
  z-index: 1;
}

.map-floating-hud {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 500;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  pointer-events: auto;
}

.map-hud-pill {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.map-corridor-filter-bar {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  z-index: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 0.45rem 0.85rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.corridor-selector-pills {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
}

.corridor-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.corridor-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.corridor-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

/* =====================================================================
   SIDE BENTO CARD: DAILY P&L TICKER
   ===================================================================== */
.pl-ticker-container {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.pl-hero-metric-box {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.15rem;
  position: relative;
  overflow: hidden;
}

.pl-hero-metric-box::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, var(--accent-success-bg) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.pl-hero-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pl-hero-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font-display, inherit);
  line-height: 1.1;
  margin: 0.4rem 0 0.25rem 0;
}

.pl-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #10b981;
}

/* Breakdown rows */
.pl-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pl-breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  transition: all 0.18s ease;
}

.pl-breakdown-row:hover {
  border-color: var(--border-medium);
  transform: translateX(2px);
}

.pl-item-info {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.pl-item-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.pl-item-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.pl-item-sub {
  font-size: 0.7rem;
  color: var(--text-tertiary);
}

.pl-item-val {
  text-align: right;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-display, inherit);
}

/* Ratio bar */
.pl-ratio-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.pl-multi-progress-bar {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-surface-elevated);
}

.bar-segment-profit {
  background: #059669;
  height: 100%;
}
.bar-segment-cng {
  background: #7c3aed;
  height: 100%;
}
.bar-segment-driver {
  background: #1d4ed8;
  height: 100%;
}

.pl-ratio-legend {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--text-tertiary);
}

/* =====================================================================
   BOTTOM BENTO CARD: ACTIVE DISPATCH & RECONCILIATION TABLE
   ===================================================================== */
.bento-table-wrap {
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
}

.bento-dispatch-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
  text-align: left;
}

.bento-dispatch-table thead {
  background: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-medium);
}

.bento-dispatch-table th {
  padding: 0.85rem 1rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  white-space: nowrap;
}

.bento-dispatch-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: middle;
}

.bento-dispatch-table tr:hover td {
  background: var(--bg-surface-hover);
}

.vehicle-reg-pill {
  font-family: monospace;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.2rem 0.5rem;
  border-radius: 5px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  display: inline-block;
}

.audit-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
}

.audit-verified {
  background: var(--accent-success-bg);
  border: 1px solid var(--accent-success-border);
  color: #34d399;
}

.audit-pending {
  background: var(--accent-warning-bg);
  border: 1px solid var(--accent-warning-border);
  color: #fbbf24;
}

.audit-flagged {
  background: var(--accent-danger-bg);
  border: 1px solid var(--accent-danger-border);
  color: #f87171;
}

/* =====================================================================
   RESPONSIVE LAYOUT ADJUSTMENTS
   ===================================================================== */
@media (max-width: 1200px) {
  .fleet-status-ribbon {
    grid-template-columns: repeat(2, 1fr);
  }
  .bento-col-8, .bento-col-4 {
    grid-column: span 12;
  }
  .ncr-map-container-wrap {
    height: 380px;
  }
}

@media (max-width: 768px) {
  .fleet-status-ribbon {
    grid-template-columns: 1fr;
  }
  .bento-overview-grid {
    gap: 1rem;
  }
  .ncr-map-container-wrap {
    height: 320px;
  }
  .map-corridor-filter-bar {
    position: static;
    margin-top: 0.5rem;
  }
}

/* =====================================================================
   COMPREHENSIVE RESPONSIVE ADJUSTMENTS FOR ANY SCREEN RESOLUTION
   ===================================================================== */
@media (max-width: 1300px) {
  .fleet-status-ribbon {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.85rem !important;
  }
}

@media (max-width: 1024px) {
  .bento-overview-grid {
    grid-template-columns: 1fr !important;
  }
  .bento-col-8, .bento-col-4 {
    grid-column: span 1 !important;
  }
  .ncr-map-container-wrap {
    height: 380px !important;
  }
}

@media (max-width: 900px) {
  .app-sidebar {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 280px !important;
    min-width: 280px !important;
    transform: translateX(-100%) !important;
    box-shadow: 10px 0 35px rgba(0, 0, 0, 0.85) !important;
    z-index: 1001 !important;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
  .app-sidebar.sidebar-open {
    transform: translateX(0) !important;
  }
  .sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
  }
  .sidebar-backdrop.active {
    display: block !important;
  }
  .main-wrapper {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .mobile-menu-btn {
    display: inline-flex !important;
  }
  .top-header {
    padding: 0 1rem !important;
  }
  .page-container {
    padding: 1rem 0.85rem 2rem !important;
  }
}

@media (max-width: 640px) {
  .fleet-status-ribbon {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }
  .top-header {
    height: auto !important;
    min-height: 56px !important;
    padding: 0.5rem 0.75rem !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
  }
  .header-right {
    margin-left: auto !important;
    gap: 0.4rem !important;
  }
  .header-pill {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.7rem !important;
  }
  .ncr-map-container-wrap {
    height: 300px !important;
  }
}
