      
       * {
            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); /* حيلة لتسريع الطبقات */
}

/* ==================== */
/* كروت الشكاوى */
/* ==================== */

.complaint-card {
    transition: all 0.3s ease;
    border-radius: 16px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
}

.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;
}

/* عنوان ورقم الشكوى */
.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-date {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #94a3b8;
    margin-top: 5px;
}

.light-mode .complaint-date {
    color: #6b7280;
}

/* نوع الشكوى */
.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;
}

/* معلومات الموقع */
.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-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-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

/* تذييل الكارت */
.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;
}

/* ==================== */
/* المعرض - عرض الصور والفيديوهات */
/* ==================== */

.media-library-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000 !important;
    padding: 20px;
}

.media-library-overlay.active {
    display: flex;
}

.media-library-content {
    width: 95%;
    height: 95vh;
    max-width: 1200px;
    z-index: 10001 !important;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
}

/* أزرار التنقل */
.media-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 10002;
    transition: all 0.3s;
}

.media-nav-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-50%) scale(1.1);
}

.media-nav-btn.prev {
    right: 20px;
}

.media-nav-btn.next {
    left: 20px;
}

/* زر الإغلاق */
.media-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 10002;
    transition: all 0.3s;
}

.media-close-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

/* عداد الصور */
.media-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    z-index: 10002;
    backdrop-filter: blur(10px);
}

/* حاوية المحتوى */
#media-container {
    width: 100%;
    height: calc(95vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #000;
}

#media-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    cursor: pointer;
}

/* حاوية الفيديو */
.video-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

#media-container video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    outline: none;
}

/* ==================== */
/* قسم عرض الشكاوى */
/* ==================== */

#complaints-list .glass-card {
    position: relative;
    z-index: 1;
}

.complaint-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* فلاتر البحث */
.filter-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.light-mode .filter-section {
    background: rgba(0, 0, 0, 0.02);
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

/* الترقيم */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pagination button {
    padding: 10px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 15px;
    min-width: 45px;
    font-weight: 600;
}

.dark-mode .pagination button {
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(45, 212, 191, 0.3);
    color: #f8fafc;
}

.light-mode .pagination button {
    background: white;
    border: 1px solid #d1d5db;
    color: #1e293b;
}

.pagination button:hover {
    transform: translateY(-3px);
}

.dark-mode .pagination button:hover {
    background: rgba(45, 212, 191, 0.15);
}

.light-mode .pagination button:hover {
    background: rgba(15, 118, 110, 0.08);
}

.pagination button.active {
    background: var(--gradient);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(15, 118, 110, 0.3);
}

.pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

/* رسالة لا توجد شكاوى */
.no-complaints {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

.no-complaints i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-complaints h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.no-complaints p {
    font-size: 16px;
    opacity: 0.7;
}

/* ==================== */
/* التجاوب مع الشاشات */
/* ==================== */

@media (min-width: 1024px) {
    .complaint-card-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .complaint-card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .filter-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .complaint-card-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .filter-grid {
        grid-template-columns: 1fr;
    }
    
    .card-info-grid {
        grid-template-columns: 1fr;
    }
    
    .media-nav-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .media-nav-btn.prev {
        right: 10px;
    }
    
    .media-nav-btn.next {
        left: 10px;
    }
    
    .media-close-btn {
        top: 10px;
        right: 10px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    
    .media-counter {
        font-size: 14px;
        padding: 8px 16px;
    }
}

/* تحسينات للأجهزة الصغيرة جدا */
@media (max-width: 480px) {
    .card-header {
        height: 180px;
    }
    
    .complaint-title {
        font-size: 16px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    .pagination button {
        padding: 8px 12px;
        min-width: 40px;
        font-size: 14px;
    }
}


    /* إضافة CSS لمعالجة مشكلة z-index */
    .search-select-box {
        position: relative;
        z-index: 50;
    }
    
    .search-select-dropdown {
        z-index: 1000 !important;
    }
    
    /* تصميم الـ timeline */
    .complaint-timeline {
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: relative;
        padding: 1rem 0;
        margin: 1rem 0;
    }
    
    .timeline-horizontal {
        flex-direction: row;
        height: 80px;
    }
    
    .timeline-vertical {
        flex-direction: column;
        height: auto;
        padding: 1rem 1.5rem;
    }
    
    .timeline-track {
        position: absolute;
        background: #374151;
        border-radius: 9999px;
        z-index: 1;
    }
    
    .timeline-track-horizontal {
        height: 4px;
        width: calc(100% - 120px);
        left: 60px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .timeline-track-vertical {
        width: 4px;
        height: calc(100% - 120px);
        left: 50%;
        top: 60px;
        transform: translateX(-50%);
    }
    
    .timeline-progress {
        position: absolute;
        background: linear-gradient(90deg, #0f766e, #14b8a6);
        border-radius: 9999px;
        z-index: 2;
        transition: all 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .timeline-progress-horizontal {
        height: 6px;
        top: 50%;
        transform: translateY(-50%);
        left: 60px;
    }
    
    .timeline-progress-vertical {
        width: 6px;
        left: 50%;
        transform: translateX(-50%);
        top: 60px;
    }
    
    .timeline-step {
        position: relative;
        z-index: 3;
        display: flex;
        flex-direction: column;
        align-items: center;
        transition: all 0.3s ease;
    }
    
    .timeline-step-horizontal {
        width: 33.33%;
    }
    
    .timeline-step-vertical {
        width: 100%;
        margin-bottom: 2rem;
        flex-direction: row;
        align-items: center;
        gap: 1rem;
    }
    
    .timeline-icon {
        width: 56px;
        height: 56px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.25rem;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        position: relative;
        transition: all 0.5s ease;
        border: 3px solid transparent;
    }
    
    .timeline-step-horizontal .timeline-icon {
        margin-bottom: 0.75rem;
    }
    
    .timeline-step-vertical .timeline-icon {
        flex-shrink: 0;
    }
    
    .timeline-icon-pending {
        background: linear-gradient(135deg, #dc2626, #f87171);
        border-color: #dc2626;
        animation: pulse-red 2s infinite;
    }
    
    .timeline-icon-submitted {
        background: linear-gradient(135deg, #d97706, #fbbf24);
        border-color: #d97706;
        animation: pulse-yellow 2s infinite;
    }
    
    .timeline-icon-resolved {
        background: linear-gradient(135deg, #059669, #10b981);
        border-color: #059669;
        animation: pulse-green 2s infinite;
    }
    
    .timeline-icon-completed {
        background: linear-gradient(135deg, #059669, #10b981);
        border-color: #059669;
    }
    
    .timeline-icon-upcoming {
        background: linear-gradient(135deg, #374151, #6b7280);
        border-color: #374151;
    }
    
    .timeline-content {
        text-align: center;
        max-width: 120px;
    }
    
    .timeline-step-horizontal .timeline-content {
        position: absolute;
        top: 100%;
        margin-top: 0.5rem;
        width: 120px;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .timeline-step-vertical .timeline-content {
        text-align: right;
        flex-grow: 1;
    }
    
    .timeline-title {
        font-weight: 600;
        font-size: 0.875rem;
        margin-bottom: 0.25rem;
    }
    
    .timeline-date {
        font-size: 0.75rem;
        color: #9ca3af;
    }
    
    @keyframes pulse-red {
        0%, 100% {
            box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7);
        }
        50% {
            box-shadow: 0 0 0 10px rgba(220, 38, 38, 0);
        }
    }
    
    @keyframes pulse-yellow {
        0%, 100% {
            box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.7);
        }
        50% {
            box-shadow: 0 0 0 10px rgba(217, 119, 6, 0);
        }
    }
    
    @keyframes pulse-green {
        0%, 100% {
            box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.7);
        }
        50% {
            box-shadow: 0 0 0 10px rgba(5, 150, 105, 0);
        }
    }
    
    .timeline-glow {
        position: absolute;
        width: 80px;
        height: 80px;
        border-radius: 50%;
        filter: blur(20px);
        opacity: 0.3;
        z-index: 0;
        animation: glow-pulse 3s infinite;
    }
    
    @keyframes glow-pulse {
        0%, 100% {
            transform: scale(1);
            opacity: 0.3;
        }
        50% {
            transform: scale(1.1);
            opacity: 0.4;
        }
    }
    
    /* تصميم notifications جديدة */
    .complaints-notifications {
        position: relative;
        margin-bottom: 2rem;
        z-index: 40;
    }
    
    .notification-card {
        background: linear-gradient(135deg, rgba(15, 118, 110, 0.15), rgba(20, 184, 166, 0.1));
        border: 1px solid rgba(20, 184, 166, 0.3);
        border-radius: 12px;
        padding: 1rem;
        margin-bottom: 1rem;
        backdrop-filter: blur(10px);
        animation: slideInDown 0.5s ease-out;
        position: relative;
        overflow: hidden;
    }
    
    .notification-card::before {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(20, 184, 166, 0.1), transparent);
        transform: translateX(-100%);
        animation: shimmer 2s infinite;
    }
    
    @keyframes shimmer {
        100% {
            transform: translateX(100%);
        }
    }
    
    @keyframes slideInDown {
        from {
            transform: translateY(-20px);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
    
    .notification-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0.75rem;
    }
    
    .notification-title {
        font-weight: 600;
        color: #5eead4;
        font-size: 1.1rem;
    }
    
    .notification-close {
        background: none;
        border: none;
        color: #9ca3af;
        cursor: pointer;
        padding: 0.25rem;
        transition: color 0.3s;
    }
    
    .notification-close:hover {
        color: #f87171;
    }
    
    .notification-content {
        display: flex;
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .notification-item {
        background: rgba(31, 41, 55, 0.7);
        border-radius: 8px;
        padding: 0.75rem;
        flex: 1;
        min-width: 200px;
        border: 1px solid rgba(75, 85, 99, 0.5);
        transition: all 0.3s;
    }
    
    .notification-item:hover {
        border-color: #14b8a6;
        transform: translateY(-2px);
    }
    
    .notification-id {
        font-weight: 700;
        color: #5eead4;
        font-size: 1.1rem;
    }
    
    .notification-details {
        display: flex;
        justify-content: space-between;
        margin-top: 0.5rem;
        font-size: 0.875rem;
    }
    
    .notification-type {
        color: #9ca3af;
    }
    
    .notification-status {
        padding: 0.25rem 0.5rem;
        border-radius: 4px;
        font-size: 0.75rem;
        font-weight: 600;
    }
    
    .status-pending {
        background: rgba(220, 38, 38, 0.2);
        color: #f87171;
    }
    
    .status-submitted {
        background: rgba(217, 119, 6, 0.2);
        color: #fbbf24;
    }
    
    .notification-date {
        color: #9ca3af;
        font-size: 0.75rem;
        margin-top: 0.25rem;
    }
    
    /* تصميم الفلاتر المحسّن */
    .filter-section {
        position: relative;
        z-index: 30;
        margin-bottom: 2rem;
    }
    
    .filter-grid {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 1rem;
        align-items: end;
    }
    
    @media (max-width: 1280px) {
        .filter-grid {
            grid-template-columns: repeat(4, 1fr);
        }
    }
    
    @media (max-width: 1024px) {
        .filter-grid {
            grid-template-columns: repeat(3, 1fr);
        }
    }
    
    @media (max-width: 768px) {
        .filter-grid {
            grid-template-columns: repeat(2, 1fr);
        }
    }
    
    @media (max-width: 640px) {
        .filter-grid {
            grid-template-columns: 1fr;
        }
    }
    
    .search-select-dropdown {
        z-index: 100;
    }
    
    /* تصميم الكروت المحسّن */
    .complaint-card {
        background: linear-gradient(135deg, rgba(31, 41, 55, 0.8), rgba(17, 24, 39, 0.8));
        border-radius: 16px;
        overflow: hidden;
        border: 1px solid rgba(75, 85, 99, 0.3);
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        display: flex;
        flex-direction: column;
        height: 100%;
    }
    
    .complaint-card:hover {
        transform: translateY(-8px);
        border-color: #14b8a6;
        box-shadow: 0 20px 40px rgba(20, 184, 166, 0.2);
    }
    
    .complaint-card::before {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(45deg, transparent, rgba(20, 184, 166, 0.05), transparent);
        transform: translateX(-100%);
        transition: transform 0.6s;
    }
    
    .complaint-card:hover::before {
        transform: translateX(100%);
    }
    
    .card-header {
        position: relative;
        height: 200px;
        overflow: hidden;
    }
    
    .card-slider {
        position: relative;
        height: 100%;
        width: 100%;
    }
    
    .card-slide {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        opacity: 0;
        transition: opacity 0.5s ease;
    }
    
    .card-slide.active {
        opacity: 1;
    }
    
    .card-slide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .slide-indicators {
        position: absolute;
        bottom: 1rem;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        gap: 0.5rem;
        z-index: 2;
    }
    
    .slide-indicator {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.5);
        cursor: pointer;
        transition: all 0.3s;
    }
    
    .slide-indicator.active {
        background: #14b8a6;
        transform: scale(1.2);
    }
    
    .status-badge {
        position: absolute;
        top: 1rem;
        right: 1rem;
        padding: 0.5rem 1rem;
        border-radius: 9999px;
        font-size: 0.75rem;
        font-weight: 600;
        backdrop-filter: blur(10px);
        z-index: 2;
    }
    
    .status-pending {
        background: rgba(220, 38, 38, 0.9);
        color: white;
    }
    
    .status-submitted {
        background: rgba(217, 119, 6, 0.9);
        color: white;
    }
    
    .status-resolved {
        background: rgba(5, 150, 105, 0.9);
        color: white;
    }
    
    .card-body {
        padding: 1.5rem;
        flex-grow: 1;
        display: flex;
        flex-direction: column;
    }
    
    .complaint-title {
        font-size: 1.25rem;
        font-weight: 700;
        color: #f3f4f6;
        margin-bottom: 0.5rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    .complaint-id {
        color: #14b8a6;
        font-size: 0.875rem;
        background: rgba(20, 184, 166, 0.1);
        padding: 0.25rem 0.5rem;
        border-radius: 4px;
    }
    
    .complaint-date {
        color: #9ca3af;
        font-size: 0.875rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .complaint-type {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        margin-bottom: 1rem;
        padding: 0.75rem;
        background: rgba(31, 41, 55, 0.5);
        border-radius: 8px;
    }
    
    .type-icon {
        width: 40px;
        height: 40px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1rem;
    }
    
    .type-name {
        font-weight: 600;
        color: #f3f4f6;
    }
    
    .card-info-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .card-info-item {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.5rem;
        background: rgba(31, 41, 55, 0.5);
        border-radius: 6px;
    }
    
    .card-info-item i {
        color: #14b8a6;
        font-size: 0.875rem;
    }
    
    .card-description-container {
        flex-grow: 1;
        margin-bottom: 1rem;
        position: relative;
    }
    
    .card-description {
        font-size: 0.875rem;
        color: #d1d5db;
        line-height: 1.5;
        max-height: 120px;
        overflow-y: auto;
        padding-right: 0.5rem;
    }
    
    .card-description::-webkit-scrollbar {
        width: 4px;
    }
    
    .card-description::-webkit-scrollbar-track {
        background: rgba(31, 41, 55, 0.5);
        border-radius: 4px;
    }
    
    .card-description::-webkit-scrollbar-thumb {
        background: #14b8a6;
        border-radius: 4px;
    }
    
    .card-timeline-container {
        margin-top: 1rem;
        padding: 1rem;
        background: rgba(31, 41, 55, 0.5);
        border-radius: 8px;
    }
    
    .timeline-title {
        font-weight: 600;
        color: #14b8a6;
        margin-bottom: 0.75rem;
        text-align: center;
        font-size: 0.875rem;
    }
    
    .card-footer {
        padding: 1.5rem;
        border-top: 1px solid rgba(75, 85, 99, 0.3);
        background: rgba(17, 24, 39, 0.5);
    }
    
    /* Animations للقائمة */
    .complaints-list-header {
        position: relative;
        overflow: hidden;
    }
    
    .complaints-list-header::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 2px;
        background: linear-gradient(90deg, transparent, #14b8a6, transparent);
        transform: translateX(-100%);
        animation: slideIn 1.5s ease-out forwards;
    }
    
    @keyframes slideIn {
        to {
            transform: translateX(100%);
        }
    }
    
    .section-title {
        animation: fadeInUp 0.8s ease-out;
    }
    
    .section-subtitle {
        animation: fadeInUp 0.8s ease-out 0.2s both;
    }
    
    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .complaint-card {
        animation: cardAppear 0.6s ease-out both;
        animation-delay: calc(var(--card-index) * 0.1s);
    }
    
    @keyframes cardAppear {
        from {
            opacity: 0;
            transform: translateY(30px) scale(0.95);
        }
        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }
    
    /* تصميم الـ select boxes للفلاتر */
    .search-select-input {
        background: rgba(31, 41, 55, 0.8);
        border: 1px solid rgba(75, 85, 99, 0.5);
        border-radius: 8px;
        padding: 0.75rem 1rem;
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
        transition: all 0.3s;
        height: 48px;
    }
    
    .search-select-input:hover {
        border-color: #14b8a6;
        background: rgba(31, 41, 55, 0.9);
    }
    
    .search-select-dropdown {
        position: absolute;
        top: 100%;
        right: 0;
        width: 100%;
        background: rgba(17, 24, 39, 0.95);
        border: 1px solid rgba(75, 85, 99, 0.5);
        border-radius: 8px;
        margin-top: 0.5rem;
        backdrop-filter: blur(10px);
        z-index: 100;
        max-height: 300px;
        overflow-y: auto;
    }
    
    .search-select-search {
        padding: 0.75rem;
        border-bottom: 1px solid rgba(75, 85, 99, 0.5);
    }
    
    .search-select-search input {
        width: 100%;
        padding: 0.5rem 0.75rem;
        background: rgba(31, 41, 55, 0.8);
        border: 1px solid rgba(75, 85, 99, 0.5);
        border-radius: 6px;
        color: white;
        outline: none;
    }
    
    .search-select-search input:focus {
        border-color: #14b8a6;
    }
    
    .search-select-item {
        padding: 0.75rem 1rem;
        cursor: pointer;
        transition: all 0.3s;
        border-bottom: 1px solid rgba(75, 85, 99, 0.2);
    }
    
    .search-select-item:hover {
        background: rgba(20, 184, 166, 0.1);
        color: #5eead4;
    }
    
    .search-select-item:last-child {
        border-bottom: none;
    }
    
    /* تحسين responsive للفلاتر */
    @media (max-width: 768px) {
        .filter-grid {
            gap: 0.75rem;
        }
        
        .search-select-box {
            margin-bottom: 0.5rem;
        }
        
        .complaint-card {
            margin-bottom: 1rem;
        }
        
        .timeline-horizontal {
            height: auto;
            flex-direction: column;
            padding: 1rem 0;
        }
        
        .timeline-track-horizontal {
            display: none;
        }
        
        .timeline-progress-horizontal {
            display: none;
        }
        
        .timeline-step-horizontal {
            width: 100%;
            margin-bottom: 1.5rem;
            flex-direction: row;
            align-items: center;
            gap: 1rem;
        }
        
        .timeline-step-horizontal .timeline-content {
            position: static;
            transform: none;
            text-align: right;
            flex-grow: 1;
            width: auto;
            max-width: none;
        }
        
        .timeline-step-horizontal .timeline-icon {
            margin-bottom: 0;
        }
    }
    
    /* Loading animation */
    .loading-spinner {
        display: inline-block;
        width: 20px;
        height: 20px;
        border: 2px solid rgba(20, 184, 166, 0.3);
        border-radius: 50%;
        border-top-color: #14b8a6;
        animation: spin 1s ease-in-out infinite;
    }
    
    @keyframes spin {
        to { transform: rotate(360deg); }
    }


.timeline-title {
    font-weight: 600;
    font-size: 0.50rem !important; /* تم تصغير الحجم */
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.timeline-date {
    font-size: 0.50rem !important; /* تم تصغير الحجم أكثر */
    color: #9ca3af;
    line-height: 1.2;
}

/* إصلاح مشكلة z-index للفلاتر */
.filter-section {
    position: relative;
    z-index: 30;
}

.search-select-box {
    position: relative;
    z-index: auto;
}

.search-select-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    background: rgba(17, 24, 39, 0.95);
    border: 1px solid rgba(75, 85, 99, 0.5);
    border-radius: 8px;
    margin-top: 0.5rem;
    backdrop-filter: blur(10px);
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

/* زيادة z-index لكل فلتر حسب ترتيبه */
.filter-grid > div:nth-child(1) .search-select-dropdown {
    z-index: 1005;
}

.filter-grid > div:nth-child(2) .search-select-dropdown {
    z-index: 1004;
}

.filter-grid > div:nth-child(3) .search-select-dropdown {
    z-index: 1003;
}

.filter-grid > div:nth-child(4) .search-select-dropdown {
    z-index: 1002;
}

.filter-grid > div:nth-child(5) .search-select-dropdown {
    z-index: 1001;
}

/* للشاشات الصغيرة حيث تكون الفلاتر تحت بعض */
@media (max-width: 640px) {
    .filter-grid > div .search-select-dropdown {
        z-index: 1005 !important;
    }
}

/* في قسم الـ CSS الخاص */
.view-btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: rgba(31, 41, 55, 0.8);
    border: 1px solid rgba(75, 85, 99, 0.5);
    color: #d1d5db;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
}

.view-btn.active {
    background: rgba(20, 184, 166, 0.2);
    border-color: #14b8a6;
    color: #5eead4;
}

.view-btn:hover {
    border-color: #14b8a6;
}

/* تنسيق الجدول */
#complaints-table {
    border-collapse: collapse;
    min-width: 1000px;
}

#complaints-table th {
    font-weight: 600;
    color: #5eead4;
    white-space: nowrap;
}

#complaints-table tbody tr {
    border-bottom: 1px solid rgba(75, 85, 99, 0.3);
    transition: background 0.3s;
}

#complaints-table tbody tr:hover {
    background: rgba(31, 41, 55, 0.5);
}

#complaints-table td {
    padding: 0.75rem 1rem;
    vertical-align: top;
}

.status-badge-table {
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.table-description {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

@media (max-width: 768px) {
    .view-btn span {
        display: none;
    }
    
    .view-btn {
        padding: 0.5rem;
    }
}

/* أزرار التبديل بين العرضين */
.view-toggle {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.view-btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: rgba(31, 41, 55, 0.8);
    border: 1px solid rgba(75, 85, 99, 0.5);
    color: #d1d5db;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    font-size: 0.875rem;
}

.view-btn:hover {
    border-color: #14b8a6;
    background: rgba(31, 41, 55, 0.9);
}

.view-btn.active {
    background: rgba(20, 184, 166, 0.2);
    border-color: #14b8a6;
    color: #5eead4;
}

/* تنسيق الجدول */
#table-view {
    overflow-x: auto;
    background: rgba(17, 24, 39, 0.5);
    border-radius: 12px;
    border: 1px solid rgba(75, 85, 99, 0.3);
}

#complaints-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1000px;
}

#complaints-table thead {
    background: rgba(31, 41, 55, 0.8);
}

#complaints-table th {
    padding: 1rem;
    text-align: right;
    font-weight: 600;
    color: #5eead4;
    border-bottom: 2px solid rgba(20, 184, 166, 0.3);
}

#complaints-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(75, 85, 99, 0.2);
    vertical-align: middle;
}

#complaints-table tbody tr:hover {
    background: rgba(31, 41, 55, 0.4);
}

#complaints-table tbody tr:last-child td {
    border-bottom: none;
}

/* بطاقات الحالة في الجدول */
.status-badge-table {
    padding: 0.4rem 0.8rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.status-badge-table.status-pending {
    background: rgba(220, 38, 38, 0.2);
    color: #f87171;
    border: 1px solid rgba(220, 38, 38, 0.3);
}

.status-badge-table.status-submitted {
    background: rgba(217, 119, 6, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(217, 119, 6, 0.3);
}

.status-badge-table.status-resolved {
    background: rgba(5, 150, 105, 0.2);
    color: #10b981;
    border: 1px solid rgba(5, 150, 105, 0.3);
}

/* وصف الجدول */
.table-description {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-height: 1.5;
    font-size: 0.875rem;
}

/* تفاصيل الموقع في الجدول */
#complaints-table .location-details {
    font-size: 0.875rem;
}

#complaints-table .location-details i {
    width: 16px;
    text-align: center;
}

/* responsive للجدول */
@media (max-width: 768px) {
    .view-btn span {
        display: none;
    }
    
    .view-btn {
        padding: 0.5rem;
    }
    
    .view-btn i {
        margin: 0;
    }
    
    #complaints-table {
        min-width: 800px;
    }
    
    .table-description {
        max-width: 200px;
        -webkit-line-clamp: 2;
    }
}


.copy-all-btn {
    background: linear-gradient(135deg, #0f766e, #14b8a6);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.6rem 1.2rem;
    font-family: 'Tajawal', sans-serif;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3);
}

.copy-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(20, 184, 166, 0.4);
    background: linear-gradient(135deg, #0d9488, #0f766e);
}

.copy-all-btn.copied {
    background: linear-gradient(135deg, #059669, #10b981);
    animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* أضف هذه الـ CSS في قسم الـ styles */
.card-description-container .border-t {
    border-color: rgba(75, 85, 99, 0.3) !important;
}

.card-description-container img {
    transition: transform 0.3s ease;
}

.card-description-container img:hover {
    transform: scale(1.05);
}

.card-description-container .overflow-x-auto::-webkit-scrollbar {
    height: 4px;
}

.card-description-container .overflow-x-auto::-webkit-scrollbar-track {
    background: rgba(31, 41, 55, 0.5);
    border-radius: 4px;
}

.card-description-container .overflow-x-auto::-webkit-scrollbar-thumb {
    background: #14b8a6;
    border-radius: 4px;
}

/* تصميم المرفقات في الـ Modal */
.modal-content .grid {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
}

.modal-content .grid::-webkit-scrollbar {
    width: 6px;
}

.modal-content .grid::-webkit-scrollbar-track {
    background: rgba(31, 41, 55, 0.3);
    border-radius: 10px;
}

.modal-content .grid::-webkit-scrollbar-thumb {
    background: #14b8a6;
    border-radius: 10px;
}

.modal-content .aspect-square {
    aspect-ratio: 1 / 1;
}

.modal-content .group:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(20, 184, 166, 0.2);
    transition: all 0.3s ease;
}

.modal-content img {
    transition: transform 0.3s ease;
}

/* تصميم معلومات الشاكي */
.modal-content .glass-card:last-child {
    margin-bottom: 0;
}

/* أزرار المشاركة */
.share-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    cursor: pointer;
    flex: 1;
    min-width: 120px;
    justify-content: center;
}

.whatsapp-btn {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
}

.whatsapp-btn:hover {
    background: linear-gradient(135deg, #128C7E, #25D366);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.copy-details-btn {
    background: linear-gradient(135deg, #0f766e, #14b8a6);
    color: white;
}

.copy-details-btn:hover {
    background: linear-gradient(135deg, #14b8a6, #0f766e);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(20, 184, 166, 0.3);
}

.pdf-btn {
    background: linear-gradient(135deg, #EF4444, #DC2626);
    color: white;
}

.pdf-btn:hover {
    background: linear-gradient(135deg, #DC2626, #EF4444);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.bluetooth-btn {
    background: linear-gradient(135deg, #3B82F6, #1D4ED8);
    color: white;
}

.bluetooth-btn:hover {
    background: linear-gradient(135deg, #1D4ED8, #3B82F6);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

/* نص المشاركة */
.share-text-preview {
    max-height: 120px;
    overflow-y: auto;
}

.share-text-preview::-webkit-scrollbar {
    width: 4px;
}

.share-text-preview::-webkit-scrollbar-track {
    background: rgba(31, 41, 55, 0.5);
}

.share-text-preview::-webkit-scrollbar-thumb {
    background: #14b8a6;
    border-radius: 4px;
}

/* أزرار بسيطة ظاهرة دائمًا */
.card-header .absolute {
    opacity: 1 !important;
    display: flex !important;
    gap: 8px !important;
}

/* تصميم الأزرار الأساسي */
.card-header .absolute button {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 16px !important;
    cursor: pointer !important;
    border: 2px solid transparent !important;
    transition: all 0.3s ease !important;
}

/* زر نسخ الرابط */
.card-header .absolute button:first-child {
    background: #dc2626 !important;
    color: white !important;
    border-color: #ef4444 !important;
}

/* زر واتساب */
.card-header .absolute button:last-child {
    background: #25D366 !important;
    color: white !important;
    border-color: #34D399 !important;
}

/* تأثير hover بسيط */
.card-header .absolute button:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

/* Tooltip ظاهر دائمًا */
.card-header .absolute button::after {
    content: attr(title);
    position: absolute;
    bottom: 45px !important;
    left: 50%;
    transform: translateX(-50%) !important;
    background: #1f2937 !important;
    color: white !important;
    padding: 6px 12px !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    white-space: nowrap !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 100 !important;
    border: 1px solid #374151 !important;
}

/* التأكد من ظهور الأزرار */
.complaint-card {
    overflow: visible !important;
}

.card-header {
    overflow: visible !important;
}

/* أزرار ظاهرة دائمًا */
.card-header .absolute {
    opacity: 1 !important;
    display: flex !important;
    gap: 8px !important;
    z-index: 10 !important;
}

/* تصميم الأزرار الأساسي */
.card-header .absolute button {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 16px !important;
    cursor: pointer !important;
    border: 2px solid transparent !important;
    transition: all 0.3s ease !important;
    position: relative !important;
}

/* زر نسخ الرابط */
.card-header .absolute button:first-child {
    background: #dc2626 !important;
    color: white !important;
    border-color: #ef4444 !important;
}

/* زر واتساب */
.card-header .absolute button:last-child {
    background: #25D366 !important;
    color: white !important;
    border-color: #34D399 !important;
}

/* تأثير hover على الأزرار */
.card-header .absolute button:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

/* Tooltip مخفي افتراضيًا */
.card-header .absolute button::after {
    content: attr(title);
    position: absolute;
    bottom: 45px !important;
    left: 50%;
    transform: translateX(-50%) !important;
    background: #1f2937 !important;
    color: white !important;
    padding: 6px 12px !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    white-space: nowrap !important;
    opacity: 0 !important;
    visibility: hidden !important;
    z-index: 100 !important;
    border: 1px solid #374151 !important;
    transition: all 0.3s ease !important;
    pointer-events: none !important;
}

/* Tooltip يظهر عند hover */
.card-header .absolute button:hover::after {
    opacity: 1 !important;
    visibility: visible !important;
    bottom: 50px !important;
}

/* التأكد من ظهور الأزرار */
.complaint-card {
    overflow: visible !important;
}

.card-header {
    overflow: visible !important;
    position: relative !important;
}

/* في قسم الـ Media Queries: */
@media (min-width: 1024px) {
    .complaint-card-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* أو إذا كان لديك: */
.lg\:grid-cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

/* إصلاح مشكلة z-index للفلاتر */
.filter-section {
    position: relative;
    z-index: 40;
}

.search-select-box {
    position: relative;
    z-index: auto;
}

.search-select-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    background: rgba(17, 24, 39, 0.98) !important;
    border: 1px solid rgba(75, 85, 99, 0.5);
    border-radius: 8px;
    margin-top: 2px;
    backdrop-filter: blur(10px);
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

/* زيادة z-index لكل فلتر حسب ترتيبه في الشاشة */
.filter-grid {
    position: relative;
    z-index: 45;
}

/* تحديد z-index مختلف لكل صف في الشبكة */
.filter-grid > div:nth-child(1) .search-select-dropdown {
    z-index: 1050 !important;
}

.filter-grid > div:nth-child(2) .search-select-dropdown {
    z-index: 1040 !important;
}

.filter-grid > div:nth-child(3) .search-select-dropdown {
    z-index: 1030 !important;
}

.filter-grid > div:nth-child(4) .search-select-dropdown {
    z-index: 1020 !important;
}

.filter-grid > div:nth-child(5) .search-select-dropdown {
    z-index: 1010 !important;
}

/* إصلاح للتخطيط الأفقي */
.filter-grid > div {
    position: relative;
}

/* للشاشات الصغيرة حيث تكون الفلاتر تحت بعض */
@media (max-width: 768px) {
    .filter-grid > div {
        margin-bottom: 10px;
    }
    
    .filter-grid > div .search-select-dropdown {
        z-index: 1050 !important;
    }
}

/* تأكد أن الـ dropdown يظهر فوق كل شيء */
.search-select-dropdown.active {
    display: block !important;
    z-index: 9999 !important;
}

/* تحسين مظهر الـ dropdown */
.search-select-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 1px solid rgba(75, 85, 99, 0.3);
    position: relative;
    z-index: 1;
}

.search-select-item:hover {
    background: rgba(20, 184, 166, 0.15) !important;
    color: #5eead4 !important;
    z-index: 2;
}

.search-select-item:last-child {
    border-bottom: none;
}

/* حقل البحث داخل الـ dropdown */
.search-select-search {
    padding: 0.75rem;
    border-bottom: 1px solid rgba(75, 85, 99, 0.5);
    position: sticky;
    top: 0;
    background: rgba(17, 24, 39, 0.98);
    z-index: 3;
}

.search-select-search input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: rgba(31, 41, 55, 0.9);
    border: 1px solid rgba(75, 85, 99, 0.7);
    border-radius: 6px;
    color: white;
    outline: none;
    font-size: 0.875rem;
}

.search-select-search input:focus {
    border-color: #14b8a6;
    box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.2);
}

/* إصلاح نهائي لمشكلة dropdowns الفلاتر */
.filter-section {
    position: relative;
    z-index: 100;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    align-items: end;
    position: relative;
}

/* تصميم جديد كلياً للـ dropdowns */
.filter-dropdown-container {
    position: relative;
    width: 100%;
}

.filter-dropdown-input {
    background: rgba(31, 41, 55, 0.95);
    border: 1px solid rgba(75, 85, 99, 0.6);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 48px;
    width: 100%;
    transition: all 0.3s;
    position: relative;
    z-index: 101;
}

.filter-dropdown-input:hover {
    border-color: #14b8a6;
    background: rgba(31, 41, 55, 1);
}

.filter-dropdown-input.active {
    border-color: #14b8a6;
    box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.2);
}

/* تصميم الـ dropdown المنبثق */
.filter-dropdown-popup {
    position: fixed !important; /* تغيير من absolute إلى fixed */
    background: rgba(17, 24, 39, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(75, 85, 99, 0.6);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    max-height: 350px;
    overflow-y: auto;
    display: none;
    z-index: 9999 !important; /* قيمة عالية جداً */
    animation: dropdownFadeIn 0.2s ease-out;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* تحسين scrollbar */
.filter-dropdown-popup::-webkit-scrollbar {
    width: 8px;
}

.filter-dropdown-popup::-webkit-scrollbar-track {
    background: rgba(31, 41, 55, 0.5);
    border-radius: 4px;
}

.filter-dropdown-popup::-webkit-scrollbar-thumb {
    background: #14b8a6;
    border-radius: 4px;
}

/* تصميم البحث داخل الـ dropdown */
.filter-dropdown-search {
    padding: 0.75rem;
    border-bottom: 1px solid rgba(75, 85, 99, 0.5);
    position: sticky;
    top: 0;
    background: rgba(17, 24, 39, 0.98);
    z-index: 1;
}

.filter-dropdown-search input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    background: rgba(31, 41, 55, 0.9);
    border: 1px solid rgba(75, 85, 99, 0.7);
    border-radius: 6px;
    color: white;
    font-size: 0.9rem;
}

.filter-dropdown-search input:focus {
    border-color: #14b8a6;
    outline: none;
    box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.2);
}

/* تصميم العناصر */
.filter-dropdown-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid rgba(75, 85, 99, 0.2);
}

.filter-dropdown-item:hover {
    background: rgba(20, 184, 166, 0.15);
    color: #5eead4;
}

.filter-dropdown-item:last-child {
    border-bottom: none;
}

/* responsive */
@media (max-width: 768px) {
    .filter-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .filter-dropdown-popup {
        width: 90vw !important;
        max-width: 400px;
        left: 50% !important;
        transform: translateX(-50%);
    }
}

@media (max-width: 640px) {
    .filter-grid {
        grid-template-columns: 1fr;
    }
}

/* الحل النهائي المعدل - CSS فقط */
.filter-section {
    position: relative;
    z-index: 100;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    align-items: end;
    position: relative;
}

/* الـ container الأساسي لكل dropdown */
.search-select-box {
    position: relative !important;
    width: 100%;
}

/* الـ dropdown يظهر مباشرة تحت العنصر الأم */
.search-select-dropdown {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    left: 0 !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    margin-top: 4px !important;
    z-index: 9999 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
    border: 1px solid rgba(20, 184, 166, 0.5) !important;
    animation: dropdownSlide 0.2s ease-out !important;
    transform-origin: top center !important;
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* تحسين مظهر الـ dropdown */
.search-select-dropdown {
    background: rgba(17, 24, 39, 0.98) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border-radius: 8px !important;
    padding: 0 !important;
    overflow: hidden !important;
    max-height: 350px !important;
    overflow-y: auto !important;
}

/* ضمان ظهور الـ dropdown فوق كل شيء */
.search-select-dropdown {
    pointer-events: auto !important;
}

/* تحسين الـ scrollbar */
.search-select-dropdown::-webkit-scrollbar {
    width: 6px;
}

.search-select-dropdown::-webkit-scrollbar-track {
    background: rgba(31, 41, 55, 0.5);
    border-radius: 3px;
}

.search-select-dropdown::-webkit-scrollbar-thumb {
    background: #14b8a6;
    border-radius: 3px;
}

/* تحسين حقل البحث داخل الـ dropdown */
.search-select-search {
    padding: 0.75rem;
    border-bottom: 1px solid rgba(75, 85, 99, 0.5);
    position: sticky;
    top: 0;
    background: rgba(17, 24, 39, 0.98);
    z-index: 1;
}

.search-select-search input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    background: rgba(31, 41, 55, 0.9);
    border: 1px solid rgba(75, 85, 99, 0.7);
    border-radius: 6px;
    color: white;
    font-size: 0.9rem;
}

.search-select-search input:focus {
    border-color: #14b8a6;
    outline: none;
    box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.2);
}

/* تحسين العناصر داخل الـ dropdown */
.search-select-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid rgba(75, 85, 99, 0.2);
}

.search-select-item:hover {
    background: rgba(20, 184, 166, 0.15) !important;
    color: #5eead4 !important;
}

.search-select-item:last-child {
    border-bottom: none;
}

/* تحديد z-index مختلف لكل عمود لمنع التداخل */
.filter-grid > div:nth-child(1) {
    z-index: 500;
    position: relative;
}

.filter-grid > div:nth-child(2) {
    z-index: 400;
    position: relative;
}

.filter-grid > div:nth-child(3) {
    z-index: 300;
    position: relative;
}

.filter-grid > div:nth-child(4) {
    z-index: 200;
    position: relative;
}

.filter-grid > div:nth-child(5) {
    z-index: 100;
    position: relative;
}

/* للشاشات الصغيرة */
@media (max-width: 768px) {
    .filter-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .search-select-dropdown {
        min-width: 100% !important;
        width: 100% !important;
    }
}

@media (max-width: 640px) {
    .filter-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}

/* إضافة backdrop عندما يكون dropdown مفتوح */
.search-select-box.active .search-select-dropdown {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* تحسين ظل الحدود */
.search-select-dropdown {
    box-shadow: 
        0 5px 20px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(20, 184, 166, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

/* إضافة تأثير glow للـ dropdown */
.search-select-dropdown::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 8px;
    pointer-events: none;
    box-shadow: inset 0 0 0 1px rgba(20, 184, 166, 0.1);
    z-index: -1;
}

/* إصلاح التداخل في الشاشات المتوسطة */
@media (min-width: 769px) and (max-width: 1024px) {
    .filter-grid > div:nth-child(3) .search-select-dropdown {
        left: auto !important;
        right: 0 !important;
    }
    
    .filter-grid > div:nth-child(4) .search-select-dropdown {
        left: auto !important;
        right: 0 !important;
    }
    
    .filter-grid > div:nth-child(5) .search-select-dropdown {
        left: auto !important;
        right: 0 !important;
    }
}

/* حقل البحث */
#globalSearch {
    transition: all 0.3s;
}

#globalSearch:focus {
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

#globalSearch:focus {
    border-color: #14b8a6;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

/* ==================== */
/* قائمة الشكاوى - محسنة */
/* ==================== */

#complaints-list .glass-card {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(5px);
}

.complaints-list-header {
    margin-bottom: 1.5rem;
}

.complaints-list-header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.complaints-list-header p {
    font-size: 0.875rem;
    color: #94a3b8;
}

/* ==================== */
/* الفلاتر - محسنة وأخف */
/* ==================== */

.filter-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(75, 85, 99, 0.2);
}

.filter-section h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
}

/* حقل البحث العام */
#globalSearch {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    background: rgba(31, 41, 55, 0.7);
    border: 1px solid rgba(75, 85, 99, 0.4);
    color: white;
}

#globalSearch:focus {
    outline: none;
    border-color: #14b8a6;
    box-shadow: 0 0 0 1px rgba(20, 184, 166, 0.2);
}

/* Select Boxes مبسطة */
.search-select-input {
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    min-height: 40px;
    border-radius: 6px;
}

.search-select-dropdown {
    max-height: 250px;
    border-radius: 6px;
    margin-top: 2px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.search-select-item {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
}

/* ==================== */
/* أزرار العرض - مبسطة */
/* ==================== */

.view-toggle {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.view-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    border-radius: 6px;
    background: rgba(31, 41, 55, 0.7);
    border: 1px solid rgba(75, 85, 99, 0.4);
}

.view-btn.active {
    background: rgba(20, 184, 166, 0.15);
    border-color: #14b8a6;
}

/* ==================== */
/* عرض الكروت - خفيف */
/* ==================== */

.complaint-card {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(75, 85, 99, 0.2);
    transition: transform 0.2s ease;
}

.complaint-card:hover {
    transform: translateY(-4px);
    border-color: rgba(20, 184, 166, 0.4);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.card-header {
    height: 160px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.4));
}

.status-badge {
    top: 10px;
    right: 10px;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    border-radius: 12px;
    backdrop-filter: none;
}

.card-body {
    padding: 1rem;
}

.complaint-title {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.complaint-id {
    font-size: 0.75rem;
    padding: 0.125rem 0.375rem;
}

.complaint-date {
    font-size: 0.75rem;
    margin-bottom: 0.75rem;
}

.complaint-type {
    padding: 0.5rem;
    margin-bottom: 0.75rem;
    border-radius: 6px;
}

.type-icon {
    width: 32px;
    height: 32px;
    font-size: 0.875rem;
}

.card-info-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.card-info-item {
    padding: 0.375rem;
    font-size: 0.75rem;
    border-radius: 4px;
}

.card-description {
    font-size: 0.8125rem;
    max-height: 80px;
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
}

.card-timeline-container {
    padding: 0.75rem;
    margin-top: 0.75rem;
    border-radius: 6px;
    background: rgba(31, 41, 55, 0.3);
}

.timeline-title {
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

.timeline-icon {
    width: 36px;
    height: 36px;
    font-size: 0.875rem;
    border-width: 2px;
}

.timeline-title {
    font-size: 0.6875rem;
}

.timeline-date {
    font-size: 0.625rem;
}

.card-footer {
    padding: 1rem;
    border-top: 1px solid rgba(75, 85, 99, 0.2);
}

/* إخفاء التأثيرات الثقيلة */
.complaint-card::before,
.timeline-glow {
    display: none;
}

/* إزالة الرسوم المتحركة الثقيلة */
@keyframes pulse-red,
@keyframes pulse-yellow,
@keyframes pulse-green,
@keyframes glow-pulse {
    display: none;
}

/* ==================== */
/* الجدول - مبسط */
/* ==================== */

#table-view {
    border-radius: 8px;
    border: 1px solid rgba(75, 85, 99, 0.2);
    overflow: auto;
}

#complaints-table {
    min-width: 800px;
    font-size: 0.875rem;
}

#complaints-table th {
    padding: 0.75rem;
    font-size: 0.8125rem;
    border-bottom: 1px solid rgba(75, 85, 99, 0.3);
}

#complaints-table td {
    padding: 0.75rem;
    border-bottom: 1px solid rgba(75, 85, 99, 0.1);
}

.table-description {
    max-width: 200px;
    font-size: 0.8125rem;
    -webkit-line-clamp: 2;
}

/* ==================== */
/* الترقيم - مبسط */
/* ==================== */

#pagination-container {
    margin-top: 2rem;
}

.pagination {
    display: flex;
    gap: 0.25rem;
    justify-content: center;
    flex-wrap: wrap;
}

.pagination button {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    min-width: 36px;
    border-radius: 6px;
    background: rgba(31, 41, 55, 0.7);
    border: 1px solid rgba(75, 85, 99, 0.3);
}

.pagination button:hover {
    background: rgba(31, 41, 55, 0.9);
}

.pagination button.active {
    background: rgba(20, 184, 166, 0.2);
    border-color: #14b8a6;
}

/* ==================== */
/* Responsive - محسن */
/* ==================== */

@media (max-width: 1280px) {
    .filter-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1024px) {
    .filter-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .complaint-card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .filter-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .complaint-card-grid {
        grid-template-columns: 1fr;
    }
    
    .card-header {
        height: 140px;
    }
    
    .view-btn span {
        display: none;
    }
    
    .view-btn {
        padding: 0.5rem;
    }
}

@media (max-width: 640px) {
    .filter-grid {
        grid-template-columns: 1fr;
    }
    
    .card-info-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline-vertical .timeline-icon {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }
}

/* ==================== */
/* تحسينات الأداء */
/* ==================== */

/* إيقاف animations غير ضرورية */
* {
    animation-duration: 0.2s !important;
    transition-duration: 0.2s !important;
}

/* تحسين تحميل الصور */
.card-slide img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* تقليل blur effects */
.glass-card,
.search-select-dropdown,
.status-badge {
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
}

/* إزالة shadows ثقيلة */
.complaint-card,
.search-select-dropdown,
.modal-content {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}


/* ==================== */
/* Light Mode Only - خلفية بيضاء لعرض الشكاوى */
/* ==================== */

body.light-mode #complaints-list {
    background: #ffffff !important;
    border-radius: 24px !important;
    padding: 30px !important;
    margin: 25px 0 !important;
    border: 2px solid #e2e8f0 !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05) !important;
}

body.light-mode #complaints-list .container {
    background: transparent !important;
}

body.light-mode #complaints-list .glass-card {
    background: #ffffff !important;
    border: 2px solid #e2e8f0 !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04) !important;
}

body.light-mode .complaints-list-header {
    background: #ffffff !important;
    padding: 25px !important;
    border-radius: 20px !important;
    margin-bottom: 25px !important;
    border: 2px solid #e2e8f0 !important;
}

body.light-mode .filter-section {
    background: #ffffff !important;
    border: 2px solid #e2e8f0 !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04) !important;
}

body.light-mode #globalSearch {
    background: #ffffff !important;
    border: 2px solid #cbd5e1 !important;
    color: #1e293b !important;
}

body.light-mode #globalSearch:focus {
    border-color: #0f766e !important;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1) !important;
}

body.light-mode .search-select-input {
    background: #ffffff !important;
    border: 2px solid #cbd5e1 !important;
    color: #1e293b !important;
}

body.light-mode .search-select-dropdown {
    background: #ffffff !important;
    border: 2px solid #0f766e !important;
}

body.light-mode .search-select-search input {
    background: #ffffff !important;
    border: 2px solid #cbd5e1 !important;
    color: #1e293b !important;
}

body.light-mode .view-toggle {
    background: #ffffff !important;
    padding: 15px !important;
    border-radius: 15px !important;
    border: 2px solid #e2e8f0 !important;
    margin-bottom: 20px !important;
}

body.light-mode #table-view {
    background: #ffffff !important;
    border: 2px solid #e2e8f0 !important;
}

body.light-mode #complaints-table thead {
    background: #ffffff !important;
    border-bottom: 3px solid #e2e8f0 !important;
}

body.light-mode #complaints-table th {
    color: #0f172a !important;
    background: #ffffff !important;
}

body.light-mode #complaints-table td {
    background: #ffffff !important;
    color: #334155 !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

body.light-mode #complaints-table tbody tr:hover {
    background: #f8fafc !important;
}

body.light-mode #pagination-container {
    background: #ffffff !important;
    padding: 20px !important;
    border-radius: 15px !important;
    border: 2px solid #e2e8f0 !important;
    margin-top: 25px !important;
}

body.light-mode .pagination button {
    background: #ffffff !important;
    border: 2px solid #cbd5e1 !important;
    color: #475569 !important;
}

body.light-mode .pagination button:hover {
    background: #f1f5f9 !important;
}

body.light-mode .pagination button.active {
    background: linear-gradient(135deg, #0f766e, #2dd4bf) !important;
    color: white !important;
    border: none !important;
}

body.light-mode .no-complaints {
    background: #ffffff !important;
    border: 2px solid #e2e8f0 !important;
}

/* تحسين ألوان النصوص على الخلفية البيضاء */
body.light-mode #complaints-list h1,
body.light-mode #complaints-list h2,
body.light-mode #complaints-list h3,
body.light-mode #complaints-list h4 {
    color: #0f172a !important;
}

body.light-mode #complaints-list p,
body.light-mode #complaints-list span,
body.light-mode #complaints-list div {
    color: #475569 !important;
}

/* تحسين الألوان الثانوية */
body.light-mode #complaints-list .text-gray-400 {
    color: #64748b !important;
}

body.light-mode #complaints-list .text-gray-500 {
    color: #64748b !important;
}

body.light-mode #complaints-list .text-gray-300 {
    color: #cbd5e1 !important;
}

/* إزالة تأثيرات الشفافية */
body.light-mode #complaints-list,
body.light-mode #complaints-list * {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background-image: none !important;
}

/* التأكد من أن العناصر داخلية تحتفظ بتصميمها */
body.light-mode #complaints-list .complaint-card,
body.light-mode #complaints-list .status-badge,
body.light-mode #complaints-list .primary-btn,
body.light-mode #complaints-list .secondary-btn {
    background: inherit !important;
}

/* تحسين التباين للعناصر التفاعلية */
body.light-mode #complaints-list .primary-btn {
    background: linear-gradient(135deg, #0f766e, #2dd4bf) !important;
    color: white !important;
}

body.light-mode #complaints-list .secondary-btn {
    background: #ffffff !important;
    border: 2px solid #0f766e !important;
    color: #0f766e !important;
}

/* تحسين لأجهزة الموبايل */
@media (max-width: 768px) {
    body.light-mode #complaints-list {
        padding: 20px 15px !important;
        border-radius: 20px !important;
        margin: 15px 0 !important;
    }
    
    body.light-mode .complaints-list-header {
        padding: 20px !important;
    }
}

/* تحسين للشاشات الكبيرة */
@media (min-width: 1024px) {
    body.light-mode #complaints-list {
        padding: 40px !important;
        margin: 30px 0 !important;
    }
}


/* ====================== */
/* استعادة التهيئة الصحيحة */
/* ====================== */

/* هذه القاعدة لضمان أن الـ Modal لا يظهر تلقائياً */
#complaint-modal,
#media-library-modal {
    display: none !important;
}

/* عند تفعيل الـ Modal فقط */
#complaint-modal.active,
#media-library-modal.active {
    display: flex !important;
}

/* ====================== */
/* تحسينات للشاشات الصغيرة فقط */
/* ====================== */

@media only screen and (max-width: 767px) {
    /* تحسين تخطيط الكروت */
    .complaint-card {
        margin-bottom: 15px;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    }
    
    .complaint-card-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
        padding: 0 8px !important;
    }
    
    /* تحسين رأس الكارت */
    .card-header {
        height: 160px !important;
        min-height: 160px !important;
        border-radius: 12px 12px 0 0 !important;
    }
    
    .status-badge {
        top: 10px !important;
        right: 10px !important;
        padding: 5px 10px !important;
        font-size: 11px !important;
    }
    
    /* تحسين جسم الكارت */
    .card-body {
        padding: 15px !important;
    }
    
    /* تحسين العنوان ورقم الشكوى */
    .complaint-title {
        font-size: 16px !important;
        margin-bottom: 5px !important;
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    
    .complaint-id {
        font-size: 11px !important;
        padding: 3px 8px !important;
        margin-top: 3px !important;
    }
    
    /* تحسين نوع الشكوى */
    .complaint-type {
        padding: 8px !important;
        margin: 10px 0 !important;
    }
    
    .type-icon {
        width: 30px !important;
        height: 30px !important;
        font-size: 14px !important;
    }
    
    .type-name {
        font-size: 13px !important;
    }
    
    /* تحسين معلومات الموقع */
    .card-info-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        margin: 10px 0 !important;
    }
    
    .card-info-item {
        padding: 6px !important;
        font-size: 12px !important;
    }
    
    .card-info-item i {
        font-size: 13px !important;
    }
    
    /* تحسين الوصف */
    .card-description-container {
        margin: 10px 0 !important;
    }
    
    .card-description {
        font-size: 13px !important;
        max-height: 80px !important;
        line-height: 1.5 !important;
        padding: 8px !important;
    }
    
    /* تحسين مسار الشكوى (Timeline) - إصلاح كامل */
    .card-timeline-container {
        padding: 12px !important;
        margin-top: 10px !important;
        background: rgba(255, 255, 255, 0.05) !important;
        border-radius: 8px !important;
    }
    
    .complaint-timeline {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 0 !important;
        margin: 0 !important;
        height: auto !important;
    }
    
    .timeline-step {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        width: 100% !important;
        margin-bottom: 15px !important;
        position: relative !important;
        padding-left: 40px !important;
    }
    
    .timeline-step:last-child {
        margin-bottom: 0 !important;
    }
    
    .timeline-icon {
        width: 32px !important;
        height: 32px !important;
        font-size: 14px !important;
        position: absolute !important;
        left: 0 !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        margin: 0 !important;
    }
    
    .timeline-content {
        text-align: right !important;
        flex: 1 !important;
        max-width: none !important;
        margin-top: 0 !important;
    }
    
    .timeline-title {
        font-size: 12px !important;
        font-weight: 600 !important;
        margin-bottom: 2px !important;
        text-align: right !important;
    }
    
    .timeline-date {
        font-size: 11px !important;
        text-align: right !important;
    }
    
    /* إخفاء خط التتبع الأفقي */
    .timeline-track-horizontal,
    .timeline-progress-horizontal,
    .timeline-track-vertical,
    .timeline-progress-vertical {
        display: none !important;
    }
    
    /* إضافة خط عمودي بدلاً من الأفقي */
    .complaint-timeline::before {
        content: '';
        position: absolute;
        right: 15px;
        top: 16px;
        bottom: 16px;
        width: 2px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 1px;
    }
    
    .timeline-glow {
        display: none !important;
    }
    
    /* تحسين الفوتر الداخلي للكارت */
    .card-footer {
        padding: 12px 15px !important;
    }
    
    /* تحسين الأزرار */
    .card-actions {
        display: flex !important;
        gap: 8px !important;
        flex-wrap: wrap !important;
    }
    
    .primary-btn,
    .secondary-btn {
        padding: 10px 12px !important;
        font-size: 13px !important;
        flex: 1 !important;
        min-width: calc(50% - 4px) !important;
        text-align: center !important;
    }
    
    /* تحسين الـ Modal على الموبايل */
    .modal-overlay {
        padding: 15px !important;
        background: rgba(0, 0, 0, 0.95) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .modal-content {
        width: 100% !important;
        max-height: 85vh !important;
        border-radius: 16px !important;
        margin: 0 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    /* تحسين محتويات الـ Modal */
    #complaint-details {
        padding: 15px !important;
    }
    
    #complaint-details .glass-card {
        padding: 15px !important;
        margin-bottom: 12px !important;
        border-radius: 10px !important;
    }
    
    #complaint-details .grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    
    /* تحسين أزرار المشاركة في الـ Modal */
    .share-btn {
        flex: 1 0 45% !important;
        margin: 4px !important;
        padding: 10px 8px !important;
        font-size: 13px !important;
    }
    
    .copy-all-btn {
        padding: 10px 15px !important;
        font-size: 13px !important;
        margin: 10px 0 !important;
    }
    
    /* تحسين الفلاتر على الموبايل */
    .filter-section {
        padding: 15px !important;
        margin-bottom: 15px !important;
    }
    
    .filter-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    .search-select-input {
        padding: 12px !important;
        height: 44px !important;
        font-size: 14px !important;
    }
    
    /* تحسين شريط البحث */
    #globalSearch {
        padding: 12px 40px 12px 12px !important;
        font-size: 14px !important;
        height: 44px !important;
    }
    
    /* تحسين أزرار العرض (كروت/جدول) */
    .view-toggle {
        justify-content: center !important;
        margin-bottom: 15px !important;
    }
    
    .view-btn {
        padding: 8px 12px !important;
        font-size: 13px !important;
        flex: 1 !important;
        max-width: 120px !important;
    }
    
    /* تحسين الجدول على الموبايل */
    #table-view {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        margin: 0 -8px !important;
        padding: 0 8px !important;
    }
    
    #complaints-table {
        min-width: 700px !important;
    }
    
    #complaints-table th,
    #complaints-table td {
        padding: 10px 8px !important;
        font-size: 12px !important;
    }
    
    /* تحسين المعرض (Media Gallery) على الموبايل */
    .media-library-content {
        width: 100% !important;
        height: 90vh !important;
        max-width: none !important;
        border-radius: 0 !important;
    }
    
    .media-nav-btn {
        width: 40px !important;
        height: 40px !important;
        font-size: 16px !important;
    }
    
    .media-close-btn {
        top: 10px !important;
        right: 10px !important;
        width: 40px !important;
        height: 40px !important;
        font-size: 18px !important;
    }
    
    .media-counter {
        bottom: 10px !important;
        font-size: 13px !important;
        padding: 6px 12px !important;
    }
    
    /* تحسين الهيدر على الموبايل */
    .navbar {
        padding: 10px 0 !important;
    }
    
    .nav-link {
        padding: 8px !important;
        min-width: 44px !important;
        justify-content: center !important;
    }
    
    .nav-link span {
        display: none !important;
    }
    
    /* تحسين الفوتر على الموبايل */
    footer .glass-card {
        padding: 20px 15px !important;
    }
    
    footer .flex-col {
        gap: 20px !important;
    }
    
    /* تحسين النموذج على الموبايل */
    #complaint-form .glass-card {
        padding: 15px !important;
    }
    
    .form-input {
        padding: 12px !important;
        font-size: 16px !important;
        min-height: 48px !important;
    }
    
    textarea.form-input {
        min-height: 120px !important;
    }
    
    /* تحسين أزرار الرفع */
    .file-upload-area {
        padding: 20px 15px !important;
    }
    
    /* تحسين الـ Pagination على الموبايل */
    .pagination {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 4px !important;
        justify-content: center !important;
        padding: 10px 0 !important;
    }
    
    .pagination button {
        min-width: 36px !important;
        height: 36px !important;
        font-size: 13px !important;
        padding: 0 8px !important;
    }
    
    /* إصلاح مشكلة التكبير في حقول الإدخال على iOS */
    @supports (-webkit-touch-callout: none) {
        input[type="text"],
        input[type="tel"],
        input[type="url"],
        textarea {
            font-size: 16px !important;
        }
    }
    
    /* تحسينات للأجهزة صغيرة جداً */
    @media (max-width: 360px) {
        .card-header {
            height: 140px !important;
        }
        
        .complaint-title {
            font-size: 15px !important;
        }
        
        .card-info-grid {
            grid-template-columns: 1fr !important;
        }
        
        .primary-btn,
        .secondary-btn {
            min-width: 100% !important;
            margin-bottom: 5px !important;
        }
    }
    
    /* تحسينات للأجهزة المتوسطة */
    @media (min-width: 376px) and (max-width: 767px) {
        .card-header {
            height: 180px !important;
        }
        
        .card-info-grid {
            grid-template-columns: repeat(2, 1fr) !important;
        }
    }
}

/* ====================== */
/* استعادة التهيئة الصحيحة للصفحة */
/* ====================== */



/* التأكد من أن الأقسام تعمل بشكل صحيح */
section[id] {
    transition: opacity 0.3s ease;
}

/* تنسيق خاص للإحصائيات */
#statistics {
    background: transparent;
}

#statistics .stats-card {
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.8), rgba(17, 24, 39, 0.8));
    border: 1px solid rgba(75, 85, 99, 0.3);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s;
}

#statistics .stats-card:hover {
    transform: translateY(-5px);
    border-color: #14b8a6;
    box-shadow: 0 10px 25px rgba(20, 184, 166, 0.1);
}


/* تحسين مكتبة المرفقات */
.media-library-content {
    width: 95%;
    height: 95vh;
    max-width: 1400px;
}

.media-container {
    padding: 20px;
    height: calc(95vh - 180px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.media-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.media-container video {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.media-thumbnails {
    display: flex;
    gap: 10px;
    padding: 15px;
    overflow-x: auto;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.media-thumbnail {
    width: 100px;
    height: 75px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.media-thumbnail:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.media-thumbnail.active {
    opacity: 1;
    border-color: var(--primary-light);
    transform: scale(1.05);
}

/* تصميم تفاصيل الشكوى */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(45, 212, 191, 0.3);
}

.timeline-item {
    position: relative;
    padding-right: 50px;
    margin-bottom: 20px;
}

.timeline-dot {
    position: absolute;
    left: 20px;
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-light);
    border: 3px solid rgba(45, 212, 191, 0.3);
}

.timeline-content {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(45, 212, 191, 0.1);
}

/* أزرار الكروت */
.card-actions-grid {
    display: flex;
    gap: 8px;
    margin-top: 15px;
}

.card-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.dark-mode .card-action-btn {
    background: rgba(30, 41, 59, 0.8);
    color: #f8fafc;
    border: 1px solid rgba(45, 212, 191, 0.3);
}

.light-mode .card-action-btn {
    background: white;
    color: #1e293b;
    border: 1px solid #d1d5db;
}

.card-action-btn:hover {
    transform: translateY(-2px);
}

.card-action-btn.whatsapp {
    color: #25D366;
}

.card-action-btn.copy {
    color: #3b82f6;
}

.card-action-btn.share {
    color: #8b5cf6;
}

/* أزرار التفاصيل */
.detail-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.detail-action-btn {
    padding: 10px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    font-size: 14px;
}

.dark-mode .detail-action-btn {
    background: rgba(30, 41, 59, 0.8);
    color: #f8fafc;
    border: 1px solid rgba(45, 212, 191, 0.3);
}

.light-mode .detail-action-btn {
    background: white;
    color: #1e293b;
    border: 1px solid #d1d5db;
}

.detail-action-btn:hover {
    transform: translateY(-2px);
}

.detail-action-btn.whatsapp {
    background: rgba(37, 211, 102, 0.1);
    color: #25D366;
    border-color: rgba(37, 211, 102, 0.3);
}

.detail-action-btn.copy {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border-color: rgba(59, 130, 246, 0.3);
}

.detail-action-btn.share {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
    border-color: rgba(139, 92, 246, 0.3);
}

/* تحسينات الجدول */
.table-responsive {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid rgba(45, 212, 191, 0.2);
}

.complaints-table {
    width: 100%;
    border-collapse: collapse;
}

.complaints-table th {
    background: rgba(45, 212, 191, 0.1);
    padding: 15px;
    text-align: right;
    font-weight: 600;
    border-bottom: 2px solid rgba(45, 212, 191, 0.3);
}

.complaints-table td {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(45, 212, 191, 0.1);
}

.complaints-table tr:hover {
    background: rgba(45, 212, 191, 0.05);
}

.table-action-btn {
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    margin-left: 5px;
}

.loading-spinner-large {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(6, 148, 136, 0.2);
    border-radius: 50%;
    border-top-color: #0d9488;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.col-span-full {
    grid-column: 1 / -1;
}
/* تأكد من أن الأقسام تأخذ المساحة الكاملة */
section {
    min-height: 400px;
}

/* تأثير الظهور */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* الروابط النشطة */
.nav-link.active {
    background: linear-gradient(135deg, #0f766e, #14b8a6);
    border-color: #0d9488;
}

.nav-link.active:hover {
    background: linear-gradient(135deg, #0d9488, #2dd4bf);
}


/* تحسين أزرار التنقل في media modal */
.media-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(15, 118, 110, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.media-nav-btn:hover {
    background: rgba(15, 118, 110, 1);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.media-nav-btn.prev {
    right: 20px;
}

.media-nav-btn.next {
    left: 20px;
}

