/* ==========================================================================
   MYSOL HOLDINGS AND LOGISTICS - 100% REAL WEBSITE DESIGN SYSTEM
   Directly matching mysolholdings.co.za:
   Dominating Color: CRISP WHITE (#FFFFFF) & Soft Neutral (#F8F9FA)
   Corporate Navy / Royal Blue Accents: #17287F, #2E3192
   Industrial Action Orange: #F1592A, #D9481A
   Headings: 'Montserrat', sans-serif (Bold, Dark #0F1338)
   Body: 'Lato', sans-serif (Clean #334155, #64748B)
   ========================================================================== */

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

:root {
  --c-white: #FFFFFF;
  --c-bg-light: #F8F9FA;
  --c-bg-alt: #F1F5F9;
  --c-text-primary: #0F1338;
  --c-text-secondary: #475569;
  --c-text-muted: #94A3B8;
  --c-border: #E2E8F0;
  --c-border-subtle: #F1F5F9;
  
  --c-blue: #2E3192;
  --c-blue-dark: #17287F;
  --c-blue-subtle: #EEF2FF;
  --c-orange: #F1592A;
  --c-orange-dark: #D9481A;
  --c-orange-subtle: #FFF7ED;

  --font-heading: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Lato', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background-color: var(--c-bg-light);
  color: var(--c-text-secondary);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6, .heading-font {
  font-family: var(--font-heading);
  color: var(--c-text-primary);
  letter-spacing: -0.015em;
}

/* Floating White Header Navbar */
.mysol-nav-pill {
  background: var(--c-white);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 9999px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  padding: 0.5rem 1.25rem;
  transition: all 0.3s ease;
}

/* Disconnected Floating Left Menu Bar (Flushing 100% from top to bottom) */
.mysol-sidebar-island {
  background: var(--c-white);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: all 0.25s ease;
}

/* Vertical Nav Item in Disconnected Left Menu */
.sidebar-nav-item {
  color: #334155;
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.6rem 0.85rem;
  border-radius: 0.875rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  position: relative;
}

.sidebar-nav-item:hover {
  background: #F8FAFC;
  color: var(--c-blue-dark);
  border-color: #E2E8F0;
  transform: translateX(3px);
}

.sidebar-nav-item.active {
  background: #F1F5F9;
  color: var(--c-text-primary);
  font-weight: 700;
  border-color: #CBD5E1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.sidebar-nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 15%;
  bottom: 15%;
  width: 4px;
  background: var(--c-blue);
  border-radius: 0 4px 4px 0;
}

.sidebar-nav-item .nav-icon {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 0.5rem;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-blue);
  font-size: 0.95rem;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.sidebar-nav-item:hover .nav-icon {
  background: #EEF2FF;
  border-color: #C7D2FE;
  color: var(--c-blue-dark);
}

.sidebar-nav-item.active .nav-icon {
  background: #17287F;
  border-color: #17287F;
  color: #FFFFFF;
}

/* Horizontal Nav Tab Links with Website Blue Underline */
.nav-tab-link {
  color: #334155;
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  position: relative;
  transition: all 0.2s ease;
  white-space: nowrap;
  background: transparent;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-tab-link:hover {
  color: var(--c-blue-dark);
}

.nav-tab-link.active {
  color: var(--c-text-primary);
  font-weight: 800;
}

.nav-tab-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0.85rem;
  right: 0.85rem;
  height: 3px;
  background-color: var(--c-blue);
  border-radius: 9999px;
}

/* Dominant Pure White Cards (100% Matching Website) */
.mysol-card {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: 1.25rem;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.mysol-card:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  border-color: #CBD5E1;
}

/* Service & Fleet Card Image Top */
.card-img-top {
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: 1.25rem 1.25rem 0 0;
  display: block;
}

/* Circular Navy Icon Badge (Overlapping Image) */
.service-icon-badge {
  width: 42px;
  height: 42px;
  border-radius: 9999px;
  background: var(--c-blue-dark);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(23, 40, 127, 0.35);
  margin-top: -21px;
  margin-left: 1.25rem;
  position: relative;
  z-index: 2;
  border: 2px solid #FFFFFF;
}

/* Buttons */
.btn-mysol-orange {
  background: linear-gradient(135deg, #F1592A 0%, #D9481A 100%);
  color: #FFFFFF !important;
  font-family: var(--font-heading);
  font-weight: 700;
  border-radius: 9999px;
  padding: 0.55rem 1.25rem;
  box-shadow: 0 4px 16px rgba(241, 89, 42, 0.35);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  cursor: pointer;
}

.btn-mysol-orange:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(241, 89, 42, 0.5);
  filter: brightness(1.05);
}

.btn-mysol-blue {
  background: var(--c-blue-dark);
  color: #FFFFFF !important;
  font-family: var(--font-heading);
  font-weight: 700;
  border-radius: 9999px;
  padding: 0.55rem 1.25rem;
  box-shadow: 0 4px 14px rgba(23, 40, 127, 0.25);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  cursor: pointer;
}

.btn-mysol-blue:hover {
  background: var(--c-blue);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(46, 49, 146, 0.4);
}

.btn-mysol-outline {
  background: var(--c-white);
  color: var(--c-text-primary);
  font-family: var(--font-heading);
  font-weight: 700;
  border: 1px solid var(--c-border);
  border-radius: 9999px;
  padding: 0.55rem 1.25rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
}

.btn-mysol-outline:hover {
  background: var(--c-bg-light);
  border-color: #CBD5E1;
  color: var(--c-blue-dark);
}

/* White Form Controls */
.mysol-input, .mysol-select {
  width: 100%;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 0.625rem;
  padding: 0.55rem 0.85rem;
  color: #0F1338;
  font-size: 0.875rem;
  font-family: var(--font-body);
  transition: all 0.2s ease;
  outline: none;
}

.mysol-input:focus, .mysol-select:focus {
  border-color: var(--c-orange);
  box-shadow: 0 0 0 3px rgba(241, 89, 42, 0.15);
}

/* Stat Box (Soft light background inside white card) */
.stat-box {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 0.875rem;
  padding: 1rem;
  transition: all 0.2s ease;
}

.stat-box:hover {
  border-color: #CBD5E1;
  background: #F1F5F9;
}

/* Live Operational Ticker (Light Clean Bar) */
.ticker-bar-light {
  background: #FFFFFF;
  border-bottom: 1px solid #E2E8F0;
  overflow: hidden;
  white-space: nowrap;
  height: 2.25rem;
  display: flex;
  align-items: center;
  font-size: 0.75rem;
}

.ticker-track-light {
  display: inline-flex;
  animation: ticker-slide 45s linear infinite;
  gap: 2.5rem;
}

@keyframes ticker-slide {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker-item-light {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  color: #475569;
}

/* Status Badges */
.badge-tag-orange {
  background: #FFF7ED;
  color: #EA580C;
  border: 1px solid #FDBA74;
  border-radius: 9999px;
  padding: 0.15rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 700;
}

.badge-tag-blue {
  background: #EEF2FF;
  color: #3730A3;
  border: 1px solid #C7D2FE;
  border-radius: 9999px;
  padding: 0.15rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 700;
}

.badge-tag-green {
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
  border-radius: 9999px;
  padding: 0.15rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 700;
}

/* Modals */
.modal-overlay {
  background-color: rgba(15, 19, 56, 0.6);
  backdrop-filter: blur(4px);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: #F1F5F9;
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* Print Styles */
@media print {
  header, .ticker-bar-light, #openDispatchBtn, .no-print, .mobile-bottom-nav, #mobileTopHeader {
    display: none !important;
  }
  body {
    background: #FFFFFF !important;
    color: #000000 !important;
  }
  .mysol-card {
    border: 1px solid #CCCCCC !important;
    box-shadow: none !important;
  }
}

/* ==========================================================================
   PWA & MOBILE OPTIMIZATIONS (100% Mobile Responsive for All Mobile Devices)
   ========================================================================== */

/* Mobile Bottom Navigation Bar */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid #E2E8F0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
  z-index: 50;
  padding: 0.25rem 0.5rem;
  padding-bottom: env(safe-area-inset-bottom, 0.25rem);
  justify-content: space-around;
  align-items: center;
}

@media (max-width: 1023px) {
  .mobile-bottom-nav {
    display: flex;
  }
  
  /* On mobile, body should allow normal vertical scrolling and give space for bottom nav */
  body {
    overflow-y: auto !important;
    height: auto !important;
    padding-bottom: 74px !important;
  }
  
  /* Hide desktop sidebar on mobile */
  .mysol-sidebar-island {
    display: none !important;
  }
  
  /* Make main content container full width on mobile */
  #mainContentWrapper {
    width: 100% !important;
    padding: 0.75rem !important;
    overflow-y: visible !important;
    height: auto !important;
  }
}

.mobile-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #64748B;
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 700;
  text-decoration: none;
  background: transparent;
  border: none;
  padding: 0.35rem 0.5rem;
  border-radius: 0.75rem;
  transition: all 0.2s ease;
  min-width: 58px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mobile-nav-btn .m-icon {
  font-size: 1.15rem;
  line-height: 1;
  margin-bottom: 2px;
  transition: transform 0.2s ease;
}

.mobile-nav-btn.active {
  color: var(--c-orange);
}

.mobile-nav-btn.active .m-icon {
  transform: translateY(-2px);
}

/* Geofence Pulse Animation */
@keyframes pulse-ring {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.geofence-pulse {
  animation: pulse-ring 2s infinite cubic-bezier(0.45, 0, 0.55, 1);
}

/* Fuel Tank Gauge */
.fuel-tank-meter {
  position: relative;
  height: 10px;
  width: 100%;
  background: #E2E8F0;
  border-radius: 9999px;
  overflow: hidden;
}

.fuel-tank-level {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Revenue Badge Glow */
.revenue-glow {
  box-shadow: 0 4px 14px rgba(241, 89, 42, 0.15);
}

/* Biometric & Face Scanner UI Animations */
@keyframes laserScan {
  0% { top: 5%; opacity: 0.7; }
  50% { opacity: 1; }
  100% { top: 95%; opacity: 0.7; }
}

@keyframes biometricPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(23, 40, 127, 0.5); }
  70% { transform: scale(1.03); box-shadow: 0 0 0 16px rgba(23, 40, 127, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(23, 40, 127, 0); }
}

.scanner-laser-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2.5px;
  background: linear-gradient(90deg, transparent, #10B981, #6EE7B7, #10B981, transparent);
  box-shadow: 0 0 12px #10B981;
  animation: laserScan 1.4s infinite alternate ease-in-out;
}

.biometric-ring-pulse {
  animation: biometricPulse 1.8s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

.login-glass-card {
  background: #FFFFFF;
  border-radius: 1.5rem;
  box-shadow: 0 25px 60px -15px rgba(15, 19, 56, 0.4);
  border: 1px solid rgba(226, 232, 240, 0.8);
}


