/* FleetFlow Modern White Theme - Clean & Professional */

@font-face {
    font-family: 'Noto Sans Arabic';
    src: url('../fonts/NotoSansArabic-VariableFont_wdth,wght.ttf') format('truetype');
    font-weight: 100 900;
    font-stretch: 75% 125%;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --secondary: #6b7280;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;
    
    /* White Theme Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    
    /* Text Colors */
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    
    /* Border & Shadow */
    --border: #e5e7eb;
    --border-light: #f3f4f6;
    --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans Arabic', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 14px;
    margin: 0;
    padding: 0;
    direction: rtl;
    text-align: right;
}

/* Container Improvements */
.container-fluid {
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
    max-width: 1400px;
    margin: 0 auto;
}

/* Navigation */
.navbar {
    background: var(--bg-primary) !important;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    padding: var(--space-md) 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary) !important;
}

.navbar-nav .nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary) !important;
    background-color: var(--bg-tertiary);
}

.dropdown-menu {
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-lg);
    padding: var(--space-sm);
    text-align: right;
}

/* Page Header */
.page-header {
    background: var(--bg-primary);
    padding: var(--space-xl) 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: var(--space-xl);
    text-align: right;
}

.page-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.page-subtitle {
    color: var(--text-secondary);
    margin: var(--space-xs) 0 0 0;
    font-size: 1rem;
}

/* Modern Cards */
.card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    transition: all 0.2s ease;
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.card-header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    padding: var(--space-lg);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.125rem;
}

.card-body {
    padding: var(--space-lg);
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.stats-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    text-align: right;
}

.stats-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--info));
}

.stats-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: var(--space-sm);
}

.stats-label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: var(--space-sm);
}

.stats-change {
    font-size: 0.75rem;
    font-weight: 600;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.stats-icon {
    position: absolute;
    top: var(--space-lg);
    left: var(--space-lg);
    right: auto;
    width: 3rem;
    height: 3rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.25rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: var(--space-2xl);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-xl);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::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" width="60" height="60" viewBox="0 0 60 60"><g fill="none" fill-rule="evenodd"><g fill="white" fill-opacity="0.05"><circle cx="30" cy="30" r="1"/></g></svg>');
    opacity: 0.5;
}

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

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
}

.hero p {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: var(--space-xl);
}

/* Forms */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
    font-size: 0.875rem;
}

.form-control, .form-select {
    width: 100%;
    padding: var(--space-md);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: var(--bg-primary);
    color: var(--text-primary);
    text-align: right;
    direction: rtl;
}

.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-control::placeholder {
    color: var(--text-tertiary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
    flex-direction: row-reverse;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    color: white;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
    color: var(--text-primary);
}

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

.btn-warning {
    background: var(--warning);
    color: white;
}

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

.btn-sm {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.8rem;
}

.btn-lg {
    padding: var(--space-lg) var(--space-xl);
    font-size: 1rem;
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-xl);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Small alert styling for cancellation reasons */
.alert-sm {
    font-size: 0.875rem;
    border-radius: var(--radius-md);
}

.status-pending {
    background: #fef3c7;
    color: #d97706;
}

.status-assigned {
    background: #dbeafe;
    color: #2563eb;
}

.status-in_transit {
    background: #e0f2fe;
    color: #0891b2;
}

.status-delivered {
    background: #d1fae5;
    color: #059669;
}

.status-cancelled {
    background: #fee2e2;
    color: #dc2626;
}

/* Request/Delivery Cards */
.request-card, .delivery-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.request-card:hover, .delivery-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
    border-color: var(--primary);
}

.request-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary);
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.delivery-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--success);
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

/* Tables */
.table-container {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.table {
    margin: 0;
    width: 100%;
    border-collapse: collapse;
}

.table th {
    background: var(--bg-tertiary);
    padding: var(--space-lg);
    text-align: right;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: none;
}

.table td {
    padding: var(--space-lg);
    border-top: 1px solid var(--border);
    vertical-align: middle;
}

.table tbody tr:hover {
    background: var(--bg-secondary);
}

/* Navigation Tabs */
.nav-tabs {
    border: none;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-sm);
    margin-bottom: var(--space-lg);
    box-shadow: var(--shadow-xs);
}

.nav-tabs .nav-link {
    border: none;
    color: var(--text-secondary);
    font-weight: 500;
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    margin: 0 var(--space-xs);
    transition: all 0.2s ease;
    text-align: center;
}

.nav-tabs .nav-link:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.nav-tabs .nav-link.active {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

/* Location Info */
.location-info {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin: var(--space-md) 0;
}

.contact-info {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: var(--space-sm);
}

.special-instructions {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-top: var(--space-md);
    font-style: italic;
    color: #92400e;
    font-size: 0.875rem;
}

/* Modals */
.modal-content {
    border: none;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: var(--space-xl);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.modal-body {
    padding: var(--space-xl);
}

.modal-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: var(--space-xl);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* Alerts */
.alert {
    border: none;
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    font-weight: 500;
    border-left: 4px solid;
    text-align: right;
    direction: rtl;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left-color: var(--success);
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border-left-color: var(--danger);
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-left-color: var(--info);
}

/* Utilities */
.text-muted {
    color: var(--text-secondary) !important;
}

.text-primary {
    color: var(--primary) !important;
}

.text-success {
    color: var(--success) !important;
}

.text-warning {
    color: var(--warning) !important;
}

.text-danger {
    color: var(--danger) !important;
}

/* Modern Loading Animations */
.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--border);
    border-top: 2px solid var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    z-index: 1000;
}

/* Modern Spinner Variants */
.spinner-dots {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.spinner-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--primary);
    animation: bounce-dots 1.4s ease-in-out infinite both;
}

.spinner-dots span:nth-child(1) { animation-delay: -0.32s; }
.spinner-dots span:nth-child(2) { animation-delay: -0.16s; }
.spinner-dots span:nth-child(3) { animation-delay: 0s; }

@keyframes bounce-dots {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.spinner-pulse {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--primary);
    animation: pulse-scale 1s ease-in-out infinite;
}

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

.spinner-wave {
    display: inline-flex;
    gap: 2px;
}

.spinner-wave span {
    width: 3px;
    height: 20px;
    background-color: var(--primary);
    animation: wave-scale 1.2s ease-in-out infinite;
    border-radius: 2px;
}

.spinner-wave span:nth-child(1) { animation-delay: 0s; }
.spinner-wave span:nth-child(2) { animation-delay: 0.1s; }
.spinner-wave span:nth-child(3) { animation-delay: 0.2s; }
.spinner-wave span:nth-child(4) { animation-delay: 0.3s; }
.spinner-wave span:nth-child(5) { animation-delay: 0.4s; }

@keyframes wave-scale {
    0%, 40%, 100% {
        transform: scaleY(0.4);
        opacity: 0.5;
    }
    20% {
        transform: scaleY(1);
        opacity: 1;
    }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-content {
    text-align: center;
    padding: var(--space-xl);
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--bg-tertiary);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--space-md) auto;
}

.loading-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-md);
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-text:last-child {
    margin-bottom: 0;
    width: 70%;
}

.skeleton-title {
    height: 1.5rem;
    margin-bottom: 1rem;
}

.skeleton-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
}

.skeleton-card {
    height: 200px;
    margin-bottom: var(--space-md);
}

@keyframes skeleton-loading {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Modern Progress Bar */
.progress-modern {
    height: 8px;
    background-color: var(--bg-tertiary);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-bar-modern {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--info));
    border-radius: 10px;
    transition: width 0.3s ease;
    position: relative;
}

.progress-bar-modern::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.3) 50%, transparent 70%);
    animation: progress-shine 2s infinite;
}

@keyframes progress-shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Floating Elements */
.floating {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* Glow Effects */
.glow {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
    transition: box-shadow 0.3s ease;
}

.glow:hover {
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.5);
}

/* Modern Button Effects */
.btn-modern {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-lg);
    font-weight: 600;
    text-transform: none;
}

.btn-modern::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-modern:hover::before {
    left: 100%;
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

/* Glass Morphism Effects */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-xl);
}

.glass-dark {
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
}

/* Micro Interactions */
.micro-bounce {
    transition: transform 0.2s ease;
}

.micro-bounce:hover {
    transform: scale(1.05);
}

.micro-bounce:active {
    transform: scale(0.95);
}

/* Loading States for Buttons */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Modern Card Hover Effects */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Smooth Animations */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Slide Animations */
.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Modern Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 400px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-lg);
    transform: translateX(100%);
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 1050;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification.success {
    border-left: 4px solid var(--success);
}

.notification.error {
    border-left: 4px solid var(--danger);
}

.notification.info {
    border-left: 4px solid var(--info);
}

.notification.warning {
    border-left: 4px solid var(--warning);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: var(--space-md);
        padding-right: var(--space-md);
    }
    
    .hero {
        padding: var(--space-xl);
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .page-header {
        padding: var(--space-lg) 0;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .card-body {
        padding: var(--space-md);
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .nav-tabs .nav-link {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.8rem;
    }
}

/* RTL Specific Styles */
.navbar-nav .nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary) !important;
    background-color: var(--bg-tertiary);
}

.dropdown-menu {
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-lg);
    padding: var(--space-sm);
    text-align: right;
}

/* RTL Text Alignment Fixes */
.text-start {
    text-align: right !important;
}

.text-end {
    text-align: left !important;
}

.me-2 {
    margin-left: 0.5rem !important;
    margin-right: 0 !important;
}

.ms-1 {
    margin-right: 0.25rem !important;
    margin-left: 0 !important;
}

/* Button RTL fixes */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
    flex-direction: row-reverse;
}

/* Form inputs RTL */
.form-control, .form-select {
    text-align: right;
    direction: rtl;
}

/* Table RTL */
.table th, .table td {
    text-align: right;
}

/* Cards RTL */
.card-title, .card-text {
    text-align: right;
}

.list-unstyled li {
    text-align: right;
}

/* Nav tabs RTL */
.nav-tabs .nav-link {
    border: none;
    color: var(--text-secondary);
    font-weight: 500;
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    margin: 0 var(--space-xs);
    transition: all 0.2s ease;
    text-align: center;
}

/* Alert RTL */
.alert {
    text-align: right;
    direction: rtl;
}

/* Page Header RTL */
.page-header {
    text-align: right;
}

/* Stats cards RTL */
.stats-card {
    text-align: right;
}

.stats-icon {
    position: absolute;
    top: var(--space-lg);
    left: var(--space-lg);
    right: auto;
    width: 3rem;
    height: 3rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.25rem;
}

/* ========================= */
/* Skeleton Loading Styles */
/* ========================= */

.skeleton-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-line {
    background: linear-gradient(90deg, 
        var(--border-color) 25%, 
        rgba(255, 255, 255, 0.2) 50%, 
        var(--border-color) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 4px;
    height: 16px;
}

.skeleton-title {
    height: 20px;
    width: 60%;
}

.skeleton-text {
    height: 14px;
    width: 90%;
}

.skeleton-text-short {
    height: 14px;
    width: 40%;
}

.skeleton-row {
    background: var(--card-bg);
}

@keyframes skeleton-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes skeleton-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* ========================= */
/* Custom Button Group Styles */
/* ========================= */

/* Serial Product Type Buttons */
#serialProductTypeGroup .btn {
    padding: 0.75rem 1rem;
    text-align: center;
    border: 2px solid var(--border);
    transition: all 0.3s ease;
    font-weight: 600;
    flex: 1;
}

#serialProductTypeGroup .btn:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.2);
}

/* Serial Product Type Multi-Select Styling */
#serialProductTypeGroup .btn-check:checked + .btn {
    background-color: var(--success);
    border-color: var(--success);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
}

#serialProductTypeGroup .btn {
    position: relative;
}

#serialProductTypeGroup .btn::after {
    content: "";
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--border);
    border-radius: 3px;
    background: white;
    transition: all 0.3s ease;
}

#serialProductTypeGroup .btn-check:checked + .btn::after {
    background: var(--success);
    border-color: var(--success);
    content: "✓";
    color: white;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Code Model Styles */
/* ================= */

.min-height-60 {
    min-height: 60px;
}

#addCodeModelBtn {
    border: 2px dashed var(--primary);
    transition: all 0.3s ease;
    font-weight: 600;
}

#addCodeModelBtn:hover {
    border-style: solid;
    background-color: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

#addCodeModelBtn.btn-outline-danger {
    border-color: var(--danger);
    color: var(--danger);
    animation: pulse-danger 2s infinite;
}

#addCodeModelBtn.btn-outline-danger:hover {
    background-color: var(--danger);
    border-color: var(--danger);
    color: white;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

#addCodeModelBtn.btn-outline-success {
    border-color: var(--success);
    color: var(--success);
}

#addCodeModelBtn.btn-outline-success:hover {
    background-color: var(--success);
    border-color: var(--success);
    color: white;
    box-shadow: 0 4px 12px rgba(25, 135, 84, 0.3);
}

@keyframes pulse-danger {
    0% { border-color: var(--danger); }
    50% { border-color: rgba(220, 53, 69, 0.5); }
    100% { border-color: var(--danger); }
}

#codeModelsDisplay .card {
    border-color: var(--success);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#codeModelsDisplay .card-header {
    background: linear-gradient(135deg, #e8f5e8, #f8f9fa);
    border-bottom: 2px solid var(--success);
}

#codeModelModal .modal-header {
    background: linear-gradient(135deg, var(--primary), #0056b3);
}

#codeModelsContainer .bg-white {
    border: 1px solid #e9ecef !important;
    transition: all 0.2s ease;
}

#codeModelsContainer .bg-white:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#codeModelInput {
    border: 2px solid var(--border);
    transition: border-color 0.3s ease;
}

#codeModelInput:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

#addCodeModelItemBtn {
    border: none;
    background: linear-gradient(135deg, var(--success), #198754);
    transition: all 0.3s ease;
}

#addCodeModelItemBtn:hover {
    background: linear-gradient(135deg, #198754, #157347);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(25, 135, 84, 0.3);
}

/* Vehicle Type Buttons */
#vehicleTypeGroup .btn {
    padding: 1rem;
    text-align: center;
    border: 2px solid var(--border);
    transition: all 0.3s ease;
    font-weight: 600;
}

#vehicleTypeGroup .btn:hover {
    border-color: #28a745;
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2);
}

#vehicleTypeGroup .btn-check:checked + .btn {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
}

/* Preferred Time Buttons */
#preferredTimeGroup .btn {
    padding: 0.75rem 0.5rem;
    text-align: center;
    border: 2px solid var(--border);
    transition: all 0.3s ease;
    font-weight: 500;
    line-height: 1.2;
}

#preferredTimeGroup .btn:hover {
    border-color: #ffc107;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.2);
}

#preferredTimeGroup .btn-check:checked + .btn {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529;
    transform: scale(1.07);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.3);
}

#preferredTimeGroup .btn small {
    display: block;
    font-size: 0.7rem;
    margin-top: 0.2rem;
    opacity: 0.8;
}

/* Validation border for button groups */
.border-danger {
    border-color: #dc3545 !important;
    border-width: 2px !important;
    border-style: solid !important;
    padding: 0.5rem;
    background-color: rgba(220, 53, 69, 0.05);
}

/* Animation for button group validation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.border-danger {
    animation: shake 0.5s ease-in-out;
}

/* Better spacing for form groups */
.form-label {
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: block;
}

/* ========================= */
/* User Management Table Styles */
/* ========================= */

.user-avatar {
    font-size: 1.5rem;
}

.user-name {
    font-weight: 600;
    color: var(--text-primary);
}

.user-email {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.user-mobile {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.role-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
}

/* Enhanced table styling */
.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background-color: var(--bg-secondary);
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Action buttons styling */
.btn-group .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    margin-right: 0.25rem;
}

.btn-group .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

.btn-outline-danger:hover {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

/* Table responsive improvements */
.table-container {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    background: var(--card-bg);
}

.table {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.table th {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    font-weight: 600;
    border-bottom: 2px solid var(--border);
    padding: 1rem 0.75rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    padding: 0.875rem 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
}

/* Empty state styling */
.table tbody tr td[colspan] {
    padding: 3rem 1rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Modal improvements */
.modal-content {
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background-color: var(--bg-tertiary);
    border-bottom: 1px solid var(--border);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* Enhanced urgency level buttons */
#urgencyLevelGroup .btn {
    padding: 0.75rem 0.5rem;
    text-align: center;
    border: 2px solid var(--border);
    transition: all 0.3s ease;
    font-weight: 500;
    line-height: 1.2;
}

#urgencyLevelGroup .btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

#urgencyLevelGroup .btn-check:checked + .btn-outline-info {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: white;
    transform: scale(1.07);
    box-shadow: 0 6px 20px rgba(23, 162, 184, 0.3);
}

#urgencyLevelGroup .btn-check:checked + .btn-outline-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529;
    transform: scale(1.07);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.3);
}

#urgencyLevelGroup .btn-check:checked + .btn-outline-danger {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
    transform: scale(1.07);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.3);
}

/* Service provider buttons */
#serviceProviderGroup .btn {
    padding: 0.75rem 0.5rem;
    text-align: center;
    border: 2px solid var(--border);
    transition: all 0.3s ease;
    font-weight: 500;
    line-height: 1.2;
}

#serviceProviderGroup .btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

#serviceProviderGroup .btn-check:checked + .btn-outline-success {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
    transform: scale(1.07);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
}

#serviceProviderGroup .btn-check:checked + .btn-outline-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: scale(1.07);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.3);
}

/* Enhanced form inputs */
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.15);
    transform: translateY(-1px);
}

.form-control.is-invalid, .form-select.is-invalid {
    border-color: #dc3545;
    animation: shake 0.5s ease-in-out;
}

.form-control[placeholder*="مثال"], .form-control[placeholder*="۰"] {
    font-family: 'Vazir', sans-serif;
}

/* Small text styling */
.form-text, small.text-muted {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    display: block;
    visibility: hidden;
}

/* Responsive adjustments for buttons */
@media (max-width: 768px) {
    #serialProductTypeGroup {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    #vehicleTypeGroup {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    #urgencyLevelGroup {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    #serviceProviderGroup {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    #serialProductTypeGroup .btn,
    #vehicleTypeGroup .btn,
    #urgencyLevelGroup .btn,
    #serviceProviderGroup .btn {
        padding: 0.75rem;
        text-align: center;
    }
    
    /* Table responsive */
    .table-container {
        overflow-x: auto;
    }
    
    .btn-group {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .btn-group .btn {
        margin-right: 0;
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
    
    .user-avatar {
        display: none;
    }
    
    .table th, .table td {
        padding: 0.5rem 0.25rem;
        font-size: 0.8rem;
    }
}

/* Modern Form UI Improvements */
.section-label {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

.section-container {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    border: 2px solid var(--border);
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.section-container:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

/* Product Type Cards */
.btn-group-modern {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-start;
    flex-wrap: wrap;
}

/* Date Picker Styles */
.date-picker-container {
    position: relative;
    display: flex;
    align-items: center;
}

.date-picker-container .input-group-append {
    margin-left: 10px;
}

.input-group-text {
    background-color: var(--primary);
    color: white;
    border: 1px solid var(--primary);
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius);
}

/* Persian Date Modal */
.persian-date-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

.persian-date-modal .modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
}

.persian-date-modal .modal-content {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 95%;
    position: relative;
    z-index: 1051;
    animation: slideUp 0.3s ease-out;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.persian-date-modal .modal-header {
    padding: 1.25rem 1.5rem 1rem 1.5rem;
    border-bottom: 2px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.persian-date-modal .modal-header h5 {
    margin: 0;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.persian-date-modal .modal-header h5:before {
    content: "📅";
    font-size: 1.5rem;
}

.persian-date-modal .close-modal {
    background: none;
    border: none;
    font-size: 1.75rem;
    cursor: pointer;
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.persian-date-modal .close-modal:hover {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    transform: scale(1.1);
}

.persian-date-modal .modal-body {
    padding: 1.5rem;
}

/* Date Preview Section */
.persian-date-modal .date-preview {
    margin-top: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: var(--radius);
    border: 2px dashed var(--border);
    text-align: center;
}

.persian-date-modal .date-preview label {
    display: block;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.persian-date-modal .date-preview .preview-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    padding: 0.5rem;
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.persian-date-modal .date-preview .preview-text:not(:empty) {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.persian-date-modal .date-selector {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 1rem;
    align-items: start;
    margin-bottom: 1rem;
}

.persian-date-modal .date-selector > div {
    display: flex;
    flex-direction: column;
}

.persian-date-modal .date-selector label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
    color: var(--text-primary);
    font-size: 0.9rem;
    text-align: center;
}

.persian-date-modal .date-selector select {
    width: 100%;
    padding: 0.75rem 0.5rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(to bottom, #ffffff, #f8f9fa);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-align-last: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.persian-date-modal .date-selector select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1);
    background: white;
    transform: translateY(-1px);
}

.persian-date-modal .date-selector select:hover {
    border-color: var(--primary);
    background: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Month select gets more space due to longer text */
.persian-date-modal .date-selector select[id="monthSelect"] {
    font-size: 0.95rem;
}

/* Style for select options */
.persian-date-modal .date-selector select option {
    padding: 0.5rem;
    background: white;
    color: var(--text-primary);
    font-weight: 500;
}

.persian-date-modal .date-selector select option:hover {
    background-color: var(--primary);
    color: white;
}

/* Responsive date selector */
@media (max-width: 480px) {
    .persian-date-modal .date-selector {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .persian-date-modal .date-selector label {
        text-align: right;
        margin-bottom: 0.25rem;
    }
    
    .persian-date-modal .date-selector select {
        padding: 1rem 0.75rem;
        font-size: 1.1rem;
    }
}

.persian-date-modal .modal-footer {
    padding: 1rem 1.5rem 1.25rem 1.5rem;
    border-top: 2px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    background: #f8f9fa;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.persian-date-modal .modal-footer .btn {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--radius);
    transition: all 0.3s ease;
    border: 2px solid;
    min-width: 100px;
}

.persian-date-modal .modal-footer .btn-secondary {
    background-color: white;
    border-color: var(--border);
    color: var(--text-secondary);
}

.persian-date-modal .modal-footer .btn-secondary:hover {
    background-color: #f8f9fa;
    border-color: var(--text-secondary);
    transform: translateY(-2px);
}

.persian-date-modal .modal-footer .btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

.persian-date-modal .modal-footer .btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* Priority Scheduled Card */
.priority-scheduled {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
}

.priority-scheduled:hover {
    background: linear-gradient(135deg, #138496, #117a8b);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
}

/* Time Picker Styles */
.time-picker-container {
    display: flex;
    justify-content: center;
}

.time-selection {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 200px;
}

.time-selection select {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: white;
    font-size: 1rem;
}

.time-separator {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--text-secondary);
    margin: 0 0.25rem;
}

/* Responsive time picker */
@media (max-width: 768px) {
    .time-selection {
        max-width: 100%;
    }
    
    .time-selection select {
        padding: 0.75rem;
        font-size: 1.1rem;
    }
}

/* Filter Controls Styling */
.filters-container {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: var(--radius);
    padding: 1rem;
    border: 1px solid var(--border);
    margin-bottom: 0.5rem;
}

.form-label-sm {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    display: block;
}

.form-select-sm {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: white;
    transition: all 0.3s ease;
}

.form-select-sm:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
    outline: none;
}

.form-select-sm:hover {
    border-color: var(--primary);
}

/* Filter Results Styling */
#filterResults {
    font-size: 0.875rem;
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius);
    background: rgba(0, 123, 255, 0.1);
    transition: all 0.3s ease;
}

#filterResults.text-primary {
    background: rgba(0, 123, 255, 0.15);
    border: 1px solid rgba(0, 123, 255, 0.2);
}

/* Filter Clear Button */
.btn-outline-secondary {
    border-color: var(--border);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.btn-outline-secondary:hover {
    background-color: var(--text-secondary);
    border-color: var(--text-secondary);
    color: white;
}

/* No Results Styling */
.text-center.py-4 {
    padding: 2rem 1rem !important;
}

.text-center.py-4 .fa-search {
    opacity: 0.5;
}

/* Responsive Filters */
@media (max-width: 768px) {
    .filters-container {
        padding: 0.75rem;
    }
    
    .filters-container .row.g-2 {
        gap: 0.5rem !important;
    }
    
    .form-select-sm {
        padding: 0.5rem 0.75rem;
        font-size: 1rem;
    }
    
    .form-label-sm {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
}

/* Service Category Selection Styling */
.service-category-selection {
    margin-bottom: 1rem;
}

.service-category-btn {
    padding: 1.25rem 1rem;
    text-align: center;
    border: 2px solid var(--border);
    transition: all 0.3s ease;
    font-weight: 500;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
}

.service-category-btn:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.2);
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
}

.service-category-btn i {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.service-category-btn .fw-bold {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.service-category-btn small {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* When radio button is checked */
.btn-check:checked + .service-category-btn {
    background: linear-gradient(135deg, var(--primary), #0056b3);
    border-color: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.3);
}

.btn-check:checked + .service-category-btn i {
    color: white !important;
}

.btn-check:checked + .service-category-btn small {
    color: rgba(255, 255, 255, 0.9);
}

/* Service Subtype Selection */
.service-subtype-selection {
    transition: all 0.3s ease;
    opacity: 1;
}

.service-subtype-selection select {
    border: 2px solid var(--border);
    padding: 0.75rem;
    border-radius: var(--radius);
    background: white;
    transition: all 0.3s ease;
}

.service-subtype-selection select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    outline: none;
}

.service-subtype-selection select:hover {
    border-color: var(--primary);
}

/* Responsive Service Category */
@media (max-width: 768px) {
    .service-category-btn {
        min-height: 90px;
        padding: 1rem 0.75rem;
    }
    
    .service-category-btn i {
        font-size: 1.25rem;
    }
    
    .service-category-btn .fw-bold {
        font-size: 1rem;
    }
}

.btn-product {
    flex: 1 1 150px;
    min-width: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.25rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-primary);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 90px;
    justify-content: center;
}

.btn-product i {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: var(--text-tertiary);
}

.btn-product span {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.btn-product:hover {
    border-color: var(--primary);
    background: #f8f9ff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-check:checked + .btn-product {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-check:checked + .btn-product i,
.btn-check:checked + .btn-product span {
    color: white;
}

/* Vehicle Cards */
.vehicle-cards {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.vehicle-card {
    flex: 1;
    min-width: 150px;
    display: flex;
    align-items: center;
    padding: 1.25rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-primary);
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.vehicle-icon {
    font-size: 2.25rem;
    margin-left: 1rem;
    color: var(--success);
}

.vehicle-info {
    display: flex;
    flex-direction: column;
}

.vehicle-name {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.vehicle-desc {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}

.vehicle-card:hover {
    border-color: var(--success);
    background: #f0fff4;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-check:checked + .vehicle-card {
    border-color: var(--success);
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-check:checked + .vehicle-card .vehicle-icon,
.btn-check:checked + .vehicle-card .vehicle-name,
.btn-check:checked + .vehicle-card .vehicle-desc {
    color: white;
}

/* Priority Cards */
.priority-cards {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.priority-card {
    flex: 1;
    min-width: 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.25rem 0.75rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-primary);
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 100px;
    justify-content: center;
}

.priority-card i {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.priority-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.priority-desc {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
}

.priority-normal i {
    color: var(--info);
}

.priority-normal:hover {
    border-color: var(--info);
    background: #f0fdff;
}

.btn-check:checked + .priority-normal {
    border-color: var(--info);
    background: linear-gradient(135deg, var(--info) 0%, #0891b2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.priority-fast i {
    color: var(--warning);
}

.priority-fast:hover {
    border-color: var(--warning);
    background: #fffbeb;
}

.btn-check:checked + .priority-fast {
    border-color: var(--warning);
    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.priority-urgent i {
    color: var(--danger);
}

.priority-urgent:hover {
    border-color: var(--danger);
    background: #fef2f2;
}

.btn-check:checked + .priority-urgent {
    border-color: var(--danger);
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-check:checked + .priority-card .priority-desc {
    color: rgba(255,255,255,0.9);
}

/* Provider Cards */
.provider-cards {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.provider-card {
    flex: 1;
    min-width: 160px;
    display: flex;
    align-items: center;
    padding: 1.25rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-primary);
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.provider-icon {
    font-size: 2rem;
    margin-left: 1rem;
}

.provider-info {
    display: flex;
    flex-direction: column;
}

.provider-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.provider-desc {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}

.provider-internal .provider-icon {
    color: var(--success);
}

.provider-internal:hover {
    border-color: var(--success);
    background: #f0fff4;
}

.btn-check:checked + .provider-internal {
    border-color: var(--success);
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.provider-external .provider-icon {
    color: var(--primary);
}

.provider-external:hover {
    border-color: var(--primary);
    background: #f8f9ff;
}

.btn-check:checked + .provider-external {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-check:checked + .provider-card .provider-icon,
.btn-check:checked + .provider-card .provider-title,
.btn-check:checked + .provider-card .provider-desc {
    color: white;
}

/* Enhanced Input Groups */
.input-group .input-group-text {
    background: var(--bg-tertiary);
    border: 2px solid var(--border);
    border-right: none;
    color: var(--text-secondary);
    font-weight: 500;
}

.input-group .form-control {
    border-left: none;
}

.input-group .form-control:focus + .input-group-text {
    border-color: var(--primary);
    background: #f8f9ff;
    color: var(--primary);
}

/* Location select improvements */
.form-select {
    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='m1 6 7 7 7-7'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 0.75rem center;
    background-size: 16px 12px;
    padding-left: 2.25rem;
}

/* Info text styling */
.text-muted {
    color: var(--text-secondary) !important;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.text-muted i {
    color: var(--info);
    margin-left: 0.25rem;
}

/* Enhanced Textarea */
.enhanced-textarea {
    resize: vertical;
    min-height: 100px;
    transition: all 0.3s ease;
}

.enhanced-textarea:focus {
    min-height: 120px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

/* Submit Button Improvements */
.btn-modern {
    position: relative;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-xl);
    border: none;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
    overflow: hidden;
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}

.btn-modern:active {
    transform: translateY(0);
}

.btn-modern i {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.btn-modern:hover i {
    transform: translateX(-2px);
}

/* Responsive improvements */
@media (max-width: 768px) {
    .btn-group-modern {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-product {
        min-width: auto;
        flex: 1;
    }
    
    .vehicle-cards,
    .provider-cards {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .vehicle-card,
    .provider-card {
        min-width: 100%;
    }
    
    .priority-cards {
        gap: 0.5rem;
    }
    
    .priority-card {
        min-width: 90px;
        padding: 1rem 0.5rem;
    }
    
    .section-container {
        padding: 1rem;
    }
    
    .vehicle-icon,
    .provider-icon {
        font-size: 1.75rem;
    }
    
    .vehicle-name,
    .provider-title {
        font-size: 0.95rem;
    }
    
    .vehicle-desc,
    .provider-desc {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .priority-cards {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .priority-card {
        min-width: 100%;
        flex-direction: row;
        justify-content: flex-start;
        text-align: right;
        min-height: auto;
        padding: 1rem;
    }
    
    .priority-card i {
        margin-bottom: 0;
        margin-left: 1rem;
        font-size: 1.5rem;
    }
    
    .btn-product {
        min-height: 80px;
        padding: 1rem 0.75rem;
    }
    
    .btn-product i {
        font-size: 1.5rem;
    }
}

/* Enhanced Assignment Modal Styles */
.provider-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.service-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    border: 1px solid var(--border);
    margin-bottom: var(--space-md);
}

.section-title {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.section-title i {
    color: var(--primary);
}

/* Third Party Provider Cards */
.third-party-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.third-party-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-lg);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    position: relative;
    min-height: 120px;
    justify-content: center;
}

.third-party-card:hover {
    border-color: var(--primary);
    background: var(--bg-secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.third-party-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bg-tertiary), var(--border));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-sm);
    transition: all 0.2s ease;
}

.third-party-icon i {
    font-size: 1.2rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.third-party-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
    font-size: 0.9rem;
}

.third-party-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Third Party Card Active States */
.btn-check:checked + .third-party-card {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-check:checked + .third-party-card .third-party-icon {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.btn-check:checked + .third-party-card .third-party-icon i {
    color: white;
}

.btn-check:checked + .third-party-card .third-party-name {
    color: white;
}

.btn-check:checked + .third-party-card .third-party-desc {
    color: rgba(255, 255, 255, 0.8);
}

/* Provider Card Specific Icons */
.third-party-card[for="providerSnapp"] .third-party-icon {
    background: linear-gradient(135deg, #00d4aa, #00a08b);
}

.third-party-card[for="providerPost"] .third-party-icon {
    background: linear-gradient(135deg, #ff6b35, #f7941d);
}

.third-party-card[for="providerTaxi"] .third-party-icon {
    background: linear-gradient(135deg, #ffba00, #ff8800);
}

.third-party-card[for="providerBarbari"] .third-party-icon {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.third-party-card[for="providerSnapp"] .third-party-icon i,
.third-party-card[for="providerPost"] .third-party-icon i,
.third-party-card[for="providerTaxi"] .third-party-icon i,
.third-party-card[for="providerBarbari"] .third-party-icon i {
    color: white;
}

/* Assignment Modal Provider Selection Enhancement */
#assignDriverModal .provider-card {
    display: flex;
    align-items: center;
    padding: var(--space-lg);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    gap: var(--space-md);
}

#assignDriverModal .provider-card:hover {
    border-color: var(--primary);
    background: var(--bg-secondary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

#assignDriverModal .provider-card .provider-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.2s ease;
}

#assignDriverModal .provider-card .provider-info {
    flex: 1;
}

#assignDriverModal .provider-card .provider-title {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

#assignDriverModal .provider-card .provider-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Assignment Modal Provider Card Active States */
#assignDriverModal .btn-check:checked + .provider-card {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

#assignDriverModal .btn-check:checked + .provider-card .provider-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

#assignDriverModal .btn-check:checked + .provider-card .provider-title {
    color: white;
}

#assignDriverModal .btn-check:checked + .provider-card .provider-desc {
    color: rgba(255, 255, 255, 0.8);
}

/* Assignment Modal Responsive Design */
@media (max-width: 768px) {
    .provider-selection {
        grid-template-columns: 1fr;
    }
    
    .third-party-options {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-sm);
    }
    
    .third-party-card {
        min-height: 100px;
        padding: var(--space-md);
    }
    
    .third-party-icon {
        width: 35px;
        height: 35px;
    }
    
    .third-party-icon i {
        font-size: 1rem;
    }
    
    .service-section {
        padding: var(--space-md);
    }
    
    #assignDriverModal .provider-card {
        flex-direction: column;
        text-align: center;
        padding: var(--space-md);
    }
    
    #assignDriverModal .provider-card .provider-icon {
        margin-bottom: var(--space-sm);
    }
}

@media (max-width: 576px) {
    .third-party-options {
        grid-template-columns: 1fr;
    }
}

/* Location Selector Styles */
.location-selector {
    padding: 0.875rem 1rem;
    text-align: right;
    background: var(--bg-primary);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.location-selector:hover {
    border-color: var(--primary);
    background: #f8f9ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.location-selector.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, #f8f9ff 0%, #f1f5f9 100%);
    color: var(--primary);
}

.location-selector.selected i {
    color: var(--primary);
}

.location-selector.is-invalid {
    border-color: var(--danger);
    background: #fff5f5;
    animation: shake 0.5s ease-in-out;
}

.location-selector.is-invalid:hover {
    border-color: var(--danger);
    background: #fff0f0;
}

/* Location Cards Container */
.location-cards-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
    max-height: 500px;
    overflow-y: auto;
    padding: 0.4rem;
    border-radius: 8px;
    background: #f8faff;
}

.location-cards-container::-webkit-scrollbar {
    width: 6px;
}

.location-cards-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.location-cards-container::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.3);
    border-radius: 3px;
}

.location-cards-container::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.5);
}

/* Location Card Styles */
.location-card {
    display: block;
    align-items: flex-start;
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    animation: locationCardFadeIn 0.5s ease-out forwards;
    animation-delay: 0s;
    opacity: 0;
    transform: translateY(20px);
    min-height: 80px;
}

@keyframes locationCardFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.location-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.08), transparent);
    transition: all 0.8s ease;
}

.location-card:hover::before {
    right: 100%;
}

.location-card:hover {
    border-color: var(--primary);
    background: #f8faff;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(59, 130, 246, 0.12);
}

.location-card:active {
    transform: translateY(0);
    transition: all 0.1s ease;
}

.location-card.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
    color: white;
    box-shadow: 0 3px 12px rgba(59, 130, 246, 0.3);
}

.location-icon {
    font-size: 0.95rem;
    color: var(--primary);
    margin-left: 0.5rem;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 6px;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.location-card:hover .location-icon {
    background: rgba(59, 130, 246, 0.15);
    transform: scale(1.05);
}

.location-card.selected .location-icon {
    color: white;
    background: rgba(255, 255, 255, 0.2);
}

/* Handle cards without icons */
.location-card:not(:has(.location-icon)) .location-info {
    margin-left: 0;
}

.location-card:has(.location-icon) .location-info {
    margin-left: 0;
}

.location-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-height: 0;
}

.location-name {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.03rem;
    color: inherit;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.location-address {
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 400;
    line-height: 1.25;
    margin-bottom: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.location-card.selected .location-address {
    color: rgba(255, 255, 255, 0.85);
}

.location-contact {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.location-contact i {
    font-size: 0.75rem;
    opacity: 0.8;
}

.location-card.selected .location-contact {
    color: rgba(255, 255, 255, 0.75);
}

.location-meta {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.05rem;
}

.location-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.08rem;
    padding: 0.08rem 0.3rem;
    background: rgba(59, 130, 246, 0.08);
    color: var(--primary);
    border-radius: 8px;
    font-size: 0.58rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1px;
    white-space: nowrap;
}

.location-card.selected .location-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.location-contact-compact {
    color: var(--text-secondary);
    font-size: 0.58rem;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 0.18rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 95px;
}

.location-contact-compact i {
    font-size: 0.55rem;
    opacity: 0.8;
    flex-shrink: 0;
}

.location-card.selected .location-contact-compact {
    color: rgba(255, 255, 255, 0.8);
}

.location-type-office .location-badge {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.location-type-warehouse .location-badge {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.location-type-store .location-badge {
    background: rgba(139, 92, 246, 0.1);
    color: #7c3aed;
}

.location-type-residential .location-badge {
    background: rgba(236, 72, 153, 0.1);
    color: #be185d;
}

.location-contacts {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.75rem;
}

.location-contact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    background: rgba(59, 130, 246, 0.08);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
}

.location-card.selected .location-contact {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.85);
}

.location-contact i {
    font-size: 0.75rem;
    opacity: 0.8;
    width: 14px;
    text-align: center;
}

.location-instructions {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.6rem 0.9rem;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 8px;
    border-left: 3px solid #f59e0b;
}

.location-card.selected .location-instructions {
    background: rgba(255, 255, 255, 0.15);
    border-left-color: rgba(255, 255, 255, 0.4);
}

.location-instructions i {
    color: #f59e0b;
    font-size: 0.8rem;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.location-card.selected .location-instructions i {
    color: rgba(255, 255, 255, 0.8);
}

.location-instructions span {
    color: #92400e;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.4;
}

.location-card.selected .location-instructions span {
    color: rgba(255, 255, 255, 0.85);
}

/* Search Input in Modal */
#locationSearch {
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    font-weight: 500;
}

#locationSearch:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1);
    background: #fefefe;
    outline: none;
}

#locationSearch::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Empty State */
.location-empty {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
    background: white;
    border-radius: 16px;
    border: 2px dashed var(--border);
    margin: 1rem;
}

.location-empty i {
    font-size: 3.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    opacity: 0.6;
}

.location-empty h6 {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.location-empty p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0;
    opacity: 0.8;
}

/* Loading State */
.location-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem 2rem;
    background: white;
    border-radius: 16px;
    margin: 1rem;
}

.location-loading .spinner-border {
    color: var(--primary);
    width: 2.5rem;
    height: 2.5rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .location-cards-container {
        grid-template-columns: 1fr;
        max-height: 420px;
        padding: 0.4rem;
        gap: 0.4rem;
    }
    
    .location-card {
        padding: 0.5rem 0.65rem;
        margin-bottom: 0;
        min-height: 78px;
    }
    
    .location-icon {
        font-size: 0.9rem;
        width: 26px;
        height: 26px;
        margin-left: 0.45rem;
    }
    
    .location-name {
        font-size: 0.8rem;
        margin-bottom: 0.03rem;
    }
    
    .location-address {
        font-size: 0.68rem;
        margin-bottom: 0.15rem;
    }
    
    .location-badge {
        font-size: 0.55rem;
        padding: 0.07rem 0.28rem;
    }
    
    .location-contact-compact {
        font-size: 0.55rem;
        max-width: 85px;
    }
    
    .location-meta {
        gap: 0.28rem;
        margin-top: 0.05rem;
    }
    
    .location-info {
        gap: 0.14rem;
    }
    
    #locationSearch {
        padding: 0.65rem 0.9rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .location-cards-container {
        max-height: 370px;
        padding: 0.35rem;
        gap: 0.35rem;
    }
    
    .location-card {
        padding: 0.45rem 0.6rem;
        min-height: 75px;
    }
    
    .location-icon {
        width: 24px;
        height: 24px;
        font-size: 0.85rem;
        margin-left: 0.4rem;
    }
    
    .location-name {
        font-size: 0.75rem;
        margin-bottom: 0.02rem;
    }
    
    .location-address {
        font-size: 0.65rem;
        margin-bottom: 0.12rem;
    }
    
    .location-contact-compact {
        max-width: 75px;
        font-size: 0.5rem;
    }
    
    .location-badge {
        font-size: 0.5rem;
        padding: 0.05rem 0.25rem;
    }
    
    .location-meta {
        gap: 0.25rem;
        margin-top: 0.05rem;
    }
    
    .location-info {
        gap: 0.12rem;
    }
    
    #locationSearch {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
    }
}

/* Persian Date Formatting Styles */
.persian-date {
    font-family: 'Noto Sans Arabic', 'Vazir', 'IRANSans', sans-serif;
    direction: ltr;
    unicode-bidi: embed;
}

.persian-time {
    font-family: 'Noto Sans Arabic', 'Vazir', 'IRANSans', sans-serif;
    direction: ltr;
    unicode-bidi: embed;
}

/* Ensure date badges are properly styled */
.date-badge {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    background-color: var(--light-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

/* Style for datetime-local inputs with Persian labels */
.persian-datetime-wrapper {
    position: relative;
}

.persian-datetime-wrapper .form-label {
    font-family: 'Noto Sans Arabic', 'Vazir', 'IRANSans', sans-serif;
}

/* Enhance date display in cards and tables */
.text-muted .persian-date,
.text-muted .persian-time {
    opacity: 0.8;
}

/* Responsive Persian date display */
@media (max-width: 768px) {
    .persian-date {
        font-size: 0.9rem;
    }
    
    .persian-time {
        font-size: 0.85rem;
    }
}

/* Additional notes column styling */
.table td:nth-child(6) {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table td:nth-child(6) span {
    cursor: help;
}

.table td:nth-child(6) span:hover {
    text-decoration: underline;
}

/* Cancel Request Modal Styling */
#cancelRequestModal .form-select {
    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='m1 6 7 7 7-7'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 0.75rem center;
    background-size: 16px 12px;
    padding-left: 2.5rem;
}

#cancelRequestModal .form-group {
    margin-bottom: 1.5rem;
}

#cancelRequestModal .form-group:last-child {
    margin-bottom: 0;
}

#cancelRequestModal .form-select option {
    padding: 0.5rem;
    font-size: 0.875rem;
}

#cancelRequestModal .alert {
    margin-bottom: 1.5rem;
}

#cancelRequestModal .form-text {
    margin-top: 0.5rem;
    color: #6c757d;
    font-size: 0.825rem;
}
/* ===============================================
   REQUESTS LIST SCROLLING IMPROVEMENTS 
   =============================================== */

/* Container for requests list with scrolling */
#requestsList {
    max-height: 600px;
    overflow-y: auto;
    padding-right: 8px;
    margin-right: -8px;
}

/* Custom scrollbar styling */
#requestsList::-webkit-scrollbar {
    width: 8px;
}

#requestsList::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

#requestsList::-webkit-scrollbar-thumb {
    background: rgba(13, 110, 253, 0.3);
    border-radius: 4px;
    transition: background 0.3s ease;
}

#requestsList::-webkit-scrollbar-thumb:hover {
    background: rgba(13, 110, 253, 0.6);
}

/* Firefox scrollbar */
#requestsList {
    scrollbar-width: thin;
    scrollbar-color: rgba(13, 110, 253, 0.3) rgba(0, 0, 0, 0.1);
}

/* Enhanced Checker Portal Styles */
.checker-portal {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    min-height: 100vh;
}

/* Enhanced request card spacing for better scrolling */
.request-card {
    margin-bottom: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.request-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--warning), var(--info));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.request-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
    border-color: var(--primary);
}

.request-card:hover::before {
    transform: scaleX(1);
}

.request-card.selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: linear-gradient(135deg, #fefefe 0%, #f8faff 100%);
}

.request-card.selected::before {
    transform: scaleX(1);
    background: var(--primary);
}

/* Smooth scroll behavior */
#requestsList {
    scroll-behavior: smooth;
}

/* Checker Portal Card Enhancements */
.checker-card {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    background: var(--bg-primary);
}

.checker-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.checker-card .card-header {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
    border-bottom: 1px solid var(--border-light);
    padding: 1rem 1.25rem;
}

.checker-card .card-body {
    padding: 1.25rem;
}

/* Product Type Badges */
.product-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 500;
    margin: 0.125rem;
    transition: all 0.2s ease;
}

.product-type-badge:hover {
    transform: scale(1.05);
}

/* Service Type Icons */
.service-type-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    margin-right: 0.75rem;
}

/* Status Badges with Better Colors */
.status-badge-pending {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
}

.status-badge-approved {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.status-badge-rejected {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.status-badge-checklist {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
}

/* Database Record Rows */
.database-record-row {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    padding: 1rem;
    transition: all 0.2s ease;
    background: var(--bg-primary);
}

.database-record-row:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
    transform: translateX(2px);
}

.database-record-row.bg-light {
    background: linear-gradient(135deg, #f8faff 0%, #f1f5f9 100%);
    border-color: var(--primary);
}

/* Record Checkbox Styling */
.record-checkbox {
    width: 1.125rem;
    height: 1.125rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.record-checkbox:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.record-checkbox:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Action Buttons */
.action-btn {
    border-radius: var(--radius-md);
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.action-btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.action-btn-success {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
}

.action-btn-warning {
    background: linear-gradient(135deg, var(--warning), #d97706);
    color: white;
}

.action-btn-danger {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: white;
}

/* Model Code Badge */
.model-code-badge {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

/* Request Info Grid */
.request-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.request-info-item {
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--primary);
}

.request-info-item .label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.request-info-item .value {
    font-weight: 600;
    color: var(--text-primary);
}

/* Loading States */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .request-card {
        margin-bottom: 0.5rem;
        padding: 0.75rem;
    }
    
    .database-record-row {
        padding: 0.75rem;
        margin-bottom: 0.375rem;
    }
    
    .request-info-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .action-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }
}

/* Loading state for requests list */
.requests-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    color: #6c757d;
}

.requests-loading i {
    margin-right: 0.5rem;
    animation: spin 1s linear infinite;
}

/* Empty state styling */
.requests-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.requests-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #dee2e6;
}

/* Improved request status badges with better contrast */
.badge.status-pending {
    background: linear-gradient(135deg, #ffc107 0%, #ffb300 100%);
    color: #000;
    font-weight: 600;
}

.badge.status-assigned {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: #fff;
    font-weight: 600;
}

.badge.status-in_transit {
    background: linear-gradient(135deg, #6f42c1 0%, #5a359a 100%);
    color: #fff;
    font-weight: 600;
}

.badge.status-delivered {
    background: linear-gradient(135deg, #28a745 0%, #20963d 100%);
    color: #fff;
    font-weight: 600;
}

.badge.status-cancelled {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: #fff;
    font-weight: 600;
}

/* Scroll to top button for long lists */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #0d6efd;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.4);
    z-index: 1000;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: #0b5ed7;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(13, 110, 253, 0.6);
}

/* Request card improvements for better readability */
.request-card .card-body {
    padding: 1.25rem;
}

.request-card .text-sm {
    font-size: 0.875rem;
    line-height: 1.5;
}

.request-card .badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    #requestsList {
        max-height: 400px;
        padding-right: 4px;
        margin-right: -4px;
    }
    
    .scroll-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .request-card .card-body {
        padding: 1rem;
    }
}

/* Animation for new requests appearing */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.request-card.new-request {
    animation: slideInDown 0.5s ease-out;
}

/* Improved Persian text rendering */
.request-card {
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-align: right;
    direction: rtl;
}

/* =================================
   MOBILE DRIVER PORTAL STYLES
   ================================= */

/* Driver Portal Header */
.driver-portal-header {
    margin-bottom: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-lg);
    color: white;
    margin-bottom: 1.5rem;
}

.driver-portal-header h2 {
    color: white;
    margin-bottom: 0.5rem;
}

.driver-portal-header p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0;
}

/* Mobile Stats Bar */
.mobile-stats-bar {
    margin-bottom: 1.5rem;
    padding: 0 1rem;
}

.stat-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
}

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

/* Mobile Card Styles */
.mobile-card {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.mobile-card .card-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
}

/* Delivery Filters */
.delivery-filters {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem;
}

.delivery-filters .nav-pills .nav-link {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.delivery-filters .nav-pills .nav-link.active {
    background: var(--primary);
    color: white;
}

.delivery-filters .nav-pills .nav-link:hover:not(.active) {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.delivery-filters .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* Mobile Delivery Cards */
.deliveries-container {
    padding: 1rem;
}

.delivery-card-mobile {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.delivery-card-mobile:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    border-color: var(--primary);
}

.delivery-card-mobile:active {
    transform: translateY(0);
    box-shadow: var(--shadow-md);
}

/* Card Header */
.card-header-mobile {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
}

.delivery-info {
    flex: 1;
}

.delivery-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.customer-name {
    font-weight: 400;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.delivery-time {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Route Info */
.route-info-mobile {
    padding: 1rem;
    position: relative;
}

.location-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.location-item:last-child {
    margin-bottom: 0;
}

.location-icon {
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.location-icon.pickup {
    background: rgba(16, 185, 129, 0.1);
}

.location-icon.delivery {
    background: rgba(239, 68, 68, 0.1);
}

.location-details {
    flex: 1;
    min-width: 0;
}

.location-details strong {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.025em;
    margin-bottom: 0.25rem;
}

.location-text {
    font-size: 0.875rem;
    color: var(--text-primary);
    line-height: 1.4;
    word-break: break-word;
}

/* Route Line */
.route-line {
    position: absolute;
    left: 1.75rem;
    top: 3rem;
    bottom: 3rem;
    width: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.route-line .line {
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, 
        var(--success) 0%, 
        var(--primary) 50%, 
        var(--danger) 100%);
    border-radius: 1px;
    position: relative;
}

.route-truck {
    position: absolute;
    background: var(--bg-primary);
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 50%;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
}

/* Product Info */
.product-info-mobile {
    padding: 0 1rem;
    border-top: 1px solid var(--border-light);
    background: var(--bg-secondary);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.info-item i {
    width: 1rem;
    text-align: center;
    flex-shrink: 0;
}

/* Notes Section */
.notes-section-mobile {
    padding: 1rem;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-light);
    margin: 0;
}

.notes-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.notes-header i {
    color: var(--warning);
}

.notes-content {
    background: var(--bg-primary);
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--warning);
    font-size: 0.875rem;
    color: var(--text-primary);
    line-height: 1.4;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Action Buttons */
.action-buttons-mobile {
    padding: 1rem;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 0.75rem;
}

.action-buttons-mobile .btn {
    flex: 1;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 500;
}

/* Location Cards for Mobile */
.location-card-mobile {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.2s ease;
}

.location-card-mobile:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.location-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
}

.location-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    color: var(--text-primary);
}

.location-details {
    padding: 1rem;
}

.detail-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    line-height: 1.4;
}

.detail-item:last-child {
    margin-bottom: 0;
}

.detail-item i {
    width: 1rem;
    text-align: center;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.detail-item.special-instructions {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    margin-top: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .driver-portal-header {
        margin: -1rem -1rem 1.5rem -1rem;
        border-radius: 0;
    }
    
    .mobile-stats-bar {
        margin: -1rem -1rem 1.5rem -1rem;
        padding: 1rem;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border);
    }
    
    .stat-card {
        border: none;
        background: var(--bg-primary);
        box-shadow: var(--shadow-sm);
    }
    
    .deliveries-container {
        padding: 0.5rem;
    }
    
    .delivery-card-mobile {
        margin-bottom: 0.75rem;
    }
    
    .route-line {
        left: 1.5rem;
    }
}

/* Touch feedback for mobile */
@media (hover: none) {
    .delivery-card-mobile:active {
        background: var(--bg-tertiary);
        transform: scale(0.98);
    }
    
    .stat-card:active {
        transform: scale(0.98);
    }
    
    .location-card-mobile:active {
        background: var(--bg-tertiary);
        transform: scale(0.98);
    }
}

/* Print Styles for Driver Assignments */
.print-container {
    font-family: 'Noto Sans Arabic', Arial, sans-serif;
    color: #333;
    line-height: 1.6;
    direction: rtl;
    text-align: right;
}

.print-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    border-bottom: 3px solid #3b82f6;
}

.print-header h1 {
    font-size: 28px;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 10px;
}

.print-header .company-info {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 15px;
}

.print-header .generated-info {
    font-size: 12px;
    color: #9ca3af;
    font-style: italic;
}

.print-header .driver-info-small {
    font-size: 14px;
    color: #4b5563;
    margin: 5px 0;
}

.print-summary-small {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 15px 0;
    padding: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

.summary-item-small {
    text-align: center;
    padding: 8px 12px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    min-width: 80px;
}

.summary-item-small .number {
    font-size: 16px;
    font-weight: bold;
    color: #3b82f6;
    display: block;
}

.summary-item-small .label {
    font-size: 10px;
    color: #6b7280;
    margin-top: 2px;
    display: block;
}

.print-summary {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 25px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.summary-item {
    text-align: center;
    padding: 10px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.summary-item .number {
    font-size: 24px;
    font-weight: bold;
    color: #3b82f6;
    display: block;
}

.summary-item .label {
    font-size: 12px;
    color: #6b7280;
    margin-top: 5px;
}

.driver-section {
    page-break-inside: avoid;
    margin-bottom: 40px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.driver-header {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.driver-name {
    font-size: 22px;
    font-weight: bold;
}

.driver-phone {
    font-size: 14px;
    opacity: 0.9;
}

.requests-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.requests-table th {
    background: #f8fafc;
    color: #374151;
    font-weight: bold;
    padding: 12px 8px;
    border: 1px solid #e5e7eb;
    text-align: center;
}

.requests-table td {
    padding: 10px 8px;
    border: 1px solid #e5e7eb;
    vertical-align: top;
}

.requests-table tr:nth-child(even) {
    background: #fafbfc;
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: bold;
    text-align: center;
    min-width: 60px;
}

.status-pending { background: #fef3c7; color: #92400e; }
.status-assigned { background: #dbeafe; color: #1e40af; }
.status-in_transit { background: #fde68a; color: #d97706; }
.status-delivered { background: #d1fae5; color: #065f46; }
.status-cancelled { background: #fee2e2; color: #dc2626; }

.urgency-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 9px;
    font-weight: bold;
}

.urgency-jet_delivery { background: #fee2e2; color: #dc2626; }
.urgency-same_day { background: #fef3c7; color: #d97706; }
.urgency-next_day { background: #d1fae5; color: #065f46; }

.notes-cell {
    max-width: 200px;
    word-wrap: break-word;
    font-size: 10px;
    line-height: 1.4;
}

.no-assignments {
    text-align: center;
    padding: 40px;
    color: #6b7280;
    font-style: italic;
}

/* Print Media Queries - Simplified since we use new window approach */
@media print {
    .print-hide {
        display: none !important;
    }
    
    /* Print content styling */
    .print-container {
        font-size: 11px;
        padding: 0;
        margin: 0;
    }
    
    .print-header {
        margin-bottom: 15px;
        padding: 10px 0;
        border-bottom: 2px solid #333;
    }
    
    .print-header h1 {
        font-size: 20px;
        margin-bottom: 5px;
    }
    
    .driver-section {
        page-break-inside: avoid;
        margin-bottom: 15px;
        border: 1px solid #333;
    }
    
    .requests-table {
        font-size: 9px;
        width: 100%;
    }
    
    .requests-table th,
    .requests-table td {
        padding: 4px 2px;
        border: 1px solid #333;
        font-size: 9px;
    }
    
    .requests-table th {
        background: #f0f0f0 !important;
        font-weight: bold;
    }
    
    /* Summary cards for print */
    .print-summary-small {
        margin: 8px 0;
        padding: 5px;
        border: 1px solid #333;
    }
    
    .summary-item-small {
        padding: 4px 6px;
        border: 1px solid #333;
        min-width: 50px;
    }
    
    .summary-item-small .number {
        font-size: 12px;
        font-weight: bold;
    }
    
    .summary-item-small .label {
        font-size: 8px;
    }
    
    /* Notes cell styling */
    .notes-cell {
        max-width: 150px;
        font-size: 8px;
        word-wrap: break-word;
    }
    
    /* Badge styling for print */
    .urgency-badge,
    .status-badge {
        border: 1px solid #333;
        padding: 1px 3px;
        font-size: 8px;
    }
    
    /* Ensure proper Persian font rendering in print */
    * {
        font-family: 'Noto Sans Arabic', Arial, sans-serif !important;
        color: #000 !important;
    }
    
    /* Remove any background colors */
    * {
        background: none !important;
    }
    
    .requests-table th {
        background: #f0f0f0 !important;
    }
}

