* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Flash Messages */
.flash-messages {
    margin-bottom: 20px;
}

.alert {
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
}

.alert-info {
    background: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.login-form {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.login-form h2 {
    text-align: center;
    margin-bottom: 15px;
    color: #333;
    font-weight: 600;
}

.login-subtitle {
    text-align: center;
    margin-bottom: 30px;
    color: #666;
    font-size: 14px;
    font-style: italic;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* ===== 🎨 نظام الأزرار الموحد والجميل ===== */

/* الأزرار الأساسية */
.btn,
.admin-btn {
    /* التصميم الأساسي */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    /* الحجم والمسافات */
    padding: 12px 24px;
    min-height: 48px;
    border-radius: 12px;
    border: none;

    /* النص والخط */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    letter-spacing: 0.5px;

    /* التفاعل */
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;

    /* إزالة التحديد */
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;

    /* الظل الأساسي */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);

    /* التدرج الافتراضي - أزرق جميل */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

/* تأثير الإضاءة الداخلية */
.btn::before,
.admin-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before,
.admin-btn:hover::before {
    left: 100%;
}

/* تأثيرات التفاعل الموحدة */
.btn:hover,
.admin-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.4);
    filter: brightness(1.1);
}

.btn:active,
.admin-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
    transition: all 0.1s ease;
}

/* ===== أنواع الأزرار المختلفة ===== */

/* الزر الأساسي - أزرق */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.4);
}

/* زر النجاح - أزرق الموقع */
.btn-success,
.admin-btn-success {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-success:hover,
.admin-btn-success:hover {
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.4);
}

/* زر التصدير المحسن - بنفسجي الموقع */
.admin-btn-export,
.export-excel-btn {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    color: white;
    position: relative;
}

.admin-btn-export::after,
.export-excel-btn::after {
    content: '📊';
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 12px;
    animation: sparkle 2s infinite;
}

@keyframes sparkle {

    0%,
    100% {
        opacity: 0;
        transform: scale(0.8);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

.admin-btn-export:hover,
.export-excel-btn:hover {
    box-shadow: 0 12px 30px rgba(118, 75, 162, 0.4);
}

/* زر بسيط - رمادي */
.btn-secondary,
.admin-btn-simple {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
}

.btn-secondary:hover,
.admin-btn-simple:hover {
    box-shadow: 0 12px 30px rgba(108, 117, 125, 0.4);
}

/* زر الخطر - أحمر */
.btn-danger,
.admin-btn-danger,
.delete-entry-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

.btn-danger:hover,
.admin-btn-danger:hover,
.delete-entry-btn:hover {
    box-shadow: 0 12px 30px rgba(220, 53, 69, 0.4);
}

/* زر تسجيل الخروج - برتقالي */
.admin-btn-logout {
    background: linear-gradient(135deg, #fd7e14 0%, #e55a00 100%);
    color: white;
}

.admin-btn-logout:hover {
    box-shadow: 0 12px 30px rgba(253, 126, 20, 0.4);
}

/* زر التحذير - أصفر */
.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #212529;
}

.btn-warning:hover {
    box-shadow: 0 12px 30px rgba(255, 193, 7, 0.4);
}

/* زر المعلومات - أزرق سماوي */
.btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
}

.btn-info:hover {
    box-shadow: 0 12px 30px rgba(23, 162, 184, 0.4);
}

/* ===== أحجام الأزرار ===== */

/* زر صغير */
.btn-sm {
    padding: 8px 16px;
    min-height: 36px;
    font-size: 12px;
    border-radius: 8px;
}

/* زر كبير */
.btn-lg {
    padding: 16px 32px;
    min-height: 56px;
    font-size: 16px;
    border-radius: 14px;
}

/* ===== الأيقونات داخل الأزرار ===== */
.btn-icon,
.admin-btn .btn-icon {
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
}

.btn-text,
.admin-btn .btn-text {
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Data Entry Page */
.data-entry-container {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.header h2 {
    color: #333;
    font-weight: 600;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.current-date {
    background: #e3f2fd;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 30px;
    text-align: center;
    color: #1565c0;
    font-size: 18px;
}

/* Model Entry */
.model-entry {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 25px;
    border: 2px solid #e9ecef;
}

/* Form Row Layout */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

.model-entry h3 {
    color: #495057;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

.display-type-section,
.pop-material-section,
.image-upload-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.display-type-section h4,
.pop-material-section h4,
.image-upload-section h4 {
    color: #495057;
    margin-bottom: 15px;
    font-weight: 600;
}

/* Checklist */
.checklist-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.checklist-item:hover {
    background: #f8f9fa;
}

.checklist-item input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.checklist-item label {
    margin: 0;
    cursor: pointer;
    font-size: 14px;
}

/* ===== 📁 أزرار رفع الملفات الجميلة ===== */

/* إخفاء input الأصلي */
input[type="file"] {
    display: none;
}

/* ===== 🖼️ Model Image Upload Area ===== */
.model-image-upload {
    border: 2px dashed #667eea;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.model-image-upload::before {
    content: '📁';
    font-size: 32px;
    opacity: 0.7;
    animation: bounce 2s infinite;
}

.model-image-upload:hover {
    border-color: #764ba2;
    background: linear-gradient(135deg, rgba(118, 75, 162, 0.1) 0%, rgba(102, 126, 234, 0.1) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
}

.model-image-upload p {
    margin: 0;
    font-weight: 600;
    color: #667eea;
    font-size: 16px;
}

.model-image-upload small {
    margin: 0;
    color: #666;
    font-size: 12px;
    opacity: 0.8;
}

.model-image-upload.dragover {
    border-color: #28a745;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(40, 167, 69, 0.05) 100%);
    transform: scale(1.02);
}

/* Mobile responsive for model image upload */
@media (max-width: 768px) {
    .model-image-upload {
        padding: 20px 15px;
        min-height: 100px;
    }

    .model-image-upload::before {
        font-size: 24px;
    }

    .model-image-upload p {
        font-size: 14px;
    }

    .model-image-upload small {
        font-size: 11px;
    }
}

/* حاوي زر رفع الملفات للتوسيط */
.file-upload-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0 auto;
}

/* تصميم Label كزر جميل */
.file-upload-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 16px 24px;
    min-height: 50px;
    border-radius: 10px;
    border: 2px solid #667eea;

    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;

    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    font-weight: 600;

    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Responsive width - fits container but has reasonable limits */
    width: 100%;
    max-width: 400px;
    min-width: 200px;
    margin: 0 auto;
    box-sizing: border-box;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* تأثير الإضاءة لزر رفع الملفات */
.file-upload-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.2), transparent);
    transition: left 0.5s ease;
}

.file-upload-label:hover::before {
    left: 100%;
}

.file-upload-label:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    border-color: #764ba2;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(118, 75, 162, 0.4);
    filter: brightness(1.1);
}

.file-upload-label:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

/* أيقونات وتصميم النص */
.upload-icon {
    font-size: 20px;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-5px);
    }

    60% {
        transform: translateY(-3px);
    }
}

.upload-text {
    font-weight: 600;
    letter-spacing: 0.5px;
}

.upload-hint {
    font-size: 12px;
    opacity: 0.8;
    font-weight: 400;
}

/* ===== 📖 تحسين زر الجايد ===== */

/* حاوي اختيار الموديل مع زر الجايد */
.form-group:has(.model-select) {
    position: relative;
}

/* زر الجايد - تحت مربع الاختيار */
.model-image-icon {
    display: block !important;
    margin: 8px auto 0 auto !important;
    width: fit-content !important;
    position: static !important;
    transform: none !important;
}

/* تحسين للموبايل */
@media (max-width: 768px) {
    .model-image-icon {
        font-size: 11px !important;
        padding: 6px 12px !important;
        margin: 6px auto 0 auto !important;
    }
}

/* Image Upload Section */
.image-upload {
    margin-bottom: 15px;
}

.image-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.image-preview img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

/* ===== 📝 أزرار النماذج والإجراءات ===== */

/* حاوي أزرار النماذج */
.form-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 12px;
    border-top: 3px solid #667eea;
    position: relative;
}

.form-actions::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2, #667eea);
    animation: shimmer 3s infinite;
}

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

    100% {
        transform: translateX(100%);
    }
}

/* أزرار الفلترة */
.filter-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    padding: 16px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

/* ===== 🔍 أزرار البحث والعرض ===== */

/* أزرار عرض الصور */
.view-images-btn,
.view-comment-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    padding: 8px 12px;
    min-height: 36px;
    border-radius: 8px;
    border: none;

    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;

    font-size: 12px;
    font-weight: 600;

    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    width: 100%;
    box-sizing: border-box;
}

.view-images-btn:hover,
.view-comment-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(23, 162, 184, 0.4);
}

.images-count {
    font-weight: 700;
}

.view-text {
    font-size: 10px;
    opacity: 0.9;
}

/* ===== 💬 أزرار التعليقات ===== */

/* زر إضافة تعليق */
.add-comment-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    position: relative;
}

.add-comment-btn::before {
    content: '💬';
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 12px;
    animation: bounce 2s infinite;
}

/* زر حذف التعليق */
.remove-comment-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    min-width: 80px !important;
    flex-shrink: 0;
}

/* حاوي إجراءات التعليقات */
.comment-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 12px;
    padding: 12px;
    background: rgba(40, 167, 69, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.comment-info {
    flex: 1;
    font-size: 11px;
    color: #28a745;
    font-weight: 500;
}

/* ===== 🗑️ أزرار الحذف والخطر ===== */

.delete-entry-btn {
    position: relative;
    overflow: hidden;
}

.delete-entry-btn::before {
    content: '⚠️';
    position: absolute;
    top: -3px;
    right: -3px;
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.delete-entry-btn:hover::before {
    opacity: 1;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-2px);
    }

    75% {
        transform: translateX(2px);
    }
}

/* Admin Dashboard */
.admin-container {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.filters-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
}

.filters-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.data-table th {
    background: #495057;
    color: white;
    font-weight: 600;
}

.data-table tr:hover {
    background: #f8f9fa;
}

.unselected-material {
    color: #dc3545;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .form-actions {
        flex-direction: column;
    }

    .filters-row {
        grid-template-columns: 1fr;
    }

    .checklist-container {
        grid-template-columns: 1fr;
    }

    /* Mobile responsive file upload */
    .file-upload-label {
        width: 90%;
        max-width: 300px;
        min-width: 150px;
        padding: 12px 16px;
        font-size: 13px;
        gap: 6px;
    }

    .upload-icon {
        font-size: 16px;
    }

    .upload-hint {
        font-size: 11px;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .file-upload-label {
        width: 85%;
        max-width: 250px;
        min-width: 120px;
        padding: 10px 12px;
        font-size: 12px;
        gap: 4px;
    }

    .upload-icon {
        font-size: 14px;
    }

    .upload-text {
        font-size: 12px;
    }

    .upload-hint {
        font-size: 10px;
    }

    .image-upload-section {
        padding: 15px;
    }
}

/* Admin Dashboard Specific Styles */
.admin-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.summary-section {
    margin-bottom: 30px;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.stat-card h4 {
    margin-bottom: 10px;
    font-size: 14px;
    opacity: 0.9;
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
}

.filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.table-container {
    overflow-x: auto;
    margin-top: 20px;
}

.materials-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    max-width: 200px;
}

.material-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    white-space: nowrap;
}

.material-tag.selected {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.material-tag.unselected {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.images-list {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.thumbnail {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.thumbnail:hover {
    transform: scale(1.1);
}

.no-data {
    color: #6c757d;
    font-style: italic;
    font-size: 14px;
}

.no-data-message {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

/* Image Modal */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.modal-content img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
}

.close-modal {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 30px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== 📝 صفحة تسجيل الموظف الجديد ===== */
.register-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 20px;
}

.register-form {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.2);
    width: 100%;
    max-width: 600px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.register-form h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #667eea;
    font-weight: 600;
    font-size: 28px;
}

/* تحسين إدارة الفروع */
.branches-container {
    background: rgba(102, 126, 234, 0.05);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.branch-entry {
    margin-bottom: 15px;
}

.branch-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.branch-row input[name="branch_names[]"] {
    flex: 1;
    min-width: 200px;
}

.branch-row input[name="branch_codes[]"] {
    flex: 1;
    min-width: 150px;
}

/* Remove button in registration form - override absolute positioning */
.register-form .remove-branch-btn {
    position: static !important;
    flex-shrink: 0;
    white-space: nowrap;
    margin-left: 5px;
    width: auto !important;
    height: auto !important;
    border-radius: 12px !important;
    padding: 8px 12px !important;
    font-size: 12px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    top: auto !important;
    right: auto !important;
}

.branch-actions {
    text-align: center;
    margin-top: 15px;
}

.form-help {
    display: block;
    margin-top: 8px;
    color: #667eea;
    font-size: 12px;
    font-style: italic;
}

/* Model Entry Improvements */
.model-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

.remove-model-btn {
    padding: 5px 10px;
    font-size: 12px;
}

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

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

/* Form Error States */
.form-group input.error,
.form-group select.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.flash-message {
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    animation: slideIn 0.3s ease;
}

.flash-message.alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.flash-message.alert-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

/* Image Preview Improvements */
.image-preview-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.image-preview-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

.file-name {
    font-size: 12px;
    color: #6c757d;
    text-align: center;
    word-break: break-all;
    max-width: 100px;
}

/* Autocomplete Styles */
.autocomplete-container {
    position: relative;
}

.autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.autocomplete-suggestion {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f8f9fa;
    transition: background-color 0.2s ease;
}

.autocomplete-suggestion:hover,
.autocomplete-suggestion.highlighted {
    background: #e3f2fd;
    color: #1565c0;
}

.autocomplete-suggestion:last-child {
    border-bottom: none;
}

.branch-input:focus+.autocomplete-suggestions {
    display: block;
}

.no-suggestions {
    padding: 10px 15px;
    color: #6c757d;
    font-style: italic;
    text-align: center;
}

/* Checkbox Improvements */
.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.checkbox-item:hover {
    background: #f8f9fa;
}

.checkbox-item input[type="checkbox"] {
    width: auto;
    margin: 0;
    transform: scale(1.2);
}

.checkbox-item label {
    margin: 0;
    cursor: pointer;
    font-size: 14px;
    user-select: none;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* ===== 📋 أزرار التبويبات والإدارة ===== */

/* حاوي التبويبات */
.management-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 30px;
    padding: 8px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

/* أزرار التبويبات */
.tab-btn,
.tab-button {
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: #667eea;
    cursor: pointer;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.tab-btn::before,
.tab-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tab-btn:hover::before,
.tab-button:hover::before {
    opacity: 1;
}

.tab-btn:hover,
.tab-button:hover {
    color: #5a67d8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

/* التبويب النشط */
.tab-btn.active,
.tab-button.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.tab-btn.active::before,
.tab-button.active::before {
    opacity: 0;
}

/* ===== 🎛️ أزرار لوحة التحكم ===== */

/* حاوي أزرار الإدارة - جنب بعض */
.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    justify-content: space-between;
    align-items: center;
}

/* الأزرار تأخذ مساحة متساوية */
.admin-actions .admin-btn {
    flex: 1;
    min-width: 100px;
    max-width: 150px;
    text-align: center;
}

/* تحسين النصوص في الأزرار */
.admin-actions .admin-btn .btn-text {
    font-size: 13px;
    font-weight: 600;
}

.admin-actions .admin-btn .btn-icon {
    font-size: 14px;
}

/* أزرار الإدارة المخصصة */
.admin-btn {
    position: relative;
    overflow: hidden;
}

/* تأثير خاص لأزرار الإدارة */
.admin-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.admin-btn:hover::after {
    width: 300px;
    height: 300px;
}

/* أزرار خاصة بألوان الموقع */
.admin-btn[title*="Data"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.admin-btn[title*="User"] {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.admin-btn[title*="Images"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.admin-btn[title*="Add"] {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.admin-btn[title*="Export Enhanced"] {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    animation: pulse 3s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 12px rgba(118, 75, 162, 0.3);
    }

    50% {
        box-shadow: 0 8px 25px rgba(118, 75, 162, 0.5);
    }

    100% {
        box-shadow: 0 4px 12px rgba(118, 75, 162, 0.3);
    }
}

.admin-btn[title*="Export Simple"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.admin-btn[title*="Logout"] {
    background: linear-gradient(135deg, #fd7e14 0%, #e55a00 100%);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.management-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 25px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #dee2e6;
}

.filter-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.filter-controls select {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: white;
}

.data-table-container {
    overflow-x: auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.management-table th,
.management-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.management-table th {
    background: #495057;
    color: white;
    font-weight: 600;
    position: sticky;
    top: 0;
}

.management-table tr:hover {
    background: #f8f9fa;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
    margin-right: 5px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    animation: slideIn 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.close-modal {
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #dc3545;
}

.modal-body {
    padding: 25px;
}

.modal-body .form-group {
    margin-bottom: 20px;
}

.modal-body .form-actions {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* Delete Entry Button */
.delete-entry-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s ease;
}

.delete-entry-btn:hover {
    background: #c82333;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Responsive Design for Management */
@media (max-width: 768px) {
    .management-tabs {
        flex-wrap: wrap;
    }

    .tab-btn {
        flex: 1;
        min-width: 120px;
    }

    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .modal-content {
        width: 95%;
        margin: 20px;
    }

    .data-table-container {
        font-size: 14px;
    }

    .management-table th,
    .management-table td {
        padding: 8px 10px;
    }
}

/* User Management Styles */
.role-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.role-badge.admin {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.role-badge.employee {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.warning-text {
    color: #dc3545;
    font-weight: 500;
    margin: 15px 0;
    padding: 10px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
}

.form-text {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
    display: block;
}

/* Password strength indicator */
.password-strength {
    margin-top: 5px;
    height: 4px;
    border-radius: 2px;
    background: #e9ecef;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    transition: all 0.3s ease;
}

.password-strength.weak .password-strength-bar {
    width: 33%;
    background: #dc3545;
}

.password-strength.medium .password-strength-bar {
    width: 66%;
    background: #ffc107;
}

.password-strength.strong .password-strength-bar {
    width: 100%;
    background: #28a745;
}

/* User management specific styles */
.user-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.user-stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.user-stat-card h4 {
    margin: 0 0 5px 0;
    font-size: 12px;
    opacity: 0.9;
}

.user-stat-number {
    font-size: 24px;
    font-weight: bold;
}

/* Enhanced form validation */
.form-group input.invalid,
.form-group select.invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.form-group input.valid,
.form-group select.valid {
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.validation-message {
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

.validation-message.error {
    color: #dc3545;
}

.validation-message.success {
    color: #28a745;
}

/* ===== ⚡ حالات خاصة للأزرار ===== */

/* حالة التحميل */
.btn.loading,
.admin-btn.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
    cursor: not-allowed;
}

.btn.loading::after,
.admin-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.btn.loading .btn-text,
.admin-btn.loading .btn-text {
    opacity: 0;
}

.btn.loading .btn-icon,
.admin-btn.loading .btn-icon {
    opacity: 0;
}

/* حالة النجاح */
.btn.success,
.admin-btn.success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    animation: successPulse 0.6s ease;
}

@keyframes successPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.btn.success::after,
.admin-btn.success::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    font-weight: bold;
}

/* حالة الخطأ */
.btn.error,
.admin-btn.error {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
    animation: errorShake 0.6s ease;
}

@keyframes errorShake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.btn.error::after,
.admin-btn.error::after {
    content: '✗';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    font-weight: bold;
}

/* حالة التعطيل */
.btn:disabled,
.admin-btn:disabled {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%) !important;
    color: rgba(255, 255, 255, 0.6) !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    opacity: 0.6 !important;
    transform: none !important;
    box-shadow: none !important;
}

/* ===== 🎯 تأثيرات التركيز والوصولية ===== */

.btn:focus,
.admin-btn:focus {
    outline: 3px solid rgba(102, 126, 234, 0.5);
    outline-offset: 2px;
}

.btn:focus:not(:focus-visible),
.admin-btn:focus:not(:focus-visible) {
    outline: none;
}

/* ===== 📱 تحسينات اللمس للأجهزة المحمولة ===== */

@media (hover: none) and (pointer: coarse) {

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

    .btn:active,
    .admin-btn:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
}

/* ===== 🌟 تأثيرات خاصة ===== */

/* تأثير النجوم للأزرار المهمة */
.btn.starred,
.admin-btn.starred {
    position: relative;
    overflow: visible;
}

.btn.starred::before,
.admin-btn.starred::before {
    content: '⭐';
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 16px;
    animation: twinkle 2s infinite;
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

/* تأثير الموجة عند النقر */
.btn,
.admin-btn {
    position: relative;
    overflow: hidden;
}

.btn::after,
.admin-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:active::after,
.admin-btn:active::after {
    width: 300px;
    height: 300px;
}

/* Enhanced modal animations */
.modal.show {
    display: block;
    animation: modalFadeIn 0.3s ease;
}

.modal.hide {
    animation: modalFadeOut 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }

    to {
        opacity: 1;
        backdrop-filter: blur(5px);
    }
}

@keyframes modalFadeOut {
    from {
        opacity: 1;
        backdrop-filter: blur(5px);
    }

    to {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
}

/* ===== 🖼️ تحسين صفحة صور الموديل ===== */

/* شبكة الموديلات - مربعات جنب بعض */
.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

/* بطاقة الموديل */
.model-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
    border: 1px solid rgba(102, 126, 234, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.model-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.model-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.25);
}

/* رأس بطاقة الموديل */
.model-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.model-header h4 {
    margin: 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.category-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

/* صورة الموديل */
.model-image {
    position: relative;
    margin-bottom: 15px;
    border-radius: 10px;
    overflow: hidden;
    background: #f8f9fa;
}

.model-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.model-image:hover img {
    transform: scale(1.05);
}

.image-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.model-image:hover .image-actions {
    opacity: 1;
}

/* حالة عدم وجود صورة */
.no-image {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 10px;
    border: 2px dashed rgba(102, 126, 234, 0.3);
    margin-bottom: 15px;
}

.no-image p {
    margin: 0 0 15px 0;
    color: #667eea;
    font-size: 16px;
    font-weight: 500;
}

/* تاريخ الرفع */
.upload-date {
    color: #6c757d;
    font-size: 12px;
    display: block;
    text-align: center;
    margin-top: 10px;
}

/* قسم الرفع */
.upload-section {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.upload-section h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 600;
}

/* منطقة رفع الصور */
.model-image-upload {
    border: 2px dashed #667eea;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    background: rgba(102, 126, 234, 0.05);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.model-image-upload:hover {
    border-color: #764ba2;
    background: rgba(118, 75, 162, 0.1);
}

.model-image-upload.dragover {
    border-color: #764ba2;
    background: rgba(118, 75, 162, 0.15);
    transform: scale(1.02);
}

.model-image-upload input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.model-image-upload p {
    margin: 0 0 10px 0;
    color: #667eea;
    font-size: 16px;
    font-weight: 500;
}

.model-image-upload small {
    color: #6c757d;
    font-size: 12px;
}

/* معاينة الصورة */
.model-image-preview {
    margin-top: 20px;
    text-align: center;
}

.model-image-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.model-image-actions {
    margin-top: 15px;
}

/* ===== 👥 تحسين User Management ===== */

/* إجراءات المستخدم - تصميم محسن */
.user-actions-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    padding: 8px;
}

.user-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    min-width: 80px;
    height: 36px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.action-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.action-text {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.edit-user-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.edit-user-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    filter: brightness(1.1);
}

.delete-user-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

.delete-user-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
    filter: brightness(1.1);
}

/* معلومات الفروع */
.user-branches-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.branches-count {
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.badge-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.branches-preview {
    font-size: 12px;
    color: #6c757d;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.no-branches {
    color: #dc3545;
    font-style: italic;
    font-size: 12px;
}

/* ===== 🏢 تصميم Manage Branches الجديد ===== */
.large-modal {
    max-width: 800px;
}

.branches-management-modern {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* رأس القسم الحديث */
.section-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
}

.section-header-modern h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #667eea;
    font-size: 18px;
    font-weight: 600;
}

.section-icon {
    font-size: 20px;
}

.branches-count-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* قسم الفروع الحالية */
.current-branches-section {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.branches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    max-height: 300px;
    overflow-y: auto;
    padding: 10px 0;
}

.branch-card {
    background: white;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.branch-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
}

.branch-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.branch-name {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.branch-code {
    color: #667eea;
    font-size: 12px;
    font-weight: 500;
}

.remove-branch-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.3s ease;
}

.remove-branch-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

/* قسم إضافة فرع جديد */
.add-branch-section-modern {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.05) 0%, rgba(32, 201, 151, 0.05) 100%);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.add-branch-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group-modern {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.input-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.input-field label {
    font-size: 12px;
    font-weight: 600;
    color: #28a745;
}

.modern-input {
    padding: 12px 16px;
    border: 2px solid rgba(40, 167, 69, 0.2);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.modern-input:focus {
    outline: none;
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.add-branch-btn-modern {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    align-self: flex-start;
}

.add-branch-btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
    filter: brightness(1.1);
}

/* حالة عدم وجود فروع */
.no-branches-found {
    padding: 40px 20px;
    text-align: center;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #6c757d;
}

.empty-icon {
    font-size: 48px;
    opacity: 0.5;
}

.empty-state p {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

.empty-state small {
    font-size: 12px;
    opacity: 0.8;
}

/* Enhanced Image Display Styles */
.images-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 300px;
}

.image-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 8px;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.image-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.image-item .thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.image-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 5px;
    gap: 3px;
}

.download-btn {
    background: #28a745;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.3s ease;
    border: none;
    cursor: pointer;
}

.download-btn:hover {
    background: #218838;
    transform: scale(1.05);
}

.image-name {
    font-size: 10px;
    color: #6c757d;
    text-align: center;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Enhanced Excel Export Button */
.export-excel-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    margin-bottom: 20px;
}

.export-excel-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
    background: linear-gradient(135deg, #218838, #1e7e34);
}

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

/* Enhanced Image Modal */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.image-modal .modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.image-modal img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 30px;
    color: #666;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #000;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Responsive Design for Images */
@media (max-width: 768px) {
    .images-list {
        max-width: 200px;
    }

    .image-item .thumbnail {
        width: 50px;
        height: 50px;
    }

    .image-name {
        font-size: 9px;
        max-width: 60px;
    }
}

/* Enhanced Flash Messages for Admin Management */
.flash-message {
    padding: 12px 20px;
    margin-bottom: 15px;
    border-radius: 8px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-left: 4px solid;
    display: flex;
    align-items: center;
    gap: 10px;
}

.flash-message.alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border-left-color: #28a745;
}

.flash-message.alert-error {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border-left-color: #dc3545;
}

.flash-message.alert-info {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    color: #0c5460;
    border-left-color: #17a2b8;
}

.message-icon {
    font-size: 18px;
    flex-shrink: 0;
}

/* Enhanced Modal Animations */
.modal {
    animation: fadeIn 0.3s ease;
}

.modal-content {
    animation: slideIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Enhanced Button Hover Effects */
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

/* Quick Edit Indicators */
.table tbody tr:hover {
    background: #f8f9fa;
    transform: scale(1.01);
    transition: all 0.2s ease;
}

.table tbody tr {
    transition: all 0.2s ease;
}

/* Tab Active State Enhancement */
.tab-btn.active {
    background: linear-gradient(135deg, #007bff, #0056b3);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    transform: translateY(-2px);
}

.tab-btn {
    transition: all 0.3s ease;
}

.tab-btn:hover:not(.active) {
    background: #e9ecef;
    transform: translateY(-1px);
}

/* Quick Tips Section */
.quick-tips {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tips-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #495057;
    font-weight: 600;
    flex-shrink: 0;
}

.tips-icon {
    font-size: 18px;
}

.tips-content {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.tip {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #6c757d;
    font-size: 14px;
}

.tip kbd {
    background: #343a40;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-family: monospace;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Responsive Tips */
@media (max-width: 768px) {
    .quick-tips {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .tips-content {
        gap: 10px;
    }

    .tip {
        font-size: 13px;
    }
}

/* Enhanced Form Focus States */
.modal input:focus,
.modal select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: none;
}

/* Success Animation for Saved Items */
@keyframes saveSuccess {
    0% {
        background-color: #d4edda;
    }

    100% {
        background-color: transparent;
    }
}

.table tbody tr.just-saved {
    animation: saveSuccess 2s ease;
}

/* Context Indicator for POP Materials */
.context-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border: 1px solid #2196f3;
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 10px;
    font-size: 14px;
    color: #1565c0;
}

.context-icon {
    font-size: 16px;
}

.context-text {
    font-weight: 500;
}

.context-text strong {
    color: #0d47a1;
    font-weight: 600;
}

/* Enhanced Section Header */
.section-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.section-header h3 {
    margin: 0;
    color: #495057;
}

.filter-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-controls select {
    min-width: 150px;
    padding: 6px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: white;
}

.filter-controls .btn {
    margin-left: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-controls .btn {
        margin-left: 0;
        margin-top: 10px;
    }

    .context-indicator {
        font-size: 13px;
        padding: 6px 10px;
    }
}

/* Empty State Styles */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
}

.empty-state-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    color: #6c757d;
}

.empty-state-icon {
    font-size: 48px;
    opacity: 0.7;
}

.empty-state-message {
    font-size: 16px;
    font-weight: 500;
    margin: 0;
    max-width: 400px;
    line-height: 1.5;
}

/* Responsive Empty State */
@media (max-width: 768px) {
    .empty-state {
        padding: 30px 15px;
    }

    .empty-state-icon {
        font-size: 36px;
    }

    .empty-state-message {
        font-size: 14px;
    }
}

/* Enhanced Filter Controls */
.filter-controls select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: none;
}

.filter-controls select:not([value=""]) {
    background-color: #e3f2fd;
    border-color: #2196f3;
    font-weight: 500;
}

/* Loading State */
.table-loading {
    text-align: center;
    padding: 20px;
    color: #6c757d;
    font-style: italic;
}

.table-loading::before {
    content: "⏳ ";
    margin-right: 8px;
}

/* User Branches Management Styles */
.branches-cell {
    max-width: 300px;
}

.branches-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.branch-tag {
    display: inline-block;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin: 2px;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.no-branches {
    color: #6c757d;
    font-style: italic;
    font-size: 14px;
}

.manage-branches-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 4px;
    align-self: flex-start;
}

.manage-branches-btn:hover {
    background: #218838;
}

/* Branches Modal Styles */
.branches-management {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.current-branches,
.available-branches {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    background: #f8f9fa;
}

.current-branches h4,
.available-branches h4 {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 16px;
}

.branches-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 60px;
}

.branch-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.branch-name {
    font-weight: 500;
    color: #495057;
}

.add-branch-section {
    display: flex;
    gap: 10px;
    align-items: center;
}

.add-branch-section select {
    flex: 1;
    padding: 6px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: white;
}

.add-branch-section button {
    padding: 6px 12px;
    white-space: nowrap;
}

/* Role Badge Styles */
.role-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.role-badge.admin {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

.role-badge.employee {
    background: linear-gradient(135deg, #28a745, #218838);
    color: white;
}

/* Responsive Design for Branches */
@media (max-width: 768px) {
    .branch-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .branch-row input[name="branch_names[]"],
    .branch-row input[name="branch_codes[]"] {
        min-width: unset;
        width: 100%;
        margin-bottom: 10px;
    }
    
    .register-form .remove-branch-btn {
        align-self: center;
        margin-left: 0 !important;
        margin-top: 5px;
        position: static !important;
    }
}
@media (max-width: 768px) {
    .branches-cell {
        max-width: 200px;
    }

    .branch-tag {
        font-size: 11px;
        padding: 3px 6px;
    }

    .manage-branches-btn {
        font-size: 11px;
        padding: 3px 6px;
    }

    .add-branch-section {
        flex-direction: column;
        align-items: stretch;
    }

    .branches-management {
        gap: 15px;
    }
}

/* Enha
nced Export Button */
.export-excel-btn {
    display: inline-block;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white !important;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    margin-right: 10px;
}

.export-excel-btn:hover {
    background: linear-gradient(135deg, #218838 0%, #1ea080 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
    color: white !important;
    text-decoration: none;
}

.export-excel-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(40, 167, 69, 0.3);
}

/* Simple Export Button */
.btn.btn-secondary {
    background: #6c757d;
    border-color: #6c757d;
    margin-right: 10px;
}

.btn.btn-secondary:hover {
    background: #5a6268;
    border-color: #545b62;
}

/* Image 
Display Improvements */
.images-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 200px;
}

.image-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 8px;
    border: 1px solid #dee2e6;
}

.image-link {
    display: block;
    text-decoration: none;
}

.thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ccc;
    transition: transform 0.2s ease;
}

.thumbnail:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.image-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 5px;
    gap: 2px;
}

.download-btn {
    text-decoration: none;
    font-size: 16px;
    padding: 2px 6px;
    border-radius: 4px;
    background: #007bff;
    color: white;
    transition: background 0.2s ease;
}

.download-btn:hover {
    background: #0056b3;
    color: white;
    text-decoration: none;
}

.image-name {
    font-size: 10px;
    color: #666;
    text-align: center;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Error handling for broken images */
.thumbnail[src=""],
.thumbnail:not([src]) {
    background: #f8f9fa;
    border: 2px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumbnail[src=""]:before,
.thumbnail:not([src]):before {
    content: "🖼️";
    font-size: 20px;
    color: #ccc;
}

/*
/* Removed duplicate file-upload-label styling */

.upload-icon {
    font-size: 24px;
    display: block;
    margin-bottom: 5px;
}

.upload-text {
    font-weight: 600;
    font-size: 16px;
    display: block;
    margin-bottom: 3px;
}

.upload-hint {
    font-size: 12px;
    opacity: 0.9;
    display: block;
}

.upload-info {
    margin-top: 8px;
    padding: 8px;
    background: #e3f2fd;
    border-radius: 4px;
    border-left: 4px solid #2196f3;
}

.upload-info small {
    color: #1976d2;
    font-weight: 500;
}

/* Image Preview Enhancements */
.preview-header {
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #28a745;
}

.preview-header h5 {
    margin: 0;
    color: #28a745;
    font-weight: 600;
}

.image-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.image-preview-item {
    position: relative;
    background: white;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.image-preview-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.image-preview-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.file-name {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #495057;
    margin-top: 8px;
    word-break: break-word;
    line-height: 1.3;
}

.file-size {
    display: block;
    font-size: 10px;
    color: #6c757d;
    margin-top: 2px;
}

.remove-image-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(220, 53, 69, 0.9);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.remove-image-btn:hover {
    background: rgba(220, 53, 69, 1);
}

.file-error {
    background: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #f5c6cb;
    font-size: 14px;
    font-weight: 500;
}

/* Image Upload Section Styling */
.image-upload-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    margin-top: 15px;
}

.image-upload-section h4 {
    color: #495057;
    margin-bottom: 15px;
    font-weight: 600;
}

/* Drag and Drop Enhancements */
.file-upload-label {
    border: 2px dashed transparent;
    transition: all 0.3s ease;
}

.file-upload-label:hover,
.file-upload-label.drag-over {
    border-color: #007bff;
    background: rgba(0, 123, 255, 0.1);
    transform: translateY(-2px);
}

.file-upload-label::after {
    content: "📎 Or drag and drop images here";
    display: block;
    font-size: 11px;
    margin-top: 8px;
    opacity: 0.8;
}

/* Image Preview Grid Improvements */
.image-preview {
    min-height: 60px;
    max-height: 400px;
    overflow-y: auto;
}

.image-preview:empty::before {
    content: "📷 No images selected yet";
    display: block;
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 20px;
}

/* Responsive image grid */
@media (max-width: 768px) {
    .image-preview {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .image-preview-item img {
        height: 100px;
    }
}

/* Loading state for images */
.image-preview-item.loading {
    opacity: 0.6;
}

.image-preview-item.loading::after {
    content: "⏳ Uploading...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
}

/* Removed duplicate simplified image upload button */

.upload-icon {
    font-size: 24px;
    display: block;
    margin-bottom: 8px;
}

.upload-text {
    font-weight: 600;
    font-size: 16px;
    display: block;
    margin-bottom: 5px;
}

.upload-hint {
    font-size: 12px;
    opacity: 0.8;
    display: block;
}

.upload-info {
    margin-bottom: 15px;
    text-align: center;
}

.upload-info small {
    color: #6c757d;
    font-style: italic;
}

/* Image Preview Styles */
.image-preview {
    margin-top: 20px;
}

.preview-header {
    margin-bottom: 15px;
}

.preview-header h5 {
    color: #495057;
    font-weight: 600;
    margin: 0;
}

/* Responsive Image Grid */
.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.image-preview-item {
    display: inline-block;
    position: relative;
    margin: 10px;
    padding: 10px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 200px;
    transition: transform 0.2s ease;
}

.image-preview-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.image-preview-item img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 8px;
}

.file-name {
    display: block;
    font-size: 12px;
    color: #495057;
    margin-bottom: 4px;
    word-break: break-word;
}

.file-size {
    display: block;
    font-size: 11px;
    color: #6c757d;
    margin-bottom: 8px;
}

.remove-image-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.remove-image-btn:hover {
    background: #c82333;
}

.file-error {
    background: #f8d7da;
    color: #721c24;
    padding: 8px 12px;
    border-radius: 4px;
    margin: 5px;
    font-size: 14px;
    border: 1px solid #f5c6cb;
}

/* Responsive Design for Image Upload */
@media (max-width: 768px) {
    .file-upload-label {
        min-width: 250px;
        padding: 12px 20px;
    }

    .image-preview-item {
        max-width: 150px;
        margin: 5px;
    }

    .image-preview-item img {
        width: 120px;
        height: 120px;
    }
}

/* Flash Message Styles for Image Upload */
.flash-message {
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.flash-message.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-message.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 
Admin Dashboard - Responsive Image Display */
.images-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 300px;
    max-height: 200px;
    overflow-y: auto;
}

.image-item {
    position: relative;
    flex: 0 0 auto;
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid #dee2e6;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.image-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: #007bff;
}

.image-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.2s ease;
}

.image-item:hover .thumbnail {
    opacity: 0.9;
}

.image-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 5px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.image-item:hover .image-actions {
    opacity: 1;
}

.download-btn {
    color: white;
    text-decoration: none;
    font-size: 12px;
    background: rgba(0, 123, 255, 0.8);
    padding: 2px 6px;
    border-radius: 3px;
    margin-right: 5px;
}

.download-btn:hover {
    background: rgba(0, 123, 255, 1);
    color: white;
}

.image-name {
    color: white;
    font-size: 10px;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

/* Responsive adjustments for dashboard images */
@media (max-width: 1200px) {
    .images-list {
        max-width: 250px;
    }

    .image-item {
        width: 70px;
        height: 70px;
    }
}

@media (max-width: 768px) {
    .images-list {
        max-width: 200px;
        gap: 8px;
    }

    .image-item {
        width: 60px;
        height: 60px;
    }

    .download-btn {
        font-size: 10px;
        padding: 1px 4px;
    }

    .image-name {
        font-size: 9px;
    }
}

@media (max-width: 480px) {
    .images-list {
        max-width: 150px;
        gap: 5px;
    }

    .image-item {
        width: 50px;
        height: 50px;
    }
}

/* Table responsiveness improvements */
.table-container {
    overflow-x: auto;
    margin: 20px 0;
}

.data-table {
    min-width: 100%;
    white-space: nowrap;
}

.data-table td {
    vertical-align: top;
    padding: 12px 8px;
}

/* Make table more responsive */
@media (max-width: 768px) {
    .data-table {
        font-size: 14px;
    }

    .data-table td {
        padding: 8px 6px;
    }

    .images-list {
        max-height: 120px;
    }
}

/* Removed duplicate beautiful upload button */

.upload-icon {
    font-size: 28px;
    display: block;
    margin-bottom: 8px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.upload-text {
    font-weight: 600;
    font-size: 16px;
    display: block;
    margin-bottom: 5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.upload-hint {
    font-size: 12px;
    opacity: 0.9;
    display: block;
    font-weight: 400;
}

/* V
iew Images Button */
.view-images-btn {
    background: linear-gradient(135deg, #6f42c1 0%, #e83e8c 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(111, 66, 193, 0.2);
    min-width: 140px;
}

.view-images-btn:hover {
    background: linear-gradient(135deg, #5a32a3 0%, #d91a72 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(111, 66, 193, 0.3);
}

.images-count {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.view-text {
    display: block;
    font-size: 11px;
    opacity: 0.9;
}

/* Image Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 2% auto;
    border-radius: 12px;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.close:hover {
    opacity: 0.7;
}

.modal-body {
    padding: 25px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.modal-image-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.modal-image-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.modal-image-container {
    position: relative;
    overflow: hidden;
}

.modal-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.modal-image-item:hover .modal-image {
    transform: scale(1.05);
}

.modal-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-image-item:hover .modal-image-overlay {
    opacity: 1;
}

.modal-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-btn:hover {
    background: white;
    transform: scale(1.1);
}

.view-btn {
    color: #007bff;
}

.download-btn {
    color: #28a745;
}

.modal-image-info {
    padding: 15px;
    text-align: center;
    background: #f8f9fa;
}

.image-number {
    display: block;
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;
}

.image-type {
    display: inline-block;
    background: #6f42c1;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.modal-footer {
    background: #f8f9fa;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #dee2e6;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }

    .modal-images-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }

    .modal-image {
        height: 150px;
    }

    .modal-header {
        padding: 15px 20px;
    }

    .modal-header h3 {
        font-size: 18px;
    }

    .modal-body {
        padding: 20px;
    }

    .modal-footer {
        padding: 15px 20px;
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .modal-images-grid {
        grid-template-columns: 1fr;
    }

    .view-images-btn {
        min-width: 120px;
        padding: 10px 15px;
    }

    .images-count {
        font-size: 13px;
    }

    .view-text {
        font-size: 10px;
    }
}

/* D
ownload Success Message Animation */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

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

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

.download-success-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    font-weight: 500;
    max-width: 300px;
    word-wrap: break-word;
}

/* Enhanced Modal Buttons */
.modal-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.modal-btn.downloading {
    animation: pulse 1s infinite;
}

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

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* Download Progress Indicator */
.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn.downloading {
    background: linear-gradient(90deg, #007bff 0%, #0056b3 50%, #007bff 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

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

    100% {
        background-position: 200% 0;
    }
}

/* Improved Modal Footer */
.modal-footer .btn {
    min-width: 120px;
    position: relative;
    overflow: hidden;
}

.modal-footer .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.modal-footer .btn:hover::before {
    left: 100%;
}

/* Enhanced Image Loading */
.modal-image {
    transition: opacity 0.3s ease;
}

.modal-image.loading {
    opacity: 0.5;
}

.modal-image.loading::after {
    content: '⏳ Loading...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
}

/* Mobile Download Message */
@media (max-width: 768px) {
    .download-success-message {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        text-align: center;
    }
}

/* 
Enhanced Download Messages */
.download-success-message,
.download-error-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 12px;
    z-index: 10000;
    font-weight: 500;
    max-width: 350px;
    word-wrap: break-word;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.download-success-message {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

.download-error-message {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.3);
}

/* Enhanced Button States */
.modal-btn.downloading {
    animation: downloadPulse 1.2s infinite;
    background: rgba(255, 193, 7, 0.9) !important;
    color: #212529 !important;
}

@keyframes downloadPulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(255, 193, 7, 0);
    }
}

/* Download All Button Enhanced */
.btn-primary.downloading {
    background: linear-gradient(90deg, #007bff 0%, #0056b3 50%, #007bff 100%) !important;
    background-size: 200% 100% !important;
    animation: downloadShimmer 2s infinite !important;
    position: relative;
    overflow: hidden;
}

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

    100% {
        background-position: 200% 0;
    }
}

.btn-primary.downloading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: downloadSweep 1.5s infinite;
}

@keyframes downloadSweep {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* Mobile Enhancements */
@media (max-width: 768px) {

    .download-success-message,
    .download-error-message {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        text-align: center;
    }

    .modal-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

/* Tooltip for Download Buttons */
.modal-btn[title]:hover::before {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 5px;
}

.modal-btn[title]:hover::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
}

/* 
تحسين الأزرار للموبايل فقط */
@media (max-width: 768px) {

    /* أزرار رفع الصور */
    input[type="file"] {
        padding: 16px !important;
        font-size: 18px !important;
        min-height: 56px !important;
        border: 3px dashed #667eea !important;
        border-radius: 12px !important;
        background: #f8f9fa !important;
        color: #495057 !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
        text-align: center !important;
        width: 100% !important;
        box-sizing: border-box !important;
        -webkit-appearance: none !important;
        appearance: none !important;
    }

    input[type="file"]:hover {
        border-color: #5a67d8 !important;
        background: rgba(102, 126, 234, 0.1) !important;
        transform: translateY(-2px) !important;
    }

    input[type="file"]:focus {
        outline: none !important;
        border-color: #667eea !important;
        box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2) !important;
    }

    /* جميع الأزرار العامة */
    .btn {
        min-height: 48px !important;
        padding: 14px 20px !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        border-radius: 10px !important;
        border: none !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        text-decoration: none !important;
        position: relative !important;
        overflow: hidden !important;
        width: 100% !important;
        box-sizing: border-box !important;
        -webkit-tap-highlight-color: transparent !important;
    }

    /* أزرار لوحة التحكم */
    .admin-actions .btn {
        min-height: 44px !important;
        padding: 12px 16px !important;
        font-size: 14px !important;
        margin: 4px 0 !important;
        width: 100% !important;
    }

    /* أزرار الجدول */
    .data-table .btn,
    .btn-sm {
        min-height: 40px !important;
        padding: 10px 14px !important;
        font-size: 13px !important;
        margin: 2px !important;
        width: auto !important;
        min-width: 80px !important;
    }

    /* أزرار النموذج */
    .form-actions .btn {
        min-height: 52px !important;
        padding: 16px 24px !important;
        font-size: 18px !important;
        margin: 8px 0 !important;
        width: 100% !important;
    }

    /* تأثير اللمس للأزرار */
    .btn:active {
        transform: scale(0.98) !important;
        transition: transform 0.1s ease !important;
    }

    /* أزرار التصدير */
    .export-excel-btn {
        min-height: 56px !important;
        padding: 18px 24px !important;
        font-size: 18px !important;
        font-weight: 700 !important;
        width: 100% !important;
        margin: 12px 0 !important;
    }

    /* أزرار الفلترة */
    .filter-actions .btn {
        min-height: 46px !important;
        padding: 12px 18px !important;
        font-size: 15px !important;
        margin: 6px 0 !important;
        width: 100% !important;
    }

    /* أزرار الصور */
    .download-btn,
    .image-actions .btn {
        min-height: 36px !important;
        padding: 8px 12px !important;
        font-size: 12px !important;
        border-radius: 6px !important;
        width: 100% !important;
        margin: 2px 0 !important;
    }

    /* أزرار الإغلاق */
    .close-modal,
    .modal .btn {
        min-height: 44px !important;
        min-width: 44px !important;
        padding: 12px !important;
        font-size: 16px !important;
    }

    /* تحسين تباعد الأزرار */
    .admin-actions {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        width: 100% !important;
    }

    .form-actions {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        width: 100% !important;
        margin-top: 24px !important;
    }

    .filter-actions {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        width: 100% !important;
    }

    /* تحسين الأزرار في الجداول */
    .data-table td .btn {
        display: block !important;
        margin: 2px 0 !important;
        width: 100% !important;
    }

    /* أزرار التبديل */
    .tab-btn {
        min-height: 44px !important;
        padding: 12px 16px !important;
        font-size: 14px !important;
        flex: 1 !important;
        min-width: 100px !important;
    }

    /* أزرار إدارة المستخدمين */
    .user-management .btn {
        min-height: 46px !important;
        padding: 12px 18px !important;
        font-size: 15px !important;
        width: 100% !important;
        margin: 4px 0 !important;
    }

    /* تحسين أزرار الحذف */
    .delete-entry-btn,
    .btn-danger {
        min-height: 42px !important;
        padding: 10px 16px !important;
        font-size: 14px !important;
        background: #dc3545 !important;
        color: white !important;
        border-radius: 8px !important;
    }

    /* تحسين أزرار التعديل */
    .btn-secondary,
    .btn-warning {
        min-height: 42px !important;
        padding: 10px 16px !important;
        font-size: 14px !important;
    }

    /* تحسين أزرار النجاح */
    .btn-success {
        min-height: 48px !important;
        padding: 14px 20px !important;
        font-size: 16px !important;
    }

    /* تأثيرات بصرية محسنة للموبايل */
    .btn:hover:not(:disabled) {
        transform: translateY(-2px) !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
    }

    .btn:focus {
        outline: 2px solid #667eea !important;
        outline-offset: 2px !important;
    }

    .btn:disabled {
        opacity: 0.6 !important;
        cursor: not-allowed !important;
        transform: none !important;
    }

    /* تحسين الأزرار في الـ Modal */
    .modal .btn {
        width: 100% !important;
        margin: 6px 0 !important;
    }

    .modal-footer .btn {
        flex: 1 !important;
        margin: 0 4px !important;
    }
}

/* تحسينات إضافية للشاشات الصغيرة جداً */
@media (max-width: 480px) {

    input[type="file"] {
        padding: 20px !important;
        font-size: 16px !important;
        min-height: 60px !important;
    }

    .btn {
        min-height: 52px !important;
        padding: 16px 20px !important;
        font-size: 16px !important;
    }

    .form-actions .btn {
        min-height: 56px !important;
        padding: 18px 24px !important;
        font-size: 18px !important;
    }

    .export-excel-btn {
        min-height: 60px !important;
        padding: 20px 24px !important;
        font-size: 20px !important;
    }
}

* تحسينات نظام الفروع */ .locked-input {
    background-color: #f8f9fa !important;
    border-color: #6c757d !important;
    cursor: not-allowed !important;
}

.locked-badge {
    background-color: #28a745;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    margin-left: 5px;
}

.branch-suggestion {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 4px 0;
}

.branch-suggestion strong {
    font-size: 15px;
    color: #333;
    font-weight: 600;
    line-height: 1.3;
}

.branch-suggestion small {
    font-size: 13px;
    color: #667eea;
    font-weight: 500;
    opacity: 0.8;
}

.new-branch-suggestion {
    padding: 10px;
    background-color: #e3f2fd;
    border: 1px dashed #2196f3;
    border-radius: 4px;
    cursor: default;
}

.new-branch-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1976d2;
}

.new-icon {
    font-size: 16px;
}

.autocomplete-suggestion {
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
}

.autocomplete-suggestion:hover {
    background-color: #f5f5f5;
}

.autocomplete-suggestion:last-child {
    border-bottom: none;
}

/* رسائل النجاح والخطأ */
.success-message,
.error-message {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.3s ease-out;
}

.success-message {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.error-message {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.message-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.success-icon,
.error-icon {
    font-size: 18px;
}

/* مؤشر التحميل */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

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

/* تحسينات الاقتراحات */
.autocomplete-suggestions {
    max-height: 250px;
    overflow-y: auto;
    border: 2px solid #e9ecef;
    border-top: none;
    border-radius: 0 0 12px 12px;
    background: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.autocomplete-suggestions::-webkit-scrollbar {
    width: 6px;
}

.autocomplete-suggestions::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.autocomplete-suggestions::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.autocomplete-suggestions::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Branch lock message */
.branch-locked-message {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 8px 12px;
    margin-top: 5px;
    z-index: 1000;
    animation: fadeInUp 0.3s ease-out;
}

.branch-locked-message .message-content {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #856404;
}

.lock-icon {
    font-size: 14px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* تحسين شكل الحقل المقفل */
.locked-input {
    background-color: #f8f9fa !important;
    border-color: #6c757d !important;
    cursor: not-allowed !important;
    opacity: 0.7;
}

.locked-input:focus {
    box-shadow: none !important;
    border-color: #6c757d !important;
}

/* تحسين الاقتراحات */
.branch-suggestion {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
}

/* Removed locked-badge styling as it's no longer used */

.autocomplete-suggestion {
    padding: 14px 16px;
    border-bottom: 1px solid #e9ecef;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    background: white;
}

.autocomplete-suggestion:hover,
.autocomplete-suggestion.highlighted {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border-left: 3px solid #667eea;
    padding-left: 13px;
    transform: translateX(2px);
}

.no-suggestions {
    padding: 12px;
    color: #6c757d;
    font-style: italic;
    text-align: center;
}

/* تنسيق ع
رض الفروع في صفحة إدارة المستخدمين */
.branches-cell {
    max-width: 200px;
}

.user-branches-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.branches-count .badge {
    background-color: #17a2b8;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.branches-preview {
    font-size: 12px;
    color: #666;
    line-height: 1.3;
    max-height: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.more-branches {
    font-size: 11px;
    color: #999;
    font-style: italic;
}

.no-branches {
    color: #999;
    font-style: italic;
    font-size: 12px;
}

/* تحسين شكل الجدول */
.management-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.management-table th,
.management-table td {
    padding: 12px 8px;
    text-align: right;
    border-bottom: 1px solid #dee2e6;
    vertical-align: top;
}

.management-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.management-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* تحسين الشارات */
.role-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.role-badge.admin {
    background-color: #dc3545;
    color: white;
}

.role-badge.employee {
    background-color: #28a745;
    color: white;
}

/* Removed duplicate file upload styling */

.upload-icon {
    font-size: 16px;
}

.upload-text {
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.upload-hint {
    font-size: 11px;
    opacity: 1;
    font-weight: 500;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* تحسين معلومات الرفع */
.upload-info {
    margin-top: 8px;
}

.upload-info small {
    color: #666;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* تحسين قسم رفع الصور */
.image-upload-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.image-upload-section h4 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
}

/* Removed conflicting responsive rules - using main responsive section instead */

/* تحسين معاينة الصور */
.image-preview {
    margin-top: 15px;
}

.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.image-preview-item {
    position: relative;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.image-preview-item img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    display: block;
}

.file-name {
    padding: 4px 6px;
    font-size: 10px;
    color: #666;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    padding: 2px 6px;
    font-size: 9px;
    color: #999;
    background: #f8f9fa;
    display: block;
}

.remove-image-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.remove-image-btn:hover {
    background: rgba(220, 53, 69, 1);
}

.preview-header {
    margin-bottom: 10px;
}

.preview-header h5 {
    color: #495057;
    font-size: 14px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* تحسين الألوان لتتماشى مع الموقع */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4);
}

/*
 Comment Section Styles */
.comment-section {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.comment-section h4 {
    margin-bottom: 15px;
    color: #495057;
    font-size: 1.1em;
}

.add-comment-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.add-comment-btn:hover {
    background: #5a6268;
}

.comment-input-container {
    margin-top: 15px;
    padding: 15px;
    background: white;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.comment-input-container label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}

.comment-textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.comment-textarea:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.comment-textarea::placeholder {
    color: #6c757d;
    font-style: italic;
}

.comment-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e9ecef;
}

.remove-comment-btn {
    padding: 6px 12px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s ease;
}

.remove-comment-btn:hover {
    background: #c82333;
}

.comment-info {
    color: #6c757d;
    font-size: 12px;
    font-style: italic;
}

.comment-icon {
    font-size: 16px;
}

/* Model Entry Header Styles */
.model-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.remove-model-btn {
    padding: 6px 12px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s ease;
}

.remove-model-btn:hover {
    background: #c82333;
}

/* Responsive adjustments for comments */
@media (max-width: 768px) {
    .comment-actions {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .comment-textarea {
        min-height: 80px;
    }

    .add-comment-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Comme
nt Display Styles in Admin Dashboard */
.comment-display {
    max-width: 300px;
}

.comment-preview {
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 6px;
    border-left: 3px solid #007bff;
    font-size: 13px;
    line-height: 1.4;
    color: #495057;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.view-comment-btn {
    margin-top: 8px;
    padding: 4px 8px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    transition: background-color 0.3s ease;
}

.view-comment-btn:hover {
    background: #0056b3;
}

/* Comment Modal Styles */
.comment-modal-content {
    max-width: 600px;
    width: 90%;
}

.comment-modal-text {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    font-size: 14px;
    line-height: 1.6;
    color: #495057;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 400px;
    overflow-y: auto;
}

/* Table column width adjustments for comments */
.data-table th:nth-child(9),
/* Comments column */
.data-table td:nth-child(9) {
    width: 200px;
    max-width: 200px;
}

.data-table th:nth-child(10),
/* Images column */
.data-table td:nth-child(10) {
    width: 150px;
    max-width: 150px;
}

/* Responsive adjustments for comment display */
@media (max-width: 1200px) {
    .comment-display {
        max-width: 200px;
    }

    .comment-preview {
        font-size: 12px;
        padding: 6px 10px;
    }

    .view-comment-btn {
        font-size: 10px;
        padding: 3px 6px;
    }
}

@media (max-width: 768px) {
    .comment-display {
        max-width: 150px;
    }

    .comment-modal-content {
        width: 95%;
        margin: 10px auto;
    }

    .comment-modal-text {
        padding: 15px;
        font-size: 13px;
        max-height: 300px;
    }
}

/* Branch Management Styles */
.branch-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.branch-card:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.branch-info {
    flex: 1;
}

.branch-name {
    font-weight: 600;
    color: #495057;
    margin-bottom: 4px;
}

.branch-code {
    font-size: 0.9em;
    color: #28a745;
    font-weight: 500;
    background: #d4edda;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
}

.branch-code.no-code {
    color: #dc3545;
    background: #f8d7da;
}

.remove-branch-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.2s ease;
}

.remove-branch-btn:hover {
    background: #c82333;
    transform: scale(1.1);
}

.no-branches-found {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.empty-icon {
    font-size: 48px;
    opacity: 0.5;
}

.branches-grid {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
}

.branches-grid::-webkit-scrollbar {
    width: 6px;
}

.branches-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.branches-grid::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.branches-grid::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 
Add Branch Button Styles */
.add-branch-btn-modern {
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    margin-top: 16px;
}

.add-branch-btn-modern:hover {
    background: #218838;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

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

.add-branch-btn-modern:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.add-branch-btn-modern .btn-icon {
    font-size: 16px;
}

.add-branch-btn-modern .btn-text {
    font-size: 14px;
}

/* Input Group Modern Styles */
.input-group-modern {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.input-field {
    flex: 1;
}

.input-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #495057;
}

.modern-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.modern-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.add-branch-section-modern {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.section-header-modern {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-header-modern h4 {
    margin: 0;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-icon {
    font-size: 18px;
}

.branches-count-badge {
    background: #007bff;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* Toas
t Notifications - Enhanced Styles */
.toast-container {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    z-index: 10001 !important;
    /* Higher than modals */
    pointer-events: none !important;
}

/* Ensure toasts don't interfere with existing flash messages */
.flash-messages+* .toast-container {
    top: 80px !important;
    /* Adjust if flash messages are present */
}

/* Enhanced toast animations for better UX */
@keyframes toastSlideIn {
    from {
        transform: translateX(100%) scale(0.8);
        opacity: 0;
    }

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

@keyframes toastSlideOut {
    from {
        transform: translateX(0) scale(1);
        opacity: 1;
    }

    to {
        transform: translateX(100%) scale(0.8);
        opacity: 0;
    }
}

.toast.show {
    animation: toastSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.toast.hide {
    animation: toastSlideOut 0.3s ease-in !important;
}

/* Export button loading states */
.admin-btn.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.admin-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Responsive toast adjustments */
@media (max-width: 768px) {
    .toast-container {
        top: 10px !important;
        right: 10px !important;
        left: 10px !important;
    }

    .toast {
        min-width: auto !important;
        max-width: none !important;
        font-size: 14px !important;
    }

    .toast-title {
        font-size: 13px !important;
    }

    .toast-message {
        font-size: 12px !important;
    }
}

/* Ensure toast text is readable in RTL */
.toast {
    text-align: right !important;
    direction: rtl !important;
}

.toast-header {
    direction: rtl !important;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .toast {
        border: 2px solid #000 !important;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5) !important;
    }

    .toast-title,
    .toast-message {
        color: #000 !important;
        font-weight: bold !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .toast {
        transition: opacity 0.2s ease !important;
    }

    .toast.show {
        animation: none !important;
        transform: translateX(0) !important;
        opacity: 1 !important;
    }

    .toast.hide {
        animation: none !important;
        opacity: 0 !important;
    }

    .toast-icon {
        animation: none !important;
    }
}