/* ==========================================================================
   QRSOR - QuantumRoute Smart Optimized Routing
   Design System & Pixel-Perfect UI Stylesheet
   ========================================================================== */

:root {
  --primary-blue: #2563eb;
  --primary-blue-hover: #1d4ed8;
  --primary-blue-light: #eff6ff;
  --active-menu-bg: #e2effc;
  --active-menu-text: #2563eb;
  
  --quantum-teal: #06b6d4;
  --quantum-green: #22c55e;
  --quantum-green-dark: #16a34a;
  --quantum-green-light: #dcfce7;
  
  --congested-orange: #f97316;
  --congested-orange-dark: #ea580c;
  --congested-orange-light: #ffedd5;

  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;

  --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --floating-shadow: 0 4px 18px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: #f8fafc;
  color: var(--slate-800);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  display: flex;
  overflow: hidden;
}

/* ==========================================================================
   Full Screen Web Application Shell
   ========================================================================== */
.app-shell {
  display: flex;
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background-color: #f8fafc;
}

/* Browser Title & Tab Bar */
.browser-chrome {
  background: #f1f5f9;
  border-bottom: 1px solid var(--slate-200);
  display: flex;
  flex-direction: column;
}

.browser-top-bar {
  display: flex;
  align-items: center;
  height: 38px;
  padding: 0 14px;
  gap: 16px;
}

.window-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.win-btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  cursor: pointer;
  transition: opacity 0.15s;
}

.win-btn:hover {
  opacity: 0.8;
}

.win-btn.close { background-color: #ff5f56; border: 1px solid #e0443e; }
.win-btn.minimize { background-color: #ffbd2e; border: 1px solid #dea123; }
.win-btn.maximize { background-color: #27c93f; border: 1px solid #1aab29; }

.browser-tabs {
  display: flex;
  align-items: center;
  flex: 1;
}

.browser-tab {
  background: var(--white);
  padding: 6px 16px;
  border-radius: 8px 8px 0 0;
  border-top: 1px solid var(--slate-200);
  border-left: 1px solid var(--slate-200);
  border-right: 1px solid var(--slate-200);
  font-size: 12px;
  font-weight: 500;
  color: var(--slate-800);
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 -1px 2px rgba(0,0,0,0.02);
}

.tab-logo-icon {
  width: 14px;
  height: 14px;
}

.tab-close {
  color: var(--slate-400);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.tab-add {
  margin-left: 8px;
  color: var(--slate-500);
  font-size: 16px;
  cursor: pointer;
  padding: 0 6px;
}

/* Browser Address / Nav Bar */
.browser-url-bar {
  display: flex;
  align-items: center;
  padding: 6px 14px 8px 14px;
  gap: 12px;
  background: var(--white);
  border-bottom: 1px solid var(--slate-200);
}

.nav-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--slate-500);
}

.nav-icon {
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.nav-icon:hover {
  background: var(--slate-100);
  color: var(--slate-800);
}

.url-input-container {
  flex: 1;
  background: #f8fafc;
  border: 1px solid var(--slate-200);
  border-radius: 20px;
  padding: 4px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--slate-700);
}

.url-text {
  font-weight: 500;
}

.url-path {
  color: var(--slate-500);
}

.url-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--slate-500);
  padding-right: 4px;
}

.chrome-user-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--slate-700);
  color: white;
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   Application Main Shell
   ========================================================================== */
.app-shell {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* Left Sidebar */
.app-sidebar {
  width: 220px;
  background-color: #fafbfd;
  border-right: 1px solid var(--slate-200);
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  flex-shrink: 0;
  user-select: none;
}

.brand-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 24px 8px;
}

.brand-logo-svg {
  width: 32px;
  height: 32px;
}

.brand-title {
  font-size: 21px;
  font-weight: 800;
  color: var(--slate-900);
  letter-spacing: -0.5px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--slate-600);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.nav-item:hover {
  background-color: var(--slate-100);
  color: var(--slate-900);
}

.nav-item.active {
  background-color: var(--active-menu-bg);
  color: var(--active-menu-text);
  font-weight: 600;
}

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

.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--slate-200);
  font-size: 11px;
  color: var(--slate-400);
  text-align: center;
}

/* Right Main Content Area */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: #f8fafc;
  position: relative;
}

/* Top App Bar inside main area */
.app-header {
  height: 48px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  background: transparent;
  position: absolute;
  top: 0;
  right: 0;
  z-index: 999;
}

.header-icon-btn {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--slate-600);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: all 0.15s;
}

.header-icon-btn:hover {
  background: var(--slate-50);
  color: var(--slate-900);
}

.user-avatar-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--slate-700);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  cursor: pointer;
}

/* Tab Views Container */
.view-container {
  display: none;
  flex-direction: column;
  flex: 1;
}

.view-container.active-view {
  display: flex;
}

/* ==========================================================================
   Dashboard View
   ========================================================================== */
.dashboard-layout {
  display: flex;
  flex-direction: column;
  padding: 16px 20px 20px 20px;
  gap: 16px;
  flex: 1;
}

/* Upper Area: Interactive Map Canvas */
.map-canvas-container {
  position: relative;
  width: 100%;
  height: 440px;
  min-height: 380px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--slate-200);
}

#leaflet-map {
  width: 100%;
  height: 100%;
  background: #e5f0f6;
  z-index: 1;
}

/* Map Watermark Top Left */
.map-brand-watermark {
  position: absolute;
  top: 18px;
  left: 20px;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  pointer-events: none;
}

.watermark-logo {
  width: 22px;
  height: 22px;
}

.watermark-text {
  font-size: 18px;
  font-weight: 800;
  color: var(--slate-900);
  letter-spacing: -0.5px;
}

/* Floating Status Alert Banner Top Right inside Map */
.map-status-banner {
  position: absolute;
  top: 18px;
  right: 20px;
  z-index: 500;
  background: var(--white);
  padding: 8px 18px;
  border-radius: 24px;
  box-shadow: var(--floating-shadow);
  border: 1px solid var(--slate-200);
  font-size: 13px;
  color: var(--slate-700);
  display: flex;
  align-items: center;
  gap: 8px;
}

.banner-active-pill {
  color: var(--quantum-green-dark);
  font-weight: 700;
}

.banner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--quantum-green);
  box-shadow: 0 0 6px var(--quantum-green);
}

.banner-divider {
  color: var(--slate-300);
  font-weight: 300;
}

.banner-savings {
  color: var(--quantum-green-dark);
  font-weight: 700;
}

.banner-time {
  color: var(--slate-500);
  font-size: 12px;
}

/* Map Custom Markers & Badges */
.qrsor-marker-wrapper {
  background: transparent;
  border: none;
}

.qrsor-pin-marker {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 800;
  font-size: 15px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  border: 3px solid var(--white);
}

.pin-a {
  background: #22c55e;
}

.pin-b {
  background: #ea580c;
}

.route-direction-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  border: 2px solid var(--white);
}

.green-badge {
  background: #22c55e;
  color: white;
}

.green-node {
  background: #16a34a;
  color: white;
}

.orange-badge {
  background: #ea580c;
  color: white;
}

.route-node-badge {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  border: 2px solid white;
}

.animated-vehicle-dot {
  position: relative;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #2563eb;
  border: 2px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.5);
}

.pulse-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid #3b82f6;
  animation: pulse-animation 1.6s infinite ease-out;
}

@keyframes pulse-animation {
  0% { transform: scale(1); opacity: 0.9; }
  100% { transform: scale(2.2); opacity: 0; }
}

.fleet-pin {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: white;
  border: 2px solid #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  cursor: pointer;
  transition: transform 0.2s;
}

.fleet-pin:hover {
  transform: scale(1.15);
}

.map-attribution-tag {
  background: rgba(255, 255, 255, 0.85);
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 4px;
  color: var(--slate-500);
}

.map-attribution-tag a {
  color: var(--primary-blue);
  text-decoration: none;
}

/* ==========================================================================
   Bottom Dashboard Cards Row (3 Cards Grid)
   ========================================================================== */
.dashboard-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.dash-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  position: relative;
}

.card-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--slate-900);
}

.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

/* Card 1: New Route Request Form */
.route-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 6px;
}

.form-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.btn-map-pick {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: var(--primary-blue);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.btn-map-pick:hover, .btn-map-pick.picking-active {
  background: var(--primary-blue);
  color: #ffffff;
  border-color: var(--primary-blue);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.pick-mode-indicator {
  font-size: 11px;
  font-weight: 600;
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
  padding: 2px 8px;
  border-radius: 12px;
}

.map-interactive-helper {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  pointer-events: none;
  transition: all 0.25s ease;
}

.helper-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
  animation: pulse-animation 1.5s infinite;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--slate-700);
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 12px;
  color: var(--slate-400);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.route-input {
  width: 100%;
  height: 38px;
  padding: 8px 12px 8px 36px;
  border: 1px solid var(--slate-300);
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--slate-800);
  background-color: var(--white);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.route-input:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.btn-optimize {
  margin-top: 4px;
  height: 40px;
  background-color: var(--primary-blue);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
  transition: all 0.15s ease;
}

.btn-optimize:hover {
  background-color: var(--primary-blue-hover);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.btn-optimize:active {
  transform: translateY(1px);
}

.btn-optimize.loading {
  background-color: #3b82f6;
  opacity: 0.85;
  cursor: wait;
}

.preset-selector-chips {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.chip-btn {
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  padding: 3px 8px;
  font-size: 11px;
  color: var(--slate-600);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.chip-btn:hover {
  background: var(--active-menu-bg);
  color: var(--primary-blue);
  border-color: #bfdbfe;
}

/* Card 2: Vehicle Fleet */
.fleet-badge-ready {
  background-color: var(--quantum-green-light);
  color: var(--quantum-green-dark);
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
}

.fleet-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fleet-item {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

.fleet-item:hover {
  background-color: var(--slate-50);
  border-color: var(--slate-200);
}

.fleet-item.selected-fleet {
  background-color: var(--active-menu-bg);
  border-color: #bfdbfe;
}

.fleet-icon-box {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background-color: var(--slate-100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--slate-600);
  margin-right: 12px;
  flex-shrink: 0;
}

.fleet-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.fleet-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--slate-800);
}

.fleet-status {
  font-size: 12px;
  font-weight: 500;
}

.text-green { color: var(--quantum-green-dark); }
.text-blue { color: var(--primary-blue); }
.text-muted { color: var(--slate-400); }

.fleet-chevron {
  color: var(--slate-300);
  font-size: 16px;
  padding-left: 6px;
}

/* Card 3: Traffic Congestion */
.chart-subheading {
  font-size: 12px;
  color: var(--slate-500);
  margin-top: 2px;
}

.chart-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 140px;
  margin-top: 10px;
}

.traffic-svg-chart {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.chart-bar {
  fill: #60a5fa;
  rx: 3;
  ry: 3;
  transition: all 0.25s ease;
  cursor: pointer;
}

.chart-bar:hover {
  fill: #2563eb;
  filter: drop-shadow(0 2px 4px rgba(37,99,235,0.4));
}

.chart-bar.peak-bar {
  fill: #3b82f6;
}

.chart-axis-label {
  font-family: var(--font-sans);
  font-size: 10px;
  fill: var(--slate-400);
  text-anchor: middle;
}

.chart-y-title {
  font-family: var(--font-sans);
  font-size: 9px;
  fill: var(--slate-500);
  font-weight: 600;
}

.chart-grid-line {
  stroke: var(--slate-200);
  stroke-dasharray: 2 2;
}

.chart-tooltip {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--slate-800);
  color: white;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}

/* ==========================================================================
   Full View Styles (Route Planner, Vehicle Fleet, Analytics, Settings, Support)
   ========================================================================== */
.section-view-shell {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section-hero {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--card-shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-hero h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--slate-900);
}

.section-hero p {
  color: var(--slate-500);
  font-size: 13px;
  margin-top: 4px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.data-table th {
  background: var(--slate-100);
  color: var(--slate-700);
  padding: 10px 14px;
  font-weight: 600;
  border-bottom: 1px solid var(--slate-200);
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--slate-200);
  color: var(--slate-700);
}

.data-table tr:hover td {
  background: var(--slate-50);
}

.metric-pill {
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 11px;
  display: inline-block;
}

.metric-pill.green { background: #dcfce7; color: #15803d; }
.metric-pill.blue { background: #dbeafe; color: #1e40af; }
.metric-pill.orange { background: #ffedd5; color: #c2410c; }

/* Quantum Tuning Sliders */
.param-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.param-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.param-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--slate-800);
}

.param-val {
  font-weight: 700;
  font-size: 14px;
  color: var(--primary-blue);
}

.param-desc {
  font-size: 12px;
  color: var(--slate-500);
}

.param-slider {
  width: 100%;
  accent-color: var(--primary-blue);
}

/* Code block & math representation */
.math-card {
  background: #0f172a;
  color: #f8fafc;
  border-radius: 10px;
  padding: 16px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
  overflow-x: auto;
}

/* Modal / Drawer for Vehicle Telematics */
.telematics-drawer {
  position: fixed;
  right: -400px;
  top: 0;
  width: 380px;
  height: 100%;
  background: white;
  box-shadow: -4px 0 25px rgba(0,0,0,0.15);
  z-index: 2000;
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  padding: 24px;
}

.telematics-drawer.open {
  right: 0;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--slate-200);
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.drawer-close {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--slate-400);
  cursor: pointer;
}

/* Quantum Optimization Notification Toast */
.quantum-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--slate-900);
  color: white;
  padding: 12px 24px;
  border-radius: 30px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 3000;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 13px;
  font-weight: 500;
}

.quantum-toast.show {
  transform: translateX(-50%) translateY(0);
}

.quantum-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: var(--quantum-teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Mobile Hamburger Toggle & Backdrop */
.mobile-menu-toggle {
  display: none;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  color: var(--slate-700);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: all 0.15s ease;
}

.mobile-menu-toggle:hover {
  background: var(--slate-100);
  color: var(--slate-900);
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  z-index: 1050;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.sidebar-backdrop.active {
  display: block;
  opacity: 1;
}

/* Mobile Bottom Navigation Bar */
.mobile-bottom-nav {
  display: none;
  background: var(--white);
  border-top: 1px solid var(--slate-200);
  padding: 6px 12px calc(6px + env(safe-area-inset-bottom, 0px)) 12px;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.04);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--slate-500);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.bottom-nav-item svg {
  width: 20px;
  height: 20px;
}

.bottom-nav-item:hover {
  color: var(--slate-800);
}

.bottom-nav-item.active {
  color: var(--primary-blue);
  font-weight: 700;
}

/* ==========================================================================
   Comprehensive Responsive Breakpoints (Desktop, Tablet, Mobile)
   ========================================================================== */

/* 1. Large Tablets & Medium Laptops (1025px - 1200px) */
@media (max-width: 1200px) {
  .dashboard-cards-grid {
    gap: 12px;
  }
  .map-canvas-container {
    height: 400px;
  }
}

/* 2. Tablets & Small Laptops (769px - 1024px) */
@media (max-width: 1024px) {
  body {
    padding: 10px;
  }
  .browser-window {
    height: 98vh;
    min-height: auto;
  }
  .app-sidebar {
    width: 200px;
    padding: 14px 10px;
  }
  .brand-title {
    font-size: 18px;
  }
  .dashboard-cards-grid {
    grid-template-columns: 1fr 1fr;
  }
  .dashboard-cards-grid > .dash-card:last-child {
    grid-column: 1 / -1;
  }
  .map-canvas-container {
    height: 360px;
  }
}

/* 3. Mobile Devices & Small Tablets (<= 768px) */
@media (max-width: 768px) {
  body {
    padding: 0;
    height: 100%;
    min-height: 100vh;
    background: #ffffff;
    align-items: stretch;
  }

  .browser-window {
    max-width: 100%;
    height: 100vh;
    min-height: 100vh;
    border-radius: 0;
    border: none;
    box-shadow: none;
  }

  /* Browser Chrome on Mobile */
  .browser-top-bar {
    height: 34px;
    padding: 0 10px;
  }
  .window-controls {
    display: none;
  }
  .browser-tab {
    padding: 4px 12px;
    font-size: 11px;
  }
  .browser-url-bar {
    padding: 4px 10px;
  }
  .url-input-container {
    font-size: 11.5px;
    padding: 3px 10px;
  }
  .url-actions svg {
    display: none;
  }

  /* Mobile App Header */
  .app-header {
    position: relative;
    height: 52px;
    padding: 0 16px;
    background: #ffffff;
    border-bottom: 1px solid var(--slate-200);
    z-index: 50;
    justify-content: space-between;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  /* Off-canvas Mobile Sidebar Drawer */
  .app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 260px;
    background: #ffffff;
    z-index: 1100;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 4px 0 25px rgba(0,0,0,0.2);
  }

  .app-sidebar.sidebar-open {
    transform: translateX(0);
  }

  /* Mobile Bottom Navigation Bar */
  .mobile-bottom-nav {
    display: flex;
  }

  /* Dashboard View Adjustments */
  .dashboard-layout {
    padding: 12px 14px 24px 14px;
    gap: 12px;
  }

  .map-canvas-container {
    height: 300px;
    min-height: 260px;
    border-radius: 10px;
  }

  .map-brand-watermark {
    display: none;
  }

  .map-status-banner {
    top: 10px;
    right: 10px;
    font-size: 11px;
    padding: 5px 12px;
    border-radius: 16px;
    max-width: calc(100% - 20px);
    gap: 6px;
  }

  .banner-time {
    display: none;
  }

  .dashboard-cards-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .dash-card {
    padding: 14px 16px;
    border-radius: 12px;
  }

  .route-input {
    height: 42px;
    font-size: 14px;
  }

  .btn-optimize {
    height: 44px;
    font-size: 14.5px;
  }

  .preset-selector-chips {
    padding-bottom: 4px;
  }

  .chip-btn {
    padding: 4px 10px;
    font-size: 11.5px;
  }

  /* Vehicle Drawer on Mobile */
  .telematics-drawer {
    width: 100%;
    max-width: 100%;
    right: -100%;
    padding: 20px;
  }

  /* Subviews on Mobile */
  .section-view-shell {
    padding: 14px;
    gap: 14px;
  }

  .section-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 16px;
  }

  .section-hero h2 {
    font-size: 17px;
  }

  .param-grid {
    grid-template-columns: 1fr;
  }

  .data-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .quantum-toast {
    width: 90%;
    bottom: 70px;
    font-size: 12px;
    padding: 10px 18px;
    text-align: center;
  }
}

/* 4. Small Phones (<= 480px) */
@media (max-width: 480px) {
  .browser-top-bar {
    display: none;
  }
  .browser-url-bar {
    padding: 4px 8px;
  }
  .url-input-container {
    padding: 2px 8px;
    font-size: 11px;
  }
  .map-canvas-container {
    height: 270px;
  }
  .map-status-banner {
    font-size: 10.5px;
    padding: 4px 10px;
  }
  .banner-divider {
    display: none;
  }
  .map-status-banner span:not(.banner-active-pill):not(.banner-savings) {
    display: none;
  }
  .map-status-banner::before {
    content: "Active";
    font-weight: 700;
    color: var(--quantum-green-dark);
    margin-right: 4px;
  }
}

