:root {
  --primary-gradient: linear-gradient(135deg, #ff8c00 0%, #ff6b00 50%, #ffd700 100%);
  --primary-color: #ff8c00;
  --secondary-color: #ff6b00;
  --accent-color: #ffd700;
  --dark-color: #2c3e50;
  --light-color: #f8f9fa;
  --gray-light: #e9ecef;
  --gray-medium: #6c757d;
  --gray-dark: #343a40;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --info-color: #17a2b8;
  --sidebar-width: 250px;
  --sidebar-collapsed-width: 70px;
  --header-height: 60px;
  --border-radius: 12px;
  --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --box-shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--dark-color);
  background-color: #f8f9fa;
  overflow-x: hidden;
}

/* Typography Scale */
h1, .h1 { font-size: 2.5rem; font-weight: 700; line-height: 1.2; }
h2, .h2 { font-size: 2rem; font-weight: 600; line-height: 1.3; }
h3, .h3 { font-size: 1.75rem; font-weight: 600; line-height: 1.3; }
h4, .h4 { font-size: 1.5rem; font-weight: 600; line-height: 1.4; }
h5, .h5 { font-size: 1.25rem; font-weight: 600; line-height: 1.4; }
h6, .h6 { font-size: 1rem; font-weight: 600; line-height: 1.4; }

.text-gradient {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

/* Layout System */
.dashboard-layout {
  padding-top: var(--header-height);
  min-height: 100vh;
}

.container-fluid {
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Header & Navigation */
.navbar {
  height: var(--header-height);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1030;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
}

.navbar-brand img {
  height: 35px;
  transition: var(--transition);
}

.navbar-brand:hover img {
  transform: scale(1.05);
}

/* Sidebar Enhanced */
.sidebar {
  width: var(--sidebar-width);
  height: calc(100vh - var(--header-height));
  position: fixed;
  top: var(--header-height);
  left: 0;
  background: linear-gradient(180deg, var(--dark-color) 0%, #2c3e50 100%);
  color: white;
  transition: var(--transition);
  z-index: 1020;
  overflow-y: auto;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}

.sidebar-header {
  padding: 1.5rem 1rem;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.sidebar ul.components {
  padding: 1rem 0;
}

.sidebar ul li a {
  padding: 0.875rem 1rem;
  display: flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: var(--transition);
  border-left: 4px solid transparent;
  margin: 0.25rem 0.5rem;
  border-radius: 8px;
}

.sidebar ul li a:hover,
.sidebar ul li a.active {
  color: white;
  background: rgba(255, 255, 255, 0.15);
  border-left-color: var(--primary-color);
  transform: translateX(5px);
}

.sidebar ul li a i {
  margin-right: 0.75rem;
  width: 20px;
  text-align: center;
  font-size: 1.1rem;
}

.sidebar.collapsed ul li a {
  justify-content: center;
  padding: 0.875rem 0.5rem;
}

.sidebar.collapsed ul li a i {
  margin-right: 0;
  font-size: 1.25rem;
}

.sidebar.collapsed ul li a span {
  display: none;
}

/* Main Content Area */
.main-content {
  margin-left: var(--sidebar-width);
  padding: 1.5rem;
  transition: var(--transition);
  min-height: calc(100vh - var(--header-height));
  background: #f8f9fa;
}

.main-content.expanded {
  margin-left: var(--sidebar-collapsed-width);
}

.main-content.full-width {
  margin-left: 0;
}

/* Cards & Components */
.card {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  margin-bottom: 1.5rem;
  background: white;
}

.card:hover {
  box-shadow: var(--box-shadow-hover);
  transform: translateY(-2px);
}

.card-header {
  background: var(--primary-gradient);
  color: white;
  border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
  border: none;
  padding: 1.25rem 1.5rem;
  font-weight: 600;
}

.card-header.bg-gradient {
  background: var(--primary-gradient) !important;
}

/* Statistics Cards */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: white;
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--box-shadow);
  border-left: 6px solid var(--primary-color);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary-gradient);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--box-shadow-hover);
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  line-height: 1;
}

.stat-label {
  color: var(--gray-medium);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Buttons */
.btn {
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  transition: var(--transition);
  border: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-gradient {
  background: var(--primary-gradient);
  color: white;
  position: relative;
  overflow: hidden;
}

.btn-gradient::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn-gradient:hover::before {
  left: 100%;
}

.btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 140, 0, 0.3);
  color: white;
}

.btn-outline-primary {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  background: transparent;
}

.btn-outline-primary:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

/* Forms */
.form-control, .form-select {
  border-radius: 8px;
  padding: 0.75rem 1rem;
  border: 2px solid var(--gray-light);
  transition: var(--transition);
  font-size: 0.95rem;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(255, 140, 0, 0.25);
  transform: translateY(-1px);
}

.form-label {
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 0.5rem;
}

/* Tables */
.table {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
}

.table th {
  background: var(--primary-gradient);
  color: white;
  border: none;
  padding: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.85rem;
}

.table td {
  padding: 1rem;
  vertical-align: middle;
  border-color: var(--gray-light);
}

.table-hover tbody tr:hover {
  background-color: rgba(255, 140, 0, 0.05);
  transform: scale(1.01);
  transition: var(--transition);
}

/* Status Badges */
.badge {
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge {
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.75rem;
}

.status-pending { background: #fff3cd; color: #856404; }
.status-assigned { background: #cce7ff; color: #004085; }
.status-in_progress { background: #d1ecf1; color: #0c5460; }
.status-completed { background: #d4edda; color: #155724; }
.status-cancelled { background: #f8d7da; color: #721c24; }

/* Role Badges */
.badge-admin { background: var(--danger-color); color: white; }
.badge-manager { background: var(--warning-color); color: var(--dark-color); }
.badge-worker { background: var(--success-color); color: white; }
.badge-customer { background: var(--info-color); color: white; }

/* Upload Areas */
.upload-area {
  border: 3px dashed var(--gray-light);
  border-radius: var(--border-radius);
  padding: 2.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background-color: #f8f9fa;
  position: relative;
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-area:hover,
.upload-area.dragover {
  border-color: var(--primary-color);
  background-color: rgba(255, 140, 0, 0.05);
  transform: scale(1.02);
}

.upload-content i {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

/* File Items */
.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: white;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  border-left: 4px solid var(--primary-color);
  transition: var(--transition);
}

.file-item:hover {
  transform: translateX(5px);
  box-shadow: var(--box-shadow);
}

.file-item-info {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 0.75rem;
}

.file-icon {
  color: var(--primary-color);
  font-size: 1.25rem;
}

/* Modals */
.modal-content {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
  background: var(--primary-gradient);
  color: white;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  border: none;
  padding: 1.5rem;
}

.modal-header .close {
  color: white;
  opacity: 0.8;
  text-shadow: none;
  font-size: 1.5rem;
}

.modal-body {
  padding: 2rem;
}

.modal-footer {
  border-top: 1px solid var(--gray-light);
  padding: 1.5rem;
}

/* Vehicle Grid */
.vehicle-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.vehicle-image-item {
  position: relative;
  border: 2px solid var(--gray-light);
  border-radius: 8px;
  padding: 0.5rem;
  text-align: center;
  transition: var(--transition);
  background: white;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  cursor: pointer;
}

.vehicle-image-item:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--box-shadow);
}

.vehicle-image-item img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
}

.image-side-label {
  font-size: 0.7rem;
  font-weight: 600;
  margin-top: 0.5rem;
  text-transform: capitalize;
  color: var(--gray-medium);
}

/* Progress Updates */
.progress-updates {
  max-height: 400px;
  overflow-y: auto;
}

.update-item {
  border-left: 4px solid var(--primary-color);
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
  background: white;
  border-radius: 0 8px 8px 0;
  box-shadow: var(--box-shadow);
}

.update-meta {
  font-size: 0.8rem;
  color: var(--gray-medium);
  margin-top: 0.5rem;
}

/* Alerts */
.alert {
  border-radius: var(--border-radius);
  border: none;
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--box-shadow);
}

.alert-success {
  background: linear-gradient(135deg, #d4edda, #c3e6cb);
  color: #155724;
}

.alert-danger {
  background: linear-gradient(135deg, #f8d7da, #f5c6cb);
  color: #721c24;
}

.alert-warning {
  background: linear-gradient(135deg, #fff3cd, #ffeaa7);
  color: #856404;
}

.alert-info {
  background: linear-gradient(135deg, #d1ecf1, #b8e6f1);
  color: #0c5460;
}

/* Loading Spinners */
.spinner-border {
  width: 2rem;
  height: 2rem;
  border-width: 0.2em;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .dashboard-stats {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
  
  .sidebar {
    width: var(--sidebar-collapsed-width);
  }
  
  .sidebar .sidebar-header h5,
  .sidebar .collapse,
  .sidebar .collapsing {
    display: none;
  }
  
  .main-content {
    margin-left: var(--sidebar-collapsed-width);
  }
}

@media (max-width: 992px) {
  html {
    font-size: 14px;
  }
  
  .main-content {
    padding: 1rem;
  }
  
  .dashboard-stats {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
  }
  
  .stat-card {
    padding: 1.5rem;
  }
  
  .stat-number {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: 280px;
  }
  
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0 !important;
    padding: 1rem 0.75rem;
  }
  
  .dashboard-stats {
    grid-template-columns: 1fr;
  }
  
  .card {
    margin-bottom: 1rem;
  }
  
  .table-responsive {
    font-size: 0.875rem;
  }
  
  .btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }
  
  .btn-group .btn {
    width: auto;
    margin-bottom: 0;
  }
}

@media (max-width: 576px) {
  html {
    font-size: 13px;
  }
  
  .navbar-brand span {
    display: none;
  }
  
  .main-content {
    padding: 0.5rem;
  }
  
  .stat-card {
    padding: 1.25rem;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .modal-dialog {
    margin: 0.5rem;
  }
  
  .modal-body {
    padding: 1.5rem 1rem;
  }
  
  .vehicle-images-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
  
  .upload-area {
    padding: 1.5rem 0.5rem;
    min-height: 120px;
  }
}

/* Print Styles */
@media print {
  .sidebar, .navbar, .btn, .modal-footer {
    display: none !important;
  }
  
  .main-content {
    margin-left: 0 !important;
    padding: 0 !important;
  }
  
  .card {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  :root {
    --primary-color: #ff6b00;
    --dark-color: #000000;
    --light-color: #ffffff;
  }
  
  .card {
    border: 2px solid var(--dark-color);
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
  .card {
    background: var(--dark-color);
    color: white;
  }
  
  .form-control, .form-select {
    background: #2c3e50;
    border-color: #34495e;
    color: white;
  }
}

/* Utility Classes */
.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shadow-sm { box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important; }
.shadow { box-shadow: var(--box-shadow) !important; }
.shadow-lg { box-shadow: var(--box-shadow-hover) !important; }

.rounded { border-radius: var(--border-radius) !important; }
.rounded-lg { border-radius: calc(var(--border-radius) * 1.5) !important; }

/* Animation Keyframes */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.fade-in { animation: fadeIn 0.5s ease-out; }
.slide-in { animation: slideIn 0.3s ease-out; }
.pulse { animation: pulse 2s infinite; }

/* Focus Styles for Accessibility */
button:focus,
a:focus,
.form-control:focus,
.form-select:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Skip to main content for screen readers */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary-color);
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 10000;
}

.skip-link:focus {
  top: 6px;
}

/* ===== MOBILE SIDEBAR STYLES - ADD TO BOTTOM OF FILE ===== */

/* Mobile Sidebar Styles */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1040;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3);
    }
    
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1039;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    body.sidebar-open {
        overflow: hidden;
    }
    
    /* Ensure navbar stays on top */
    .navbar {
        z-index: 1041;
    }
    
    /* Adjust sidebar header for mobile */
    .sidebar-header {
        padding: 1rem;
        text-align: left;
    }
    
    .sidebar-header h5 {
        font-size: 1.1rem;
        margin: 0;
    }
    
    /* Improve touch targets for mobile */
    .sidebar ul li a {
        padding: 1rem 1.25rem;
        margin: 0.25rem 0.75rem;
        font-size: 0.95rem;
    }
    
    .sidebar ul li a i {
        font-size: 1.2rem;
        width: 24px;
    }
    
    /* Better dropdown handling on mobile */
    .sidebar .collapse {
        transition: none;
    }
    
    .sidebar .collapse.show {
        animation: slideDown 0.3s ease;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* Enhanced navbar toggle button */
.navbar-toggler {
    border: none;
    background: transparent;
    padding: 0.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.navbar-toggler:hover {
    background: rgba(255, 255, 255, 0.1);
}

.navbar-toggler:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.navbar-toggler-icon {
    background-image: none;
    position: relative;
    width: 20px;
    height: 2px;
    background: white;
    transition: all 0.3s ease;
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: white;
    left: 0;
    transition: all 0.3s ease;
}

.navbar-toggler-icon::before {
    top: -6px;
}

.navbar-toggler-icon::after {
    top: 6px;
}

/* Animated hamburger icon when sidebar is open */
body.sidebar-open .navbar-toggler-icon {
    background: transparent;
}

body.sidebar-open .navbar-toggler-icon::before {
    transform: rotate(45deg);
    top: 0;
}

body.sidebar-open .navbar-toggler-icon::after {
    transform: rotate(-45deg);
    top: 0;
}

/* Smooth transitions for desktop sidebar */
@media (min-width: 769px) {
    .sidebar {
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .sidebar.collapsed {
        width: var(--sidebar-collapsed-width);
    }
    
    .sidebar.collapsed .sidebar-header,
    .sidebar.collapsed .nav-link-text {
        opacity: 0;
        visibility: hidden;
        transition: all 0.2s ease;
    }
    
    .main-content {
        transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
}

/* Improved dropdown indicators */
.sidebar .dropdown-toggle::after {
    transition: transform 0.3s ease;
    margin-left: auto;
}

.sidebar .dropdown-toggle[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

/* Better scrollbar for sidebar */
.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Simplified Submenu Styles */
.sidebar .collapse {
    display: none;
}

.sidebar .collapse.show {
    display: block;
}

.sidebar .dropdown-toggle.active {
    background: rgba(255, 255, 255, 0.2) !important;
    border-left-color: var(--accent-color) !important;
}

.sidebar ul ul li a {
    padding-left: 2.5rem;
    font-size: 0.9rem;
}

/* Smooth animations */
.sidebar .collapse {
    transition: max-height 0.3s ease !important;
    max-height: 0;
    overflow: hidden;
}

.sidebar .collapse.show {
    max-height: 500px;
}

/* ===== FIX FOR SELECT DROPDOWNS ===== */

/* Base select styles */
.form-select,
.form-control select,
select.form-control {
    width: 100% !important;
    max-width: 100% !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    height: auto !important;
    min-height: 48px;
    padding: 0.75rem 2.25rem 0.75rem 1rem !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    border: 2px solid var(--gray-light);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: var(--transition);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Focus states */
.form-select:focus,
select.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(255, 140, 0, 0.25);
    outline: none;
}

/* Hover states */
.form-select:hover,
select.form-control:hover {
    border-color: var(--primary-color);
    cursor: pointer;
}

/* Disabled state */
.form-select:disabled,
select.form-control:disabled {
    background-color: var(--gray-light);
    opacity: 0.6;
    cursor: not-allowed;
}

/* Option styles */
.form-select option,
select.form-control option {
    padding: 12px 16px !important;
    margin: 4px 0 !important;
    border-bottom: 1px solid #f8f9fa;
    background: white;
    color: var(--dark-color);
    font-size: 0.95rem;
    white-space: normal !important;
    word-wrap: break-word !important;
    min-height: 44px;
    display: flex;
    align-items: center;
}

/* Option hover state (for modern browsers) */
.form-select option:hover,
select.form-control option:hover {
    background: var(--primary-color) !important;
    color: white !important;
}

/* Selected option */
.form-select option:checked,
select.form-control option:checked {
    background: var(--primary-color) !important;
    color: white !important;
}

/* Group headers */
.form-select optgroup,
select.form-control optgroup {
    font-weight: 600;
    color: var(--dark-color);
    background: var(--gray-light);
    padding: 8px 12px;
}

/* Modal specific fixes */
.modal .form-select,
.modal select.form-control {
    width: 100% !important;
    max-width: 100% !important;
}

/* Card specific fixes */
.card .form-select,
.card select.form-control {
    background-color: white;
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .form-select,
    select.form-control {
        background-color: #2c3e50;
        border-color: #34495e;
        color: white;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    }
    
    .form-select option,
    select.form-control option {
        background: #2c3e50;
        color: white;
    }
}

/* Custom select wrapper for better control */
.select-wrapper {
    position: relative;
    width: 100%;
}

.select-wrapper::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
    z-index: 1;
}

.select-wrapper select {
    padding-right: 3rem !important;
    background: white;
}

/* Small select variant */
.form-select-sm,
select.form-control-sm {
    padding: 0.5rem 2rem 0.5rem 0.75rem !important;
    min-height: 38px;
    font-size: 0.875rem;
}

/* Large select variant */
.form-select-lg,
select.form-control-lg {
    padding: 1rem 2.5rem 1rem 1.25rem !important;
    min-height: 56px;
    font-size: 1.1rem;
}

/* Error state */
.form-select.is-invalid,
select.form-control.is-invalid {
    border-color: var(--danger-color);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23dc3545' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

/* Success state */
.form-select.is-valid,
select.form-control.is-valid {
    border-color: var(--success-color);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2328a745' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

/* Multiple select styles */
.form-select[multiple],
select.form-control[multiple] {
    padding: 0.75rem 1rem !important;
    background-image: none;
    height: auto;
    min-height: 120px;
}

.form-select[multiple] option,
select.form-control[multiple] option {
    padding: 8px 12px;
    margin: 2px 0;
    border-radius: 4px;
}

/* Responsive fixes */
@media (max-width: 768px) {
    .form-select,
    select.form-control {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.875rem 2.5rem 0.875rem 1rem !important;
    }
    
    /* Ensure dropdowns are usable on mobile */
    select.form-control {
        min-height: 52px;
    }
}

@media (max-width: 576px) {
    .form-select,
    select.form-control {
        padding: 0.875rem 2.25rem 0.875rem 0.875rem !important;
    }
    
    /* Stack selects in forms on mobile */
    .row .form-select,
    .row select.form-control {
        margin-bottom: 1rem;
    }
}

/* Print styles */
@media print {
    .form-select,
    select.form-control {
        border: 1px solid #000 !important;
        background: white !important;
        color: black !important;
        background-image: none !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .form-select,
    select.form-control {
        border: 2px solid #000;
    }
    
    .form-select:focus,
    select.form-control:focus {
        border: 3px solid #000;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .form-select,
    select.form-control {
        transition: none;
    }
}

/* Fix for Bootstrap 4 compatibility */
.custom-select {
    width: 100% !important;
    max-width: 100% !important;
}

/* Ensure all select elements use our improved styles */
select {
    width: 100% !important;
    max-width: 100% !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
}

/* Status Cards */
.status-card {
    padding: 1.5rem;
    text-align: center;
    border-radius: var(--border-radius);
    background: white;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.status-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--box-shadow-hover);
}

/* Quick Stats Animation */
.stat-card {
    animation: fadeInUp 0.6s ease-out;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }
.stat-card:nth-child(5) { animation-delay: 0.5s; }
.stat-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading States */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== AUTHENTICATION STYLES ===== */

.auth-container {
    min-height: 100vh;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
}

.auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 300px;
    background: linear-gradient(135deg, #ff8c00 0%, #ff6b00 50%, #ffd700 100%);
    z-index: 0;
}

.auth-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    max-width: 1200px;
    width: 100%;
    min-height: 700px;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 140, 0, 0.1);
}

.auth-left {
    background: linear-gradient(135deg, var(--dark-color) 0%, #2c3e50 100%);
    color: white;
    height: 100%;
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.auth-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" opacity="0.1"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="white" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
}

.brand-logo {
    height: 80px;
    margin-bottom: 2rem;
    filter: brightness(0) invert(1);
}

.auth-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ff8c00, #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 3rem;
    line-height: 1.6;
}

.auth-features {
    text-align: left;
    max-width: 300px;
    margin: 0 auto;
}

.auth-feature {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-feature i {
    color: var(--accent-color);
    margin-right: 1rem;
    font-size: 1.2rem;
}

.auth-feature span {
    font-weight: 500;
}

.auth-right {
    padding: 3rem 2.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: white;
}

.auth-tabs {
    display: flex;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 0.5rem;
    margin-bottom: 2rem;
    position: relative;
    border: 1px solid #e9ecef;
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 1rem 0.5rem;
    cursor: pointer;
    border-radius: 8px;
    font-weight: 600;
    color: var(--gray-medium);
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.auth-tab.active {
    color: var(--dark-color);
}

.auth-tabs::before {
    content: '';
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    width: calc(33.333% - 1rem);
    height: calc(100% - 1rem);
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.2);
    transition: var(--transition);
    border: 1px solid rgba(255, 140, 0, 0.1);
}

.auth-tabs[data-active-tab="login"]::before {
    transform: translateX(0);
}

.auth-tabs[data-active-tab="register"]::before {
    transform: translateX(100%);
}

.auth-tabs[data-active-tab="forgot"]::before {
    transform: translateX(200%);
}

.auth-form {
    display: none;
    animation: fadeInUp 0.5s ease-out;
}

.auth-form.active {
    display: block;
}

.auth-form h5 {
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f8f9fa;
    background: linear-gradient(135deg, #ff8c00, #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.password-field {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-medium);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: var(--transition);
}

.password-toggle:hover {
    color: var(--primary-color);
    background: rgba(255, 140, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    display: block;
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    transition: var(--transition);
    background: #fff;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(255, 140, 0, 0.15);
    transform: translateY(-2px);
}

.form-control.is-invalid {
    border-color: var(--danger-color);
}

.invalid-feedback {
    display: none;
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.was-validated .form-control:invalid ~ .invalid-feedback,
.form-control.is-invalid ~ .invalid-feedback {
    display: block;
}

.btn-gradient {
    background: var(--primary-gradient);
    border: none;
    color: white;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-gradient:hover::before {
    left: 100%;
}

.btn-gradient:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 140, 0, 0.4);
}

.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.text-gradient:hover {
    text-decoration: underline;
    background: linear-gradient(135deg, #ff6b00, #ffa500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Back to main site link */
.back-to-main {
    position: absolute;
    top: 2rem;
    left: 2rem;
    z-index: 2;
}

.back-to-main .btn-gradient {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    border-radius: 8px;
}

.back-to-main .btn-gradient i {
    margin-right: 0.5rem;
}

/* Form animations */
@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.auth-form.active[data-form="login"] {
    animation: slideInFromRight 0.5s ease-out;
}

.auth-form.active[data-form="register"] {
    animation: slideInFromLeft 0.5s ease-out;
}

.auth-form.active[data-form="forgot"] {
    animation: slideInFromRight 0.5s ease-out;
}

.auth-form.active[data-form="reset"] {
    animation: slideInFromLeft 0.5s ease-out;
}

/* Responsive Design for Auth */
@media (max-width: 992px) {
    .auth-card {
        max-width: 700px;
        min-height: auto;
    }
    
    .auth-left {
        padding: 2rem 1.5rem;
    }
    
    .auth-right {
        padding: 2rem 1.5rem;
    }
    
    .auth-title {
        font-size: 2rem;
    }
    
    .back-to-main {
        position: relative;
        top: auto;
        left: auto;
        margin-bottom: 1rem;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .auth-container {
        padding: 1rem 0.5rem;
    }
    
    .auth-container::before {
        height: 200px;
    }
    
    .auth-card {
        border-radius: 15px;
    }
    
    .auth-left {
        padding: 2rem 1rem;
        border-radius: 15px 15px 0 0;
    }
    
    .auth-right {
        padding: 2rem 1rem;
        border-radius: 0 0 15px 15px;
    }
    
    .brand-logo {
        height: 60px;
    }
    
    .auth-title {
        font-size: 1.75rem;
    }
    
    .auth-tabs {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .auth-tabs::before {
        display: none;
    }
    
    .auth-tab {
        border: 2px solid transparent;
    }
    
    .auth-tab.active {
        border-color: var(--primary-color);
        background: rgba(255, 140, 0, 0.1);
    }
    
    .back-to-main {
        position: relative;
        top: auto;
        left: auto;
        margin-bottom: 1rem;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .auth-container {
        padding: 0.5rem;
    }
    
    .auth-container::before {
        height: 150px;
    }
    
    .auth-left,
    .auth-right {
        padding: 1.5rem 1rem;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
    
    .auth-subtitle {
        font-size: 1rem;
    }
    
    .auth-feature {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    .form-control {
        padding: 0.875rem 1rem;
    }
    
    .btn-gradient {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    .back-to-main .btn-gradient {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

/* Loading state for forms */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-right-color: transparent;
    animation: spin 1s linear infinite;
}

/* Success states */
.form-control.is-valid {
    border-color: var(--success-color);
}

.valid-feedback {
    display: none;
    color: var(--success-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.was-validated .form-control:valid ~ .valid-feedback,
.form-control.is-valid ~ .valid-feedback {
    display: block;
}

/* Password strength indicator */
.password-strength {
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0%;
    transition: var(--transition);
    border-radius: 2px;
}

.password-strength.weak .password-strength-bar {
    background: var(--danger-color);
    width: 33%;
}

.password-strength.medium .password-strength-bar {
    background: var(--warning-color);
    width: 66%;
}

.password-strength.strong .password-strength-bar {
    background: var(--success-color);
    width: 100%;
}

/* Enhanced focus states for accessibility */
.auth-tab:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.password-toggle:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print styles for auth */
@media print {
    .auth-container {
        background: white !important;
    }
    
    .auth-container::before {
        display: none;
    }
    
    .auth-left {
        background: white !important;
        color: black !important;
    }
    
    .auth-title {
        background: none !important;
        -webkit-text-fill-color: black !important;
        color: black !important;
    }
    
    .btn-gradient {
        background: #f8f9fa !important;
        color: black !important;
        border: 1px solid #dee2e6 !important;
    }
}

/* Chat Styles */
.chat-message {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 12px;
    max-width: 80%;
}

.chat-message.own {
    background: var(--primary-gradient);
    color: white;
    margin-left: auto;
}

.chat-message.other {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.chat-time {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 0.5rem;
}

/* Rating Stars */
.rating-stars {
    color: #ffc107;
}

.rating-stars .far {
    color: #e4e5e9;
}

/* Analytics Charts */
.analytics-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--box-shadow);
}

/* GPS Tracking */
.location-marker {
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border: 2px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.worker-online {
    color: var(--success-color);
}

.worker-offline {
    color: var(--gray-medium);
}

/* Sidebar Badges */
.sidebar .badge-pill {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
}

/* Sidebar Footer */
.sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

/* Active sidebar item highlighting */
.sidebar ul li a.active {
    background: rgba(255, 140, 0, 0.3) !important;
    border-left-color: var(--accent-color) !important;
}

/* Submenu animations */
.sidebar .collapse {
    transition: max-height 0.3s ease !important;
}

.sidebar .collapse.show {
    max-height: 500px;
}

/* Role-based sidebar items */
.sidebar .admin-only {
    border-left: 2px solid var(--danger-color);
}

.sidebar .manager-only {
    border-left: 2px solid var(--warning-color);
}

.sidebar .worker-only {
    border-left: 2px solid var(--success-color);
}

.sidebar .customer-only {
    border-left: 2px solid var(--info-color);
}

/* Mobile sidebar enhancements */
@media (max-width: 768px) {
    .sidebar .badge-pill {
        position: absolute;
        right: 0.5rem;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .sidebar.collapsed .badge-pill {
        display: none;
    }
}
/* Location Permission Modal */
.location-permission-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.location-permission-modal .modal-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.location-permission-modal .modal-header h5 {
    margin: 0 0 1rem 0;
    color: #333;
}

.location-permission-modal .modal-body p {
    margin-bottom: 1rem;
    color: #666;
}

.permission-options {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.permission-options .btn {
    flex: 1;
}

/* Location Status */
.location-status {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 300px;
}



/* ===== DARK MODE TEXT ENHANCEMENTS ===== */

@media (prefers-color-scheme: dark) {
  body {
    color: #f8f9fa;
    background-color: #2c3e50;
  }
  
  .card {
    background: #343a40;
    color: #f8f9fa;
  }
  
  .card-body {
    background: #343a40;
    color: #f8f9fa;
  }
  
  .form-control, .form-select {
    background: #495057;
    color: #f8f9fa;
    border-color: #6c757d;
  }
  
  .form-control::placeholder {
    color: #adb5bd;
  }
  
  .table {
    background: #343a40;
    color: #f8f9fa;
  }
  
  .table td {
    background: #343a40;
    color: #f8f9fa;
    border-color: #495057;
  }
  
  .stat-card {
    background: #343a40;
    color: #f8f9fa;
  }
  
  .stat-label {
    color: #adb5bd;
  }
  
  .upload-area {
    background-color: #495057;
    color: #f8f9fa;
  }
  
  .file-item {
    background: #495057;
    color: #f8f9fa;
  }
  
  .modal-content {
    background: #343a40;
    color: #f8f9fa;
  }
  
  .modal-body {
    background: #343a40;
    color: #f8f9fa;
  }
  
  .modal-footer {
    background: #343a40;
    color: #f8f9fa;
  }
}

/* ===== HIGH CONTRAST MODE ENHANCEMENTS ===== */

@media (prefers-contrast: high) {
  body {
    color: #000000;
    background-color: #ffffff;
  }
  
  .card {
    border: 2px solid #000000;
  }
  
  .sidebar ul li a {
    border-left: 3px solid transparent;
  }
  
  .sidebar ul li a.active,
  .sidebar ul li a.active-parent,
  .sidebar ul ul li a.active {
    border-left: 3px solid #000000;
  }
}

/* ===== UTILITY CLASSES FOR TEXT CONTRAST ===== */

.text-contrast-primary {
  color: #2c3e50 !important;
}

.text-contrast-secondary {
  color: #6c757d !important;
}

.text-contrast-light {
  color: #ffffff !important;
}

.bg-contrast-white {
  background: #ffffff !important;
  color: #2c3e50 !important;
}

.bg-contrast-dark {
  background: #2c3e50 !important;
  color: #ffffff !important;
}

.bg-contrast-gray {
  background: #f8f9fa !important;
  color: #2c3e50 !important;
}