/* =============================================
   شركة التوكل للتجارة العامة والنقل العام
   Modern Pure Light Mode Theme (الوضع الفاتح الكامل)
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --font-main: 'Cairo', sans-serif;

  /* Primary Brand Colors (Logo Red Theme) */
  --primary: #c5221f;
  --primary-hover: #991b1b;
  --primary-light: #fef2f2;
  --primary-border: #fecaca;
  
  /* Brand Navy & Gold */
  --navy: #0f2744;
  --navy-light: #1e3a8a;
  
  --gold: #d97706;
  --gold-dark: #b45309;
  --gold-light: #fffbeb;
  --gold-border: #fde68a;
  
  /* Status Colors */
  --green: #16a34a;
  --green-light: #f0fdf4;
  --green-border: #bbf7d0;
  
  --purple: #7c3aed;
  --purple-light: #faf5ff;
  --purple-border: #e9d5ff;
  
  --red: #dc2626;
  --red-light: #fef2f2;
  --red-border: #fecaca;
  
  --blue: #0284c7;
  --blue-light: #f0f9ff;
  --blue-border: #bae6fd;

  /* Surfaces & Backgrounds - Pure Light */
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-alt: #f1f5f9;
  --bg-sidebar: #ffffff;
  --bg-input: #f8fafc;
  
  /* Borders */
  --border-light: #f1f5f9;
  --border-color: #e2e8f0;
  --border-dark: #cbd5e1;
  
  /* Text */
  --text-main: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-white: #ffffff;
  
  /* Sizing & Radius */
  --sidebar-width: 270px;
  --topbar-height: 72px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --radius-pill: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-modal: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}




/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body, button, input, select, textarea, table, th, td, div, span, p, h1, h2, h3, h4, h5, h6, label {
  font-family: 'Cairo', sans-serif;
}

/* Explicit Font Awesome Preservation - Prevents Empty Square Box Bug */
.fa, .fa-solid, .fa-regular, .fa-brands, .fas, .far, .fab, i[class*="fa-"], i[class*="fa-"]::before, .fa-solid::before, .fa-regular::before {
  font-family: "Font Awesome 6 Free", "FontAwesome" !important;
}
.fa-regular, .far, .fa-regular::before, .far::before {
  font-weight: 400 !important;
}
.fa-solid, .fas, .fa-solid::before, .fas::before {
  font-weight: 900 !important;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-body);
  color: var(--text-main);
  direction: rtl;
  min-height: 100vh;
  overflow-x: hidden;
  font-size: 14px;
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-body); }
::-webkit-scrollbar-thumb { background: var(--border-dark); border-radius: var(--radius-pill); }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* =============================================
   FULL-WIDTH MINIMALIST MODERN TOPBAR & APPLICATION
   ============================================= */
.main-content {
  margin-right: 0 !important;
  width: 100% !important;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #f1f5f9;
}

/* Minimalist Topbar */
.topbar-minimal {
  position: sticky;
  top: 0;
  height: 66px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  z-index: 1000;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
}

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

.topbar-circle-back-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.95rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.topbar-circle-back-btn:hover {
  background: #fef2f2;
  color: #c5221f;
  border-color: #c5221f;
  transform: translateX(2px);
}

.brand-minimal {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: var(--transition);
}

.logo-circle-minimal {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffffff;
  border: 1.5px solid var(--gold);
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.logo-img-minimal {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.brand-info-minimal {
  display: flex;
  flex-direction: column;
}

.brand-name-min {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1.1;
}

.brand-sub-min {
  font-size: 0.7rem;
  color: #64748b;
  font-weight: 700;
}

/* Left: Manager Dropdown Wrapper & Notif */
.topbar-left-minimal {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-notif-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.topbar-notif-btn:hover {
  background: #fef2f2;
  color: #c5221f;
  border-color: #fca5a5;
}

.manager-dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.manager-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f172a;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.manager-dropdown-btn:hover,
.manager-dropdown-btn.active {
  background: #ffffff;
  border-color: #c5221f;
  box-shadow: 0 0 0 2px rgba(197, 34, 31, 0.15);
}

.manager-pill-icon {
  color: #c5221f;
  font-size: 0.95rem;
}

.pill-chevron {
  font-size: 0.74rem;
  color: #64748b;
  margin-right: 2px;
  transition: transform 0.2s ease;
}

.manager-dropdown-btn.active .pill-chevron {
  transform: rotate(180deg);
}

/* Dropdown Card Popup */
.manager-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 280px;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 16px 36px -6px rgba(0, 0, 0, 0.14);
  z-index: 2500;
  overflow: hidden;
  animation: dropdownFade 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.manager-dropdown-menu.show {
  display: block;
}

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

/* Red Luxury Header Profile */
.dropdown-user-header {
  background: linear-gradient(135deg, #fef2f2 0%, #fff1f2 100%);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #fee2e2;
}

.user-header-info {
  text-align: right;
}

.user-header-name {
  font-size: 1.05rem;
  font-weight: 900;
  color: #0f2744;
  line-height: 1.2;
}

.user-header-role {
  font-size: 0.74rem;
  color: #64748b;
  font-weight: 700;
}

.user-header-avatar {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: #c5221f;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  box-shadow: 0 4px 10px rgba(197, 34, 31, 0.25);
}

/* Dropdown Menu Items */
.dropdown-menu-list {
  padding: 8px 10px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 10px;
  color: #1e293b;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}

.dropdown-item:hover {
  background: #fef2f2;
  color: #c5221f;
}

.dropdown-item:hover .item-icon {
  color: #c5221f;
}

.item-label-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  width: 100%;
}

.item-text {
  font-size: 0.9rem;
  font-weight: 800;
}

.item-icon {
  font-size: 1rem;
  color: #64748b;
  width: 20px;
  text-align: center;
  transition: color 0.15s;
}

/* Controller Rows (+ / -) */
.dropdown-controller-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.controller-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ctrl-btn {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  font-size: 0.95rem;
  font-weight: 900;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}

.ctrl-btn:hover {
  background: #c5221f;
  color: #ffffff;
  border-color: #c5221f;
}

.ctrl-value {
  font-size: 0.84rem;
  font-weight: 900;
  color: #0f172a;
  min-width: 36px;
  text-align: center;
}

/* Fullscreen Row */
.dropdown-fullscreen-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.fullscreen-sub-action {
  font-size: 0.74rem;
  color: #64748b;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.fullscreen-sub-action:hover {
  color: #c5221f;
}

.dropdown-divider {
  height: 1px;
  background: #f1f5f9;
  margin: 6px 0;
}

.text-danger {
  color: #dc2626 !important;
}

.dropdown-item.text-danger:hover {
  background: #fef2f2 !important;
}

.dropdown-item.text-danger:hover .item-icon {
  color: #dc2626 !important;
}

/* =============================================
   MINIMALIST MODERN HUB PORTAL (USER SCREENSHOT DESIGN)
   ============================================= */
.hub-header-center {
  text-align: center;
  margin-top: 24px;
  margin-bottom: 26px;
}

.hub-main-title {
  font-size: 2.3rem;
  font-weight: 900;
  color: #0f2744;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.hub-title-underline {
  width: 58px;
  height: 4px;
  background: #c5221f;
  border-radius: 4px;
  margin: 0 auto;
}

/* Controls Bar */
.hub-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto 22px auto;
  padding: 0 8px;
}

.controls-right-group .layout-label-text {
  font-size: 0.88rem;
  font-weight: 800;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
}

.controls-left-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.layout-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 800;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  transition: var(--transition);
}

.layout-toggle-btn:hover {
  background: #f8fafc;
}

.layout-toggle-btn.active {
  background: #fef2f2;
  color: #c5221f;
  border-color: #fca5a5;
}

/* Quick Order Button with Smooth Red Animation */
.layout-toggle-btn.btn-hub-quick-order {
  transition: all 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-color: #cbd5e1;
}

.layout-toggle-btn.btn-hub-quick-order i {
  color: #c5221f;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease;
}

.layout-toggle-btn.btn-hub-quick-order:hover {
  background: linear-gradient(135deg, #c5221f 0%, #dc2626 100%);
  border-color: #c5221f;
  color: #ffffff !important;
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 6px 18px rgba(197, 34, 31, 0.35);
}

.layout-toggle-btn.btn-hub-quick-order:hover i {
  color: #ffffff !important;
  transform: rotate(90deg) scale(1.25);
}

.layout-toggle-btn.btn-hub-quick-order:active {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 2px 6px rgba(197, 34, 31, 0.2);
}

/* Minimalist App Tiles Grid */
.minimal-tiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(136px, 1fr));
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto 40px auto;
}

.app-tile-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px 12px 18px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  min-height: 124px;
}

.app-tile-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px -4px rgba(197, 34, 31, 0.12);
  border-color: #fca5a5;
}

.tile-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  transition: transform 0.22s ease;
}

.color-teal {
  background: #fef2f2;
  color: #c5221f;
  border: 1px solid #fee2e2;
}

.app-tile-card:hover .tile-icon-wrapper {
  transform: scale(1.08);
  background: #c5221f;
  color: #ffffff;
}

.app-tile-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #1e293b;
  line-height: 1.3;
}

.tile-title {
  font-size: 1.1rem;
  font-weight: 900;
  color: #0f2744;
  margin-bottom: 6px;
  line-height: 1.3;
}

.tile-desc {
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 16px;
  min-height: 38px;
}

.tile-footer-strip {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
  margin-top: auto;
}

.tile-badge {
  font-size: 0.74rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tile-arrow {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--primary);
  opacity: 0.75;
  transition: var(--transition);
}

.service-tile:hover .tile-arrow {
  opacity: 1;
  transform: translateX(-4px);
}

.badge-red { background: #fef2f2; color: #c5221f; border: 1px solid #fecaca; }
.badge-blue { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.badge-green { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.badge-amber { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; }
.badge-purple { background: #faf5ff; color: #7c3aed; border: 1px solid #e9d5ff; }
.badge-slate { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.badge-rose { background: #fff1f2; color: #e11d48; border: 1px solid #fecdd3; }
.badge-teal { background: #f0fdfa; color: #0d9488; border: 1px solid #99f6e4; }

/* =============================================
   INNER PAGES TOP NAVIGATION BAR (BREADCRUMBS)
   ============================================= */
.page-top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  background: #ffffff;
  padding: 12px 18px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
  flex-wrap: wrap;
  gap: 12px;
}

.btn-return-hub {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: var(--primary-light);
  color: var(--primary);
  border: 1.5px solid var(--primary-border);
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-return-hub:hover {
  background: var(--primary);
  color: #ffffff;
  transform: translateX(3px);
}

.quick-nav-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-pill {
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-pill:hover {
  background: #ffffff;
  color: var(--primary);
  border-color: var(--primary-border);
}

.nav-pill.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(197, 34, 31, 0.25);
}

/* =============================================
   PAGES CONTAINER & FADE IN
   ============================================= */
.page {
  display: none;
  padding: 28px 32px;
  flex: 1;
  animation: fadeIn 0.25s ease;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}
.page.active { display: block; }

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

/* =============================================
   CLEAN MINIMALIST SECTION HEADER
   ============================================= */
.section-clean-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 14px;
}

.section-title-bold {
  font-size: 1.45rem;
  font-weight: 900;
  color: #0f2744;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.section-subtitle-muted {
  font-size: 0.86rem;
  color: #64748b;
  font-weight: 600;
}

.hero-btn.primary {
  background: #c5221f;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(197, 34, 31, 0.35);
}
.hero-btn.primary:hover {
  background: #991b1b;
  transform: translateY(-2px);
}

.hero-btn.secondary {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
}
.hero-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

/* Enhanced KPI Stat Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.card-kpi {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card-kpi:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-border);
}

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

.stat-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.card-blue .stat-icon-wrapper { background: #fef2f2; color: #c5221f; border: 1px solid #fecaca; }
.card-gold .stat-icon-wrapper { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; }
.card-green .stat-icon-wrapper { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.card-purple .stat-icon-wrapper { background: #faf5ff; color: #7c3aed; border: 1px solid #e9d5ff; }

.stat-trend {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'Inter', sans-serif;
}

.stat-trend.up { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.stat-trend.live { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }

.stat-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 700;
}

.stat-number {
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1.1;
  font-family: 'Inter', sans-serif;
}

.stat-currency {
  color: #c5221f;
}

.stat-footer-bar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
}

.progress-bar {
  width: 100%;
  height: 5px;
  background: var(--bg-card-alt);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: #c5221f;
  border-radius: var(--radius-pill);
  transition: width 1s ease-in-out;
}
.fill-gold { background: #d97706; }
.fill-green { background: #16a34a; }
.fill-purple { background: #7c3aed; }

.stat-subtext {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* =============================================
   DASHBOARD GRIDS & CARDS
   ============================================= */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 20px;
}

.dashboard-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  align-items: start;
}

.recent-orders-card {
  min-width: 0;
  overflow: hidden;
}

.top-drivers-card {
  min-width: 0;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
}

/* =============================================
   CITY & CARGO TRANSPORT ANALYSIS & EXPLORER
   ============================================= */
.city-transport-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 10px;
}

.city-card-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.city-card-item:hover {
  transform: translateY(-2px);
  border-color: #fca5a5;
  box-shadow: 0 8px 20px -4px rgba(197, 34, 31, 0.08);
}

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

.city-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
  font-weight: 900;
  color: #0f172a;
}

.city-card-title i {
  color: #c5221f;
  font-size: 1.1rem;
}

.city-trips-pill {
  background: #fef2f2;
  color: #c5221f;
  border: 1px solid #fecaca;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 0.76rem;
  font-weight: 800;
}

.city-section-block {
  margin-bottom: 12px;
}

.city-section-label {
  font-size: 0.76rem;
  font-weight: 800;
  color: #64748b;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.city-badges-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mat-badge {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 4px 9px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #1e293b;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.mat-badge strong {
  color: #c5221f;
}

.drv-badge {
  background: #f0fdf4;
  border: 1px solid #dcfce7;
  color: #166534;
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.city-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border-radius: 10px;
  padding: 8px 12px;
  margin-top: 8px;
  border: 1px solid #f1f5f9;
}

.city-stat-metric {
  display: flex;
  flex-direction: column;
}

.city-stat-metric-label {
  font-size: 0.68rem;
  color: #64748b;
  font-weight: 700;
}

.city-stat-metric-value {
  font-size: 0.95rem;
  font-weight: 900;
  color: #0f172a;
}

.view-all-btn {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 800;
  color: #475569;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.view-all-btn:hover {
  background: #fef2f2;
  color: #c5221f;
  border-color: #fca5a5;
}

.driver-rank-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  margin-bottom: 8px;
  border: 1px solid #f1f5f9;
  transition: all 0.15s;
}

.driver-rank-item:hover {
  background: #fef2f2;
  border-color: #fecaca;
}

.driver-rank-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.driver-rank-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #c5221f;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.85rem;
}

.driver-rank-name {
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f172a;
}

.driver-rank-trips {
  font-size: 0.74rem;
  color: #64748b;
}

.driver-rank-val {
  font-size: 0.9rem;
  font-weight: 900;
  color: #c5221f;
  text-align: left;
}

/* =============================================
   COLLAPSIBLE STATISTICS BANNER (USER SCREENSHOT DESIGN)
   ============================================= */
.stats-banner-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 22px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

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

.stats-banner-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
  font-weight: 900;
  color: #c5221f;
}

.stats-banner-title i {
  font-size: 1.15rem;
}

.stats-toggle-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #c5221f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.stats-toggle-btn:hover {
  background: #fef2f2;
  border-color: #fca5a5;
}

.stats-toggle-btn.collapsed i {
  transform: rotate(180deg);
}

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

.stats-banner-grid.collapsed {
  display: none;
}

.banner-stat-item {
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 94px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.banner-stat-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.banner-stat-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.banner-stat-label {
  font-size: 0.82rem;
  font-weight: 800;
}

.banner-stat-icon {
  font-size: 1.05rem;
}

.banner-stat-value {
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1.1;
  margin-top: 6px;
  text-align: left;
  direction: ltr;
}

.banner-stat-sub {
  font-size: 0.68rem;
  font-weight: 700;
  text-align: left;
  margin-top: 2px;
  opacity: 0.8;
}

/* 4 Soft Tinted Themes with Red Primary */
.stat-teal {
  background: #fef2f2;
  border: 1.5px solid #fecaca;
  color: #c5221f;
}
.stat-teal .banner-stat-label { color: #991b1b; }
.stat-teal .banner-stat-icon { color: #c5221f; }
.stat-teal .banner-stat-value { color: #c5221f; }

.stat-blue {
  background: #e0f2fe;
  border: 1.5px solid #bae6fd;
  color: #0284c7;
}
.stat-blue .banner-stat-label { color: #0369a1; }
.stat-blue .banner-stat-icon { color: #0284c7; }
.stat-blue .banner-stat-value { color: #0284c7; }

.stat-purple {
  background: #f3e8ff;
  border: 1.5px solid #e9d5ff;
  color: #7c3aed;
}
.stat-purple .banner-stat-label { color: #6b21a8; }
.stat-purple .banner-stat-icon { color: #7c3aed; }
.stat-purple .banner-stat-value { color: #7c3aed; }

.stat-gold {
  background: #fffbeb;
  border: 1.5px solid #fef3c7;
  color: #d97706;
}
.stat-gold .banner-stat-label { color: #92400e; }
.stat-gold .banner-stat-icon { color: #d97706; }
.stat-gold .banner-stat-value { color: #d97706; }

@media (max-width: 1024px) {
  .stats-banner-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 580px) {
  .stats-banner-grid {
    grid-template-columns: 1fr;
  }
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.card-header-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-header-title i {
  font-size: 1.3rem;
  color: var(--primary);
}

.card-header-title h3 {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

/* Table Action Toolbar & Header Actions matching unified design */
.table-toolbar-group,
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.toolbar-search-box,
.search-box {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.toolbar-search-input,
.search-input {
  padding: 8px 38px 8px 14px;
  border-radius: 10px;
  border: 1.5px solid #cbd5e1;
  background: #f1f5f9;
  font-size: 0.86rem;
  font-weight: 700;
  color: #1e293b;
  outline: none;
  transition: var(--transition);
  min-width: 220px;
}

.toolbar-search-input:focus,
.search-input:focus {
  background: #ffffff;
  border-color: #c5221f;
  box-shadow: 0 0 0 3px rgba(197, 34, 31, 0.12);
  min-width: 250px;
}

.toolbar-search-icon,
.search-icon {
  position: absolute;
  right: 12px;
  color: #64748b;
  font-size: 0.85rem;
  pointer-events: none;
}

.btn-add-order,
.toolbar-btn-add {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #c5221f 0%, #dc2626 100%);
  color: #ffffff !important;
  font-size: 0.88rem;
  font-weight: 900;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 6px rgba(197, 34, 31, 0.3);
}

.btn-add-order:hover,
.toolbar-btn-add:hover {
  background: linear-gradient(135deg, #991b1b 0%, #c5221f 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(197, 34, 31, 0.4);
}

.toolbar-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.toolbar-action-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.toolbar-action-btn.active {
  background: #fef2f2;
  color: #c5221f;
  border-color: #fca5a5;
}

.icon-excel {
  color: #16a34a !important;
  font-size: 0.95rem;
}

/* Expandable Filter Drawer (Modern Compact Bar) */
.filters-drawer {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  animation: fadeIn 0.2s ease;
}

.filters-drawer-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr 1.3fr 1.5fr auto;
  gap: 12px;
  align-items: flex-end;
}

@media (max-width: 1100px) {
  .filters-drawer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .filter-actions-item {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .filters-drawer-grid {
    grid-template-columns: 1fr;
  }
}

.filter-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-item label {
  font-size: 0.78rem;
  font-weight: 800;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 5px;
}

.filter-item input,
.filter-item select {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
  outline: none;
  transition: all 0.2s ease;
  font-family: inherit;
}

.filter-item input:focus,
.filter-item select:focus {
  background: #ffffff;
  border-color: #c5221f;
  box-shadow: 0 0 0 3px rgba(197, 34, 31, 0.12);
}

.btn-reset-filter {
  height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-reset-filter:hover {
  background: #fef2f2;
  color: #c5221f;
  border-color: #fca5a5;
  transform: translateY(-1px);
}

.card-title-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.card-subtitle {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 600;
  display: block;
}

.card-badge {
  background: var(--bg-card-alt);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Top Drivers Ranking List Widget */
.top-drivers-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.top-driver-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: var(--transition);
  gap: 12px;
}

.top-driver-item:hover {
  background: #ffffff;
  border-color: var(--primary-border);
  transform: translateX(-3px);
  box-shadow: var(--shadow-sm);
}

.top-driver-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.driver-rank-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 900;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  border: 1px solid var(--primary-border);
  flex-shrink: 0;
}

.rank-1 { background: #fef3c7; color: #b45309; border-color: #fde68a; }
.rank-2 { background: #f1f5f9; color: #475569; border-color: #cbd5e1; }
.rank-3 { background: #fff1f2; color: #be123c; border-color: #fecdd3; }

.top-driver-name {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-driver-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  direction: ltr;
  text-align: right;
}

.top-driver-stat {
  text-align: left;
  flex-shrink: 0;
}

.top-driver-revenue {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--green);
  font-family: 'Inter', sans-serif;
}

.top-driver-tons {
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-weight: 700;
}

/* =============================================
   TABLES (Pure Light & Dark Mode Compatible)
   ============================================= */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 750px;
  font-size: 0.86rem;
  background: transparent;
}

.data-table thead tr {
  background: var(--bg-card-alt);
  border-bottom: 2px solid var(--border-color);
}

.data-table th {
  padding: 14px 16px;
  text-align: right;
  font-weight: 800;
  color: var(--text-secondary);
  white-space: nowrap;
  font-size: 0.82rem;
  background: var(--bg-card-alt);
  border-bottom: 2px solid var(--border-color);
}

.data-table td {
  padding: 13px 16px;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
  transition: var(--transition);
}

.data-table tbody tr {
  background: var(--bg-card);
  transition: var(--transition);
}

.data-table tbody tr:hover {
  background: var(--bg-card-alt);
}

.data-table tbody tr:hover td {
  color: var(--text-main);
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 48px 20px !important;
  font-size: 0.95rem;
}

/* Badges & Status Pills */
.badge,
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.badge-active,
.badge-ready {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.badge-repair,
.badge-suspended {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.badge-trip {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

/* Action Icon Buttons */
.action-btns {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.88rem;
  position: relative;
}

.icon-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.btn-view { color: var(--blue); border-color: var(--blue-border); background: var(--blue-light); }
.btn-view:hover { background: #e0f2fe; border-color: var(--blue); }

.btn-edit { color: #c5221f; border-color: #fecaca; background: #fef2f2; }
.btn-edit:hover { background: #fee2e2; border-color: #c5221f; }

.btn-print { color: #0284c7; border-color: #bae6fd; background: #f0f9ff; }
.btn-print:hover { background: #e0f2fe; border-color: #0284c7; }

.btn-delete { color: var(--red); border-color: var(--red-border); background: var(--red-light); }
.btn-delete:hover { background: #fee2e2; border-color: var(--red); }

.btn-perm { color: #7c3aed; border-color: #e9d5ff; background: #f3e8ff; }
.btn-perm:hover { background: #ede9fe; border-color: #7c3aed; }

.btn-status-active { color: #d97706; border-color: #fde68a; background: #fffbeb; }
.btn-status-active:hover { background: #fef3c7; border-color: #d97706; }

.btn-status-inactive { color: #16a34a; border-color: #bbf7d0; background: #f0fdf4; }
.btn-status-inactive:hover { background: #dcfce7; border-color: #16a34a; }

/* Permissions Modal Grid & Toggles */
.perm-presets-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.perm-preset-btn {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s;
}

.perm-preset-btn:hover {
  background: #fef2f2;
  color: #c5221f;
  border-color: #fca5a5;
}

.perm-group-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
}

.perm-group-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

@media (max-width: 600px) {
  .perm-items-grid {
    grid-template-columns: 1fr;
  }
}

.perm-checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}

.perm-checkbox-item:hover {
  border-color: #cbd5e1;
  background: #fef2f2;
}

.perm-checkbox-item input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: #c5221f;
  cursor: pointer;
}

.perm-checkbox-item span {
  font-size: 0.82rem;
  font-weight: 700;
  color: #1e293b;
}

/* Fallback for row-actions */
.row-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
}

.btn-action {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.88rem;
}

.btn-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Tooltips */
.icon-btn::after {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-main);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 100;
  font-family: 'Cairo', sans-serif;
}

.icon-btn:hover::after { opacity: 1; }

/* =============================================
   DRIVERS & VEHICLES PAGES
   ============================================= */
.drivers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.driver-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px 18px;
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.driver-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-border);
}

.driver-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary-light);
  border: 2px solid var(--primary-border);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 auto 12px;
}

.driver-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.driver-phone {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  direction: ltr;
  font-family: 'Inter', sans-serif;
}

.driver-trips {
  font-size: 0.78rem;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-family: 'Inter', 'Cairo', sans-serif;
  margin-bottom: 12px;
}

.driver-card-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
}

/* Vehicle and Driver Status Badges */
.badge-ready { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.badge-trip { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.badge-repair { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.badge-vacation { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; }

/* =============================================
   SETTINGS PAGE & FORM CONTROLS
   ============================================= */
.settings-layout {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 1440px;
  margin: 0 auto;
}

@media (max-width: 1100px) {
  .settings-layout {
    grid-template-columns: 1fr;
  }
}

.settings-card {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
  padding: 22px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

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

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

@media (max-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 800;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 4px;
}

.form-group label .req {
  color: #c5221f;
  font-weight: 900;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 9px 14px;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
  outline: none;
  transition: all 0.2s ease;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  background: #ffffff;
  border-color: #c5221f;
  box-shadow: 0 0 0 3px rgba(197, 34, 31, 0.12);
}

.settings-action-bar {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
}

.btn-save {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 22px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #c5221f 0%, #dc2626 100%);
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(197, 34, 31, 0.25);
}

.btn-save:hover {
  background: linear-gradient(135deg, #991b1b 0%, #c5221f 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(197, 34, 31, 0.35);
}

/* Font Size & Zoom Controller */
.font-zoom-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.font-preview-box {
  background: #f8fafc;
  border: 1.5px dashed #cbd5e1;
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.font-preview-label {
  font-size: 0.76rem;
  font-weight: 800;
  color: #64748b;
}

.font-preview-text {
  color: #0f172a;
  font-weight: 700;
  line-height: 1.6;
  transition: font-size 0.2s ease;
}

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

.font-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
}

.font-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-2px);
}

.font-btn.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
  box-shadow: 0 0 0 3px rgba(197, 34, 31, 0.15);
}

/* Backup and Restore Cards */
.backup-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.backup-card-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--bg-card-alt);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  text-align: right;
  cursor: pointer;
  transition: var(--transition);
  color: inherit;
  width: 100%;
}

.backup-card-btn:hover {
  background: #ffffff;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.backup-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.export-box {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.import-box {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

.backup-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.backup-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
}

.backup-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* =============================================
   MODAL DIALOGS
   ============================================= */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.show { display: flex; }

.modal {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 780px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-modal);
  animation: modalScale 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalScale {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  background: #ffffff;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  z-index: 2;
}

.modal-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
}

.modal-title-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.modal-close {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.modal-close:hover { background: var(--red-light); color: var(--red); border-color: var(--red-border); }

/* Form Layout */
.form-section {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.req { color: var(--red); }

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
  width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(197, 34, 31, 0.12);
}

.readonly-input {
  background: var(--gold-light) !important;
  border-color: var(--gold-border) !important;
  color: var(--gold-dark) !important;
  font-weight: 800 !important;
  font-family: 'Inter', sans-serif;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 18px 24px;
  border-top: 1px solid var(--border-color);
  flex-direction: row-reverse;
  background: #f8fafc;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.btn-cancel {
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 700;
  transition: var(--transition);
}
.btn-cancel:hover { background: var(--bg-card-alt); color: var(--text-main); }

.btn-save, .btn-print-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #c5221f 0%, #dc2626 100%);
  border: none;
  color: #ffffff;
  padding: 10px 24px;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(197, 34, 31, 0.25);
}
.btn-save:hover, .btn-print-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(197, 34, 31, 0.35);
}

.btn-save-print {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: none;
  color: #ffffff;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
}
.btn-save-print:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
}

/* =============================================
   SUPERIOR OFFICIAL VOUCHER PRINT DESIGN
   (مطابق للوثيقة الأصلية بأعلى جودة واحترافية)
   ============================================= */
.print-modal { max-width: 820px; }

.voucher-sheet {
  margin: 10px auto;
  background: #ffffff;
  color: #0f172a;
  border-radius: 12px;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
  font-family: 'Cairo', sans-serif;
  direction: rtl;
  padding: 24px 28px;
  position: relative;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

/* Subtle background watermark */
.voucher-sheet::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-25deg);
  width: 320px;
  height: 320px;
  background-image: url('logo.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.04;
  pointer-events: none;
  z-index: 0;
}

.voucher-content {
  position: relative;
  z-index: 1;
}

/* Header Top: Right Arabic Name, Center Circular Logo, Left English Name */
.v-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
}

.v-header-right {
  text-align: right;
  flex: 1;
}

.v-comp-name-ar {
  font-size: 1.85rem;
  font-weight: 900;
  color: #c5221f;
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.v-comp-sub-ar {
  font-size: 0.92rem;
  font-weight: 800;
  color: #0f2744;
  margin-top: 4px;
}

.v-header-center {
  padding: 0 15px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.v-logo-circle {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid #c9a227;
  padding: 3px;
  box-shadow: 0 4px 12px rgba(201, 162, 39, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.v-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.v-header-left {
  text-align: left;
  flex: 1;
  direction: ltr;
}

.v-comp-name-en {
  font-size: 1.4rem;
  font-weight: 900;
  color: #c5221f;
  font-family: 'Inter', sans-serif;
  line-height: 1.1;
}

.v-comp-sub-en {
  font-size: 0.78rem;
  font-weight: 700;
  color: #0f2744;
  margin-top: 4px;
  font-family: 'Inter', sans-serif;
}

/* Red Contact Bar with gold border */
.v-contact-bar {
  background: linear-gradient(135deg, #c5221f 0%, #b91c1c 100%);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
  font-weight: 700;
  margin-bottom: 14px;
  box-shadow: 0 2px 6px rgba(197, 34, 31, 0.2);
  border: 1px solid #991b1b;
}

.v-contact-phones {
  direction: ltr;
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  color: #fef08a;
}

/* Permit Title & NO Bar */
.v-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding: 0 6px;
}

.v-permit-badge {
  font-size: 1.25rem;
  font-weight: 900;
  color: #0f2744;
  letter-spacing: 0.5px;
}

.v-permit-no {
  font-size: 1.1rem;
  font-weight: 900;
  color: #c5221f;
  font-family: 'Inter', sans-serif;
  background: #fee2e2;
  padding: 4px 14px;
  border-radius: 6px;
  border: 1.5px solid #fca5a5;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* =============================================
   ULTRA-MODERN MANIFEST CARD DESIGN
   ============================================= */
.v-modern-manifest {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.v-card {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

/* 1. Driver & Vehicle Card */
.v-driver-vehicle-card {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  border-right: 4px solid #c5221f;
}

.v-card-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.v-card-divider {
  width: 1px;
  height: 80%;
  background: #cbd5e1;
}

.v-meta-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.v-meta-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #c5221f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.v-meta-lbl {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 1px;
}

.v-meta-val {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f2744;
}

.v-driver-name {
  font-size: 1.08rem;
  color: #0f2744;
}

.v-phone-val {
  font-family: 'Inter', sans-serif;
  color: #1e293b;
  font-weight: 700;
}

/* Plate Badge */
.v-plate-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 12px;
  background: #ffffff;
  border: 2px solid #0f2744;
  border-radius: 6px;
  font-family: 'Inter', 'Cairo', sans-serif;
  font-weight: 900;
  font-size: 0.95rem;
  color: #0f2744;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  letter-spacing: 0.5px;
}

/* 2. Cargo & Financial Card */
.v-cargo-fin-card {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 14px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  align-items: center;
  padding: 10px 16px;
}

.v-cargo-side {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.v-material-badge {
  font-size: 0.96rem;
  font-weight: 800;
  color: #0f2744;
  background: #f1f5f9;
  padding: 2px 10px;
  border-radius: 4px;
  display: inline-block;
}

.v-qty-badge {
  font-size: 1rem;
  font-weight: 900;
  color: #0f2744;
  font-family: 'Inter', 'Cairo', sans-serif;
}

.v-fin-side {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1.5px solid #fde68a;
  border-radius: 8px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.v-fin-unit {
  display: flex;
  flex-direction: column;
}

.v-fin-lbl {
  font-size: 0.7rem;
  font-weight: 800;
  color: #92400e;
}

.v-fin-num {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f2744;
  font-family: 'Inter', sans-serif;
}

.v-fin-total-box {
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.v-total-lbl {
  font-size: 0.72rem;
  font-weight: 800;
  color: #b91c1c;
}

.v-total-price {
  font-size: 1.25rem;
  font-weight: 900;
  color: #c5221f;
  font-family: 'Inter', 'Cairo', sans-serif;
  line-height: 1.1;
}

/* 3. Route & Recipient Card */
.v-route-recipient-card {
  padding: 10px 16px;
  border-right: 4px solid #c9a227;
}

.v-route-track {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px dashed #cbd5e1;
  margin-bottom: 8px;
}

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

.v-route-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.origin-dot { background: #16a34a; box-shadow: 0 0 0 3px #dcfce7; }
.dest-dot { background: #c5221f; box-shadow: 0 0 0 3px #fee2e2; }

.v-route-tag {
  font-size: 0.68rem;
  font-weight: 700;
  color: #64748b;
  display: block;
}

.v-route-city {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f2744;
}

.dest-city {
  color: #c5221f;
  font-size: 1.05rem;
}

.v-route-arrow-line {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 0 16px;
}

.v-line-dashes {
  width: 100%;
  height: 2px;
  background: repeating-linear-gradient(90deg, #cbd5e1, #cbd5e1 6px, transparent 6px, transparent 12px);
}

.v-truck-icon {
  position: absolute;
  top: -12px;
  font-size: 1.1rem;
  background: #f8fafc;
  padding: 0 6px;
}

.v-recipient-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
}

.v-rec-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.v-lbl-sub {
  color: #64748b;
  font-weight: 700;
}

.v-val-sub {
  color: #0f2744;
  font-weight: 800;
}

.v-val-price {
  font-size: 1.15rem;
  font-weight: 900;
  color: #c5221f;
}

/* Notes Field */
.v-notes-box {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 12px;
  min-height: 48px;
}

.v-notes-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: #0f2744;
  margin-bottom: 4px;
}

.v-notes-text {
  font-size: 0.88rem;
  color: #334155;
  font-weight: 600;
}

/* Date Row */
.v-date-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f2744;
  margin-bottom: 12px;
  padding: 4px 6px;
  gap: 8px;
}

.v-date-badge {
  font-family: 'Inter', sans-serif;
  color: #c5221f;
  background: #f1f5f9;
  padding: 2px 10px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
}

/* Legal Notice & Rules (Green / Dark bullet points) */
.v-rules-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 16px;
}

.v-rules-header {
  font-size: 0.84rem;
  font-weight: 900;
  color: #0f2744;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.v-rules-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 18px;
  list-style: none;
}

.v-rule-item {
  font-size: 0.76rem;
  font-weight: 700;
  color: #334155;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.v-rule-item::before {
  content: '•';
  color: #16a34a;
  font-size: 1rem;
  line-height: 1;
}

/* Signatures */
.v-signatures {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 10px 18px 0;
  border-top: 1.5px dashed #cbd5e1;
}

.v-sig-block {
  text-align: center;
}

.v-sig-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: #0f2744;
  margin-bottom: 25px;
}

.v-sig-line {
  width: 140px;
  border-bottom: 1.5px solid #0f2744;
  margin: 0 auto 4px;
}

.v-sig-name {
  font-size: 0.92rem;
  font-weight: 800;
  color: #c5221f;
}

/* =============================================
   TOAST NOTIFICATION
   ============================================= */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #0f172a;
  border: 1px solid #334155;
  color: #ffffff;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s;
  opacity: 0;
  box-shadow: var(--shadow-modal);
}

.toast i { color: #4ade80; font-size: 1.1rem; }
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* =============================================
   RESPONSIVENESS
   ============================================= */
@media (max-width: 1300px) {
  .dashboard-bottom-grid { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .font-buttons-grid { grid-template-columns: repeat(2, 1fr); }
  .backup-actions-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .topbar-minimal { padding: 0 16px; }
  .hub-controls-bar { flex-direction: column; align-items: stretch; gap: 12px; }
  .minimal-tiles-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .app-tile-card { padding: 16px 8px 12px 8px; min-height: 110px; }
  .tile-icon-wrapper { width: 44px; height: 44px; }
  .app-tile-title { font-size: 0.78rem; }
  .stats-grid { grid-template-columns: 1fr; gap: 14px; }
  .page { padding: 14px; }
  .page-top-nav { flex-direction: column; align-items: stretch; gap: 10px; }
  .quick-nav-pills { justify-content: center; }
}

@media (max-width: 480px) {
  .minimal-tiles-grid { grid-template-columns: repeat(2, 1fr); }
}

/* =============================================
   PERFECT A4 FULL-PAGE BORDERLESS PRINT MEDIA STYLES
   ============================================= */
@media print {
  @page {
    size: auto;
    margin: 6mm 8mm;
  }

  html, body {
    background: #ffffff !important;
    color: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: auto !important;
    font-size: 13px !important;
    font-family: 'Cairo', sans-serif !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  #printArea, #printArea table, #printArea th, #printArea td, #printArea div, #printArea span, #printArea p {
    font-family: 'Cairo', sans-serif !important;
  }

  /* STRICT ISOLATION: Hide entire web dashboard, topbars, sidebars, modals, toolbars */
  body > *:not(#printArea),
  .app-main-wrapper,
  .topbar-minimal,
  .topbar-right-group,
  .topbar-left-minimal,
  .sidebar,
  .topbar,
  .main-content,
  .modal-overlay,
  .toast,
  .btn-add-order,
  .notif-btn,
  .menu-btn,
  .modal-footer,
  .modal-header,
  .page,
  .login-screen,
  .stats-banner-card,
  .table-toolbar-group,
  .table-filters-container,
  #loginScreen,
  #appMainWrapper,
  #printModal,
  #batchPrintModal,
  #orderModal,
  #driverModal,
  #vehicleModal,
  #userModal,
  #cityDetailModal,
  #aboutModal {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
  }

  /* Show ONLY #printArea with perfect full A4 layout */
  #printArea {
    display: block !important;
    visibility: visible !important;
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
  }

  #printArea * {
    visibility: visible !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Borderless, full A4 page filling container */
  .voucher-sheet {
    max-width: 100% !important;
    width: 100% !important;
    min-height: 265mm !important;
    margin: 0 auto !important;
    padding: 4px 0 !important;
    box-shadow: none !important;
    border: none !important;
    outline: none !important;
    border-radius: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    page-break-inside: avoid !important;
  }

  .voucher-content {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    height: 100% !important;
    flex: 1 !important;
  }

  /* Executive Header */
  .v-header-top {
    padding-bottom: 12px !important;
    border-bottom: 2px solid #0f2744 !important;
    margin-bottom: 10px !important;
  }

  .v-comp-name-ar {
    font-size: 2.1rem !important;
    font-weight: 900 !important;
    color: #c5221f !important;
    line-height: 1.1 !important;
  }

  .v-comp-sub-ar {
    font-size: 1rem !important;
    font-weight: 800 !important;
    color: #0f2744 !important;
    margin-top: 4px !important;
  }

  .v-logo-circle {
    width: 86px !important;
    height: 86px !important;
    background: #ffffff !important;
    border: 3px solid #c9a227 !important;
    box-shadow: none !important;
  }

  .v-comp-name-en {
    font-size: 1.5rem !important;
    font-weight: 900 !important;
    color: #c5221f !important;
    line-height: 1.1 !important;
  }

  .v-comp-sub-en {
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    color: #0f2744 !important;
    margin-top: 4px !important;
  }

  /* Contact Bar */
  .v-contact-bar {
    background: #c5221f !important;
    color: #ffffff !important;
    padding: 7px 16px !important;
    margin-bottom: 14px !important;
    border-radius: 6px !important;
    font-size: 0.82rem !important;
    font-weight: 800 !important;
  }

  .v-contact-phones {
    color: #fef08a !important;
    font-size: 0.88rem !important;
  }

  /* Permit Title Line */
  .v-title-row {
    margin-bottom: 14px !important;
  }

  .v-permit-badge {
    font-size: 1.35rem !important;
    font-weight: 900 !important;
    color: #0f2744 !important;
  }

  .v-permit-no {
    font-size: 1.2rem !important;
    font-weight: 900 !important;
    color: #c5221f !important;
    background: #fee2e2 !important;
    border: 1.5px solid #fca5a5 !important;
    padding: 4px 16px !important;
    border-radius: 6px !important;
  }

  /* Modern Manifest Cards */
  .v-modern-manifest {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    margin-bottom: 14px !important;
    flex: 1 !important;
  }

  .v-card {
    background: #f8fafc !important;
    border: 1.5px solid #cbd5e1 !important;
    padding: 12px 18px !important;
    border-radius: 8px !important;
  }

  .v-driver-vehicle-card {
    border-right: 5px solid #c5221f !important;
    padding: 14px 18px !important;
  }

  .v-meta-icon {
    width: 34px !important;
    height: 34px !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    color: #c5221f !important;
    border: 1px solid #cbd5e1 !important;
    font-size: 0.95rem !important;
  }

  .v-meta-lbl {
    font-size: 0.76rem !important;
    color: #475569 !important;
  }

  .v-driver-name {
    font-size: 1.2rem !important;
    font-weight: 900 !important;
    color: #0f2744 !important;
  }

  .v-phone-val {
    font-size: 1.05rem !important;
    color: #0f172a !important;
    font-weight: 800 !important;
  }

  .v-plate-badge {
    background: #ffffff !important;
    border: 2px solid #0f2744 !important;
    color: #0f2744 !important;
    font-size: 1.1rem !important;
    padding: 3px 14px !important;
    border-radius: 6px !important;
  }

  /* Cargo & Pricing */
  .v-cargo-fin-card {
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    padding: 12px 18px !important;
  }

  .v-material-badge {
    background: #f1f5f9 !important;
    color: #0f2744 !important;
    font-size: 1.1rem !important;
    padding: 3px 12px !important;
    font-weight: 800 !important;
  }

  .v-qty-badge {
    font-size: 1.15rem !important;
    color: #0f2744 !important;
    font-weight: 900 !important;
  }

  .v-fin-side {
    background: #fffbeb !important;
    border: 2px solid #fde68a !important;
    padding: 10px 16px !important;
    border-radius: 8px !important;
  }

  .v-fin-lbl {
    font-size: 0.78rem !important;
    color: #92400e !important;
  }

  .v-fin-num {
    font-size: 1.1rem !important;
    color: #0f2744 !important;
    font-weight: 900 !important;
  }

  .v-total-lbl {
    font-size: 0.8rem !important;
    color: #b91c1c !important;
  }

  .v-total-price {
    font-size: 1.45rem !important;
    font-weight: 900 !important;
    color: #c5221f !important;
  }

  /* Route Card */
  .v-route-recipient-card {
    border-right: 5px solid #c9a227 !important;
    padding: 12px 18px !important;
  }

  .v-route-city {
    font-size: 1.1rem !important;
    font-weight: 800 !important;
    color: #0f2744 !important;
  }

  .dest-city {
    color: #c5221f !important;
    font-size: 1.25rem !important;
    font-weight: 900 !important;
  }

  .origin-dot { background: #16a34a !important; }
  .dest-dot { background: #c5221f !important; }

  .v-truck-icon {
    background: #f8fafc !important;
    font-size: 1.25rem !important;
  }

  .v-recipient-strip {
    font-size: 0.92rem !important;
    padding-top: 4px !important;
  }

  /* Notes */
  .v-notes-box {
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    padding: 10px 16px !important;
    margin-bottom: 12px !important;
    min-height: 55px !important;
    border-radius: 8px !important;
  }

  .v-notes-title {
    font-size: 0.88rem !important;
    font-weight: 800 !important;
    color: #0f2744 !important;
    margin-bottom: 4px !important;
  }

  .v-notes-text {
    font-size: 0.92rem !important;
    color: #334155 !important;
  }

  .v-date-row {
    margin-bottom: 12px !important;
    font-size: 0.95rem !important;
  }

  .v-date-badge {
    background: #f1f5f9 !important;
    color: #c5221f !important;
    border: 1px solid #cbd5e1 !important;
    font-size: 1rem !important;
    padding: 3px 12px !important;
  }

  /* Rules */
  .v-rules-box {
    background: #f8fafc !important;
    border: 1.5px solid #e2e8f0 !important;
    padding: 12px 18px !important;
    margin-bottom: 16px !important;
    border-radius: 8px !important;
  }

  .v-rules-header {
    font-size: 0.9rem !important;
    font-weight: 900 !important;
    color: #0f2744 !important;
    margin-bottom: 6px !important;
  }

  .v-rule-item {
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    color: #334155 !important;
  }

  .v-rule-item::before {
    color: #16a34a !important;
    font-size: 1.1rem !important;
  }

  /* Signatures */
  .v-signatures {
    padding: 14px 20px 0 !important;
    border-top: 2px dashed #cbd5e1 !important;
  }

  .v-sig-title {
    font-size: 0.92rem !important;
    font-weight: 800 !important;
    color: #0f2744 !important;
    margin-bottom: 28px !important;
  }

  .v-sig-line {
    width: 160px !important;
    border-bottom: 2px solid #0f2744 !important;
  }

  .v-sig-name {
    font-size: 1.05rem !important;
    font-weight: 900 !important;
    color: #c5221f !important;
  }
}

/* =============================================
   LIVE GPS FLEET & DRIVER TRACKING MODULE
   ============================================= */
.tracking-console-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 16px;
  align-items: stretch;
  margin-top: 10px;
}

@media (max-width: 1024px) {
  .tracking-console-grid {
    grid-template-columns: 1fr;
  }
}

.tracking-sidebar-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Driver Quick GPS Portal Card */
.tracking-driver-box {
  background: #ffffff;
  border: 1.5px solid #fecaca;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(197, 34, 31, 0.05);
}

.driver-portal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.driver-portal-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #fef2f2;
  color: #c5221f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  border: 1px solid #fca5a5;
  flex-shrink: 0;
}

.driver-portal-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.portal-input-row {
  display: flex;
  gap: 8px;
}

.portal-code-input {
  flex: 1;
  height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
  outline: none;
  font-family: inherit;
  text-align: center;
  letter-spacing: 0.5px;
}

.portal-code-input:focus {
  border-color: #c5221f;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(197, 34, 31, 0.1);
}

.btn-portal-activate {
  height: 38px;
  padding: 0 14px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-portal-activate:hover {
  background: linear-gradient(135deg, #15803d 0%, #166534 100%);
  transform: translateY(-1px);
}

.btn-portal-activate.active {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.driver-gps-status {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 800;
  color: #166534;
}

.gps-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7);
  animation: gpsPulse 1.5s infinite;
}

@keyframes gpsPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(22, 163, 74, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

/* Tracking Search */
.tracking-search-wrap {
  position: relative;
  margin-bottom: 10px;
}

.tracking-search-wrap i {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.85rem;
}

.tracking-search-input {
  width: 100%;
  height: 36px;
  padding: 0 34px 0 10px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  font-size: 0.8rem;
  font-weight: 700;
  color: #1e293b;
  outline: none;
  font-family: inherit;
}

.tracking-search-input:focus {
  background: #ffffff;
  border-color: #c5221f;
}

/* Scrollable Active Shipments Cards */
.tracking-cards-scroll {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 4px;
}

.tracking-card-item {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.tracking-card-item:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  transform: translateX(-3px);
}

.tracking-card-item.active {
  border-color: #c5221f;
  background: #fef2f2;
  box-shadow: 0 4px 12px rgba(197, 34, 31, 0.08);
}

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

.trk-card-code {
  font-size: 0.78rem;
  font-weight: 900;
  color: #c5221f;
  background: #fee2e2;
  padding: 2px 8px;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
}

.trk-card-status {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
}

.trk-status-onroad { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.trk-status-arrived { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }

.trk-card-driver {
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 4px;
}

.trk-card-route {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #475569;
  font-weight: 700;
  margin-bottom: 8px;
}

.trk-progress-bar-bg {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 6px;
}

.trk-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #c5221f 0%, #dc2626 100%);
  border-radius: 6px;
  transition: width 0.4s ease;
}

.trk-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
}

/* Tracking Map Card */
.tracking-map-card {
  display: flex;
  flex-direction: column;
  min-height: 600px;
}

.map-controls-group {
  display: flex;
  gap: 8px;
}

.map-ctrl-btn {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s;
}

.map-ctrl-btn:hover,
.map-ctrl-btn.active {
  background: #fef2f2;
  color: #c5221f;
  border-color: #fca5a5;
}

.leaflet-map-wrapper {
  flex: 1;
  min-height: 520px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  border: 1px solid #e2e8f0;
}

#fleetMap {
  width: 100%;
  height: 100%;
  min-height: 520px;
  z-index: 1;
}

/* Floating Selected Truck Overlay */
.map-selected-overlay {
  position: absolute;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border: 1.5px solid #cbd5e1;
  border-radius: 14px;
  padding: 16px 18px;
  width: 320px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  animation: slideUp 0.25s ease;
}

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

.overlay-close-btn {
  position: absolute;
  top: 10px;
  left: 12px;
  background: none;
  border: none;
  font-size: 1.3rem;
  color: #94a3b8;
  cursor: pointer;
  line-height: 1;
}

.overlay-close-btn:hover {
  color: #c5221f;
}

.overlay-driver-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
}

.overlay-truck-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #fef2f2;
  color: #c5221f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  border: 1px solid #fca5a5;
}

.overlay-driver-info h4 {
  font-size: 0.92rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 2px;
}

.overlay-badge {
  font-size: 0.72rem;
  font-weight: 800;
  color: #475569;
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 4px;
  font-family: 'Inter', sans-serif;
}

.overlay-metrics-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.overlay-metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
}

.overlay-metric .lbl {
  color: #64748b;
  font-weight: 700;
}

.overlay-metric strong {
  font-weight: 800;
  color: #0f172a;
}

.btn-whatsapp-share {
  height: 36px;
  border-radius: 8px;
  border: none;
  background: #25d366;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s;
}

.btn-whatsapp-share:hover {
  background: #1eb956;
  transform: translateY(-1px);
}

/* Custom Pulsing Truck Marker on Leaflet */
.truck-marker-icon {
  background: #c5221f;
  border: 2px solid #ffffff;
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  box-shadow: 0 2px 8px rgba(197, 34, 31, 0.4);
  cursor: pointer;
  transition: transform 0.2s;
}

.truck-marker-icon:hover {
  transform: scale(1.2);
}

.city-pin-icon {
  background: #0f2744;
  border: 2px solid #ffffff;
  color: #ffffff;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* =============================================
   DRIVER PORTAL & MOBILE APP STYLES
   ============================================= */
.driver-portal-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 10px 0 30px;
}

/* Screen 1: Driver Auth Card */
.driver-auth-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  max-width: 480px;
  margin: 20px auto;
  text-align: center;
}

.driver-auth-logo {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: #fef2f2;
  color: #c5221f;
  border: 1.5px solid #fca5a5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin: 0 auto 14px;
}

.driver-auth-header h2 {
  font-size: 1.25rem;
  font-weight: 900;
  color: #0f172a;
  margin-bottom: 6px;
}

.driver-auth-header p {
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 600;
  margin-bottom: 22px;
}

.auth-input-group {
  text-align: right;
  margin-bottom: 14px;
}

.auth-input-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  color: #334155;
  margin-bottom: 5px;
}

.auth-input-group input {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
  outline: none;
  font-family: inherit;
}

.auth-input-group input:focus {
  background: #ffffff;
  border-color: #c5221f;
  box-shadow: 0 0 0 3px rgba(197, 34, 31, 0.12);
}

.btn-driver-submit {
  width: 100%;
  height: 44px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #c5221f 0%, #dc2626 100%);
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  box-shadow: 0 4px 12px rgba(197, 34, 31, 0.25);
  transition: all 0.2s ease;
}

.btn-driver-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(197, 34, 31, 0.35);
}

.quick-demo-drivers {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px dashed #e2e8f0;
  text-align: right;
}

.quick-demo-title {
  font-size: 0.76rem;
  font-weight: 800;
  color: #64748b;
  margin-bottom: 10px;
}

.demo-drivers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.demo-driver-btn {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}

.demo-driver-btn:hover {
  background: #fef2f2;
  color: #c5221f;
  border-color: #fca5a5;
}

/* Screen 2: Driver Logged In Dashboard */
.driver-dashboard-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.driver-dash-header-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

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

.driver-avatar-circle {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: #fef2f2;
  color: #c5221f;
  border: 1.5px solid #fecaca;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 900;
}

.driver-profile-left h3 {
  font-size: 1.05rem;
  font-weight: 900;
  color: #0f172a;
  margin-bottom: 2px;
}

.driver-truck-plate {
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
}

.driver-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-driver-logout {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s;
}

.btn-driver-logout:hover {
  background: #fef2f2;
  color: #c5221f;
  border-color: #fca5a5;
}

/* Active Assigned Trip Box */
.driver-active-trip-box {
  border: 1.5px solid #fecaca !important;
  background: linear-gradient(180deg, #ffffff 0%, #fffcfc 100%);
  padding: 20px !important;
}

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

.trip-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.trip-badge {
  font-size: 0.9rem;
  font-weight: 900;
  color: #c5221f;
}

.tracking-code-pill {
  font-size: 0.78rem;
  font-weight: 900;
  color: #c5221f;
  background: #fee2e2;
  padding: 2px 8px;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
}

.trip-status-pill {
  font-size: 0.78rem;
  font-weight: 800;
  color: #d97706;
  background: #fffbeb;
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid #fde68a;
}

.trip-route-display {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

@media (max-width: 600px) {
  .trip-route-display {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  .route-line-divider {
    transform: rotate(90deg);
    margin: 4px auto;
  }
}

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

.point-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.point-icon.from { background: #eff6ff; color: #1d4ed8; }
.point-icon.to { background: #f0fdf4; color: #16a34a; }

.point-text {
  display: flex;
  flex-direction: column;
}

.point-lbl {
  font-size: 0.7rem;
  color: #64748b;
  font-weight: 700;
}

.point-text strong {
  font-size: 0.95rem;
  font-weight: 900;
  color: #0f172a;
}

.route-line-divider {
  font-size: 1.2rem;
  padding: 0 10px;
}

.trip-cargo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

@media (max-width: 500px) {
  .trip-cargo-grid {
    grid-template-columns: 1fr;
  }
}

.cargo-field {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cargo-field .lbl {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 700;
}

.cargo-field strong {
  font-size: 0.88rem;
  color: #0f172a;
  font-weight: 800;
}

.phone-link {
  font-size: 0.88rem;
  font-weight: 800;
  color: #16a34a;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.driver-trip-actions-row {
  display: flex;
  gap: 10px;
}

@media (max-width: 600px) {
  .driver-trip-actions-row {
    flex-direction: column;
  }
}

.btn-trip-gps {
  flex: 1.2;
  height: 44px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.2);
}

.btn-trip-gps:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(22, 163, 74, 0.3);
}

.btn-trip-gps.active {
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
}

.btn-trip-finish {
  flex: 1;
  height: 44px;
  border-radius: 10px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-trip-finish:hover {
  background: #f0fdf4;
  color: #16a34a;
  border-color: #86efac;
  transform: translateY(-2px);
}

/* =============================================
   MAIN SYSTEM LOGIN GATEWAY SCREEN
   ============================================= */
.login-gateway-screen {
  min-height: 100vh;
  width: 100%;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 16px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99999;
  overflow-y: auto;
}

.login-gateway-card {
  width: 100%;
  max-width: 450px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 20px;
  padding: 32px 28px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
  text-align: center;
  animation: fadeIn 0.3s ease;
  margin: auto;
}

.login-logo-box {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #fecaca;
  box-shadow: 0 4px 12px rgba(197, 34, 31, 0.1);
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.login-logo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.login-brand-title {
  font-size: 1.4rem;
  font-weight: 900;
  color: #0f172a;
  margin-bottom: 2px;
}

.login-brand-sub {
  font-size: 0.8rem;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 12px;
}

.login-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fef2f2;
  color: #c5221f;
  border: 1px solid #fecaca;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 800;
  margin-bottom: 20px;
}

/* Tabs Selector */
.login-tabs-selector {
  display: flex;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 20px;
  gap: 4px;
}

.login-tab-btn {
  flex: 1;
  height: 38px;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.login-tab-btn.active {
  background: #ffffff;
  color: #c5221f;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Inputs */
.login-field-group {
  text-align: right;
  margin-bottom: 14px;
}

.login-field-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  color: #334155;
  margin-bottom: 5px;
}

.login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-icon {
  position: absolute;
  right: 14px;
  color: #94a3b8;
  font-size: 0.9rem;
  pointer-events: none;
}

.login-input-wrap input {
  width: 100%;
  height: 42px;
  padding: 0 40px 0 40px;
  border-radius: 10px;
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
  outline: none;
  font-family: inherit;
  transition: all 0.2s ease;
}

.login-input-wrap input:focus {
  background: #ffffff;
  border-color: #c5221f;
  box-shadow: 0 0 0 3px rgba(197, 34, 31, 0.12);
}

.toggle-pass-btn {
  position: absolute;
  left: 12px;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 0.95rem;
  padding: 4px;
}

.toggle-pass-btn:hover {
  color: #c5221f;
}

.btn-main-login {
  width: 100%;
  height: 44px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #c5221f 0%, #dc2626 100%);
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  box-shadow: 0 4px 16px rgba(197, 34, 31, 0.25);
  transition: all 0.2s ease;
}

.btn-main-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(197, 34, 31, 0.35);
}

/* Quick Demo Logins Bar */
.login-demo-bar {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed #e2e8f0;
  text-align: right;
}

.login-demo-label {
  font-size: 0.74rem;
  font-weight: 800;
  color: #64748b;
  margin-bottom: 8px;
}

.login-demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.demo-pill {
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}

.demo-pill:hover {
  background: #fef2f2;
  color: #c5221f;
  border-color: #fca5a5;
}

.login-footer-security {
  margin-top: 18px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
}

/* =============================================
   DRIVER ROLE ISOLATION RULES (عزل حساب السائق بالكامل)
   ============================================= */
body.user-is-driver .topbar-circle-back-btn,
body.user-is-driver #topbarBackBtn {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.user-is-driver .dropdown-item:has(.fa-user-pen),
body.user-is-driver .dropdown-item:has(.fa-circle-info),
body.user-is-driver .dropdown-controller-row,
body.user-is-driver .dropdown-fullscreen-row,
body.user-is-driver .dropdown-divider {
  display: none !important;
}

/* =============================================
   CITIES & GOVERNORATES LOGISTICS REPORT STYLING
   ============================================= */
.cities-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  padding: 14px 18px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.cities-filter-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 150px;
}

.cities-filter-item.search-grow {
  flex: 1 1 220px;
}

.cities-filter-item label {
  font-size: 0.76rem;
  font-weight: 700;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 4px;
}

.cities-filter-item .form-select-sm {
  height: 38px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  color: #1e293b;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}

.cities-filter-item .form-select-sm:focus {
  border-color: #c5221f;
  box-shadow: 0 0 0 2px rgba(197, 34, 31, 0.1);
}

.view-switch-group {
  display: inline-flex;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  gap: 3px;
}

.view-switch-btn {
  padding: 6px 12px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: inherit;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.view-switch-btn:hover {
  color: #0f172a;
}

.view-switch-btn.active {
  background: #ffffff;
  color: #c5221f;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Modal Summary Grid */
.city-modal-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.city-modal-stat-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.city-modal-stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 5px;
}

.city-modal-stat-value {
  font-size: 1.1rem;
  font-weight: 900;
  color: #0f172a;
}

/* City Card Actions */
.city-card-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
  position: relative;
}

.city-card-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.07);
  border-color: #cbd5e1;
}

.city-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed #e2e8f0;
}

.city-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
  font-weight: 900;
  color: #0f172a;
}

.city-card-title i {
  color: #c5221f;
  font-size: 1.1rem;
}

.city-trips-pill {
  background: #fee2e2;
  color: #c5221f;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid #fca5a5;
}

.city-section-block {
  margin-bottom: 10px;
}

.city-section-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.city-badges-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mat-badge {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.drv-badge {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.city-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  margin-top: 10px;
  border-top: 1px solid #f1f5f9;
}

.city-stat-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.city-stat-metric-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: #94a3b8;
}

.city-stat-metric-value {
  font-size: 0.95rem;
  font-weight: 900;
  color: #0f172a;
}

.btn-city-drilldown {
  width: 100%;
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #1e293b;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  transition: all 0.15s ease;
}

.btn-city-drilldown:hover {
  background: #fee2e2;
  color: #c5221f;
  border-color: #fca5a5;
}

/* Print official city logistics sheet */
.city-report-print-sheet {
  background: #ffffff;
  padding: 24px;
  font-family: 'Cairo', sans-serif;
  color: #0f172a;
  direction: rtl;
}

.city-print-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 2px solid #0f2744;
  margin-bottom: 16px;
}

.city-print-title {
  text-align: center;
}

.city-print-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 0.85rem;
}

.city-print-table th {
  background: #0f2744 !important;
  color: #ffffff !important;
  padding: 8px 10px;
  border: 1px solid #0f2744;
  text-align: right;
  font-weight: 800;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.city-print-table td {
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  text-align: right;
}

.city-print-table tr:nth-child(even) {
  background: #f8fafc;
}

.city-print-table tfoot td {
  font-weight: 900;
  background: #f1f5f9;
  border-top: 2px solid #0f2744;
}

/* =============================================
   OFFICIAL ORDERS MANIFEST TABLE PRINT STYLES
   ============================================= */
.orders-table-print-sheet {
  background: #ffffff;
  padding: 8px 12px;
  font-family: 'Cairo', sans-serif;
  color: #0f172a;
  direction: rtl;
  width: 100%;
  box-sizing: border-box;
}

.orders-print-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 2px solid #0f2744;
  margin-bottom: 10px;
}

.orders-print-contact-bar {
  background: #c5221f !important;
  color: #ffffff !important;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 4px;
  margin-bottom: 12px;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

.orders-print-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 12px;
  text-align: center;
}

.orders-print-kpi-box {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 6px 10px;
  background: #f8fafc !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

.orders-print-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 0.78rem;
}

.orders-print-table th {
  background: #0f2744 !important;
  color: #ffffff !important;
  padding: 7px 5px;
  border: 1px solid #0f2744;
  text-align: center;
  font-weight: 800;
  font-size: 0.78rem;
  white-space: nowrap;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

.orders-print-table td {
  padding: 6px 5px;
  border: 1px solid #cbd5e1;
  text-align: center;
  font-size: 0.77rem;
  line-height: 1.3;
}

.orders-print-table tr:nth-child(even) {
  background: #f8fafc !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

.orders-print-table tfoot td {
  font-weight: 900;
  background: #e2e8f0 !important;
  border-top: 2px solid #0f2744;
  font-size: 0.8rem;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

/* =============================================
   BATCH VOUCHERS PRINT MODAL STYLES
   ============================================= */
.batch-options-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.batch-option-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.batch-option-card:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.batch-option-card.active {
  background: #f0f9ff;
  border-color: #0284c7;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.12);
}

.batch-opt-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 1.15rem;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.batch-option-card.active .batch-opt-icon {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

.batch-opt-info {
  flex: 1;
}

.batch-opt-info h4 {
  margin: 0 0 2px 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
}

.batch-opt-info p {
  margin: 0;
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 600;
}

.batch-radio-indicator {
  font-size: 1.2rem;
  color: #cbd5e1;
}

.batch-option-card.active .batch-radio-indicator {
  color: #0284c7;
}

.batch-permits-scroll-list {
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.batch-permit-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  cursor: pointer;
  transition: all 0.15s ease;
}

.batch-permit-item:hover {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.batch-permit-item.selected {
  background: #f0fdf4;
  border-color: #86efac;
}

.batch-permit-item input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: #16a34a;
  cursor: pointer;
}

.batch-permit-badge {
  font-weight: 900;
  font-family: monospace;
  background: #fee2e2;
  color: #c5221f;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
}

.batch-permit-details {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  font-size: 0.8rem;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-select-action {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn-select-action:hover {
  background: #f1f5f9;
  color: #0f172a;
}

/* Batch Modal Inputs */
.form-input {
  width: 100%;
  box-sizing: border-box;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.88rem;
  font-family: inherit;
  color: #0f172a;
  outline: none;
  transition: all 0.2s ease;
}

.form-input:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.batch-search-container {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 12px;
}

.batch-search-input {
  width: 100%;
  box-sizing: border-box;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 36px 8px 12px;
  font-size: 0.85rem;
  font-family: inherit;
  color: #0f172a;
  outline: none;
  transition: all 0.2s ease;
}

.batch-search-input:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.batch-search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.9rem;
  pointer-events: none;
}

/* Quick Add Buttons in Order Form */
.btn-quick-add-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #c5221f;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-quick-add-link:hover {
  background: #c5221f;
  color: #ffffff;
  border-color: #c5221f;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(197, 34, 31, 0.25);
}

.btn-quick-add-vehicle {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #16a34a;
}

.btn-quick-add-vehicle:hover {
  background: #16a34a;
  color: #ffffff;
  border-color: #16a34a;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.25);
}

.btn-mini-add-driver {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #0284c7;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-mini-add-driver:hover {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #7dd3fc;
  transform: translateY(-1px);
}

#driverModal.modal-overlay,
#vehicleModal.modal-overlay {
  z-index: 2200;
}

/* Calc Mode Switch (Auto vs Manual Total) */
.calc-mode-switch {
  display: inline-flex;
  background: #f1f5f9;
  border-radius: 6px;
  padding: 2px;
  border: 1px solid #cbd5e1;
  gap: 2px;
}

.btn-calc-mode {
  padding: 2px 8px;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.btn-calc-mode:hover {
  color: #0f172a;
}

.btn-calc-mode.active {
  background: #ffffff;
  color: #c5221f;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Input Picker with Dropdown Trigger */
.input-picker-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-picker-wrapper input {
  width: 100%;
  padding-left: 32px !important;
  cursor: pointer;
}

.input-picker-chevron {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #64748b;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.input-picker-chevron:hover {
  color: #c5221f;
}

/* Visual Driver & Vehicle Picker Grid Modal */
.btn-picker-grid-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-picker-grid-trigger:hover {
  background: #1d4ed8;
  color: #ffffff;
  border-color: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.25);
}

.picker-dual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 768px) {
  .picker-dual-grid {
    grid-template-columns: 1fr;
  }
}

.picker-column {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.picker-column-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.picker-col-title {
  font-size: 0.85rem;
  font-weight: 900;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
}

.picker-col-search {
  width: 100%;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  font-size: 0.8rem;
  font-family: inherit;
  outline: none;
  background: #f8fafc;
  transition: all 0.15s ease;
}

.picker-col-search:focus {
  background: #ffffff;
  border-color: #c5221f;
  box-shadow: 0 0 0 2px rgba(197, 34, 31, 0.1);
}

.picker-cards-scroll {
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}

.picker-select-card {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: all 0.15s ease;
}

.picker-select-card:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.picker-select-card.selected {
  background: #f0fdf4 !important;
  border-color: #16a34a !important;
  box-shadow: 0 0 0 1px #16a34a, 0 3px 8px rgba(22, 163, 74, 0.15);
}

.picker-select-card.selected-vehicle {
  background: #eff6ff !important;
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 1px #0284c7, 0 3px 8px rgba(2, 132, 199, 0.15);
}

.picker-card-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.picker-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: #475569;
}

.picker-select-card.selected .picker-card-icon {
  background: #16a34a;
  color: #ffffff;
  border-color: #16a34a;
}

.picker-select-card.selected-vehicle .picker-card-icon {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

.picker-card-text {
  display: flex;
  flex-direction: column;
}

.picker-card-name {
  font-size: 0.86rem;
  font-weight: 800;
  color: #0f172a;
}

.picker-card-sub {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
}

.picker-check-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: transparent;
}

.picker-select-card.selected .picker-check-badge {
  border-color: #16a34a;
  background: #16a34a;
  color: #ffffff;
}

.picker-select-card.selected-vehicle .picker-check-badge {
  border-color: #0284c7;
  background: #0284c7;
  color: #ffffff;
}

.picker-selection-summary-bar {
  margin-top: 14px;
  background: #ffffff;
  border: 1.5px dashed #cbd5e1;
  border-radius: 10px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.selection-indicator-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sel-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
}

.sel-val {
  font-size: 0.85rem;
  font-weight: 900;
  color: #c5221f;
}

#driverVehiclePickerModal.modal-overlay {
  z-index: 2300;
}

/* Quick New Order Button in Hub Bar */
.btn-quick-new-order-hub {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #c5221f;
  color: #ffffff;
  border: none;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(197, 34, 31, 0.3);
  transition: all 0.2s ease;
}

.btn-quick-new-order-hub:hover {
  background: #a81c19;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(197, 34, 31, 0.4);
}










