/* Enhanced Arabic Layout */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Arabic Font Support */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700&family=Tajawal:wght@300;400;500;700&display=swap');

/* Arabic Text Rendering */
html {
    direction: rtl;
    text-align: right;
    font-size: 16px;
}

body {
    font-family: 'Cairo', 'Tajawal', 'Amiri', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    color: #2c3e50;
    direction: rtl;
    text-align: right;
    font-feature-settings: "liga" 1, "kern" 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-size: 16px;
    line-height: 1.6;
}

/* Improved Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Cairo', 'Tajawal', 'Amiri', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 15px;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    line-height: 1.7;
    margin-bottom: 15px;
}

/* Better spacing */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Improved Cards */
.card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    padding: 25px;
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

/* Fix Font Awesome Icons */
.fas, .far, .fab, .fa {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 6 Brands" !important;
    font-weight: 900 !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-transform: none !important;
    line-height: 1 !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    display: inline-block !important;
}

.far {
    font-weight: 400 !important;
}

.fab {
    font-weight: 400 !important;
    font-family: "Font Awesome 6 Brands" !important;
}

/* Ensure icons are visible */
i.fas, i.far, i.fab, i.fa {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    speak: none !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-transform: none !important;
    line-height: 1 !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

/* Fix specific icon classes */
.fa-chart-line:before { content: "\f201"; }
.fa-list:before { content: "\f03a"; }
.fa-plus:before { content: "\f067"; }
.fa-users:before { content: "\f0c0"; }
.fa-cog:before { content: "\f013"; }
.fa-file-alt:before { content: "\f15c"; }
.fa-bell:before { content: "\f0f3"; }
.fa-search:before { content: "\f002"; }
.fa-user:before { content: "\f007"; }
.fa-sign-out-alt:before { content: "\f2f5"; }
.fa-home:before { content: "\f015"; }
.fa-tasks:before { content: "\f0ae"; }
.fa-calendar:before { content: "\f133"; }
.fa-clipboard-list:before { content: "\f46d"; }
.fa-user-plus:before { content: "\f234"; }
.fa-edit:before { content: "\f044"; }
.fa-trash:before { content: "\f1f8"; }
.fa-eye:before { content: "\f06e"; }
.fa-download:before { content: "\f019"; }
.fa-file-excel:before { content: "\f1c3"; }
.fa-file-pdf:before { content: "\f1c1"; }
.fa-file-csv:before { content: "\f6dd"; }
.fa-refresh:before { content: "\f021"; }
.fa-filter:before { content: "\f0b0"; }

/* Ensure all text elements support Arabic but preserve icon fonts */
h1, h2, h3, h4, h5, h6, p, span:not(.fas):not(.far):not(.fab):not(.fa), div, label, input, textarea, select, button {
    font-family: 'Cairo', 'Tajawal', 'Amiri', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    direction: rtl;
    text-align: right;
}

/* Fix input and form elements */
input, textarea, select {
    direction: rtl;
    text-align: right;
    unicode-bidi: plaintext;
}

/* Fix table text alignment */
table, th, td {
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', 'Tajawal', 'Amiri', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Sidebar */
.sidebar {
    position: fixed;
    right: 0;
    top: 0;
    width: 300px;
    height: 100vh;
    background: linear-gradient(180deg, #1e3c72 0%, #2a5298 50%, #7e22ce 100%);
    color: white;
    padding: 25px;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 20px rgba(0,0,0,0.15);
    z-index: 1000;
    transition: transform 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}

.logo {
    text-align: center;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.logo-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 15px;
    border-radius: 12px;
    background: white;
    padding: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.logo i {
    font-size: 48px;
    margin-bottom: 10px;
}

.logo h2 {
    font-size: 20px;
    font-weight: 600;
    margin-top: 10px;
}

.nav-menu {
    flex: 1;
    margin-top: 30px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 18px 25px;
    color: white;
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 500;
}

.nav-item:hover {
    background: rgba(255,255,255,0.15);
    transform: translateX(-5px);
}

.nav-item.active {
    background: rgba(255,255,255,0.25);
    border-right: 4px solid #fbbf24;
    transform: translateX(-5px);
}

.nav-item i {
    margin-left: 18px;
    font-size: 22px;
    width: 25px;
    text-align: center;
}

.user-info {
    display: flex;
    align-items: center;
    padding: 15px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    margin-top: 20px;
    flex-shrink: 0;
}

.user-avatar i {
    font-size: 40px;
}

.user-details {
    flex: 1;
    margin: 0 10px;
}

.user-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.user-role {
    font-size: 12px;
    opacity: 0.8;
}

.logout-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* Main Content */
.main-content {
    margin-right: 300px;
    padding: 25px;
    min-height: 100vh;
    background: #f5f7fa;
    position: relative;
    z-index: 1;
}

/* Header */
.header {
    background: white;
    padding: 25px 35px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 25px;
    margin-bottom: 35px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #667eea;
}

.header-search {
    flex: 1;
    position: relative;
    max-width: 500px;
}

.header-search i.fa-search {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #7f8c8d;
    z-index: 2;
}

.header-search .search-loading {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #3b82f6;
    display: none;
    z-index: 2;
}

.header-search .search-loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: translateY(-50%) rotate(0deg); }
    to { transform: translateY(-50%) rotate(360deg); }
}

.header-search input {
    width: 100%;
    padding: 15px 50px 15px 50px;
    border: 2px solid #e0e6ed;
    border-radius: 25px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    font-family: 'Cairo', 'Tajawal', 'Amiri', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.header-search input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: scale(1.02);
}

.header-search input::placeholder {
    color: #9ca3af;
    font-style: italic;
}

.notification-btn {
    position: relative;
    background: #f5f7fa;
    border: none;
    padding: 12px 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.notification-btn:hover {
    background: #e0e6ed;
}

.notification-btn .badge {
    position: absolute;
    top: 5px;
    left: 5px;
    background: #e74c3c;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
}

/* Pages */
.page {
    display: none;
}

.page.active {
    display: block;
    width: 100%;
    position: relative;
}

.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 36px;
    color: #2c3e50;
    margin-bottom: 12px;
    font-weight: 700;
}

.page-header p {
    color: #7f8c8d;
    font-size: 18px;
    font-weight: 500;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 30px;
    border-radius: 18px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 25px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
}

.stat-card.blue .stat-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.stat-card.cyan .stat-icon {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.stat-card.purple .stat-icon {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.stat-card.orange .stat-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.stat-card.green .stat-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.stat-card.red .stat-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.stat-info h3 {
    font-size: 38px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #2c3e50;
}

.stat-info p {
    color: #7f8c8d;
    font-size: 16px;
    font-weight: 500;
}

/* Dashboard Section */
.dashboard-section {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.dashboard-section h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #2c3e50;
}

/* Enhanced Table */
.table-container {
    background: white;
    border-radius: 18px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    margin-bottom: 30px;
}

.tickets-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.tickets-table thead {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
}

.tickets-table th {
    padding: 20px 18px;
    text-align: right;
    font-weight: 600;
    font-size: 16px;
    border-bottom: none;
}

.tickets-table td {
    padding: 18px;
    text-align: right;
    border-bottom: 1px solid #e0e6ed;
    font-size: 15px;
    vertical-align: middle;
}

.tickets-table tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid #f0f0f0;
}

.tickets-table tbody tr:hover {
    background: #f8fafc;
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.tickets-table tbody tr:nth-child(even) {
    background: #fafbfc;
}

.tickets-table tbody tr:nth-child(even):hover {
    background: #f0f4f8;
}

.excel-style {
    font-family: 'Courier New', monospace;
}

.excel-style td {
    border-left: 1px solid #e0e6ed;
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.status-badge:hover {
    transform: scale(1.05);
}

.status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

.status-badge.in-progress {
    background: #cfe2ff;
    color: #084298;
}

.status-badge.completed {
    background: #d1e7dd;
    color: #0f5132;
}

.status-badge.cancelled {
    background: #f8d7da;
    color: #842029;
}

/* Action Buttons */
.action-btn {
    background: none;
    border: none;
    padding: 8px 12px;
    margin: 0 2px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #667eea;
}

.action-btn:hover {
    background: #f5f7fa;
}

.action-btn.delete {
    color: #e74c3c;
}

/* Filter Controls */
.filter-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.filter-controls select,
.filter-controls input {
    padding: 10px 15px;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 14px;
}

.filter-controls select:focus,
.filter-controls input:focus {
    outline: none;
    border-color: #667eea;
}

/* Enhanced Forms */
.form-container {
    background: white !important;
    padding: 35px !important;
    border-radius: 18px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08) !important;
    display: block !important;
    visibility: visible !important;
    margin-bottom: 30px !important;
}

.form-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 25px !important;
    visibility: visible !important;
}

.form-group {
    display: flex !important;
    flex-direction: column !important;
    visibility: visible !important;
    margin-bottom: 5px !important;
}

.form-group.full-width {
    grid-column: 1 / -1 !important;
}

.form-group label {
    margin-bottom: 10px !important;
    font-weight: 600 !important;
    color: #2c3e50 !important;
    display: block !important;
    font-size: 16px !important;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 15px 18px !important;
    border: 2px solid #e0e6ed !important;
    border-radius: 10px !important;
    font-size: 16px !important;
    font-family: 'Cairo', 'Tajawal', 'Amiri', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    transition: all 0.3s ease !important;
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    background: white !important;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
    transform: scale(1.02) !important;
}

.form-group textarea {
    min-height: 120px !important;
    resize: vertical !important;
}

.form-actions {
    margin-top: 35px !important;
    display: flex !important;
    gap: 20px !important;
    justify-content: flex-start !important;
}

/* Enhanced Buttons */
.btn {
    padding: 15px 35px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-family: 'Cairo', 'Tajawal', 'Amiri', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e3a8a 100%);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
}

.btn-secondary {
    background: #e0e6ed;
    color: #2c3e50;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.btn-secondary:hover {
    background: #d0d6dd;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5);
}

.full-width {
    width: 100%;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

/* Login Page */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 20px;
    border-radius: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 15px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.login-header i {
    font-size: 60px;
    color: #667eea;
    margin-bottom: 15px;
}

.login-header h2 {
    font-size: 26px;
    color: #2c3e50;
    font-weight: 700;
    margin-bottom: 8px;
}

.login-header p {
    font-size: 14px;
    color: #7f8c8d;
    margin-top: 5px;
}

.login-hint {
    margin-top: 20px;
    padding: 15px;
    background: #f5f7fa;
    border-radius: 10px;
    font-size: 13px;
    color: #7f8c8d;
}

.login-hint p {
    margin: 5px 0;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: #d1e7dd;
    color: #0f5132;
    border: 1px solid #badbcc;
}

.alert-error {
    background: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
}

/* Priority Badge */
.priority-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.priority-badge.low {
    background: #d1e7dd;
    color: #0f5132;
}

.priority-badge.medium {
    background: #cfe2ff;
    color: #084298;
}

.priority-badge.high {
    background: #fff3cd;
    color: #856404;
}

.priority-badge.urgent {
    background: #f8d7da;
    color: #842029;
}

/* Role Badge */
.role-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.role-badge.admin {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.role-badge.manager {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.role-badge.user {
    background: #e0e6ed;
    color: #2c3e50;
}

/* Ticket Details */
.ticket-details-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ticket-info-card,
.ticket-images-card,
.ticket-actions-card,
.ticket-history-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.ticket-info-card h3,
.ticket-images-card h3,
.ticket-actions-card h3,
.ticket-history-card h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #2c3e50;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-item.full-width {
    grid-column: 1 / -1;
}

.info-item label {
    font-weight: 600;
    color: #7f8c8d;
    font-size: 14px;
}

.info-item span,
.info-item p {
    color: #2c3e50;
    font-size: 15px;
}

/* Images Grid */
.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.images-grid a {
    display: block;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #e0e6ed;
    transition: all 0.3s ease;
}

.images-grid a:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.images-grid img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

/* History Timeline */
.history-timeline {
    position: relative;
    padding-right: 30px;
}

.history-item {
    position: relative;
    padding-bottom: 30px;
    display: flex;
    gap: 15px;
}

.history-icon {
    width: 30px;
    height: 30px;
    background: #667eea;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    flex-shrink: 0;
}

.history-content {
    flex: 1;
}

.history-notes {
    margin: 10px 0;
    padding: 10px;
    background: #f5f7fa;
    border-radius: 8px;
    font-size: 14px;
}

.history-time {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 5px;
}

/* Enhanced Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(100%);
        width: 280px;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-right: 0;
        padding: 20px 15px;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .filter-controls form {
        flex-direction: column;
        width: 100%;
        gap: 15px;
    }
    
    .filter-controls select,
    .filter-controls input {
        width: 100%;
        font-size: 16px;
        padding: 15px;
    }
    
    .welcome-banner {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding: 25px 20px;
    }
    
    .page-header h1 {
        font-size: 28px;
    }
    
    .page-header p {
        font-size: 16px;
    }
    
    .stat-card {
        padding: 20px;
        gap: 15px;
    }
    
    .stat-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }
    
    .stat-info h3 {
        font-size: 32px;
    }
    
    .tickets-table {
        font-size: 14px;
    }
    
    .tickets-table th,
    .tickets-table td {
        padding: 12px 8px;
    }
    
    .btn {
        padding: 12px 25px;
        font-size: 15px;
    }
}

/* Profile Page */
.profile-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.profile-stats {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.profile-stats h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #2c3e50;
}

/* Reports Page */
.reports-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-top: 20px;
}

.report-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.report-card h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #2c3e50;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.report-card h3 i {
    color: #667eea;
}

.report-card h3::before {
    content: '';
    width: 6px;
    height: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
}

/* Bar Chart */
.bar-chart {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 15px 0;
}

.bar-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 8px 0;
}

.bar-label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 15px;
    min-width: 140px;
    text-align: right;
    flex-shrink: 0;
}

.bar-wrapper {
    position: relative;
    background: #f8fafc;
    border-radius: 10px;
    height: 40px;
    overflow: hidden;
    flex: 1;
    border: 1px solid #e2e8f0;
}

.bar-fill {
    height: 100%;
    transition: width 0.8s ease;
    display: flex;
    align-items: center;
    padding: 0 12px;
    border-radius: 10px;
    position: relative;
}

.bar-fill.pending {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.bar-fill.in-progress {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.bar-fill.completed {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
}

.bar-fill.cancelled {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.bar-value {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 700;
    color: white;
    font-size: 16px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    z-index: 10;
    background: rgba(0,0,0,0.1);
    padding: 2px 8px;
    border-radius: 12px;
    min-width: 20px;
    text-align: center;
}

/* Average Time Display */
.avg-time-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    padding: 50px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    color: white;
    margin-top: 10px;
}

.avg-time-icon {
    font-size: 90px;
    color: rgba(255,255,255,0.9);
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.avg-time-value {
    text-align: center;
}

.avg-time-value h2 {
    font-size: 48px;
    margin: 0;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.avg-time-value p {
    font-size: 18px;
    margin: 5px 0 0 0;
    opacity: 0.9;
    font-weight: 500;
}

.avg-time-value h2 {
    font-size: 60px;
    color: #667eea;
    margin-bottom: 10px;
}

.avg-time-value p {
    font-size: 20px;
    color: #7f8c8d;
}

/* Date inputs in header */
.page-header form input[type="date"] {
    padding: 10px 15px;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 14px;
}

.page-header form input[type="date"]:focus {
    outline: none;
    border-color: #667eea;
}

/* Responsive for reports */
@media (max-width: 500px) {
    .reports-container {
        grid-template-columns: 1fr;
    }
    
    .bar-item {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .bar-label {
        min-width: auto;
        text-align: center;
        font-size: 14px;
    }
    
    .bar-wrapper {
        height: 35px;
    }
    
    .bar-value {
        font-size: 14px;
        right: 8px;
    }
    
    .avg-time-display {
        flex-direction: column;
        padding: 20px;
    }
    
    .page-header form {
        flex-direction: column;
        width: 100%;
    }
    
    .page-header form input,
    .page-header form button,
    .page-header form a {
        width: 100%;
    }
}

/* Comments Section */
.ticket-comments-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.ticket-comments-card h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #2c3e50;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.comments-list {
    margin-bottom: 20px;
}

.comment-item {
    background: #f5f7fa;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    border-right: 4px solid #667eea;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.comment-header strong {
    color: #2c3e50;
    font-size: 15px;
}

.comment-time {
    font-size: 12px;
    color: #7f8c8d;
}

.comment-body {
    color: #2c3e50;
    font-size: 14px;
    line-height: 1.6;
}

.comment-form {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e0e6ed;
}

.comment-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
}

.comment-form textarea:focus {
    outline: none;
    border-color: #667eea;
}

.comment-form button {
    margin-top: 10px;
}

/* Modules Grid */
.modules-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.module-category {
    background: #f5f7fa !important;
    padding: 20px !important;
    border-radius: 10px !important;
    border: 2px solid #e0e6ed !important;
    display: block !important;
    visibility: visible !important;
}

.module-category h4 {
    color: #667eea !important;
    font-size: 18px !important;
    margin-bottom: 15px !important;
    padding-bottom: 10px !important;
    border-bottom: 2px solid #667eea !important;
    display: block !important;
}

.module-checkboxes {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
    gap: 10px !important;
    visibility: visible !important;
}

.module-checkbox {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 10px !important;
    background: white !important;
    border: 2px solid #e0e6ed !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.module-checkbox:hover {
    border-color: #667eea !important;
    background: #f8f9ff !important;
}

.module-checkbox input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    cursor: pointer !important;
    display: block !important;
}

.module-checkbox input[type="checkbox"]:checked + span {
    color: #667eea !important;
    font-weight: 600 !important;
}

.module-checkbox span {
    font-size: 14px !important;
    color: #2c3e50 !important;
    display: block !important;
}

/* Module Badge */
.modules-display {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.module-badge {
    display: inline-block;
    padding: 6px 12px;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .module-checkboxes {
        grid-template-columns: 1fr;
    }
}

/* Settings Grid */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.settings-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.settings-card:hover:not(.disabled) {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
}

.settings-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.settings-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.settings-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #2c3e50;
}

.settings-card p {
    font-size: 14px;
    color: #7f8c8d;
}

/* Management Tables */
.management-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.drag-handle {
    cursor: move;
    color: #7f8c8d;
    margin-left: 10px;
}

.drag-handle:hover {
    color: #667eea;
}

.status-toggle {
    cursor: pointer;
}

.status-toggle.active {
    color: #27ae60;
}

.status-toggle.inactive {
    color: #e74c3c;
}

/* Enhanced Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page {
    animation: fadeIn 0.4s ease-out;
}

.stat-card {
    animation: fadeIn 0.5s ease-out;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

/* Better Shadows */
.form-container,
.table-container,
.dashboard-section {
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

/* Enhanced Status Badges */
.status-badge {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.pending {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
}

.status-badge.in-progress {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.status-badge.completed {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.status-badge.cancelled {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

/* Enhanced Priority Badges */
.priority-badge {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.priority-badge.low {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.priority-badge.medium {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.priority-badge.high {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.priority-badge.urgent {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
    }
    50% {
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.6);
    }
}

/* Enhanced Role Badges */
.role-badge.admin {
    background: linear-gradient(135deg, #7e22ce 0%, #6b21a8 100%);
    box-shadow: 0 2px 8px rgba(126, 34, 206, 0.3);
}

.role-badge.manager {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.role-badge.user {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(107, 114, 128, 0.3);
}

/* Enhanced Header */
.header {
    background: white;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

/* Enhanced Page Header */
.page-header h1 {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Enhanced Login Page */
.login-page {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #7e22ce 100%);
}

.login-box {
    box-shadow: 0 10px 50px rgba(0,0,0,0.3);
}

.login-header i {
    color: #3b82f6;
}

/* Enhanced Module Category */
.module-category h4 {
    color: #1e3c72;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Enhanced Ticket Details Cards */
.ticket-info-card h3,
.ticket-images-card h3,
.ticket-actions-card h3,
.ticket-history-card h3,
.ticket-comments-card h3 {
    border-bottom: 3px solid #3b82f6;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Enhanced Comment Items */
.comment-item {
    border-right: 4px solid #3b82f6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Enhanced History Timeline */
.history-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Smooth Transitions */
* {
    transition: all 0.3s ease;
}

button, .btn, .action-btn, .nav-item {
    transition: all 0.2s ease;
}

/* Files Grid */
.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.file-item {
    display: block;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #e0e6ed;
    transition: all 0.3s ease;
    text-decoration: none;
}

.file-item:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.file-item.image-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.file-item.document-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #f5f7fa;
    min-height: 150px;
}

.file-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.file-icon .fa-file-pdf {
    color: #ef4444;
}

.file-icon .fa-file-word {
    color: #3b82f6;
}

.file-icon .fa-file-excel {
    color: #10b981;
}

.file-icon .fa-file {
    color: #6b7280;
}

.file-name {
    font-size: 12px;
    color: #2c3e50;
    text-align: center;
    word-break: break-word;
}

/* Loading Indicator */
.search-loading {
    position: absolute;
    left: 45px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
}

.search-loading.active {
    display: block;
}

.search-loading i {
    color: #3b82f6;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Search Input Enhancement */
.header-search input {
    padding-left: 45px;
}

.header-search input:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Highlight Search Results */
.search-highlight {
    background-color: #fef3c7;
    padding: 2px 4px;
    border-radius: 3px;
}

/* Module Search Box */
.module-search-box {
    margin-bottom: 20px;
    position: relative;
}

.module-search-box input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid #e0e6ed;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.module-search-box input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.module-search-box i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #7f8c8d;
}

/* Hide modules that don't match search */
.module-checkbox.hidden {
    display: none !important;
}

.module-category.all-hidden {
    display: none !important;
}

/* Highlight matched text */
.highlight-match {
    background-color: #fef3c7;
    font-weight: 700;
    padding: 2px 4px;
    border-radius: 3px;
}

/* Module count badge */
.module-count {
    display: inline-block;
    background: #3b82f6;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    margin-right: 8px;
    font-weight: 600;
}

/* Module Filter Dropdown */
.module-dropdown {
    scrollbar-width: thin;
    scrollbar-color: #3b82f6 #f5f7fa;
}

.module-dropdown::-webkit-scrollbar {
    width: 8px;
}

.module-dropdown::-webkit-scrollbar-track {
    background: #f5f7fa;
    border-radius: 10px;
}

.module-dropdown::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 10px;
}

.module-dropdown::-webkit-scrollbar-thumb:hover {
    background: #2563eb;
}

.module-filter-search:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Module Filter Select Enhancement */
#moduleFilter {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%233b82f6'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 10px center;
    background-size: 20px;
    padding-left: 40px;
}

/* Table Modules Display */
.tickets-table .modules-display {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
}

.tickets-table .module-badge {
    font-size: 10px;
    padding: 4px 8px;
    white-space: nowrap;
}

/* Better Table Layout */
.tickets-table {
    table-layout: auto;
    width: 100%;
}

.tickets-table td {
    vertical-align: top;
    word-wrap: break-word;
    white-space: normal;
}

/* Description column styling */
.tickets-table td[style*="max-width: 300px"] {
    line-height: 1.4;
    padding: 12px 8px;
}

/* Make table rows expand properly */
.tickets-table tbody tr {
    height: auto;
}

/* Responsive Table */
@media (max-width: 1400px) {
    .tickets-table {
        font-size: 13px;
    }
    
    .tickets-table th,
    .tickets-table td {
        padding: 10px 8px;
    }
}

/* Fix Filter Controls Layout */
.filter-controls form {
    align-items: center;
}

.filter-controls select {
    min-width: 200px;
}

/* Better Status Badges in Table */
.tickets-table .status-badge {
    white-space: nowrap;
    font-size: 11px;
}

.tickets-table .priority-badge {
    white-space: nowrap;
    font-size: 10px;
}

/* File Count Badge */
.file-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f0f9ff;
    color: #3b82f6;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.file-count-badge i {
    font-size: 10px;
}

/* Better Action Buttons */
.tickets-table .action-btn {
    padding: 6px 10px;
    font-size: 14px;
}

/* Improve Table Readability */
.tickets-table tbody tr:hover {
    background: #f8fafc;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.tickets-table td {
    font-size: 13px;
}

.tickets-table td strong {
    color: #1e3c72;
    font-size: 14px;
}

/* Better Priority Badges */
.priority-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 700;
    text-transform: none;
    white-space: nowrap;
}

/* Improve Table Cell Alignment */
.tickets-table td:first-child {
    font-weight: 600;
}

.tickets-table .modules-display {
    justify-content: flex-start;
}

/* Better Module Badge Sizing */
.tickets-table .module-badge {
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Improve Action Buttons Spacing */
.tickets-table .action-btn {
    margin: 0 3px;
}

/* Better Date Display */
.tickets-table td[style*="font-size: 12px"] {
    white-space: nowrap;
}

/* Fix Table Overflow */
.table-container {
    overflow-x: auto;
}

.tickets-table {
    min-width: 1200px;
    max-width: 100%;
}

/* Better Description Cell */
.tickets-table td[style*="max-width: 250px"] {
    position: relative;
}

.tickets-table td[style*="max-width: 250px"] div {
    max-height: 50px;
    overflow-y: auto;
    line-height: 1.3;
    font-size: 11px;
    padding: 4px;
}

.tickets-table td[style*="max-width: 250px"] div::-webkit-scrollbar {
    width: 3px;
}

.tickets-table td[style*="max-width: 250px"] div::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.tickets-table td[style*="max-width: 250px"] div::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.tickets-table td[style*="max-width: 250px"] div::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Compact Table on Smaller Screens */
@media (max-width: 1600px) {
    .tickets-table {
        font-size: 12px;
    }
    
    .tickets-table th,
    .tickets-table td {
        padding: 8px 6px;
    }
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.chart-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.chart-card h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #1e3c72;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Chart Container */
.chart-container {
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.chart-container canvas {
    max-width: 150px;
    max-height: 150px;
    margin: 0 auto;
    display: block;
}

.chart-legend {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    width: 100%;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.legend-color {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    flex-shrink: 0;
}

.legend-item strong {
    color: #1e3c72;
    font-weight: 600;
}

/* Priority Bars */
.priority-bars {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    padding: 40px 20px;
    gap: 30px;
}

.priority-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    flex: 1;
}

.priority-count {
    font-size: 36px;
    font-weight: 700;
    color: #1e3c72;
    line-height: 1;
}

.priority-label {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
    white-space: nowrap;
}

/* Vertical Bar Chart */
.bar-chart-vertical {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 250px;
    padding: 20px 10px;
    gap: 15px;
}

.bar-item-vertical {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.bar-value-top {
    font-weight: 700;
    font-size: 18px;
    color: #1e3c72;
}

.bar-fill-vertical {
    width: 100%;
    max-width: 80px;
    border-radius: 8px 8px 0 0;
    transition: all 0.5s ease;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    animation: growUp 1s ease-out;
}

@keyframes growUp {
    from {
        height: 0;
    }
}

.bar-label-bottom {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-align: center;
}

/* Activity Timeline */
.activity-timeline {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 10px;
    border-right: 4px solid #3b82f6;
    transition: all 0.3s ease;
}

.activity-item:hover {
    background: #f0f9ff;
    transform: translateX(-5px);
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.1);
}

.activity-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-content p {
    margin: 5px 0;
    color: #2c3e50;
}

.activity-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #6b7280;
}

.activity-code {
    background: #e0e7ff;
    color: #3b82f6;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.activity-time {
    display: flex;
    align-items: center;
    gap: 5px;
}

.activity-time::before {
    content: '🕐';
}

/* Dashboard Section Enhancement */
.dashboard-section h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1e3c72;
}

/* Responsive Charts */
@media (max-width: 768px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-legend {
        grid-template-columns: 1fr;
    }
    
    .bar-chart-vertical {
        height: 200px;
    }
}

/* User Management Enhanced UI */
.user-mgmt-container {
    max-width: 900px;
    margin: 20px auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    overflow: hidden;
}

.user-mgmt-header {
    background: #f8fafc;
    padding: 20px 30px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-mgmt-header h2 {
    margin: 0;
    font-size: 20px;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-mgmt-body {
    padding: 30px;
}

/* Section Styling */
.mgmt-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Branch Selection */
.branch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    background: #f1f5f9;
    padding: 20px;
    border-radius: 12px;
}

.branch-item {
    background: white;
    padding: 10px 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.branch-item:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.branch-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.branch-item label {
    flex: 1;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
}

/* Permissions Grouping */
.permissions-area {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.permission-group {
    background: #f8fafc;
    border-radius: 15px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.permission-group-header {
    background: #f1f5f9;
    padding: 12px 20px;
    font-weight: 700;
    color: #334155;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.permission-group-body {
    padding: 15px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

.permission-checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s;
}

.permission-checkbox-item:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.permission-checkbox-item i {
    width: 20px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
}

.permission-checkbox-item span {
    font-size: 13px;
    font-weight: 500;
}

.permission-checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Custom Checkbox Alignment for Arabic */
.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    gap: 10px;
    width: 100%;
}

.checkbox-container input {
    margin: 0;
}

.checkbox-text {
    flex: 1;
}

/* Form Grid */
.user-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-field.full-width {
    grid-column: span 2;
}

.form-field label {
    font-weight: 600;
    color: #475569;
    font-size: 14px;
}

.form-field input, .form-field select {
    padding: 10px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-field input:focus, .form-field select:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-field small {
    color: #94a3b8;
    font-size: 12px;
}

/* Specific group colors */
.group-basic { border-right: 4px solid #10b981; }
.group-basic .permission-group-header { color: #059669; }

.group-codes { border-right: 4px solid #3b82f6; }
.group-codes .permission-group-header { color: #1d4ed8; }

.group-sites { border-right: 4px solid #f59e0b; }
.group-sites .permission-group-header { color: #b45309; }

/* Scrollbar for permissions if long */
.user-mgmt-body {
    max-height: 85vh;
    overflow-y: auto;
}

.user-mgmt-body::-webkit-scrollbar {
    width: 8px;
}

.user-mgmt-body::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.user-mgmt-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.user-mgmt-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Actions in User Management */
.mgmt-actions {
    padding: 20px 30px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

@media (max-width: 768px) {
    .user-form-grid {
        grid-template-columns: 1fr;
    }
    .form-field.full-width {
        grid-column: span 1;
    }
}

/* Permissions Badge in Users Table */
.perm-badge {
    display: inline-flex;
    align-items: center;
    background: #10b981;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    gap: 5px;
}

.perm-badge .total {
    opacity: 0.8;
}

.perm-badge.custom {
    background: #3b82f6;
}

.perm-badge.default {
    background: #6b7280;
}

/* Enhanced Pie Chart */
.pie-chart {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pie-chart::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.1);
}

/* Better Legend */
.chart-legend {
    margin-top: 20px;
}

.legend-item {
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.legend-item:hover {
    background: #f0f9ff;
    transform: translateX(-3px);
}

.legend-item strong {
    color: #1e3c72;
    font-size: 16px;
}

/* Better Bar Chart */
.bar-chart-vertical {
    background: linear-gradient(to top, #f8fafc 0%, transparent 100%);
    border-radius: 10px;
}

.bar-value-top {
    animation: fadeIn 0.8s ease-out;
}

.bar-label-bottom {
    padding: 5px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* Dashboard Section Icons */
.dashboard-section h2 i {
    color: #3b82f6;
}

/* Better Stats Cards Animation */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.stat-card:hover::before {
    left: 100%;
}

/* Chart Card Enhancement */
.chart-card {
    position: relative;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.chart-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #10b981, #f59e0b, #ef4444);
}

/* Activity Item Enhancement */
.activity-item {
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.activity-item:nth-child(1) { animation-delay: 0.1s; }
.activity-item:nth-child(2) { animation-delay: 0.2s; }
.activity-item:nth-child(3) { animation-delay: 0.3s; }
.activity-item:nth-child(4) { animation-delay: 0.4s; }
.activity-item:nth-child(5) { animation-delay: 0.5s; }

/* Welcome Banner */
.welcome-banner {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 35px;
    border-radius: 18px;
    margin-bottom: 35px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(30, 60, 114, 0.3);
}

.welcome-content h2 {
    font-size: 32px;
    margin-bottom: 10px;
    font-weight: 700;
}

.welcome-content p {
    font-size: 18px;
    opacity: 0.9;
    font-weight: 500;
}

.welcome-date {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    background: rgba(255,255,255,0.1);
    padding: 15px 25px;
    border-radius: 12px;
}

@media (max-width: 768px) {
    .welcome-banner {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
}

/* Branches Checkboxes */
.branches-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 10px;
    border: 2px solid #e5e7eb;
}

.checkbox-label {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.checkbox-label:hover {
    background: #f3f4f6;
    border-color: #3b82f6;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-left: 10px;
    cursor: pointer;
    accent-color: #3b82f6;
}

.checkbox-label input[type="checkbox"]:checked + span {
    color: #3b82f6;
    font-weight: 600;
}

.checkbox-label span {
    font-size: 14px;
    color: #374151;
}

/* Reports Responsive Design */
@media (max-width: 600px) {
    .reports-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .report-card {
        padding: 20px;
    }
    
    .bar-item {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .bar-label {
        min-width: auto;
        text-align: center;
        font-size: 14px;
    }
    
    .bar-wrapper {
        height: 35px;
    }
    
    .bar-value {
        font-size: 14px;
    }
    
    .avg-time-display {
        flex-direction: column;
        gap: 20px;
        padding: 30px 15px;
    }
    
    .avg-time-icon {
        font-size: 60px;
    }
    
    .avg-time-value h2 {
        font-size: 36px;
    }
}


/* Reports Grid Responsive */
@media (max-width: 600px) {
    .reports-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}/* 
Force Grid Layout for Reports */
.reports-container .report-card {
    width: 100% !important;
    box-sizing: border-box !important;
}

.reports-container .report-card:nth-child(1),
.reports-container .report-card:nth-child(2) {
    display: block !important;
}/* Sys
tem Categories Styles */
.system-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.category-group {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
}

.category-group h4 {
    color: #1e293b;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #3b82f6;
}

.category-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.category-checkboxes label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.category-checkboxes label:hover {
    background: #f1f5f9;
    border-color: #3b82f6;
}

.category-checkboxes input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #3b82f6;
}

.category-checkboxes input[type="checkbox"]:checked + span {
    color: #1e40af;
    font-weight: 500;
}

/* Responsive for system categories */
@media (max-width: 768px) {
    .system-categories {
        grid-template-columns: 1fr;
    }
    
    .category-group {
        padding: 15px;
    }
}
/* System Categories Styles */
.system-categories {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    margin-top: 10px;
}

.category-group {
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.category-group:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-color: #3b82f6;
}

.main-category {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.main-category input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #3b82f6;
    margin: 0;
}

.main-category span {
    flex: 1;
    user-select: none;
}

.category-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.category-checkboxes label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.category-checkboxes label:hover {
    background: #f1f5f9;
}

.category-checkboxes input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #3b82f6;
}/* E
nhanced System Categories */
#softwareCategories, #hardwareCategories {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-group input[type="checkbox"]:checked + span {
    color: #3b82f6;
    font-weight: 700;
}

.category-group:has(input:checked) {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

/* Form Grid Enhancement */
.form-grid .form-group.full-width {
    grid-column: 1 / -1;
}

/* Responsive for system categories */
@media (max-width: 768px) {
    .system-categories {
        padding: 15px;
        gap: 12px;
    }
    
    .category-group {
        padding: 12px 15px;
    }
    
    .main-category {
        font-size: 15px;
    }
}

/* ===== REPORTS PAGE STYLES ===== */

/* Reports Page Layout Fix */
.page[data-page="reports"], 
#reports-page,
.page.active {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative;
    z-index: 10;
    width: 100%;
}

/* Filters Container */
.filters-container {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    margin-bottom: 25px;
    border: 1px solid #e5e7eb;
}

.filters-form {
    display: flex;
    gap: 20px;
    align-items: end;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 150px;
}

.filter-group label {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label i {
    color: #3b82f6;
    font-size: 16px;
}

.filter-group input, 
.filter-group select {
    padding: 10px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.filter-group input:focus, 
.filter-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.filter-actions .btn {
    padding: 10px 20px;
    font-size: 14px;
    white-space: nowrap;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
    position: relative;
    overflow: hidden;
}

.summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    transition: all 0.3s ease;
}

.summary-card.total::before { background: #3b82f6; }
.summary-card.problems::before { background: #ef4444; }
.summary-card.requests::before { background: #06b6d4; }
.summary-card.completed::before { background: #10b981; }
.summary-card.pending::before { background: #f59e0b; }
.summary-card.time::before { background: #8b5cf6; }

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    flex-shrink: 0;
}

.summary-card.total .card-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.summary-card.problems .card-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.summary-card.requests .card-icon {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.summary-card.completed .card-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.summary-card.pending .card-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.summary-card.time .card-icon {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.card-content {
    flex: 1;
}

.card-content h3 {
    font-size: 36px;
    font-weight: 700;
    margin: 0 0 5px 0;
    color: #1f2937;
    line-height: 1;
}

.card-content p {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 5px 0;
    color: #374151;
}

.card-content small {
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
}

/* No Data Message */
.no-data-message {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
}

.no-data-icon {
    font-size: 80px;
    color: #d1d5db;
    margin-bottom: 20px;
}

.no-data-message h3 {
    font-size: 24px;
    color: #374151;
    margin-bottom: 10px;
}

.no-data-message p {
    color: #6b7280;
    font-size: 16px;
    margin-bottom: 20px;
}

.filter-suggestions {
    background: #f9fafb;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: right;
}

.filter-suggestions p {
    font-weight: 600;
    color: #374151;
    margin-bottom: 10px;
}

.filter-suggestions ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.filter-suggestions li {
    padding: 5px 0;
    color: #6b7280;
    position: relative;
    padding-right: 20px;
}

.filter-suggestions li::before {
    content: '•';
    color: #3b82f6;
    font-weight: bold;
    position: absolute;
    right: 0;
}

/* Charts Container */
.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
}

.chart-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.chart-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.chart-card h3 {
    margin: 0 0 20px 0;
    color: #1f2937;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f3f4f6;
}

.chart-card h3 i {
    color: #3b82f6;
    font-size: 20px;
}

.chart-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Chart Bars */
.chart-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 8px 0;
    transition: all 0.3s ease;
}

.chart-bar:hover {
    background: #f9fafb;
    border-radius: 8px;
    padding: 12px 8px;
}

.bar-info {
    min-width: 140px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.bar-label {
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

.bar-count {
    background: #f3f4f6;
    color: #6b7280;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

.bar-track {
    flex: 1;
    height: 10px;
    background: #f3f4f6;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.8s ease;
    position: relative;
}

.bar-percentage {
    min-width: 50px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
}

/* Status Colors */
.status-pending { background: linear-gradient(135deg, #f59e0b, #d97706); }
.status-in-progress { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.status-completed { background: linear-gradient(135deg, #10b981, #059669); }
.status-cancelled { background: linear-gradient(135deg, #ef4444, #dc2626); }

/* Type Colors */
.type-problem { background: linear-gradient(135deg, #ef4444, #dc2626); }
.type-request { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.type-suggestion { background: linear-gradient(135deg, #10b981, #059669); }

/* Priority Colors */
.priority-low { background: linear-gradient(135deg, #10b981, #059669); }
.priority-medium { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.priority-high { background: linear-gradient(135deg, #f59e0b, #d97706); }
.priority-urgent { background: linear-gradient(135deg, #ef4444, #dc2626); }

/* Other Colors */
.category-bar { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.module-bar { background: linear-gradient(135deg, #06b6d4, #0891b2); }

/* Users List */
.users-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid #f3f4f6;
}

.user-item:hover {
    background: #f3f4f6;
    transform: translateX(-3px);
    border-color: #e5e7eb;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #374151;
}

.user-info i {
    color: #6b7280;
    font-size: 16px;
}

.user-info span {
    font-weight: 500;
}

.count-badge {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.no-data {
    text-align: center;
    color: #6b7280;
    padding: 40px 20px;
    font-style: italic;
    font-size: 16px;
}

/* Page Content Visibility Fix */
.main-content .page {
    min-height: 500px;
    background: transparent;
}

.main-content .page.active {
    display: block !important;
    visibility: visible !important;
}

/* Force Reports Page to Show */
body .main-content .page {
    position: relative;
    z-index: 1;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .charts-container {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
}

@media (max-width: 768px) {
    .filters-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        min-width: auto;
    }
    
    .filter-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .summary-cards {
        grid-template-columns: 1fr;
    }
    
    .charts-container {
        grid-template-columns: 1fr;
    }
    
    .chart-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .bar-info {
        min-width: auto;
        justify-content: center;
    }
    
    .bar-percentage {
        text-align: center;
    }
    
    .user-item {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .filters-container {
        padding: 20px;
    }
    
    .summary-card {
        padding: 20px;
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .card-content h3 {
        font-size: 28px;
    }
    
    .chart-card {
        padding: 20px;
    }
    
    .bar-info {
        flex-direction: column;
        gap: 5px;
    }
}

/* Animation for bars */
@keyframes growWidth {
    from {
        width: 0;
    }
}

.bar-fill {
    animation: growWidth 1s ease-out;
}

/* Enhanced hover effects */
.chart-bar:hover .bar-fill {
    filter: brightness(1.1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.chart-bar:hover .bar-count {
    background: #e5e7eb;
    color: #374151;
}

/* Loading state */
.chart-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    color: #6b7280;
}

.chart-loading i {
    font-size: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }

}/* Filter Controls Styling */
.filter-controls {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.filter-controls form {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-controls select {
    padding: 10px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    color: #2c3e50;
    transition: all 0.3s ease;
    min-width: 150px;
}

.filter-controls select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.filter-controls select:hover {
    border-color: #bdc3c7;
}

/* Filter Labels */
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-size: 12px;
    font-weight: 600;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive filters */
@media (max-width: 768px) {
    .filter-controls form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-controls select {
        width: 100%;
        min-width: unset;
    }
}

/* Enhanced button styling for clear filter */
.btn-secondary {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: #7f8c8d;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(149, 165, 166, 0.3);
}

/* Filter indicator */
.filter-active {
    position: relative;
}

.filter-active::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: #e74c3c;
    border-radius: 50%;
    border: 2px solid white;
}

/* Search Enhancements */
.header-search input.search-active {
    border-color: #10b981;
    background: #f0fdf4;
}

.search-indicator {
    position: absolute;
    top: 100%;
    right: 0;
    background: #10b981;
    color: white;
    padding: 8px 12px;
    border-radius: 0 0 8px 8px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 10;
}

.search-indicator .clear-search {
    color: white;
    text-decoration: none;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255,255,255,0.2);
    transition: all 0.2s ease;
}

.search-indicator .clear-search:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

/* Page-specific search hints */
.header-search input[placeholder*="الطلبات"] {
    border-left: 4px solid #3b82f6;
}

.header-search input[placeholder*="المستخدمين"] {
    border-left: 4px solid #10b981;
}

.header-search input[placeholder*="الموديولات"] {
    border-left: 4px solid #f59e0b;
}

.header-search input[placeholder*="التقارير"] {
    border-left: 4px solid #8b5cf6;
}

/* Highlight matching text in search results */
.highlight-match {
    background: #fef3c7;
    font-weight: 700;
    padding: 2px 4px;
    border-radius: 3px;
}

/* Module search enhancements */
.module-checkbox.hidden {
    display: none !important;
}

.module-category.all-hidden {
    display: none !important;
}

.module-count {
    background: #3b82f6;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    margin-right: 8px;
}
/* Service Categories Management */
.status-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.status-toggle.active {
    background: #d1fae5;
    color: #065f46;
}

.status-toggle.inactive {
    background: #fee2e2;
    color: #991b1b;
}

.status-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.action-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}

/* Module search highlighting */
.highlight-match {
    background: #fef3c7;
    font-weight: 700;
    padding: 1px 2px;
    border-radius: 2px;
}

.module-count {
    background: #3b82f6;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
    margin-right: 8px;
}

.module-category.all-hidden {
    display: none;
}

.module-checkbox.hidden {
    display: none !important;
}

/* Settings grid improvements */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.settings-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    display: block;
}

.settings-card:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
}

.settings-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.settings-icon i {
    font-size: 24px;
    color: white;
}

.settings-card h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.settings-card p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
}
/* Branch chart styling */
.branch-bar {
    background: linear-gradient(90deg, #8b5cf6, #a78bfa);
}

/* Improve filters layout */
.filters-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    align-items: end;
}

.filter-group {
    min-width: 180px;
}

.filter-group select {
    min-width: 100%;
}

.filter-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 15px;
}

@media (max-width: 1200px) {
    .filters-form {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }
    
    .filter-group {
        min-width: 160px;
    }
}

@media (max-width: 768px) {
    .filters-form {
        grid-template-columns: 1fr;
    }
    
    .filter-group {
        min-width: auto;
    }
    
    .filter-actions {
        flex-direction: column;
    }
}
/* نظام الإشعارات - تصميم محسن */
.notifications-container {
    position: relative;
    margin-left: 15px;
}

.notifications-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 12px;
    border-radius: 50%;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notifications-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.notifications-btn:active {
    transform: translateY(0);
}

.notifications-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 3px 6px;
    border-radius: 12px;
    min-width: 20px;
    text-align: center;
    animation: bounce 2s infinite;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
    pointer-events: none; /* منع التفاعل مع العداد */
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-5px); }
    60% { transform: translateY(-3px); }
}

.notifications-dropdown {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border: none;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    width: 500px;
    max-width: 90vw;
    max-height: 80vh;
    z-index: 2000;
    display: none;
    overflow: hidden;
    /* منع النقر من الانتشار خارج القائمة */
    pointer-events: auto;
}

.notifications-dropdown::before {
    display: none;
}

.notifications-dropdown.show {
    display: block;
    animation: slideInFade 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* إضافة overlay للخلفية */
.notifications-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    display: none;
    cursor: pointer; /* مؤشر للنقر */
}

.notifications-overlay.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes slideInFade {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.notifications-header {
    padding: 25px 30px 20px;
    border-bottom: 1px solid #f1f3f4;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.notifications-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
}

.notifications-header h3::before {
    content: '🔔';
    margin-left: 10px;
    font-size: 18px;
}

.notifications-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mark-all-read {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 20px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.mark-all-read:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.notifications-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.notifications-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.mark-all-read {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border: none;
    color: white;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 20px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mark-all-read:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.3);
}

.notifications-list {
    max-height: 350px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 transparent;
}

.notifications-list::-webkit-scrollbar {
    width: 4px;
}

.notifications-list::-webkit-scrollbar-track {
    background: transparent;
}

.notifications-list::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 2px;
}

.notification-item {
    padding: 20px 25px;
    border-bottom: 1px solid #f7fafc;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: white;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    /* منع النقر من الانتشار */
    pointer-events: auto;
}

.notification-item:hover {
    background: linear-gradient(135deg, #f8f9ff 0%, #f1f3ff 100%);
    transform: translateX(-3px);
}

.notification-item.unread {
    background: linear-gradient(135deg, #e6f3ff 0%, #f0f8ff 100%);
    border-right: 4px solid #4facfe;
    position: relative;
}

.notification-item.unread::after {
    content: '';
    position: absolute;
    top: 20px;
    right: 15px;
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(79, 172, 254, 0.6);
    animation: pulse-dot 2s infinite;
    pointer-events: none; /* منع التفاعل مع المؤشر */
}

@keyframes pulse-dot {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 8px;
    font-size: 15px;
    line-height: 1.4;
}

.notification-message {
    color: #4a5568;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 10px;
}

.notification-time {
    color: #a0aec0;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.notification-time::before {
    content: '🕒';
    font-size: 10px;
}

.notification-type-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.notification-type-ticket { 
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}
.notification-type-success { 
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
}
.notification-type-warning { 
    background: linear-gradient(135deg, #ed8936, #dd6b20);
    color: white;
}
.notification-type-error { 
    background: linear-gradient(135deg, #f56565, #e53e3e);
    color: white;
}
.notification-type-info { 
    background: linear-gradient(135deg, #4299e1, #3182ce);
    color: white;
}

.loading-notifications {
    padding: 40px;
    text-align: center;
    color: #a0aec0;
}

.loading-notifications i {
    font-size: 24px;
    margin-bottom: 10px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.no-notifications {
    padding: 40px;
    text-align: center;
    color: #a0aec0;
}

.no-notifications i {
    font-size: 32px;
    margin-bottom: 15px;
    display: block;
    opacity: 0.5;
}

.no-notifications p {
    font-size: 14px;
    font-weight: 500;
}

/* تحديث الهيدر لاستيعاب الإشعارات */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    height: 70px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    max-width: 500px;
    margin: 0 20px;
}

.header-right {
    display: flex;
    align-items: center;
}
/* تأثيرات إضافية للإشعارات */
@keyframes slideUpFade {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
}

/* تحسين شكل الهيدر */
.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    max-width: 600px;
    margin: 0 20px;
}

.header-search {
    width: 100%;
    position: relative;
}

/* تأثير hover للإشعارات */
.notification-item:hover .notification-type-icon {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* تحسين الاستجابة للموبايل */
@media (max-width: 768px) {
    .notifications-dropdown {
        width: 95vw;
        max-height: 85vh;
        border-radius: 15px;
    }
    
    .notifications-header {
        padding: 20px 20px 15px;
    }
    
    .notifications-header h3 {
        font-size: 18px;
    }
    
    .notification-item {
        padding: 15px 20px;
        gap: 12px;
    }
    
    .notification-type-icon {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .notification-title {
        font-size: 14px;
    }
    
    .notification-message {
        font-size: 13px;
    }
    
    .notifications-container {
        margin-left: 10px;
    }
}

@media (max-width: 480px) {
    .notifications-dropdown {
        width: 95vw;
        max-height: 90vh;
        border-radius: 12px;
    }
    
    .notifications-header {
        padding: 15px 15px 12px;
    }
    
    .notifications-header h3 {
        font-size: 16px;
    }
    
    .notification-item {
        padding: 12px 15px;
        gap: 10px;
    }
    
    .notification-type-icon {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
}

/* تحسينات إضافية لنظام الإشعارات */
.notifications-btn.has-notifications {
    animation: bellShake 2s ease-in-out infinite;
}

@keyframes bellShake {
    0%, 50%, 100% { transform: rotate(0deg); }
    10%, 30% { transform: rotate(-10deg); }
    20%, 40% { transform: rotate(10deg); }
}

.notifications-count {
    border: 2px solid white;
}

.mark-all-read:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.3);
}

.mark-all-read:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-content {
    flex: 1;
}

.notification-type-icon {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.no-notifications button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.no-notifications button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* تحسين الاستجابة للموبايل - إضافات */
@media (max-width: 480px) {
    .notifications-header {
        padding: 15px 20px 12px;
    }
    
    .notifications-header h3 {
        font-size: 16px;
    }
    
    .mark-all-read {
        padding: 6px 10px;
        font-size: 11px;
    }
}
/* شارة الإشعارات في القائمة الجانبية */
.nav-item {
    position: relative;
}

.nav-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
    animation: pulse 2s infinite;
    border: 1px solid white;
}
/* تحسينات إضافية للإشعارات */
.notifications-list {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 transparent;
}

.notifications-list::-webkit-scrollbar {
    width: 6px;
}

.notifications-list::-webkit-scrollbar-track {
    background: transparent;
}

.notifications-list::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.notifications-list::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* تأثير hover محسن للإشعارات */
.notification-item:hover .notification-type-icon {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* تحسين النص في الإشعارات */
.notification-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-message {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* تأثير loading محسن */
.loading-notifications {
    padding: 50px 40px;
    text-align: center;
    color: #7f8c8d;
}

.loading-notifications i {
    font-size: 28px;
    margin-bottom: 15px;
    color: #667eea;
    animation: spin 1s linear infinite;
}

.loading-notifications p {
    font-size: 16px;
    font-weight: 500;
    color: #4a5568;
}

/* تحسين رسالة عدم وجود إشعارات */
.no-notifications {
    padding: 60px 40px;
    text-align: center;
    color: #7f8c8d;
}

.no-notifications i {
    font-size: 48px;
    color: #cbd5e0;
    margin-bottom: 20px;
}

.no-notifications p {
    font-size: 18px;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 8px;
}

.no-notifications small {
    font-size: 14px;
    color: #a0aec0;
}

/* تأثير النقر على الإشعار */
.notification-item:active {
    transform: scale(0.98);
}

/* تحسين الـ badge للعدد */
.notifications-count {
    animation: bounce 0.6s ease-in-out;
}

@keyframes bounce {
    0%, 20%, 60%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-3px);
    }
    80% {
        transform: translateY(-1px);
    }
}

/* تحسين الاستجابة للموبايل - إضافات */
@media (max-width: 480px) {
    .notifications-header-actions {
        gap: 8px;
    }
    
    .mark-all-read {
        font-size: 11px;
        padding: 6px 12px;
    }
    
    .notifications-close {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .no-notifications {
        padding: 40px 20px;
    }
    
    .no-notifications i {
        font-size: 36px;
    }
    
    .no-notifications p {
        font-size: 16px;
    }
}
/* تنسيق خاص لطلبات تطبيق الخبير */
.expert-app-row {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-right: 4px solid #0ea5e9;
}

.expert-app-badge {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.expert-app-badge::before {
    content: '👨‍💼';
    font-size: 12px;
}

.expert-specialty-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: white;
    margin-top: 3px;
    display: inline-block;
}

.expert-specialty-badge.financial {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.expert-specialty-badge.medical {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.expert-specialty-badge.hr {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.expert-specialty-badge.resolved {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

/* تحسين عرض الفروع في الجدول */
.branch-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: white;
    display: inline-block;
}

.branch-badge.expert {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}

.branch-badge.normal {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

/* تحسينات إضافية للجدول */
.tickets-table th {
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}

.tickets-table td {
    vertical-align: top;
    border-bottom: 1px solid #e5e7eb;
}

.tickets-table tbody tr:nth-child(even) {
    background-color: #f9fafb;
}

.tickets-table tbody tr:hover {
    background-color: #f3f4f6 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* تحسين عرض الأولوية */
/* الأولويات: low = الأولوية، medium = عادي، high = طارئ، urgent = عاجلة */
.priority-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}

.priority-badge.low {
    background: #dcfce7;
    color: #166534;
}

.priority-badge.medium {
    background: #dbeafe;
    color: #1d4ed8;
}

.priority-badge.high {
    background: #fef3c7;
    color: #d97706;
}

.priority-badge.urgent {
    background: #fecaca;
    color: #dc2626;
}

/* تحسين عرض الحالة */
.status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}

.status-badge:hover {
    transform: scale(1.05);
}

.status-badge.pending {
    background: #fef3c7;
    color: #d97706;
}

.status-badge.in-progress {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-badge.completed {
    background: #dcfce7;
    color: #166534;
}
/* Pagination Styles */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    padding: 15px 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.pagination-info {
    color: #6b7280;
    font-size: 14px;
}

.pagination-controls {
    display: flex;
    gap: 5px;
    align-items: center;
}

.pagination-btn {
    padding: 8px 12px;
    background: #f8fafc;
    color: #374151;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
    border: 1px solid #e5e7eb;
}

.pagination-btn:hover {
    background: #e5e7eb;
    color: #1f2937;
    text-decoration: none;
}

.pagination-btn.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.pagination-dots {
    padding: 8px 4px;
    color: #9ca3af;
}

@media (max-width: 768px) {
    .pagination-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .pagination-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .pagination-btn {
        padding: 6px 10px;
        font-size: 13px;
    }
}

/* تحسين الجدول للشاشات الصغيرة */
@media (max-width: 1200px) {
    .tickets-table {
        min-width: 1000px;
        font-size: 12px;
    }
    
    .tickets-table th,
    .tickets-table td {
        padding: 6px 4px;
    }
}

@media (max-width: 768px) {
    .table-container {
        margin: 0 -10px;
    }
    
    .tickets-table {
        min-width: 800px;
        font-size: 11px;
    }
    
    .tickets-table th,
    .tickets-table td {
        padding: 4px 3px;
    }
}
/* تحسينات إضافية لتوفير المساحة */
.tickets-table th {
    padding: 10px 6px;
    font-size: 12px;
    line-height: 1.2;
}

.tickets-table td {
    padding: 8px 6px;
    font-size: 11px;
    line-height: 1.3;
}

.tickets-table .module-badge {
    font-size: 9px;
    padding: 2px 6px;
    margin: 1px;
}

.tickets-table .branch-badge {
    font-size: 10px;
    padding: 3px 6px;
}

.tickets-table .action-btn {
    padding: 4px 6px;
    font-size: 12px;
    margin: 0 1px;
}

/* تحسين عرض التواريخ */
.tickets-table td[style*="font-size: 12px"] {
    font-size: 10px !important;
    white-space: nowrap;
}

/* تحسين الأولوية والحالة */
.tickets-table .priority-badge,
.tickets-table .status-badge {
    font-size: 9px;
    padding: 3px 6px;
}

/* تحسين عدد الملفات */
.file-count-badge {
    font-size: 10px;
    padding: 2px 4px;
}
/* تنسيقات معايير الجودة التفاعلية */
.quality-standards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.quality-standard-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.quality-standard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    border-color: #3b82f6;
}

.standard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.standard-priority {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.standard-priority.low {
    background: #10b981;
}

.standard-priority.medium {
    background: #3b82f6;
}

.standard-priority.high {
    background: #f59e0b;
}

.standard-priority.critical {
    background: #ef4444;
}

.standard-category {
    background: #f3f4f6;
    color: #374151;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.standard-content h4 {
    color: #1f2937;
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
}

.standard-content p {
    color: #6b7280;
    margin: 0 0 15px 0;
    line-height: 1.5;
    font-size: 14px;
}

.standard-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #6b7280;
    font-size: 12px;
}

.stat-item i {
    color: #3b82f6;
}

.standard-score {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.score-stars {
    display: flex;
    gap: 2px;
}

.score-stars i {
    color: #e5e7eb;
    font-size: 14px;
}

.score-stars i.active {
    color: #fbbf24;
}

.score-text {
    font-weight: 600;
    color: #1f2937;
    font-size: 14px;
}

.standard-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #f3f4f6;
    font-size: 12px;
    color: #6b7280;
}

.department {
    background: #dbeafe;
    color: #1e40af;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.no-standards {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

/* تنسيقات المودال المحسن */
.modal .modal-content {
    max-width: 600px;
}

.modal-body {
    padding: 20px 0;
}

.standard-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-row p {
    margin: 5px 0 0 0;
    color: #6b7280;
    line-height: 1.6;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-item strong {
    color: #374151;
    font-size: 14px;
}

.detail-item span {
    color: #6b7280;
    font-size: 14px;
}

.score-display {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tasks-summary {
    display: flex;
    gap: 20px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
}

.task-count {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #374151;
    font-weight: 500;
}

.task-count i {
    color: #3b82f6;
}

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.modal-footer .btn {
    padding: 8px 16px;
    font-size: 14px;
}

/* تحسينات للشاشات الصغيرة */
@media (max-width: 768px) {
    .quality-standards-grid {
        grid-template-columns: 1fr;
    }
    
    .standard-stats {
        flex-direction: column;
        gap: 8px;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .tasks-summary {
        flex-direction: column;
        gap: 10px;
    }
    
    .modal-footer {
        flex-direction: column;
    }
}

/* تأثيرات إضافية */
.quality-standard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #10b981);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.quality-standard-card:hover::before {
    opacity: 1;
}

/* تحسين عرض النجوم */
.score-stars i {
    transition: color 0.2s ease;
}

.quality-standard-card:hover .score-stars i.active {
    color: #f59e0b;
}
/* تنسيقات إضافية لعرض معايير الجودة */
.related-systems {
    margin: 10px 0;
    padding: 10px;
    background: #f8fafc;
    border-radius: 6px;
    border-left: 3px solid #3b82f6;
}

.system-tags {
    margin-bottom: 5px;
}

.system-tags:last-child {
    margin-bottom: 0;
}

.system-tags small {
    color: #4b5563;
    font-size: 12px;
    line-height: 1.4;
}

.system-tags strong {
    color: #1f2937;
}

/* تحسين فلاتر البحث */
.filter-controls label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

.filter-controls select,
.filter-controls input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: white;
}

.filter-controls select:focus,
.filter-controls input[type="text"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* تحسين عرض البحث في الهيدر */
.header-search input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 40px 8px 15px;
    border-radius: 20px;
    width: 300px;
    transition: all 0.3s ease;
}

.header-search input:focus {
    background: white;
    color: #1f2937;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.header-search input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.header-search input:focus::placeholder {
    color: #9ca3af;
}

/* تحسين عرض الإحصائيات */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* تأثيرات تفاعلية للبطاقات */
.quality-standard-card {
    position: relative;
    overflow: hidden;
}

.quality-standard-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.quality-standard-card:hover::after {
    left: 100%;
}

/* تحسين عرض النتائج الفارغة */
.no-standards {
    text-align: center;
    padding: 80px 20px;
    background: #f9fafb;
    border-radius: 12px;
    border: 2px dashed #e5e7eb;
}

.no-standards i {
    display: block;
    margin-bottom: 20px;
}

.no-standards p {
    color: #6b7280;
    font-size: 16px;
    margin-bottom: 20px;
}

/* تحسين الأزرار */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn i {
    font-size: 14px;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
    transform: translateY(-1px);
}

/* تحسين المودال */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 20px 20px 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 20px;
}

.modal-header h3 {
    margin: 0;
    color: #1f2937;
    font-size: 18px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.modal-body {
    padding: 0 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #e5e7eb;
    margin-top: 20px;
}

/* تحسينات للشاشات الصغيرة */
@media (max-width: 768px) {
    .header-search input {
        width: 200px;
    }
    
    .filter-controls {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .quality-standards-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .standard-stats {
        flex-direction: column;
        gap: 5px;
    }
    
    .standard-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}
/* القوائم الفرعية في الـ Sidebar */
.nav-dropdown {
    margin-bottom: 5px;
}

.dropdown-toggle {
    position: relative;
    justify-content: space-between;
}

.dropdown-arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
    margin-left: 10px;
}

.dropdown-toggle.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    margin: 5px 0 10px 20px;
}

.dropdown-menu.show {
    max-height: 500px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    border-radius: 6px;
    margin: 3px 0;
    transition: all 0.3s ease;
    font-size: 14px;
}

.dropdown-item:hover {
    background: rgba(255,255,255,0.15);
    transform: translateX(-3px);
    color: white;
}

.dropdown-item i {
    width: 20px;
    margin-left: 10px;
    font-size: 14px;
    opacity: 0.8;
}

.dropdown-item span {
    flex: 1;
}

/* تحسين شكل القائمة الرئيسية */
.nav-item.dropdown-toggle:hover {
    background: rgba(255,255,255,0.15);
}

/* إضافة خط فاصل بصري */
.nav-dropdown + .nav-dropdown {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 10px;
    margin-top: 15px;
}

/* تحسين الألوان للقوائم الفرعية */
.dropdown-item:nth-child(1) i { color: #4CAF50; } /* أخضر */
.dropdown-item:nth-child(2) i { color: #2196F3; } /* أزرق */
.dropdown-item:nth-child(3) i { color: #FF9800; } /* برتقالي */
.dropdown-item:nth-child(4) i { color: #9C27B0; } /* بنفسجي */
.dropdown-item:nth-child(5) i { color: #F44336; } /* أحمر */
.dropdown-item:nth-child(6) i { color: #00BCD4; } /* سماوي */

/* تأثير الانيميشن للقائمة */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-menu.show .dropdown-item {
    animation: slideDown 0.3s ease forwards;
}

.dropdown-menu.show .dropdown-item:nth-child(1) { animation-delay: 0.1s; }
.dropdown-menu.show .dropdown-item:nth-child(2) { animation-delay: 0.2s; }
.dropdown-menu.show .dropdown-item:nth-child(3) { animation-delay: 0.3s; }
.dropdown-menu.show .dropdown-item:nth-child(4) { animation-delay: 0.4s; }
.dropdown-menu.show .dropdown-item:nth-child(5) { animation-delay: 0.5s; }
.dropdown-menu.show .dropdown-item:nth-child(6) { animation-delay: 0.6s; }
/* تحسين القائمة الفرعية للصفحات */
.dropdown-item.active {
    background: rgba(255,255,255,0.25) !important;
    border-left: 3px solid #fff;
    font-weight: 600;
}

.nav-item.dropdown-toggle.active {
    background: rgba(255,255,255,0.2);
}

.nav-item.dropdown-toggle.active .dropdown-arrow {
    transform: rotate(180deg);
}

/* تحسين شكل القائمة في الصفحات الفرعية */
.dropdown-menu.show {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}
/* نوع المكان */
.location-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    color: white;
    min-width: 60px;
}

.location-badge.hospital {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
}

.location-badge.expert {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    box-shadow: 0 2px 4px rgba(33, 150, 243, 0.3);
}

/* فلتر نوع المكان */
.filter-group select[name="location_type"] {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px solid #dee2e6;
    font-weight: 600;
}

.filter-group select[name="location_type"]:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.filter-group select[name="location_type"].filter-active {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border-color: #2196F3;
    color: #1976D2;
}
/* إصلاح عرض الموديولات - Fix Modules Display */
.module-checkbox {
    display: flex !important;
    align-items: center;
    padding: 8px;
    margin: 4px 0;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.module-checkbox:hover {
    background-color: #f5f5f5;
}

.module-category {
    display: block !important;
    margin: 15px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.module-category h4 {
    background: #007cba;
    color: white;
    padding: 12px 15px;
    margin: 0;
    font-size: 16px;
    font-weight: bold;
}

.module-checkboxes {
    padding: 15px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 8px;
}

/* إعادة تعريف قواعد الإخفاء لتكون أكثر وضوحاً */
.module-checkbox.hidden {
    display: none !important;
}

.module-category.all-hidden {
    display: none !important;
}

/* تحسين مظهر البحث */
.module-search-box {
    position: relative;
}

.module-search-box input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.module-search-box input:focus {
    outline: none;
    border-color: #007cba;
}

.module-search-box i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

/* تحسين مظهر النتائج المميزة */
.highlight-match {
    background-color: #ffeb3b;
    padding: 2px 4px;
    border-radius: 2px;
    font-weight: bold;
}

.module-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-right: 8px;
}

/* إصلاح مشاكل العرض المحتملة */
.modules-grid {
    min-height: 200px;
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
}

/* تحسين الاستجابة */
@media (max-width: 768px) {
    .module-checkboxes {
        grid-template-columns: 1fr;
    }
    
    .module-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .module-search-box {
        width: 100%;
    }
}
/* Filters Container */
.filters-container {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
}

.filters-container form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-group input[type="text"] {
    min-width: 200px;
}

.filter-group select {
    min-width: 120px;
    cursor: pointer;
}

.filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-actions button,
.filter-actions a {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-family: inherit;
}

.filter-actions button {
    background: #3b82f6;
    color: white;
}

.filter-actions button:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.filter-actions a {
    background: #6b7280;
    color: white;
}

.filter-actions a:hover {
    background: #4b5563;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(107, 114, 128, 0.3);
}

/* Filter Active State */
.filter-active {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

/* Responsive Filters */
@media (max-width: 768px) {
    .filters-container form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-group input,
    .filter-group select {
        min-width: auto;
    }
    
    .filter-actions {
        justify-content: center;
        margin-top: 10px;
    }
}

/* Loading state for selects */
select:disabled {
    background-color: #f9fafb;
    color: #6b7280;
    cursor: not-allowed;
}

/* Enhanced search input */
input[name="search"] {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m19 19-4-4m0-7A7 7 0 1 1 1 8a7 7 0 0 1 14 0Z'/%3e%3c/svg%3e");
    background-position: left 12px center;
    background-repeat: no-repeat;
    background-size: 16px 16px;
    padding-left: 40px;
}

/* RTL support for search input */
[dir="rtl"] input[name="search"] {
    background-position: right 12px center;
    padding-left: 12px;
    padding-right: 40px;
}

/* ===== EXCEL-STYLE TICKETS PAGE ===== */

/* Excel Header Container */
.excel-header {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 0;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Excel Title */
.excel-title {
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3c72 100%);
    color: white;
    padding: 15px 20px;
    text-align: center;
    border-bottom: 2px solid #1e3c72;
}

.excel-title h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Excel Filters Container */
.excel-filters {
    background: white;
    padding: 0;
}

/* Excel Filter Row */
.excel-filter-row {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    border-bottom: 1px solid #dee2e6;
}

/* Excel Filter Cells */
.excel-filter-cell {
    border-right: 1px solid #dee2e6;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 70px;
}

.excel-filter-cell:last-child {
    border-right: none;
}

/* Excel Filter Labels */
.excel-filter-cell label {
    background: #f8f9fa;
    padding: 8px 12px;
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: #495057;
    border-bottom: 1px solid #dee2e6;
    text-align: center;
    line-height: 1.2;
}

/* Excel Filter Selects */
.excel-filter-cell select {
    flex: 1;
    border: none;
    border-radius: 0;
    padding: 8px 12px;
    font-size: 13px;
    background: white;
    outline: none;
    appearance: none;
    cursor: pointer;
    text-align: center;
    color: #495057;
}

.excel-filter-cell select:focus {
    background: #e3f2fd;
    color: #1976d2;
}

.excel-filter-cell select:hover {
    background: #f5f5f5;
}

/* Excel Search Cell */
.excel-search-cell {
    position: relative;
}

.excel-search-container {
    flex: 1;
    display: flex;
    position: relative;
}

.excel-search-container input {
    flex: 1;
    border: none;
    border-radius: 0;
    padding: 8px 40px 8px 12px;
    font-size: 13px;
    background: white;
    outline: none;
    text-align: center;
}

.excel-search-container input:focus {
    background: #e3f2fd;
    color: #1976d2;
}

.excel-search-btn {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 4px;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.excel-search-btn:hover {
    background: #e9ecef;
    color: #495057;
}

/* Clear Filters Button */
.excel-clear-filters {
    padding: 10px 20px;
    text-align: center;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.excel-clear-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: #dc3545;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.excel-clear-btn:hover {
    background: #c82333;
    text-decoration: none;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

/* Excel Table Container */
.table-container {
    background: white;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Excel Table Styling */
.tickets-table.excel-style {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 12px;
}

.tickets-table.excel-style thead {
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3c72 100%);
    color: white;
}

.tickets-table.excel-style th {
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    font-size: 11px;
    border-right: 1px solid rgba(255,255,255,0.2);
    line-height: 1.3;
    text-shadow: 0 1px 1px rgba(0,0,0,0.2);
}

.tickets-table.excel-style th:last-child {
    border-right: none;
}

.tickets-table.excel-style td {
    padding: 8px 6px;
    text-align: center;
    border-right: 1px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
    font-size: 11px;
    line-height: 1.4;
    vertical-align: middle;
}

.tickets-table.excel-style td:last-child {
    border-right: none;
}

.tickets-table.excel-style tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.tickets-table.excel-style tbody tr:hover {
    background: #e3f2fd !important;
    box-shadow: inset 0 0 0 1px #2196f3;
}

/* Excel-style badges and elements */
.tickets-table.excel-style .status-badge,
.tickets-table.excel-style .priority-badge,
.tickets-table.excel-style .branch-badge,
.tickets-table.excel-style .location-badge {
    font-size: 10px;
    padding: 3px 6px;
    border-radius: 3px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tickets-table.excel-style .module-badge {
    font-size: 9px;
    padding: 2px 5px;
    margin: 1px;
    border-radius: 2px;
}

.tickets-table.excel-style .action-btn {
    padding: 4px 6px;
    margin: 0 1px;
    font-size: 11px;
    border-radius: 3px;
}

.tickets-table.excel-style .file-count-badge {
    font-size: 10px;
    padding: 2px 5px;
}

/* Responsive Excel Design */
@media (max-width: 1400px) {
    .excel-filter-row {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .excel-filter-cell:nth-child(n+5) {
        border-top: 1px solid #dee2e6;
    }
}

@media (max-width: 768px) {
    .excel-filter-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .excel-filter-cell:nth-child(n+3) {
        border-top: 1px solid #dee2e6;
    }
    
    .excel-title h1 {
        font-size: 20px;
    }
    
    .tickets-table.excel-style {
        font-size: 10px;
    }
    
    .tickets-table.excel-style th,
    .tickets-table.excel-style td {
        padding: 6px 4px;
    }
}

@media (max-width: 480px) {
    .excel-filter-row {
        grid-template-columns: 1fr;
    }
    
    .excel-filter-cell {
        border-right: none;
        border-bottom: 1px solid #dee2e6;
    }
    
    .excel-filter-cell:last-child {
        border-bottom: none;
    }
}

/* Excel Print Styles */
@media print {
    .excel-header {
        break-inside: avoid;
    }
    
    .excel-filters {
        display: none;
    }
    
    .tickets-table.excel-style {
        font-size: 10px;
    }
    
    .tickets-table.excel-style th,
    .tickets-table.excel-style td {
        padding: 4px 2px;
    }
}

/* Excel-style scrollbar for table */
.table-container {
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #2c5aa0 #f8f9fa;
}

.table-container::-webkit-scrollbar {
    height: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: #f8f9fa;
}

.table-container::-webkit-scrollbar-thumb {
    background: #2c5aa0;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: #1e3c72;
}

/* Excel-style focus states */
.excel-filter-cell select:focus,
.excel-search-container input:focus {
    box-shadow: inset 0 0 0 2px #2196f3;
}

/* Excel-style dropdown arrows */
.excel-filter-cell select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: left 8px center;
    background-repeat: no-repeat;
    background-size: 16px 12px;
    padding-left: 30px;
}

/* RTL support for dropdowns */
[dir="rtl"] .excel-filter-cell select {
    background-position: right 8px center;
    padding-left: 12px;
    padding-right: 30px;
}

/* إصلاح مشكلة عدم ظهور النماذج */
.page[data-page="new-ticket"] .form-container,
#new-ticket-page .form-container,
.form-container {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: white !important;
    padding: 30px !important;
    border-radius: 15px !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05) !important;
    margin: 20px 0 !important;
}

.form-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.form-group {
    display: flex !important;
    flex-direction: column !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.form-group label {
    display: block !important;
    margin-bottom: 8px !important;
    font-weight: 600 !important;
    color: #2c3e50 !important;
}

.form-group input,
.form-group select,
.form-group textarea {
    display: block !important;
    width: 100% !important;
    padding: 12px 15px !important;
    border: 2px solid #e0e6ed !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
}

/* Modules Container - Enhanced Design to Match Image */
.modules-container {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: #f8fafc !important;
    border-radius: 8px !important;
    padding: 0 !important;
    margin-top: 15px !important;
}

.modules-category-section {
    background: white !important;
    margin-bottom: 15px !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    display: block !important;
    visibility: visible !important;
}

.modules-category-header {
    background: #1e88e5 !important;
    color: white !important;
    padding: 12px 20px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-align: right !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.modules-category-count {
    background: rgba(255,255,255,0.2) !important;
    padding: 2px 8px !important;
    border-radius: 12px !important;
    font-size: 11px !important;
    font-weight: 500 !important;
}

.modules-category-body {
    padding: 15px !important;
    background: white !important;
    display: block !important;
    visibility: visible !important;
}

.modules-grid-new {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8px !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.module-item-new {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 8px 12px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-height: 40px !important;
}

.module-item-new:hover {
    background: #e3f2fd !important;
    border-color: #1e88e5 !important;
}

.module-item-new input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    cursor: pointer !important;
    accent-color: #1e88e5 !important;
    display: block !important;
    margin: 0 !important;
    order: 2 !important;
}

.module-item-new input[type="checkbox"]:checked + .module-label-new {
    color: #1e88e5 !important;
    font-weight: 600 !important;
}

.module-item-new.selected {
    background: #e3f2fd !important;
    border-color: #1e88e5 !important;
}

.module-label-new {
    font-size: 13px !important;
    color: #374151 !important;
    font-weight: 500 !important;
    flex: 1 !important;
    text-align: right !important;
    line-height: 1.3 !important;
    display: block !important;
    order: 1 !important;
    margin-left: 8px !important;
}

.module-item-new .highlight-match {
    background: #fef3c7 !important;
    color: #92400e !important;
    padding: 1px 3px !important;
    border-radius: 2px !important;
    font-weight: 700 !important;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .modules-grid-new {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .modules-grid-new {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 6px !important;
    }
    
    .module-item-new {
        padding: 6px 10px !important;
        min-height: 36px !important;
    }
    
    .module-label-new {
        font-size: 12px !important;
    }
    
    .modules-category-header {
        padding: 10px 15px !important;
        font-size: 13px !important;
    }
    
    .modules-category-body {
        padding: 12px !important;
    }
}

@media (max-width: 480px) {
    .modules-grid-new {
        grid-template-columns: 1fr !important;
    }
}

/* إزالة أي أنماط مخفية */
.hidden {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.all-hidden {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* إصلاح أزرار النماذج */
.form-actions {
    display: flex !important;
    gap: 15px !important;
    margin-top: 30px !important;
    visibility: visible !important;
}

.btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 12px 30px !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3) !important;
}

.btn-secondary {
    background: #e0e6ed !important;
    color: #2c3e50 !important;
}

/* Modules Container - Simple Clean Design */
.modules-container {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: white !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
}

.modules-category-section {
    border-bottom: 1px solid #e2e8f0 !important;
    display: block !important;
    visibility: visible !important;
}

.modules-category-section:last-child {
    border-bottom: none !important;
}

.modules-category-header {
    background: #1e88e5 !important;
    color: white !important;
    padding: 12px 20px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-align: right !important;
    margin: 0 !important;
    display: block !important;
}

.modules-category-body {
    padding: 20px !important;
    background: #f8fafc !important;
    display: block !important;
    visibility: visible !important;
}

.modules-grid-simple {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 15px !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.module-item-simple {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 12px 15px !important;
    background: white !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-height: 45px !important;
}

.module-item-simple:hover {
    background: #f0f9ff !important;
    border-color: #3b82f6 !important;
}

.module-item-simple input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    cursor: pointer !important;
    accent-color: #1e88e5 !important;
    display: block !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
}

.module-item-simple input[type="checkbox"]:checked + .module-label-simple {
    color: #1e40af !important;
    font-weight: 600 !important;
}

.module-item-simple.selected {
    background: #e3f2fd !important;
    border-color: #1e88e5 !important;
}

.module-label-simple {
    font-size: 13px !important;
    color: #374151 !important;
    font-weight: 500 !important;
    flex: 1 !important;
    text-align: right !important;
    line-height: 1.3 !important;
    display: block !important;
}

.module-item-simple .highlight-match {
    background: #fef3c7 !important;
    color: #92400e !important;
    padding: 1px 3px !important;
    border-radius: 2px !important;
    font-weight: 700 !important;
}

/* Hide/Show Animation */
.module-item-simple.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .modules-grid-simple {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .modules-grid-simple {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    
    .module-item-simple {
        padding: 10px 12px !important;
        min-height: 40px !important;
    }
    
    .modules-category-header {
        padding: 10px 15px !important;
        font-size: 13px !important;
    }
    
    .modules-category-body {
        padding: 15px !important;
    }
}

@media (max-width: 480px) {
    .modules-grid-simple {
        grid-template-columns: 1fr !important;
    }
}
/* أنماط الموديولات لصفحة تعديل التذكرة */
.modules-grid {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
}

.module-category {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    margin-bottom: 20px;
    display: block;
    width: 100%;
}

.module-category h4 {
    color: #495057;
    font-size: 16px;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    display: block;
    width: 100%;
}

.module-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    width: 100%;
    margin: 0;
    padding: 0;
}

.module-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0;
    min-height: 45px;
}

.module-checkbox:hover {
    border-color: #007bff;
    background: #f8f9ff;
}

.module-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    flex-shrink: 0;
}

.module-checkbox span {
    font-size: 14px;
    color: white;
    font-weight: 400;
    flex: 1;
    line-height: 1.4;
    display: block;
}

/* إصلاح النموذج */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
}

.form-group {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    color: #2c3e50;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* صندوق البحث */
.module-search-box {
    position: relative;
    margin-bottom: 20px;
}

.module-search-box i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #7f8c8d;
    z-index: 2;
}

.module-search-box input {
    padding-right: 45px;
}

/* للشاشات الصغيرة */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .module-checkboxes {
        grid-template-columns: 1fr;
    }
}