/* =========================================================
   site.css - نظام ورش الصيانة - ملف موحد
   ========================================================= */

/* ---------- 1) المتغيرات الأساسية ---------- */
:root {
    /* الأبعاد */
    --sidebar-width: 280px;
    --header-height: 70px;
    --footer-height: 60px;
    --transition-speed: 0.3s;
    /* الألوان الرئيسية - من modern-layout */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --brand-hero: #667eea;
    --brand-hero-secondary: #764ba2;
    --brand-hero-rgb: 102, 126, 234;
    /* الظلال والحواف */
    --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-strong: 0 8px 24px rgba(0, 0, 0, 0.16);
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* أسطح التطبيق */
    --app-bg: #f5f7fa;
    --app-surface: #ffffff;
    --app-text: #212529;
    --app-muted: #6c757d;
    --app-border: #dee2e6;
    --app-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* ---------- 2) الوضع الداكن ---------- */
[data-theme="dark"] {
    --app-bg: #121212;
    --app-surface: #1e1e1e;
    --app-text: #e9ecef;
    --app-muted: #adb5bd;
    --app-border: #495057;
    --app-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.5);
    --brand-hero: #8b9aef;
}

/* ---------- 3) التنسيقات العامة ---------- */
* {
    box-sizing: border-box;
}

body {
    direction: rtl;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8eef5 100%);
    color: var(--app-text);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

    body.dark-mode {
        background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    }

/* ---------- 4) Textarea ---------- */
textarea {
    min-height: 120px !important;
    height: auto !important;
    resize: vertical !important;
    overflow-y: auto !important;
    line-height: 1.6;
    padding: 10px;
}

/* ---------- 5) Status Select ---------- */
.status-select {
    background-color: white !important;
    color: #000 !important;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 5px 10px;
}

    .status-select option {
        color: #000 !important;
        background-color: white !important;
    }

/* ---------- 6) Toggle Switch (iOS Style) ---------- */
.switch {
    position: relative;
    display: inline-block;
    width: 55px;
    height: 28px;
    cursor: pointer;
}

    .switch input {
        display: none;
    }

.slider {
    position: absolute;
    inset: 0;
    background-color: #ccc;
    border-radius: 34px;
    transition: .4s;
}

    .slider:before {
        position: absolute;
        content: "";
        height: 22px;
        width: 22px;
        left: 3px;
        bottom: 3px;
        background-color: white;
        border-radius: 50%;
        transition: .4s;
    }

.switch input:checked + .slider {
    background: var(--primary-gradient);
}

    .switch input:checked + .slider:before {
        transform: translateX(26px);
    }

.slider.round {
    border-radius: 34px;
}

    .slider.round:before {
        border-radius: 50%;
    }

/* ---------- 7) الهيدر ---------- */
header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: var(--shadow-soft) !important;
    z-index: 1030;
}

    header .btn-light {
        background: #f8f9fa;
        border: 1px solid #e9ecef;
        transition: var(--transition);
    }

        header .btn-light:hover {
            background: #e9ecef;
            transform: translateY(-1px);
            box-shadow: var(--shadow-soft);
        }

#darkModeToggle {
    background: var(--primary-gradient);
    border: none !important;
    color: white;
}

    #darkModeToggle:hover {
        transform: scale(1.05);
        box-shadow: var(--shadow-medium);
    }

/* ---------- 8) الـ Wrapper الرئيسي ---------- */
.main-wrapper {
    display: flex;
    flex: 1 0 auto;
      margin-top: var(--header-height);
        min-height: calc(100vh - var(--header-height));
        position: relative;
    }

footer {
    flex-shrink: 0;
    margin-top: auto !important;
    width: calc(100% - var(--sidebar-width));
}
    /* ---------- 9) الشريط الجانبي ---------- */
    .sidebar {
        width: var(--sidebar-width);
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(10px);
        border-left: 1px solid rgba(0, 0, 0, 0.05);
        box-shadow: -2px 0 20px rgba(0, 0, 0, 0.08) !important;
        height: calc(100vh - var(--header-height));
        position: fixed;
        top: var(--header-height);
        right: 0;
        overflow-y: auto;
        z-index: 1020;
        transition: transform var(--transition-speed) ease-in-out;
    }

        .sidebar::-webkit-scrollbar {
            width: 6px;
        }

        .sidebar::-webkit-scrollbar-track {
            background: transparent;
        }

        .sidebar::-webkit-scrollbar-thumb {
            background: #d0d7de;
            border-radius: 10px;
        }

            .sidebar::-webkit-scrollbar-thumb:hover {
                background: #b4bcc5;
            }
    /*تحسينات */
    /* تأثيرات الحركة */
    .animate__animated {
        animation-duration: 0.5s;
    }
    /* تخصيص Swal */
    .swal2-popup {
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        border-radius: 12px !important;
    }

    .swal2-title {
        color: #2c3e50;
        font-weight: 700;
    }
    /* تحسينات للعناصر النصية */
    .text-truncate {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    /* تأثيرات للبطاقات */
    .shadow-sm {
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }

    .shadow-lg {
        box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    }
    /* تحسينات للمجموعات */
    .btn-group {
        border-radius: 8px;
        overflow: hidden;
    }
    /* تحسينات لحقول الإدخال */
    .form-control:focus {
        border-color: #3498db;
        box-shadow: 0 0 0 0.25rem rgba(52, 152, 219, 0.25);
    }
    /* Admin Badge */
    .admin-sidebar::before {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        left: 0;
        height: 4px;
        background: var(--primary-gradient);
    }

    .sidebar .border-bottom {
        background: var(--primary-gradient);
        color: white !important;
        margin: 0;
        padding: 1rem 1.5rem !important;
        border: none !important;
        font-size: 0.9rem;
        letter-spacing: 0.5px;
    }
    /* Sidebar Menu Container */
    .sidebar-menu {
        padding: 0.5rem 0;
    }
    /* Sidebar Group Header (العناوين الرئيسية) */
    .sidebar-group {
        padding: 0.875rem 1rem;
        margin: 0.25rem 0.5rem;
        border-radius: 10px;
        transition: var(--transition);
        color: #4a5568;
        font-weight: 600;
        font-size: 0.95rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        cursor: pointer;
        text-decoration: none;
    }

        .sidebar-group:hover {
            background: rgba(102, 126, 234, 0.08);
            color: var(--brand-hero);
        }

        .sidebar-group.active-group {
            background: rgba(102, 126, 234, 0.12);
            color: var(--brand-hero);
        }

        .sidebar-group i.bi-chevron-down {
            font-size: 0.8rem;
            transition: transform 0.3s ease;
        }

        .sidebar-group[aria-expanded="true"] i.bi-chevron-down {
            transform: rotate(180deg);
        }
    /* Sidebar Items (العناصر الفرعية) */
    .sidebar-item {
        padding: 0.75rem 1rem;
        margin: 0.2rem 0.5rem;
        border-radius: 8px;
        transition: var(--transition);
        color: #5a6573;
        font-weight: 500;
        font-size: 0.9rem;
        display: flex;
        align-items: center;
        text-decoration: none;
        border-right: 3px solid transparent;
    }

        .sidebar-item:hover {
            background: var(--primary-gradient);
            color: white;
            transform: translateX(-4px);
            box-shadow: var(--shadow-soft);
            border-right-color: transparent;
        }

        .sidebar-item.active-item {
            background: var(--primary-gradient);
            color: white;
            box-shadow: var(--shadow-medium);
            border-right-color: white;
            font-weight: 600;
        }

        .sidebar-item i {
            margin-left: 0.5rem;
            font-size: 1rem;
            width: 20px;
            text-align: center;
        }
    /* Sidebar Group Icon */
    .sidebar-group i:not(.bi-chevron-down) {
        margin-left: 0;
        font-size: 1.1rem;
        width: 24px;
        text-align: center;
    }
    /* Collapsed Menu Spacing */
    .sidebar .collapse .nav {
        padding-right: 0.5rem;
        margin-top: 0.25rem;
        margin-bottom: 0.25rem;
    }
    /* Navigation List Styling */
    .sidebar .nav-item {
        list-style: none;
    }

    .sidebar .nav.flex-column {
        padding-right: 0;
    }
    /* Legacy Support - للتوافق مع الأكواد القديمة */
    .sidebar .nav-link {
        padding: 0.875rem 1rem;
        margin: 0.25rem 0.5rem;
        border-radius: 12px;
        transition: var(--transition);
        color: #4a5568;
        font-weight: 500;
        display: flex;
        align-items: center;
        text-decoration: none;
    }

        .sidebar .nav-link:hover {
            background: var(--primary-gradient);
            color: white;
            transform: translateX(-4px);
            box-shadow: var(--shadow-soft);
        }

        .sidebar .nav-link.active {
            background: var(--primary-gradient);
            color: white;
            box-shadow: var(--shadow-medium);
        }

        .sidebar .nav-link i {
            margin-left: 0.75rem;
            font-size: 1.1rem;
            width: 24px;
            text-align: center;
        }
    /* ---------- 10) الـ Overlay للجوال ---------- */
    .sidebar-overlay {
        position: fixed;
        top: var(--header-height);
        right: 0;
        bottom: 0;
        left: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1015;
        display: none;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

        .sidebar-overlay.show {
            display: block;
            opacity: 1;
        }
    /* ---------- 11) المحتوى الرئيسي ---------- */
    .main-content {
        flex: 1;
        padding: 2rem !important;
        margin-right: var(--sidebar-width);
        min-height: calc(100vh - var(--header-height) - var(--footer-height));
        transition: margin var(--transition-speed) ease-in-out;
    }
    /* ---------- 12) بطاقات الفلترة ---------- */
    .filter-card,
    .status-filter-card {
        background: var(--primary-gradient);
        border-radius: 10px;
        padding: 20px;
        margin-bottom: 20px;
        color: white;
        box-shadow: var(--shadow-medium);
    }

    .filter-label {
        font-weight: 600;
        margin-bottom: 8px;
        font-size: 14px;
        color: white;
    }

    .filter-card .form-control,
    .status-filter-card .form-control {
        border-radius: 8px;
        border: 2px solid rgba(255, 255, 255, 0.3);
        background-color: rgba(255, 255, 255, 0.95);
        padding: 10px 15px;
        font-size: 14px;
        transition: all 0.3s ease;
    }

        .filter-card .form-control:focus,
        .status-filter-card .form-control:focus {
            border-color: #fff;
            box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
            background-color: #fff;
        }

    .stats-badge {
        background: rgba(255, 255, 255, 0.2);
        padding: 8px 16px;
        border-radius: 20px;
        display: inline-block;
        color: white;
    }
    /* ---------- 13) البطاقات الرئيسية ---------- */
    .main-card,
    .card {
        border: none;
        border-radius: var(--border-radius);
        box-shadow: var(--shadow-soft);
        overflow: hidden;
        background: var(--app-surface);
        margin-bottom: 20px;
        transition: var(--transition);
    }

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

        .main-card .card-header,
        .card > .card-header {
            background: var(--primary-gradient);
            border-bottom: none;
            padding: 20px 25px;
            font-weight: 600;
        }

            .main-card .card-header h3,
            .main-card .card-header .card-title {
                color: white;
                font-weight: 700;
                margin: 0;
                font-size: 24px;
            }

                .main-card .card-header h3 i,
                .main-card .card-header .card-title i {
                    margin-left: 10px;
                }
    /* ---------- 14) الأزرار ---------- */
    .btn {
        border-radius: 10px;
        padding: 0.625rem 1.25rem;
        font-weight: 500;
        transition: var(--transition);
    }

    .btn-create,
    .btn-add-new {
        background-color: #fff;
        color: var(--brand-hero);
        border: none;
        border-radius: 8px;
        padding: 10px 20px;
        font-weight: 600;
        transition: all 0.3s ease;
        box-shadow: var(--shadow-soft);
    }

        .btn-create:hover,
        .btn-add-new:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-medium);
            color: var(--brand-hero);
            background-color: #fff;
        }

        .btn-create i,
        .btn-add-new i {
            margin-left: 5px;
        }

    .btn-action {
        border-radius: 6px;
        padding: 6px 12px;
        transition: all 0.3s ease;
        margin: 0 2px;
    }

        .btn-action:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-soft);
        }

    .btn-info,
    .btn-primary {
        background: var(--primary-gradient);
        border: none;
        color: #fff;
    }

        .btn-info:hover,
        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-medium);
        }

    .btn-outline-brand {
        color: var(--brand-hero);
        border: 2px solid var(--brand-hero);
        background-color: transparent;
    }

        .btn-outline-brand:hover {
            color: #fff;
            background: var(--primary-gradient);
            border-color: var(--brand-hero);
        }
    /* ---------- 15) الجداول ---------- */
    .table {
        background: white;
        border-radius: var(--border-radius);
        overflow: hidden;
        margin-bottom: 0;
        border-collapse: separate;
        border-spacing: 0;
    }

        .table thead {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
            position: relative;
        }

            .table thead tr {
                background: transparent !important;
            }

            .table thead th {
                color: #ffffff !important;
                font-weight: 600;
                border-bottom: none !important;
                padding: 15px 12px;
                font-size: 14px;
                text-align: center;
                vertical-align: middle;
                background: transparent !important;
            }

                .table thead th i {
                    margin-left: 5px;
                    color: white !important;
                }

        .table tbody td {
            padding: 15px 12px;
            vertical-align: middle;
            text-align: center;
            font-size: 14px;
            color: var(--app-text);
            border-bottom: 1px solid var(--app-border);
        }

        .table tbody tr {
            transition: all 0.3s ease;
            background: var(--app-surface);
        }

            .table tbody tr:hover {
                background-color: rgba(var(--brand-hero-rgb), 0.05);
                transform: scale(1.01);
                box-shadow: var(--shadow-soft);
            }
    /* ---------- 16) الشارات ---------- */
    .badge {
        padding: 6px 12px;
        font-size: 12px;
        font-weight: 600;
        border-radius: 6px;
    }

    .badge-primary {
        background: var(--primary-gradient);
        color: #fff;
    }

    .badge-warning {
        background-color: #ffc107;
        color: #000;
    }

    .badge-info {
        background: var(--primary-gradient);
        color: #fff;
    }

    .badge-success {
        background-color: #28a745;
        color: #fff;
    }

    .badge-danger {
        background-color: #dc3545;
        color: #fff;
    }

    .badge-secondary {
        background-color: #6c757d;
        color: #fff;
    }
    /* ---------- 17) معلومات إضافية ---------- */
    .info-label {
        font-size: 12px;
        color: var(--app-muted);
        background-color: rgba(var(--brand-hero-rgb), 0.1);
        padding: 3px 8px;
        border-radius: 4px;
        display: inline-block;
        margin-top: 5px;
    }

        .info-label i {
            margin-left: 3px;
        }

    .amount-cell,
    .price-cell {
        font-weight: 700;
        color: #28a745;
        font-size: 15px;
    }

    .record-number {
        font-weight: 700;
        color: var(--brand-hero);
    }
    /* ---------- 18) حالة فارغة ---------- */
    .empty-state {
        text-align: center;
        padding: 60px 20px;
        color: var(--app-muted);
    }

        .empty-state i {
            font-size: 64px;
            margin-bottom: 20px;
            opacity: 0.5;
            color: var(--brand-hero);
        }

        .empty-state h4 {
            font-weight: 600;
            margin-bottom: 10px;
            color: var(--app-text);
        }

        .empty-state p {
            color: var(--app-muted);
            margin-bottom: 20px;
        }
    /* ---------- 19) النماذج ---------- */
    .form-section {
        background: var(--app-surface);
        border-radius: 10px;
        padding: 20px;
        margin-bottom: 20px;
        border: 1px solid var(--app-border);
    }

    .form-section-title {
        color: var(--brand-hero);
        font-weight: 700;
        font-size: 18px;
        margin-bottom: 20px;
        padding-bottom: 10px;
        border-bottom: 2px solid var(--brand-hero);
    }

        .form-section-title i {
            margin-left: 8px;
        }

    .form-group label {
        font-weight: 600;
        color: var(--app-text);
        margin-bottom: 8px;
    }

    .form-control,
    .form-select {
        border-radius: 10px;
        border: 1px solid #e2e8f0;
        padding: 0.625rem 1rem;
        transition: var(--transition);
    }

        .form-control:focus,
        .form-select:focus {
            border-color: #667eea;
            box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
        }
    /* ---------- 20) بطاقات الإحصائيات ---------- */
    .stat-card {
        background: var(--app-surface);
        border-radius: 10px;
        padding: 20px;
        border: 1px solid var(--app-border);
        transition: all 0.3s ease;
        text-align: center;
    }

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

        .stat-card .icon-circle,
        .icon-circle,
        .rounded-circle {
            width: 60px;
            height: 60px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 15px;
            background-color: rgba(var(--brand-hero-rgb), 0.1);
            color: var(--brand-hero);
            font-size: 24px;
            box-shadow: 0 4px 12px rgba(15, 23, 42, .18);
        }

        .stat-card h3 {
            font-size: 32px;
            font-weight: 700;
            color: var(--brand-hero);
            margin: 10px 0;
        }

        .stat-card p {
            color: var(--app-muted);
            font-size: 14px;
            margin: 0;
        }
    /* ---------- 21) التنبيهات ---------- */
    .alert {
        border-radius: 10px;
        border: none;
        padding: 15px 20px;
    }

    .alert-info {
        background-color: rgba(var(--brand-hero-rgb), 0.1);
        color: var(--brand-hero);
        border-right: 4px solid var(--brand-hero);
    }

    .alert-success {
        background-color: rgba(40, 167, 69, 0.1);
        color: #28a745;
        border-right: 4px solid #28a745;
    }

    .alert-warning {
        background-color: rgba(255, 193, 7, 0.1);
        color: #856404;
        border-right: 4px solid #ffc107;
    }

    .alert-danger {
        background-color: rgba(220, 53, 69, 0.1);
        color: #dc3545;
        border-right: 4px solid #dc3545;
    }
    /* ---------- 22) القوائم المنسدلة ---------- */
    .dropdown-menu {
        border: none !important;
        box-shadow: var(--shadow-strong) !important;
        border-radius: var(--border-radius) !important;
        padding: 0.75rem !important;
        margin-top: 0.5rem !important;
    }

    .dropdown-item {
        border-radius: 8px;
        padding: 0.625rem 1rem;
        transition: var(--transition);
    }

        .dropdown-item:hover {
            background: var(--primary-gradient);
            color: white;
        }

        .dropdown-item i {
            margin-left: 8px;
            width: 20px;
            text-align: center;
        }
    /* ---------- 23) التبويبات ---------- */
    .nav-tabs {
        border-bottom: 2px solid var(--app-border);
    }

        .nav-tabs .nav-link {
            color: var(--app-muted);
            border: none;
            padding: 12px 20px;
            font-weight: 600;
            transition: all 0.3s ease;
        }

            .nav-tabs .nav-link:hover {
                color: var(--brand-hero);
            }

            .nav-tabs .nav-link.active {
                color: var(--brand-hero);
                background-color: transparent;
                border-bottom: 3px solid var(--brand-hero);
            }
    /* ---------- 24) بطاقات صغيرة ---------- */
    .info-card {
        background: var(--app-surface);
        border: 1px solid var(--app-border);
        border-radius: 10px;
        padding: 15px;
        margin-bottom: 15px;
    }

    .info-card-title {
        font-weight: 600;
        color: var(--brand-hero);
        margin-bottom: 10px;
        font-size: 16px;
    }

    .info-card-content {
        color: var(--app-text);
        font-size: 14px;
    }
 
    /* ---------- 26) Animations ---------- */
    @keyframes slideInRight {
        from {
            transform: translateX(100%);
            opacity: 0;
        }

        to {
            transform: translateX(0);
            opacity: 1;
        }
    }

    @keyframes spin {
        from {
            transform: rotate(0deg);
        }

        to {
            transform: rotate(360deg);
        }
    }

    .sidebar.show {
        animation: slideInRight 0.3s ease;
    }
    /* ---------- 27) التحميل ---------- */
    .loading-spinner {
        text-align: center;
        padding: 40px;
        color: var(--brand-hero);
    }

        .loading-spinner i {
            font-size: 48px;
            animation: spin 1s linear infinite;
        }

    .spinner-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.9);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 9999;
    }
    /* ---------- 28) إضافات ---------- */
    .page-title {
        color: var(--brand-hero);
        font-weight: 700;
        margin-bottom: 20px;
        font-size: 28px;
    }

    .section-divider {
        border-top: 2px solid var(--app-border);
        margin: 30px 0;
    }

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

    .bg-brand {
        background: var(--primary-gradient) !important;
    }

    .border-brand {
        border-color: var(--brand-hero) !important;
    }
    /* ---------- 29) الوضع الداكن - دعم كامل ---------- */
    body.dark-mode .sidebar,
    body.dark-mode header {
        background: rgba(26, 32, 44, 0.98) !important;
    }

        body.dark-mode .sidebar .nav-link,
        body.dark-mode .sidebar-group,
        body.dark-mode .sidebar-item {
            color: #e2e8f0;
        }

            body.dark-mode .sidebar-group:hover,
            body.dark-mode .sidebar-group.active-group {
                background: rgba(141, 154, 239, 0.15);
                color: #8d9aef;
            }

            body.dark-mode .sidebar-item:hover,
            body.dark-mode .sidebar-item.active-item {
                background: var(--primary-gradient);
                color: white;
            }

    body.dark-mode .card {
        background: #2d3748;
        color: #e2e8f0;
    }

    body.dark-mode .table {
        background: #2d3748;
        color: #e2e8f0;
    }

    [data-theme="dark"] .table thead th {
        background: var(--primary-gradient);
    }

    [data-theme="dark"] .filter-card .form-control,
    [data-theme="dark"] .status-filter-card .form-control {
        background-color: #2d3748;
        color: #fff;
    }

    [data-theme="dark"] .stat-card {
        background-color: #1e1e1e;
    }

    [data-theme="dark"] .form-control {
        background-color: #2d3748;
        color: #fff;
        border-color: #4a5568;
    }

    [data-theme="dark"] .dropdown-menu {
        background-color: #2d3748;
    }

    [data-theme="dark"] .dropdown-item {
        color: #e9ecef;
    }

        [data-theme="dark"] .dropdown-item:hover {
            background: var(--primary-gradient);
        }
    /* ---------- 30) Dashboard Styles ---------- */
    /* Dashboard Header Card */
    .card.bg-success.text-white {
        background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
        border: none;
        border-radius: var(--border-radius);
        box-shadow: var(--shadow-medium);
        margin-bottom: 1.5rem;
    }

        .card.bg-success.text-white .card-body {
            padding: 2rem;
        }

        .card.bg-success.text-white h2 {
            font-weight: 700;
            font-size: 1.75rem;
            margin-bottom: 0.5rem;
        }

            .card.bg-success.text-white h2 i {
                margin-left: 0.75rem;
            }
    /* Dashboard Stats Cards */
    .border-left-primary {
        border-right: 4px solid var(--brand-hero) !important;
        border-left: none !important;
    }

    .border-left-success {
        border-right: 4px solid #28a745 !important;
        border-left: none !important;
    }

    .border-left-info {
        border-right: 4px solid #17a2b8 !important;
        border-left: none !important;
    }

    .border-left-warning {
        border-right: 4px solid #ffc107 !important;
        border-left: none !important;
    }

    .card.shadow {
        box-shadow: var(--shadow-soft) !important;
        border: none;
        border-radius: 12px;
        transition: var(--transition);
    }

        .card.shadow:hover {
            box-shadow: var(--shadow-medium) !important;
            transform: translateY(-3px);
        }

        .card.shadow.h-100 {
            height: 100%;
        }

        .card.shadow.py-2 .card-body {
            padding: 1.25rem;
        }
    /* Dashboard Stats Text */
    .text-xs {
        font-size: 0.75rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 0.5rem;
    }

    .font-weight-bold {
        font-weight: 700 !important;
    }

    .text-gray-800 {
        color: #5a5c69 !important;
    }

    .text-gray-300 {
        color: #dddfeb !important;
    }

    .h5 {
        font-size: 1.5rem;
        font-weight: 700;
    }
    /* Dashboard Stats Icons */
    .fa-2x {
        font-size: 2rem;
    }

    .fa-3x {
        font-size: 3rem;
    }
    /* No Gutters Fix */
    .row.no-gutters {
        margin-right: 0;
        margin-left: 0;
    }

        .row.no-gutters > .col,
        .row.no-gutters > [class*="col-"] {
            padding-right: 0;
            padding-left: 0;
        }

        .row.no-gutters .col.mr-2 {
            margin-left: 0.5rem;
        }

        .row.no-gutters .col-auto {
            flex: 0 0 auto;
            width: auto;
        }
    /* Dashboard Card Headers */
    .card-header.py-3 {
        padding: 1rem 1.25rem;
        background: var(--primary-gradient);
        border: none;
        border-radius: 12px 12px 0 0;
    }

        .card-header.py-3 h6 {
            color: white;
            font-weight: 700;
            font-size: 1rem;
            margin: 0;
        }

        .card-header.py-3 .btn {
            margin-right: 0.5rem;
        }

            .card-header.py-3 .btn:last-child {
                margin-right: 0;
            }
    /* Dashboard Tables */
    .table-responsive {
        border-radius: 8px;
        overflow: hidden;
    }

    .table-bordered {
        border: 1px solid var(--app-border);
    }

    .table-hover tbody tr:hover {
        background-color: rgba(var(--brand-hero-rgb), 0.05);
        cursor: pointer;
    }

    .table thead.bg-light {
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    }

        .table thead.bg-light th {
            font-weight: 600;
            color: var(--app-text);
            border-bottom: 2px solid var(--app-border);
            padding: 0.75rem;
            text-align: center;
        }

    .table tbody td {
        padding: 0.75rem;
        vertical-align: middle;
        text-align: center;
    }

        .table tbody td strong {
            color: var(--brand-hero);
            font-weight: 600;
        }
    /* Button Groups */
    .btn-group-sm > .btn,
    .btn-sm {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
        border-radius: 6px;
    }

    .btn-group {
        display: inline-flex;
        gap: 0.25rem;
    }

        .btn-group .btn {
            margin: 0;
        }
    /* Dashboard Action Cards */
    .d-grid {
        display: grid;
    }

    .gap-2 {
        gap: 0.5rem;
    }

    .d-grid.gap-2 .btn {
        width: 100%;
        text-align: right;
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }

        .d-grid.gap-2 .btn i {
            margin-left: 0.5rem;
        }
    /* Empty State in Dashboard */
    .text-center.py-4 {
        padding: 2rem 1rem;
    }

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

    .text-center .fa-3x {
        opacity: 0.3;
    }
    /* Status Badges in Tables */
    .badge.badge-primary {
        background: var(--primary-gradient);
    }

    .badge.badge-success {
        background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    }

    .badge.badge-warning {
        background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
        color: #000;
    }

    .badge.badge-info {
        background: linear-gradient(135deg, #17a2b8 0%, #00bcd4 100%);
    }

    .badge.badge-danger {
        background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    }
    /* Responsive Dashboard Cards */
    @media (max-width: 767.98px) {
        .card.bg-success.text-white h2 {
            font-size: 1.5rem;
        }

        .h5 {
            font-size: 1.25rem;
        }

        .text-xs {
            font-size: 0.7rem;
        }

        .btn-group {
            flex-direction: column;
        }

            .btn-group .btn {
                width: 100%;
                margin-bottom: 0.25rem;
            }
    }
    /* Dark Mode Dashboard Support */
    [data-theme="dark"] .card.bg-success.text-white {
        background: linear-gradient(135deg, #198754 0%, #20c997 100%) !important;
    }

    [data-theme="dark"] .text-gray-800 {
        color: #e9ecef !important;
    }

    [data-theme="dark"] .table thead.bg-light {
        background: linear-gradient(135deg, #2d3748 0%, #374151 100%);
    }

        [data-theme="dark"] .table thead.bg-light th {
            color: #e9ecef;
        }

    [data-theme="dark"] .table-bordered {
        border-color: #4a5568;
    }

    [data-theme="dark"] .table tbody tr:hover {
        background-color: rgba(141, 154, 239, 0.1);
    }
    /***/
    font-face-src
    /* ============================================
   Cairo Font - Local Files
   File: wwwroot/css/cairo-font.css
   ============================================ */
    /* Cairo Light - 300 */
    @font-face {
    font-family: 'Cairo';
    src: url('../fonts/Cairo-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

/* Cairo Regular - 400 */
@font-face {
    font-family: 'Cairo';
    src: url('../fonts/Cairo-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* Cairo Medium - 500 */
@font-face {
    font-family: 'Cairo';
    src: url('../fonts/Cairo-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

/* Cairo SemiBold - 600 */
@font-face {
    font-family: 'Cairo';
    src: url('../fonts/Cairo-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* Cairo Bold - 700 */
@font-face {
    font-family: 'Cairo';
    src: url('../fonts/Cairo-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Cairo ExtraBold - 800 */
@font-face {
    font-family: 'Cairo';
    src: url('../fonts/Cairo-ExtraBold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}
/* ---------- 31) Mobile Responsive ---------- */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(100%);
    }

        .sidebar.show {
            transform: translateX(0);
        }

    .main-content {
        margin-right: 0 !important;
        width: 100%;
    }

    
}

@media (max-width: 767.98px) {
    .main-content {
        padding: 1rem !important;
    }

    :root {
        --sidebar-width: 260px;
    }

    .main-card .card-header {
        padding: 15px 20px;
    }

        .main-card .card-header h3,
        .main-card .card-header .card-title {
            font-size: 20px;
        }

    .btn-create,
    .btn-add-new {
        padding: 8px 15px;
        font-size: 14px;
    }

    .filter-card,
    .status-filter-card {
        padding: 15px;
    }

    .table thead th,
    .table tbody td {
        padding: 10px 8px;
        font-size: 13px;
    }

    .stat-card {
        margin-bottom: 15px;
    }

    .page-title {
        font-size: 24px;
    }
}
