/* ==========================================================================
   1. DESIGN SYSTEM & CORE VARIABLES
   ========================================================================== */
:root {
  /* Colors */
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --primary-light: #EFF6FF;
  --success: #10B981;
  --success-light: #ECFDF5;
  --warning: #F59E0B;
  --warning-light: #FEF3C7;
  --danger: #EF4444;
  --danger-light: #FEF2F2;
  --info: #06B6D4;
  --info-light: #ECFEFF;
  
  /* Neutral Palette (Slate) */
  --neutral-50: #F8FAFC;
  --neutral-100: #F1F5F9;
  --neutral-200: #E2E8F0;
  --neutral-300: #CBD5E1;
  --neutral-400: #94A3B8;
  --neutral-500: #64748B;
  --neutral-600: #475569;
  --neutral-700: #334155;
  --neutral-800: #1E293B;
  --neutral-900: #0F172A;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-indigo: 0 10px 15px -3px rgba(37, 99, 235, 0.2);
  
  /* Border Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Interactive Scales */
  --tap-target-height: 48px;
  
  /* Layout Defaults */
  --safe-area-top: env(safe-area-inset-top, 0px);
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

/* ==========================================================================
   2. OUTDOOR SUNLIGHT CONTRAST THEME (DYNAMIC OVERRIDES)
   ========================================================================== */
.sunlight-theme {
  --neutral-50: #FFFFFF;
  --neutral-100: #F1F5F9;
  --neutral-200: #CBD5E1;
  --neutral-300: #94A3B8;
  --neutral-400: #64748B;
  --neutral-500: #475569;
  --neutral-600: #334155;
  --neutral-700: #1E293B;
  --neutral-800: #0F172A;
  --neutral-900: #000000;
  
  --primary: #0040E0;
  --primary-dark: #002DB3;
  --success: #059669;
  --danger: #DC2626;
  --warning: #D97706;
  
  font-weight: 500;
}

.sunlight-theme .text-secondary {
  color: var(--neutral-800) !important;
}

.sunlight-theme input,
.sunlight-theme select,
.sunlight-theme button,
.sunlight-theme .card {
  border: 2px solid var(--neutral-900) !important;
  box-shadow: none !important;
}

.sunlight-theme button.btn-primary {
  background: var(--neutral-900) !important;
  color: #FFF !important;
}

/* ==========================================================================
   3. GLOBAL RESET & SMARTPHONE WRAPPER (DESKTOP MODE)
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

body {
  font-family: var(--font-primary);
  background-color: #0F172A;
  color: var(--neutral-800);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
}

/* Smartphone container for desktop demonstration */
.smartphone-container {
  width: 412px;
  height: 892px;
  background: var(--neutral-50);
  border-radius: 40px;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 12px #334155;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 4px solid #1E293B;
}

/* Device Notch */
.device-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  height: 28px;
  background: #334155;
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 18px;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}
.device-notch::before {
  content: '';
  width: 45px;
  height: 4px;
  background: #1e293b;
  border-radius: 10px;
  margin-bottom: 2px;
}

/* Fullscreen on actual mobile viewports */
@media (max-width: 500px) {
  body {
    background-color: var(--neutral-50);
  }
  .smartphone-container {
    width: 100%;
    height: 100vh;
    border-radius: 0;
    box-shadow: none;
    border: none;
  }
  .device-notch {
    display: none;
  }
}

/* Screen Frame Scrollable Area */
.app-viewport {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  position: relative;
  padding-top: 40px; /* Space for Notch & Status Bar */
  background: var(--neutral-100);
}

/* ==========================================================================
   4. NAVIGATION & HEADER ARCHITECTURE
   ========================================================================== */
.app-header {
  background: var(--neutral-50);
  border-bottom: 1px solid var(--neutral-200);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 56px;
  min-height: 56px;
  z-index: 90;
  box-shadow: var(--shadow-sm);
}

.app-header h1 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--neutral-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-action {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--neutral-100);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neutral-700);
  cursor: pointer;
  transition: var(--transition-fast);
}

.header-action:active {
  transform: scale(0.92);
  background: var(--neutral-200);
}

.app-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  position: relative;
  padding-bottom: 96px; /* Safe padding for bottom navigation */
  scrollbar-width: none;
}

.app-body::-webkit-scrollbar {
  display: none;
}

/* Sticky Action Bar Container */
.sticky-bottom-bar {
  position: absolute;
  bottom: 72px; /* Positioned just above Bottom Nav */
  left: 0;
  right: 0;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0) 0%, var(--neutral-50) 40%);
  padding: 12px 16px 20px 16px;
  z-index: 85;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Premium Bottom Navigation Tab Bar */
.bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 72px;
  background: var(--neutral-50);
  border-top: 1px solid var(--neutral-200);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  z-index: 95;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.03);
}

.nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--neutral-400);
  font-size: 11px;
  font-weight: 600;
  gap: 4px;
  cursor: pointer;
  position: relative;
  transition: var(--transition-fast);
}

.nav-tab svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  transition: var(--transition-fast);
}

.nav-tab.active {
  color: var(--primary);
}

.nav-tab.active svg {
  stroke: var(--primary);
  transform: translateY(-2px);
}

.nav-tab.active::after {
  content: '';
  position: absolute;
  top: 0;
  width: 24px;
  height: 3px;
  background: var(--primary);
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
}

.nav-badge {
  position: absolute;
  top: 8px;
  right: 18px;
  background: var(--danger);
  color: #FFF;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 10px;
  line-height: 1;
  border: 1.5px solid var(--neutral-50);
}

/* ==========================================================================
   5. CORE COMPONENT CLASSES
   ========================================================================== */
/* Dynamic Screen States */
.screen {
  display: none;
  position: absolute;
  top: 90px;
  bottom: 0;
  left: 0;
  right: 0;
  overflow-y: auto;
  padding: 16px;
  padding-bottom: 96px;
  scrollbar-width: none;
  background: var(--neutral-100);
}

.screen::-webkit-scrollbar {
  display: none;
}

.screen.active-screen {
  display: block;
  animation: screenFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes screenFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Typography Utilities */
.text-title {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--neutral-900);
}
.text-secondary {
  color: var(--neutral-500);
  font-size: 13px;
  font-weight: 500;
}
.text-semibold {
  font-weight: 600;
}
.text-bold {
  font-weight: 700;
}

/* Layout Utilities */
.flex-row-center {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gap-y-sm {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gap-y-md {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Cards */
.card {
  background: var(--neutral-50);
  border-radius: var(--radius-lg);
  padding: 16px;
  border: 1px solid var(--neutral-200);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.card:active {
  transform: scale(0.98);
  box-shadow: none;
}

.card-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--neutral-100);
  padding-bottom: 8px;
}

.card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--neutral-900);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Status Badges / Chips */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 30px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-info { background: var(--info-light); color: var(--info); }

/* Buttons */
.btn {
  height: 52px;
  min-height: 52px;
  border-radius: var(--radius-md);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition-fast);
  width: 100%;
  text-align: center;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--primary);
  color: #FFF;
  box-shadow: var(--shadow-indigo);
}

.btn-primary:active {
  background: var(--primary-dark);
}

.btn-success {
  background: var(--success);
  color: #FFF;
}

.btn-danger {
  background: var(--danger);
  color: #FFF;
}

.btn-secondary {
  background: var(--neutral-200);
  color: var(--neutral-800);
}

.btn-secondary:active {
  background: var(--neutral-300);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--neutral-300);
  color: var(--neutral-700);
}

.btn-outline:active {
  background: var(--neutral-100);
  border-color: var(--neutral-400);
}

.btn-sm {
  height: 38px;
  min-height: 38px;
  padding: 0 16px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

/* Grid layout for buttons & actions */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

/* Form Controls Optimization for Mobile Tap Targets */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.form-control {
  height: 52px;
  border-radius: var(--radius-md);
  border: 1px solid var(--neutral-300);
  background: var(--neutral-50);
  padding: 0 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--neutral-900);
  transition: var(--transition-fast);
  width: 100%;
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

textarea.form-control {
  height: 90px;
  padding: 12px 16px;
  resize: none;
}

/* Chip Selectors (Taps instead of Dropdowns / Keyboards) */
.chip-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 10px 16px;
  border-radius: var(--radius-md);
  background: var(--neutral-200);
  color: var(--neutral-700);
  font-size: 13px;
  font-weight: 700;
  border: 2px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}

.chip svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.chip.selected {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

/* Big numeric visual pad for fast typing values */
.quick-calc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.quick-calc-btn {
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--neutral-200);
  border: none;
  color: var(--neutral-800);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.quick-calc-btn:active {
  background: var(--neutral-300);
}

/* Horizontal list divider */
.divider {
  height: 1px;
  background: var(--neutral-200);
  margin: 4px 0;
}

/* ==========================================================================
   6. SPECIFIC SCREEN DESIGNS
   ========================================================================== */

/* [Screen 1] Login Screen Specifics */
#screen-login {
  background: radial-gradient(circle at top, var(--neutral-800) 0%, var(--neutral-900) 100%);
  color: #FFF;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px 24px;
  top: 0;
  z-index: 200;
}

.login-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 40px;
  gap: 16px;
}

.logo-badge {
  width: 68px;
  height: 68px;
  background: var(--primary);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.4);
}

.logo-badge svg {
  width: 36px;
  height: 36px;
  fill: none;
  stroke: #FFF;
  stroke-width: 2.5;
}

.login-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: #FFF;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.login-subtitle {
  font-size: 13px;
  color: var(--neutral-400);
  font-weight: 600;
}

.pin-input-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin: 30px 0;
}

.pin-dots {
  display: flex;
  gap: 20px;
}

.pin-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--neutral-400);
  transition: var(--transition-fast);
}

.pin-dot.filled {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 12px var(--primary);
  transform: scale(1.1);
}

.pin-keyboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
}

.key-btn {
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: #FFF;
  font-size: 22px;
  font-family: var(--font-display);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.key-btn:active {
  background: var(--primary);
  transform: scale(0.9);
}

.key-btn-blank {
  background: transparent;
  border: none;
  cursor: default;
}
.key-btn-blank svg {
  width: 24px;
  height: 24px;
  stroke: var(--neutral-400);
  stroke-width: 2;
}
.key-btn-blank:active {
  transform: none;
  background: transparent;
}

/* [Screen 2] Home Dashboard Grid Layout */
.home-hero-card {
  background: linear-gradient(135deg, var(--neutral-900) 0%, var(--neutral-800) 100%);
  color: #FFF;
  border: none;
  padding: 20px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

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

.driver-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  background-size: cover;
  background-position: center;
  background-image: url('https://images.unsplash.com/photo-1534528741775-53994a69daeb?auto=format&fit=crop&q=80&w=200');
}

.online-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--success);
  background: rgba(16, 185, 129, 0.15);
  padding: 2px 8px;
  border-radius: 20px;
}

.online-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulseGreen 1.5s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.6; }
}

/* Dashboard Action Buttons (Tap friendly operational size) */
.dashboard-action-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.action-btn-card {
  background: var(--neutral-50);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  padding: 8px;
  text-align: center;
}

.action-btn-card:active {
  transform: scale(0.92);
  background: var(--primary-light);
  border-color: var(--primary);
}

.action-btn-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.action-btn-card:hover .action-btn-icon {
  transform: translateY(-2px);
}

.action-btn-text {
  font-size: 11px;
  font-weight: 800;
  color: var(--neutral-800);
  line-height: 1.2;
}

/* Urgent Alert notice */
.urgent-banner {
  background: linear-gradient(90deg, var(--danger-light) 0%, rgba(254, 242, 242, 0.4) 100%);
  border-left: 5px solid var(--danger);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: alertPulse 2s infinite ease-in-out;
}

@keyframes alertPulse {
  0% { border-left-color: var(--danger); }
  50% { border-left-color: rgba(239, 68, 68, 0.3); }
  100% { border-left-color: var(--danger); }
}

/* [Screen 3] Assigned Trips - Interactive tabs */
.trip-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--neutral-200);
  border-radius: var(--radius-md);
  padding: 4px;
}

.trip-tab-btn {
  border: none;
  background: transparent;
  padding: 10px 0;
  font-size: 12px;
  font-weight: 800;
  color: var(--neutral-600);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.trip-tab-btn.active {
  background: var(--neutral-50);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* Card Trip Layout */
.trip-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  position: relative;
}

.trip-header-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.trip-code {
  font-size: 16px;
  font-weight: 800;
  color: var(--neutral-900);
  font-family: var(--font-display);
}

.trip-meta-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
}

.trip-meta-icon {
  width: 18px;
  height: 18px;
  stroke: var(--neutral-400);
  stroke-width: 2.5;
  fill: none;
  flex-shrink: 0;
  margin-top: 1px;
}

.trip-meta-text {
  color: var(--neutral-700);
  font-weight: 600;
  line-height: 1.4;
}

/* [Screen 4] Trip Detail Interactive Progressive Action */
.delivery-timeline {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin: 10px 0 20px 0;
  padding: 0 10px;
}

.delivery-timeline::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 30px;
  right: 30px;
  height: 4px;
  background: var(--neutral-200);
  z-index: 1;
}

.timeline-progress-bar {
  content: '';
  position: absolute;
  top: 12px;
  left: 30px;
  width: 0%; /* Dynamic width based on stage */
  height: 4px;
  background: var(--primary);
  z-index: 2;
  transition: width var(--transition-normal);
}

.timeline-node {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--neutral-50);
  border: 3px solid var(--neutral-300);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--neutral-500);
  position: relative;
  z-index: 3;
  transition: var(--transition-normal);
}

.timeline-node.completed {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFF;
}

.timeline-node.active {
  border-color: var(--primary);
  background: var(--neutral-50);
  color: var(--primary);
  transform: scale(1.15);
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.3);
}

.timeline-label {
  position: absolute;
  top: 32px;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
  text-transform: uppercase;
  color: var(--neutral-500);
}
.timeline-node.active .timeline-label {
  color: var(--primary);
  font-weight: 800;
}

/* CSS Interactive Map Simulator */
.map-container {
  height: 140px;
  border-radius: var(--radius-md);
  background-color: #E2E8F0;
  border: 1px solid var(--neutral-300);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.05);
}

.map-bg {
  position: absolute;
  width: 150%;
  height: 150%;
  background-image: 
    radial-gradient(var(--neutral-300) 20%, transparent 20%),
    radial-gradient(var(--neutral-300) 20%, transparent 20%);
  background-size: 30px 30px;
  background-position: 0 0, 15px 15px;
  animation: mapScroll 30s linear infinite;
  opacity: 0.4;
}

@keyframes mapScroll {
  from { transform: translate(0, 0); }
  to { transform: translate(-30px, -30px); }
}

.map-route-line {
  position: absolute;
  width: 60%;
  height: 4px;
  background: var(--primary);
  transform: rotate(-15deg);
  z-index: 5;
}

.map-pin {
  position: absolute;
  width: 24px;
  height: 24px;
  z-index: 6;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}
.map-pin-start {
  left: 20%;
  top: 60%;
  color: var(--neutral-700);
}
.map-pin-end {
  right: 20%;
  top: 40%;
  color: var(--danger);
  animation: bounce 1.5s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* Proof photo dynamic shutter */
.camera-frame {
  border: 3px dashed var(--neutral-400);
  background: var(--neutral-200);
  height: 180px;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  overflow: hidden;
  position: relative;
}

.camera-frame:active {
  background: var(--neutral-300);
}

.camera-preview-img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.camera-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.6);
  color: #FFF;
  padding: 8px 12px;
  font-size: 10px;
  font-family: monospace;
  display: none;
  flex-direction: column;
  gap: 2px;
}

/* Failure Reason Selector List */
.fail-reasons-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fail-reason-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--neutral-50);
  border: 1px solid var(--neutral-200);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition-fast);
}
.fail-reason-item:active {
  background: var(--neutral-100);
}
.fail-reason-item.selected {
  background: var(--danger-light);
  border-color: var(--danger);
  color: var(--danger);
}
.fail-radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--neutral-400);
  margin-right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fail-reason-item.selected .fail-radio {
  border-color: var(--danger);
}
.fail-reason-item.selected .fail-radio::after {
  content: '';
  width: 10px;
  height: 10px;
  background: var(--danger);
  border-radius: 50%;
}

/* [Screen 5] Expenses Submissions - Accordion / Timeline */
.expense-history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.expense-history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: var(--neutral-50);
  border-radius: var(--radius-md);
  border: 1px solid var(--neutral-200);
}

/* [Screen 6] Advance Timeline */
.request-timeline {
  display: flex;
  flex-direction: column;
  position: relative;
  padding-left: 24px;
  margin-top: 10px;
}

.request-timeline::before {
  content: '';
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 6px;
  width: 3px;
  background: var(--neutral-200);
}

.request-timeline-node {
  position: relative;
  padding-bottom: 20px;
}

.request-timeline-node::before {
  content: '';
  position: absolute;
  left: -23px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--neutral-300);
  border: 2px solid var(--neutral-50);
  z-index: 10;
}

.request-timeline-node.completed::before {
  background: var(--success);
}
.request-timeline-node.active::before {
  background: var(--warning);
  box-shadow: 0 0 8px var(--warning);
}

.request-timeline-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--neutral-900);
}

.request-timeline-desc {
  font-size: 11px;
  color: var(--neutral-500);
  margin-top: 2px;
}

/* [Screen 7] Salary & Debt circular charts */
.salary-gauge-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
  position: relative;
}

.salary-circle {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: conic-gradient(var(--success) 0% 75%, var(--neutral-200) 75% 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.salary-circle::before {
  content: '';
  position: absolute;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: var(--neutral-50);
}

.salary-circle-content {
  position: relative;
  z-index: 10;
  text-align: center;
}

/* Expandable item block (Accordion) */
.accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 700;
  padding: 12px 14px;
  background: var(--neutral-200);
  border-radius: var(--radius-sm);
}

.accordion-body {
  display: none;
  padding: 12px 14px;
  border: 1px solid var(--neutral-200);
  border-top: none;
  border-bottom-left-radius: var(--radius-sm);
  border-bottom-right-radius: var(--radius-sm);
  background: var(--neutral-50);
  flex-direction: column;
  gap: 10px;
}

.accordion-body.open {
  display: flex;
  animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* [Screen 8] Vehicle Incident dictation wave */
.mic-button-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.mic-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  color: #FFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
  position: relative;
}

.mic-btn.recording {
  background: var(--danger);
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.recording-wave {
  display: none;
  align-items: center;
  gap: 3px;
  height: 20px;
  margin-top: 8px;
}

.recording-wave span {
  width: 3px;
  height: 100%;
  background: var(--danger);
  border-radius: 3px;
  animation: bounceWave 0.6s infinite ease-in-out alternate;
}
.recording-wave span:nth-child(2) { animation-delay: 0.15s; }
.recording-wave span:nth-child(3) { animation-delay: 0.3s; }
.recording-wave span:nth-child(4) { animation-delay: 0.45s; }

@keyframes bounceWave {
  from { height: 4px; }
  to { height: 20px; }
}

/* [Screen 9] Rules & training list and signature check */
.rules-card-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rule-item-card {
  display: flex;
  gap: 14px;
  padding: 14px;
  background: var(--neutral-50);
  border-radius: var(--radius-md);
  border: 1px solid var(--neutral-200);
  cursor: pointer;
}

.rule-icon-box {
  width: 44px;
  height: 44px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* [Screen 11] Notifications Badge Dot */
.notification-item {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--neutral-50);
  border: 1px solid var(--neutral-200);
  position: relative;
  cursor: pointer;
}

.notification-item.unread::before {
  content: '';
  position: absolute;
  top: 14px;
  right: 14px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
}

/* Modal Styling */
.modal-overlay {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-card {
  background: var(--neutral-50);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 320px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  animation: modalZoom 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid var(--neutral-200);
  box-shadow: var(--shadow-lg);
}

@keyframes modalZoom {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-icon-container {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Screen Overlay back button positioning */
.screen-back-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.btn-back-arrow {
  background: var(--neutral-200);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
