
* {
            font-family: 'Tajawal', 'El Messiri', sans-serif;
        }
        
        :root {
            --primary: #0f766e;
            --primary-light: #2dd4bf;
            --dark: #0f172a;
            --light-dark: #1e293b;
            --gradient: linear-gradient(135deg, #0f766e 0%, #2dd4bf 100%);
            --light-bg: #f8fafc;
            --light-text: #1e293b;
            --light-border: #e2e8f0;
        }
        
        body.dark-mode {
            background: linear-gradient(135deg, #020617 0%, var(--dark) 100%);
            color: #f8fafc;
        }
        
        body.light-mode {
            background: #f5f7fa;
            color: #1e293b;
        }
        
        /* الهيدر ثابت في الوضعين */
        .navbar {
            background: linear-gradient(135deg, #0f766e 0%, #2dd4bf 100%);
            color: white;
        }
        
        .dark-mode .glass-card {
            background: rgba(30, 41, 59, 0.7);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(45, 212, 191, 0.2);
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
            color: #f8fafc;
        }
        
        .light-mode .glass-card {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            border: 1px solid #e2e8f0;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
            color: #1e293b;
        }
        
        .hero-gradient {
            background: var(--gradient);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        }
        
        .dark-mode .form-input {
            background: rgba(30, 41, 59, 0.8);
            border: 1px solid rgba(45, 212, 191, 0.3);
            color: white;
            border-radius: 8px;
        }
        
        .light-mode .form-input {
            background: white;
            border: 1px solid #d1d5db;
            color: #1e293b;
            border-radius: 8px;
        }
        
        .light-mode .form-input:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
        }
        
        .form-input {
            padding: 12px 16px;
            width: 100%;
            transition: all 0.3s ease;
            font-size: 15px;
        }
        
        .form-input:focus {
            outline: none;
            border-color: var(--primary-light);
            box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.1);
        }
        
        /* تحسين Select Boxes - Z-Index عالي جدا */
        .search-select-box {
            position: relative;
            width: 100%;
            z-index: 10000 !important;
        }
        
        .search-select-dropdown {
            position: absolute !important;
            top: calc(100% + 5px) !important;
            left: 0 !important;
            right: 0 !important;
            z-index: 10050 !important;
            max-height: 300px;
            overflow-y: auto;
            display: none;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
            border-radius: 8px;
            animation: dropdownFade 0.2s ease;
        }
        
        @keyframes dropdownFade {
            from { opacity: 0; transform: translateY(-10px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        .dark-mode .search-select-dropdown {
            background: rgba(30, 41, 59, 0.98);
            border: 1px solid rgba(45, 212, 191, 0.4);
            backdrop-filter: blur(10px);
        }
        
        .light-mode .search-select-dropdown {
            background: white;
            border: 1px solid #d1d5db;
            color: #1e293b;
            backdrop-filter: blur(10px);
        }
        
        .search-select-input {
            width: 100%;
            padding: 12px 16px;
            border-radius: 8px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: space-between;
            min-height: 48px;
            transition: all 0.3s;
        }
        
        .dark-mode .search-select-input {
            background: rgba(30, 41, 59, 0.9);
            border: 1px solid rgba(45, 212, 191, 0.4);
            color: white;
        }
        
        .light-mode .search-select-input {
            background: white;
            border: 1px solid #d1d5db;
            color: #1e293b;
        }
        
        .search-select-input:hover {
            border-color: var(--primary-light);
        }
        
        .search-select-search {
            padding: 10px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            position: sticky;
            top: 0;
            background: inherit;
        }
        
        .dark-mode .search-select-search {
            border-bottom-color: rgba(255, 255, 255, 0.1);
        }
        
        .light-mode .search-select-search {
            border-bottom-color: #e5e7eb;
        }
        
        .search-select-search input {
            width: 100%;
            padding: 8px 12px;
            border-radius: 6px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            background: rgba(255, 255, 255, 0.1);
            color: white;
            font-size: 14px;
        }
        
        .light-mode .search-select-search input {
            background: white;
            border: 1px solid #d1d5db;
            color: #1e293b;
        }
        
        .search-select-item {
            padding: 12px 16px;
            cursor: pointer;
            transition: all 0.2s;
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
            font-size: 14px;
        }
        
        .dark-mode .search-select-item {
            border-bottom-color: rgba(255, 255, 255, 0.05);
        }
        
        .light-mode .search-select-item {
            border-bottom-color: #f3f4f6;
        }
        
        .search-select-item:last-child {
            border-bottom: none;
        }
        
        .dark-mode .search-select-item:hover {
            background: rgba(45, 212, 191, 0.15);
        }
        
        .light-mode .search-select-item:hover {
            background: rgba(15, 118, 110, 0.1);
        }
        
        .search-select-item.selected {
            background: rgba(45, 212, 191, 0.25);
        }
        
        .primary-btn {
            background: var(--gradient);
            color: white;
            border: none;
            padding: 12px 24px;
            border-radius: 8px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            font-size: 15px;
        }
        
        .primary-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 25px rgba(15, 118, 110, 0.4);
        }
        
        .secondary-btn {
            padding: 10px 20px;
            border-radius: 8px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            font-size: 14px;
        }
        
        .dark-mode .secondary-btn {
            background: rgba(30, 41, 59, 0.8);
            color: var(--primary-light);
            border: 1px solid rgba(45, 212, 191, 0.3);
        }
        
        .light-mode .secondary-btn {
            background: white;
            color: var(--primary);
            border: 1px solid #d1d5db;
        }
        
        .secondary-btn:hover {
            transform: translateY(-1px);
        }
        
        .dark-mode .secondary-btn:hover {
            background: rgba(45, 212, 191, 0.1);
        }
        
        .light-mode .secondary-btn:hover {
            background: rgba(15, 118, 110, 0.05);
        }
        
        /* تحسين الكروت بشكل احترافي */
        .complaint-card {
            transition: all 0.3s ease;
            border-radius: 16px;
            overflow: hidden;
            height: 100%;
            display: flex;
            flex-direction: column;
            position: relative;
        }
        
        .complaint-card:hover {
            transform: translateY(-8px) scale(1.02);
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
        }
        
        .dark-mode .complaint-card {
            background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
            border: 1px solid rgba(45, 212, 191, 0.2);
        }
        
        .light-mode .complaint-card {
            background: linear-gradient(145deg, #ffffff, #f8fafc);
            border: 1px solid #e2e8f0;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        }
        
        .card-header {
            position: relative;
            height: 220px;
            overflow: hidden;
        }
        
        .card-slider {
            position: relative;
            width: 100%;
            height: 100%;
        }
        
        .card-slide {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            opacity: 0;
            transition: opacity 0.5s ease;
            background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.7));
        }
        
        .card-slide.active {
            opacity: 1;
        }
        
        .card-slide img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            mix-blend-mode: overlay;
        }
        
        .slide-indicators {
            position: absolute;
            bottom: 15px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            gap: 6px;
            z-index: 2;
        }
        
        .slide-indicator {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.5);
            cursor: pointer;
            transition: all 0.3s;
        }
        
        .slide-indicator.active {
            background: white;
            transform: scale(1.3);
        }
        
        .status-badge {
            position: absolute;
            top: 15px;
            right: 15px;
            padding: 6px 15px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 600;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            z-index: 2;
            backdrop-filter: blur(10px);
            text-shadow: 0 1px 2px rgba(0,0,0,0.2);
        }
        
        .status-pending {
            background: rgba(245, 158, 11, 0.25);
            color: #fcd34d;
            border: 1px solid rgba(245, 158, 11, 0.4);
        }
        
        .status-submitted {
            background: rgba(59, 130, 246, 0.25);
            color: #93c5fd;
            border: 1px solid rgba(59, 130, 246, 0.4);
        }
        
        .status-resolved {
            background: rgba(34, 197, 94, 0.25);
            color: #86efac;
            border: 1px solid rgba(34, 197, 94, 0.4);
        }
        
        .card-body {
            padding: 20px;
            flex: 1;
            display: flex;
            flex-direction: column;
        }
        
        .card-footer {
            padding: 15px 20px;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            background: rgba(0, 0, 0, 0.05);
        }
        
        .light-mode .card-footer {
            border-top-color: #e5e7eb;
            background: #f9fafb;
        }
        
        .card-description {
            flex: 1;
            overflow-y: auto;
            max-height: 120px;
            margin-bottom: 15px;
            line-height: 1.6;
            font-size: 14px;
            padding: 10px;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 8px;
        }
        
        .light-mode .card-description {
            background: rgba(0, 0, 0, 0.02);
        }
        
        .card-description::-webkit-scrollbar {
            width: 5px;
        }
        
        .card-description::-webkit-scrollbar-track {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 3px;
        }
        
        .card-description::-webkit-scrollbar-thumb {
            background: var(--primary-light);
            border-radius: 3px;
        }
        
        .card-info-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 12px;
            margin-bottom: 20px;
        }
        
        .card-info-item {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 13px;
            padding: 8px;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 8px;
        }
        
        .light-mode .card-info-item {
            background: rgba(0, 0, 0, 0.02);
        }
        
        .card-info-item i {
            color: var(--primary-light);
            width: 16px;
            flex-shrink: 0;
        }
        
        .card-actions {
            display: flex;
            gap: 10px;
            margin-top: auto;
        }
        
        .nav-link {
            padding: 10px 20px;
            border-radius: 8px;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 10px;
            white-space: nowrap;
            font-weight: 500;
            color: rgba(255, 255, 255, 0.9);
        }
        
        .nav-link:hover {
            background: rgba(255, 255, 255, 0.15);
            color: white;
        }
        
        .nav-link.active {
            background: rgba(255, 255, 255, 0.2);
            color: white;
        }
        
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        .fade-in {
            animation: fadeIn 0.5s ease-out;
        }
        
        .loading {
            display: inline-block;
            width: 20px;
            height: 20px;
            border: 3px solid rgba(255, 255, 255, 0.3);
            border-radius: 50%;
            border-top-color: var(--primary-light);
            animation: spin 1s ease-in-out infinite;
        }
        
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        
        .gallery-image {
            cursor: pointer;
            transition: transform 0.3s ease;
        }
        
        .gallery-image:hover {
            transform: scale(1.02);
        }
        
        .qr-code-display {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 20px;
            border-radius: 12px;
        }
        
        .dark-mode .qr-code-display {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
        }
        
        .light-mode .qr-code-display {
            background: rgba(15, 118, 110, 0.05);
            border: 1px solid rgba(15, 118, 110, 0.1);
        }
        
        .qr-code-display img {
            width: 150px;
            height: 150px;
            margin-bottom: 15px;
        }
        
        @media (max-width: 768px) {
            .nav-link span {
                display: none;
            }
            
            .nav-link {
                padding: 10px;
            }
            
            .form-input {
                padding: 10px 12px;
                font-size: 14px;
            }
            
            .primary-btn, .secondary-btn {
                padding: 10px 15px;
                font-size: 14px;
            }
            
            .complaint-card-grid {
                grid-template-columns: 1fr !important;
            }
            
            .card-info-grid {
                grid-template-columns: 1fr;
            }
        }
        
        .fixed-action-btn {
            position: fixed;
            bottom: 30px;
            left: 30px;
            z-index: 100;
            width: 60px;
            height: 60px;
            border-radius: 50%;
            background: var(--gradient);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 24px;
            box-shadow: 0 4px 15px rgba(15, 118, 110, 0.4);
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .fixed-action-btn:hover {
            transform: scale(1.1);
        }
        
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.8);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 9999;
            padding: 20px;
        }
        
        .modal-overlay.active {
            display: flex;
        }
        
        .dark-mode .modal-content {
            background: rgba(30, 41, 59, 0.98);
            border: 1px solid rgba(45, 212, 191, 0.3);
        }
        
        .light-mode .modal-content {
            background: white;
            border: 1px solid #e5e7eb;
        }
        
        .modal-content {
            border-radius: 16px;
            max-width: 900px;
            width: 100%;
            max-height: 90vh;
            overflow-y: auto;
        }
        
        .media-library-overlay {
            z-index: 10000 !important;
            background: rgba(0, 0, 0, 0.95);
        }
        
        .media-library-content {
            width: 95%;
            height: 95vh;
            max-width: 1200px;
            z-index: 10001 !important;
        }
        
        .map-link-btn {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 8px 16px;
            background: rgba(59, 130, 246, 0.1);
            color: #3b82f6;
            border: 1px solid rgba(59, 130, 246, 0.2);
            border-radius: 8px;
            text-decoration: none;
            transition: all 0.3s;
            font-size: 14px;
        }
        
        .map-link-btn:hover {
            background: rgba(59, 130, 246, 0.2);
            transform: translateY(-2px);
        }
        
        .stats-card {
            border-radius: 12px;
            padding: 25px;
            text-align: center;
            transition: all 0.3s;
        }
        
        .stats-card:hover {
            transform: translateY(-5px);
        }
        
        .dark-mode .stats-card {
            background: linear-gradient(145deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.8));
            border: 1px solid rgba(45, 212, 191, 0.2);
        }
        
        .light-mode .stats-card {
            background: linear-gradient(145deg, #ffffff, #f8fafc);
            border: 1px solid #e2e8f0;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        }
        
        .stats-number {
            font-size: 48px;
            font-weight: bold;
            background: var(--gradient);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            margin: 15px 0;
        }
        
        .category-card {
            cursor: pointer;
            transition: all 0.3s ease;
            border-radius: 10px;
            padding: 20px;
            text-align: center;
            border: 2px solid transparent;
        }
        
        .category-card:hover {
            transform: translateY(-5px);
        }
        
        .dark-mode .category-card:hover {
            border-color: rgba(45, 212, 191, 0.5);
            background: rgba(45, 212, 191, 0.1);
        }
        
        .light-mode .category-card:hover {
            border-color: rgba(15, 118, 110, 0.5);
            background: rgba(15, 118, 110, 0.1);
        }
        
        .category-card.selected {
            border-color: var(--primary-light);
        }
        
        .dark-mode .category-card.selected {
            background: rgba(45, 212, 191, 0.2);
        }
        
        .light-mode .category-card.selected {
            background: rgba(15, 118, 110, 0.2);
        }
        
        .pagination {
            display: flex;
            justify-content: center;
            gap: 5px;
            margin-top: 30px;
            flex-wrap: wrap;
        }
        
        .pagination button {
            padding: 8px 12px;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 14px;
            min-width: 40px;
        }
        
        .dark-mode .pagination button {
            background: rgba(30, 41, 59, 0.8);
            border: 1px solid rgba(45, 212, 191, 0.3);
            color: white;
        }
        
        .light-mode .pagination button {
            background: white;
            border: 1px solid #d1d5db;
            color: #1e293b;
        }
        
        .pagination button:hover {
            transform: translateY(-2px);
        }
        
        .dark-mode .pagination button:hover {
            background: rgba(45, 212, 191, 0.1);
        }
        
        .light-mode .pagination button:hover {
            background: rgba(15, 118, 110, 0.05);
        }
        
        .pagination button.active {
            background: var(--gradient);
            color: white;
        }
        
        .pagination button:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }
        
        .chart-container {
            position: relative;
            height: 300px;
            animation: fadeIn 1s ease-out;
        }
        
        .file-upload-area {
            border-radius: 12px;
            padding: 25px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s ease;
            border: 2px dashed;
        }
        
        .dark-mode .file-upload-area {
            border-color: rgba(45, 212, 191, 0.3);
            color: #f8fafc;
        }
        
        .light-mode .file-upload-area {
            border-color: rgba(15, 118, 110, 0.3);
            color: #1e293b;
        }
        
        .file-upload-area:hover {
            border-color: var(--primary-light);
        }
        
        .dark-mode .file-upload-area:hover {
            background: rgba(45, 212, 191, 0.05);
        }
        
        .light-mode .file-upload-area:hover {
            background: rgba(15, 118, 110, 0.05);
        }
        
        /* تحسين ألوان الوضع الفاتح */
        .light-mode {
            color: #374151;
        }
        
        .light-mode .text-gray-300 {
            color: #6b7280 !important;
        }
        
        .light-mode .text-gray-400 {
            color: #9ca3af !important;
        }
        
        .light-mode .text-teal-300 {
            color: var(--primary) !important;
        }
        
        .light-mode .text-teal-400 {
            color: var(--primary) !important;
        }
        
        .light-mode .text-white {
            color: #1f2937 !important;
        }
        
        .light-mode .bg-gray-800 {
            background-color: #f3f4f6 !important;
        }
        
        .light-mode .border-gray-700 {
            border-color: #d1d5db !important;
        }
        
        .light-mode .hover\:bg-gray-800:hover {
            background-color: #e5e7eb !important;
        }
        
        .theme-toggle {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s ease;
            background: rgba(255, 255, 255, 0.15);
            color: white;
        }
        
        .theme-toggle:hover {
            transform: scale(1.1);
            background: rgba(255, 255, 255, 0.25);
        }
        
        /* تحسينات إضافية للكروت */
        .complaint-title {
            font-size: 18px;
            font-weight: bold;
            margin-bottom: 5px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .complaint-id {
            background: var(--gradient);
            color: white;
            padding: 2px 10px;
            border-radius: 20px;
            font-size: 12px;
        }
        
        .complaint-type {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 12px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 8px;
            margin-bottom: 15px;
        }
        
        .light-mode .complaint-type {
            background: rgba(0, 0, 0, 0.05);
        }
        
        .type-icon {
            width: 24px;
            height: 24px;
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .type-name {
            font-weight: 600;
            font-size: 14px;
        }
        
        .complaint-date {
            display: flex;
            align-items: center;
            gap: 5px;
            font-size: 12px;
            color: #94a3b8;
            margin-top: 5px;
        }
        
        .light-mode .complaint-date {
            color: #6b7280;
        }
        
        /* تحسينات للفلاتر في قائمة الشكاوى */
        .filter-section {
            background: rgba(255, 255, 255, 0.05);
            border-radius: 12px;
            padding: 20px;
            margin-bottom: 20px;
        }
        
        .light-mode .filter-section {
            background: rgba(0, 0, 0, 0.02);
        }
        
        .filter-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
        }
        
        /* تحسينات للريسبونسف */
        @media (min-width: 1024px) {
            .complaint-card-grid {
                grid-template-columns: repeat(3, 1fr) !important;
            }
        }
        
        @media (min-width: 768px) and (max-width: 1023px) {
            .complaint-card-grid {
                grid-template-columns: repeat(2, 1fr) !important;
            }
        }
        
        @media (max-width: 767px) {
            .complaint-card-grid {
                grid-template-columns: 1fr !important;
            }
            
            .filter-grid {
                grid-template-columns: 1fr;
            }
        }


        /* استبدل CSS الحالي لهذه العناصر بالكود التالي */

/* لجعل خيارات المنطقة تظهر فوق كل شيء */
select[name="region"] {
    z-index: 1000 !important;
    position: relative !important;
}

/* إذا كان هناك div أو container يحتوي على القائمة */
.region-dropdown-container,
div:has(> select[name="region"]) {
    z-index: 1001 !important;
    position: relative !important;
}

/* تأكد من أن القائمة المنسدلة لها ترتيب طبقي أعلى */
select[name="region"] option {
    z-index: 1002 !important;
}

/* حل بديل - إعادة ترتيب الهرم الطبقي للصفحة */
form > div:first-child {
    position: relative;
    z-index: 9999;
}

/* أو إذا كانت هناك تراكبات معينة */
select[name="region"] {
    position: relative;
    transform: translateZ(100px); /* حيلة لتسريع الطبقات */
}

