/* المتغيرات */
:root {
    

    --primary-color: #0A2E5C;    /* أزرق داكن */
    --primary-dark: #FFD700;    /* ذهب */
    --primary-silver: #E0E0E0;  /* فضي */
    --primary-black: #121212;   /* أسود */

    --secondary-color: #ff9900;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --sidebar-width: 280px;
    --header-height: 70px;
    --border-radius: 8px;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --transition: all 0.3s ease;
}

/* إعادة تعيين الأنماط الأساسية */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

/* صفحة تسجيل الدخول */
/* صفحة تسجيل الدخول */
.login-body {
    background: linear-gradient(135deg, var(--primary-color), #1a3e70);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.login-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 460px;
    padding: 45px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
}
.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.logo-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* النص البديل الذي يظهر عند فشل تحميل الصورة */
.logo-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    background: white;
    opacity: 0;
    pointer-events: none;
}



.logo-wrapper img:not([src*="logo.jpg"]) + .logo-fallback,
.logo-wrapper img[src=""] + .logo-fallback,
.logo-wrapper img:not([src]) + .logo-fallback {
    opacity: 1;
}

/* الطريقة الأكيدة: استخدام onerror في HTML (اختياري لكن مضمون) */
/* سنستخدمها في HTML أدناه */

/* تنبيهات الخطأ */
.alert {
    padding: 14px 20px;
    border-radius: 10px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff8f8;
    border: 1px solid #f1c0c0;
    color: #d32f2f;
    font-weight: 500;
    text-align: right;
    direction: rtl;
}

.alert i {
    font-size: 1.3rem;
    color: #d32f2f;
}

/* حقول النموذج */
.login-form .form-group {
    text-align: right;
    margin-bottom: 24px;
    position: relative;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #444;
    text-align: right;
    font-size: 15px;
}

.login-form label i {
    margin-left: 8px;
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}

.login-form input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fafafa;
}

.login-form input:focus {
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(10, 46, 92, 0.15);
    outline: none;
}

/* خيارات النموذج */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    flex-wrap: wrap;
    font-size: 14px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.remember-me label {
    margin: 0;
    font-weight: 500;
    color: #555;
    cursor: pointer;
}

/* زر تسجيل الدخول */
.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 8px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(10, 46, 92, 0.2);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 215, 0, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

/* تذييل الصفحة */
.login-footer {
    margin-top: 20px;
    color: #888;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
}

.login-footer p {
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.login-footer a {
    color: var(--primary-color); /* #0A2E5C */
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.login-footer a:hover {
    color: var(--primary-dark); /* #FFD700 (ذهبي) */
}

/* تأثير خط تحت الرابط عند التحويم */
.login-footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary-dark);
    transition: width 0.3s ease;
}

.login-footer a:hover::after {
    width: 100%;
}


/* تحسينات للهواتف */
@media (max-width: 480px) {
    .login-container {
        padding: 35px 25px;
        margin: 10px;
    }

    .login-logo h2 {
        font-size: 1.7rem;
    }

    .login-logo .logo-icon {
        width: 70px;
        height: 70px;
        font-size: 2.8rem;
    }

    .btn-primary {
        padding: 13px;
        font-size: 16px;
    }
}

/* التنبيهات */
.alert {
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert i {
    font-size: 1.2rem;
}

/* الشريط الجانبي */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: white;
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1000;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #eee;
    background: var(--primary-color);
    color: white;
}

.sidebar-header .logo-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.sidebar-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
    flex: 1;
    overflow-y: auto;
}

.sidebar-menu li {
    padding: 0 15px;
    margin-bottom: 5px;
}

.sidebar-menu li a {
    display: block;
    padding: 12px 15px;
    color: #444;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-weight: 500;
    display: flex;
    align-items: center;
}

.sidebar-menu li a i {
    margin-left: 12px;
    width: 20px;
    text-align: center;
    font-size: 18px;
}

.sidebar-menu li.active a,
.sidebar-menu li a:hover {
    background: var(--primary-color);
    color: white;
}

.sidebar-footer {
    padding: 15px;
    border-top: 1px solid #eee;
    text-align: center;
    color: #777;
    font-size: 14px;
}

/* المحتوى الرئيسي */
.main-content {
    margin-right: var(--sidebar-width);
    min-height: 100vh;
    transition: var(--transition);
}

.header {
    height: var(--header-height);
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 900;
}

.toggle-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--primary-color);
    cursor: pointer;
    display: none;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notifications {
    position: relative;
}

.notification-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #555;
    cursor: pointer;
    position: relative;
    /* align-items: start; */
}

.notification-badge {
    position: absolute;
    top: -8px;
    left: -8px;
    background: var(--danger-color);
    color: white;
    font-size: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.user-profile span {
    font-weight: 500;
    color: #333;
}

/* محتوى لوحة التحكم */
.dashboard-content {
    padding: 30px;
}

.page-title {
    margin-bottom: 30px;
}

.page-title h1 {
    font-size: 2rem;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.breadcrumb {
    display: flex;
    list-style: none;
    padding: 0;
}

.breadcrumb li {
    font-size: 14px;
}

.breadcrumb li:not(:last-child)::after {
    content: '/';
    margin: 0 8px;
    color: #999;
}

.breadcrumb li a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb li.active {
    color: #777;
}

/* بطاقات الإحصائيات */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.stat-card.primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.stat-card.warning {
    background: linear-gradient(135deg, var(--warning-color), #e0a800);
    color: white;
}

.stat-card.success {
    background: linear-gradient(135deg, var(--success-color), #218838);
    color: white;
}

.stat-card.danger {
    background: linear-gradient(135deg, var(--danger-color), #c82333);
    color: white;
}

.card-body {
    padding: 20px;
    display: flex;
    align-items: center;
}

.stat-icon {
    font-size: 2.5rem;
    margin-left: 15px;
}

.stat-content h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-content p {
    font-size: 1rem;
    opacity: 0.9;
}

/* البلاغات الأخيرة */
.recent-reports {
    margin-bottom: 30px;
}

.view-all {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: var(--transition);
}

.view-all:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.card-header h3 {
    font-size: 1.3rem;
    color: var(--dark-color);
    margin: 0;
}

.card-body {
    padding: 20px;
}

.table-responsive {
   overflow-x: auto;
    margin-left: -20px; /* إزاحة لليسار لتعويض البادينغ الداخلي */
    padding-left: 20px; /* لضمان عدم قص المحتوى */
    width: calc(100% + 20px); /* توسيع العرض ليشمل المسافة الإضافية */
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th, table td {
    padding: 12px 15px;
    text-align: right;
    border-bottom: 1px solid #eee;
}

table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.new {
    background: #e3f2fd;
    color: #1976d2;
}

.status-badge.in-progress {
    background: #fff8e1;
    color: #ffa000;
}

.status-badge.urgent {
    background: #ffebee;
    color: #d32f2f;
}

.status-badge.completed {
    background: #e8f5e9;
    color: #388e3c;
}

.problem-type {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
}

.problem-type.urgent {
    background: #ffebee;
    color: #d32f2f;
}

.problem-type.normal {
    background: #e8f5e9;
    color: #388e3c;
}

.btn-action {
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 2px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    text-decoration: none;
    color: #555;
}

.btn-action.view {
    background: #e3f2fd;
    color: #1976d2;
}

.btn-action.edit {
    background: #e8f5e9;
    color: #388e3c;
}

.btn-action.delete {
    background: #ffebee;
    color: #d32f2f;
}

.btn-action:hover {
    transform: scale(1.1);
}

.no-data {
    text-align: center;
    padding: 40px 20px;
    color: #777;
}

.no-data i {
    font-size: 3rem;
    color: #ddd;
    margin-bottom: 15px;
}

.no-data p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

/* التذييل */
.footer {
    padding: 20px 30px;
    background: white;
    border-top: 1px solid #eee;
    text-align: center;
    color: #777;
    font-size: 14px;
}

/* نموذج البلاغ */
.stepper {
    display: flex;
    justify-content: space-between;
    margin: 30px 0;
    position: relative;
}

.stepper::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background: #ddd;
    z-index: 1;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.step.active::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -100%;
    right: 0;
    height: 4px;
    background: var(--secondary-color);
    z-index: -1;
}

.step.active .step-number {
    background: var(--secondary-color);
    color: white;
}

.step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #ddd;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 8px;
}

.step-label {
    font-size: 0.9rem;
    color: #666;
}

.step.active .step-label {
    color: var(--secondary-color);
    font-weight: bold;
}

.step-content {
    display: none;
}

.step-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.file-upload-area {
    border: 2px dashed #ddd;
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    margin: 15px 0;
}

.file-upload-area.highlight {
    border-color: var(--primary-color);
    background: rgba(44, 111, 59, 0.05);
}

.file-upload-area i {
    font-size: 2.5rem;
    color: #ddd;
    margin-bottom: 15px;
}

.file-upload-area p {
    color: #777;
    font-size: 1rem;
}

.file-upload-area input[type="file"] {
    display: none;
}

.preview-images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.preview-images img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #eee;
}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.prev-step, .next-step {
    padding: 10px 20px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.prev-step {
    background: #f1f1f1;
    color: #333;
}

.prev-step:hover {
    background: #e1e1e1;
}

.next-step, .btn-primary {
    background: var(--primary-color);
    color: white;
}

.next-step:hover, .btn-primary:hover {
    background: var(--primary-dark);
}

.type-options {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.type-option {
    flex: 1;
    min-width: 150px;
    background: #f5f5f5;
    padding: 15px;
    border-radius: var(--border-radius);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.type-option:hover, .type-option.active {
    background: #e8f5e9;
    border-color: var(--primary-color);
}

.type-option input[type="radio"] {
    display: none;
}

.type-option label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.type-option i {
    font-size: 1.8rem;
    color: #777;
}

.type-option.active i, .type-option:hover i {
    color: var(--primary-color);
}

.type-option span {
    font-weight: 500;
    color: #333;
}

.location-info {
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: var(--border-radius);
    margin-top: 10px;
    font-size: 0.9rem;
    color: #555;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.half {
    flex: 1;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group select, .form-group input[type="text"], .form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group select:focus, .form-group input[type="text"]:focus, .form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 111, 59, 0.2);
    outline: none;
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.text-danger {
    color: var(--danger-color);
    font-weight: bold;
}

.form-text {
    color: #777;
    font-size: 0.85rem;
    margin-top: 5px;
    display: block;
}

/* الاستجابة على الشاشات الصغيرة */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-right: 0;
        width: 100%;
    }
    
    .toggle-btn {
        display: block;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 0 15px;
    }
    
    .dashboard-content {
        padding: 15px;
    }
    
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .nav-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .nav-buttons button {
        width: 100%;
    }
    
    .type-options {
        flex-direction: column;
    }
    
    .table-responsive {
        font-size: 13px;
    }
    
    table th, table td {
        padding: 8px 10px;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 25px 20px;
        margin: 10px;
    }
    
    .stepper {
        flex-direction: column;
        gap: 15px;
        margin: 20px 0;
    }
    
    .step::before {
        content: '';
        position: absolute;
        top: -15px;
        bottom: -15px;
        left: 50%;
        width: 4px;
        background: #ddd;
        z-index: -1;
    }
    
    .step.active::before {
        left: 50%;
        width: 4px;
        background: var(--secondary-color);
    }
    
    .modal-content {
        width: 95%;
        margin: 10px;
    }
}

/* أنماط صفحة المستخدمين */
.user-form {
    max-width: 600px;
    margin: 0 auto;
}

.user-form .form-group {
    margin-bottom: 20px;
}

.user-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.user-form input[type="text"],
.user-form input[type="password"],
.user-form select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.user-form input[type="text"]:focus,
.user-form input[type="password"]:focus,
.user-form select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 111, 59, 0.2);
    outline: none;
}

.form-text {
    color: #777;
    font-size: 0.85rem;
    margin-top: 5px;
    display: block;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: #5a6268;
}

.toggle-password {
    position: absolute;
    left: 15px;
    top: 38px;
    background: none;
    border: none;
    color: #777;
    cursor: pointer;
    font-size: 16px;
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-admin {
    background: #e3f2fd;
    color: #1976d2;
}

.badge-user {
    background: #e8f5e9;
    color: #388e3c;
}

.actions {
    display: flex;
    gap: 8px;
}

/* أنماط خاصة بصفحة البلاغات */
.map-btn {
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.map-btn:hover {
    background: #bbdefb;
    color: #0d47a1;
    text-decoration: none;
}

.problem-type {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
}

.problem-type.urgent {
    background: #ffebee;
    color: #d32f2f;
}

.problem-type.normal {
    background: #e8f5e9;
    color: #388e3c;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.new {
    background: #e3f2fd;
    color: #1976d2;
}

.status-badge.in-progress {
    background: #fff8e1;
    color: #ffa000;
}

.status-badge.completed {
    background: #e8f5e9;
    color: #388e3c;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 0.85rem;
}

.table-responsive {
    overflow-x: auto;
}

@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.9rem;
    }
    
    .table th,
    .table td {
        padding: 8px 5px;
    }
    
    .btn-action {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}

/* أنماط صفحات عرض وتعديل البلاغات */
.report-details {
    padding: 20px;
}

.detail-row {
    display: flex;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.detail-label {
    flex: 0 0 150px;
    font-weight: 600;
    color: #555;
}

.detail-value {
    flex: 1;
    color: #333;
}

.location-coordinates {
    margin-left: 10px;
    color: #1976d2;
}

.btn-map {
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    margin-left: 15px;
}

.btn-map:hover {
    background: #bbdefb;
    color: #0d47a1;
}

.report-images {
    margin-top: 10px;
}

.report-images img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.no-image {
    color: #777;
    font-style: italic;
}

.description-text {
    line-height: 1.8;
    white-space: pre-wrap;
}

.detail-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.btn-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.btn-danger:hover {
    background: #f5c6cb;
    color: #6d1a21;
}

/* نافذة الخريطة المنبثقة */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.3);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.3rem;
    font-weight: 600;
}

.close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #777;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    text-align: left;
}

@media (max-width: 768px) {
    .detail-row {
        flex-direction: column;
    }
    
    .detail-label {
        flex: 0 0 auto;
        margin-bottom: 5px;
    }
    
    .btn-map {
        margin-left: 0;
        margin-top: 10px;
        display: inline-block;
    }
    
    .detail-actions {
        flex-direction: column;
        gap: 10px;
    }
}

/* أنماط تحميل الصور */
.upload-area {
    border: 2px dashed #ddd;
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    margin: 15px 0;
    background: #fafafa;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(44, 111, 59, 0.05);
}

.upload-area i {
    font-size: 2.5rem;
    color: #ddd;
    margin-bottom: 15px;
    transition: color 0.3s;
}

.upload-area:hover i, .upload-area .active i {
    color: var(--primary-color);
}

.upload-area p {
    color: #777;
    font-size: 1rem;
}

#new_image {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

.current-image {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: var(--border-radius);
}

.current-img-preview {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    margin-top: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* نافذة الصورة المنبثقة */
.modal-image {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-image-content {
    max-width: 90%;
    max-height: 90%;
}

.modal-image-content img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 4px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.5);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--secondary-color);
}

/* تحسين عرض الصور في الهاتف */
@media (max-width: 768px) {
    .current-img-preview {
        max-height: 150px;
    }
    
    .modal-image-content {
        max-width: 95%;
        max-height: 80vh;
    }
}

/* أنماط تحميل الصور بعد الإصلاح */
#after-upload-area {
    border: 2px dashed #4CAF50;
    background: rgba(76, 175, 80, 0.05);
}

#after-upload-area:hover {
    border-color: #2E7D32;
    background: rgba(46, 125, 50, 0.1);
}

#after-upload-area i {
    color: #4CAF50;
}

#after-upload-area:hover i {
    color: #2E7D32;
}

/* أنماط مقارنة الصور قبل وبعد */
.before-after-container {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.before-after-image {
    flex: 1;
    min-width: 300px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: relative;
}

.before-after-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.before-after-image img:hover {
    transform: scale(1.05);
}

.image-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 10px;
    text-align: center;
    font-weight: bold;
    font-size: 1.1rem;
}

.before-label {
    background: rgba(220, 53, 69, 0.8); /* لون أحمر شفاف */
}

.after-label {
    background: rgba(40, 167, 69, 0.8); /* لون أخضر شفاف */
}

.no-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 250px;
    background: #f9f9f9;
    color: #777;
    border: 1px dashed #ddd;
    border-radius: 8px;
    text-align: center;
    padding: 20px;
}

.no-image i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #ddd;
}

.image-preview {
    cursor: pointer;
}

/* نافذة الصورة المنبثقة */
.modal-image {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-image-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.modal-image-content img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 4px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.5);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--secondary-color);
}

.image-caption {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

/* تعديلات للهواتف */
@media (max-width: 768px) {
    .before-after-container {
        flex-direction: column;
    }
    
    .before-after-image {
        min-width: 100%;
        margin-bottom: 15px;
    }
    
    .current-img-preview {
        max-height: 150px;
    }
    
    .modal-image-content {
        max-width: 95%;
        max-height: 80vh;
    }
}

/* أنماط صفحات الداعمين */
.supplier-logo {
    width: 80px;
    height: 50px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.no-logo {
    color: #777;
    font-style: italic;
    text-align: center;
}

.file-upload-area {
    border: 2px dashed #ddd;
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    margin: 15px 0;
    background: #fafafa;
}

.file-upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(44, 111, 59, 0.05);
}

.file-upload-area i {
    font-size: 2.5rem;
    color: #ddd;
    margin-bottom: 15px;
    transition: color 0.3s;
}

.file-upload-area:hover i, .file-upload-area .active i {
    color: var(--primary-color);
}

.file-upload-area p {
    color: #777;
    font-size: 1rem;
}

#logo, #after_image {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

.logo-preview {
    margin-top: 20px;
    text-align: center;
}

.preview-img {
    max-width: 150px;
    max-height: 100px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin: 0 auto;
}

.current-logo {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: var(--border-radius);
}

.current-logo-img {
    max-width: 150px;
    max-height: 100px;
    display: block;
    margin: 10px auto;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.current-logo h4 {
    color: #555;
    margin-bottom: 10px;
    text-align: center;
}

/* أنماط الاستجابة للشاشات الصغيرة */
@media (max-width: 768px) {
    .supplier-logo {
        width: 60px;
        height: 40px;
    }
    
    .preview-img, .current-logo-img {
        max-width: 100px;
        max-height: 70px;
    }
    
    .file-upload-area {
        padding: 20px;
    }
    
    .file-upload-area i {
        font-size: 2rem;
    }
}

/* أنماط الإشعارات */
.notifications {
    position: relative;
    margin-right: 25px;
}

.notification-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #555;
    cursor: pointer;
    position: relative;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.notification-btn:hover {
    background: rgba(44, 111, 59, 0.1);
    color: var(--primary-color);
}

.notification-badge {
    position: absolute;
    top: -8px;
    left: -8px;
    background: var(--danger-color);
    color: white;
    font-size: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(220, 53, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

/* نافذة الإشعارات المنسدلة */
.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 350px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    z-index: 1000;
    display: none;
    margin-top: 10px;
}

.notification-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-header h3 {
    margin: 0;
    color: var(--primary-color);
}

.mark-all-read {
    color: var(--primary-color);
    cursor: pointer;
    font-size: 14px;
    transition: color 0.3s;
}

.mark-all-read:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.notification-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
}

.notification-item {
    padding: 12px 15px;
    border-bottom: 1px solid #f1f1f1;
    display: flex;
    gap: 12px;
    transition: all 0.3s ease;
}

.notification-item:hover {
    background: #f9f9f9;
}

.notification-item.new {
    background: rgba(32, 102, 148, 0.05);
    border-left: 3px solid var(--primary-color);
}

.notification-item .fas {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-top: 3px;
}

.notification-content {
    flex: 1;
}

.notification-content p {
    margin: 0 0 5px 0;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.notification-time {
    font-size: 12px;
    color: #777;
}

.notification-item.empty {
    text-align: center;
    padding: 30px;
    color: #777;
}

.notification-item.empty .fas {
    font-size: 2.5rem;
    color: #ddd;
    display: block;
    margin: 0 auto 15px;
}

.notification-footer {
    border-top: 1px solid #eee;
    padding: 12px 15px;
    text-align: center;
}

.notification-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    display: block;
    padding: 8px;
    transition: all 0.3s;
}

.notification-footer a:hover {
    background: rgba(44, 111, 59, 0.05);
    border-radius: 4px;
}

/* إضافة مؤثرات للإشعارات الجديدة */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification-item.new {
    animation: fadeInUp 0.5s ease forwards;
}

/* تنسيقات الاستجابة */
@media (max-width: 768px) {
    .notifications {
        margin-right: 15px;
    }
    
    .notification-dropdown {
        width: 300px;
    }
}

@media (max-width: 480px) {
    .notification-dropdown {
        width: calc(100% - 30px);
        right: 15px;
    }
    
    .notification-btn {
        font-size: 18px;
        padding: 6px;
    }
}

/* أنماط جديدة للروابط الواضحة */
.user-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-right: 15px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.username {
    font-weight: 600;
    color: #333;
    font-size: 1.05rem;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    color: #555;
    border: 1px solid #ddd;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.password-btn {
    background: #e8f5e9;
    color: #28a745;
    border-color: #c3e6cb;
}

.password-btn:hover {
    background: #d4edda;
    color: #155724;
    border-color: #b1dfbb;
}

.logout-btn {
    background: #f8d7da;
    color: #dc3545;
    border-color: #f5c6cb;
    
}

.logout-btn:hover {
    background: #f5c6cb;
    color: #b22222;
    border-color: #f1b0b7;
}

.action-btn i {
    font-size: 1.1rem;
}

.action-text {
    display: none;
}

/* إظهار النصوص على الشاشات الكبيرة */
@media (min-width: 992px) {
    .action-text {
        display: inline;
    }
    
    .action-btn {
        padding: 8px 15px;
    }
}

/* تصميم متجاوب للهواتف */
@media (max-width: 768px) {
    .user-actions {
        gap: 10px;
    }
    
    .avatar {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .username {
        display: none;
    }
    
    .action-buttons {
        gap: 5px;
    }
    
    .action-btn {
        padding: 5px 10px;
    }
    
    .action-btn i {
        font-size: 1rem;
    }
}

/* إضافة مؤشر عند التمرير بالفأرة */
.action-btn:hover {
    cursor: pointer;
}

/* تنسيق الجدول الأساسي */
#reportsTable {
    width: 100% !important;
    border-collapse: collapse;
    margin: 0;
    direction: rtl;
}

/* رؤوس الأعمدة */
#reportsTable thead th {
    background-color: var(--primary-color); /* #0A2E5C */
    color: white;
    font-weight: 600;
    padding: 14px 16px;
    text-align: center;
    border: none;
    white-space: nowrap;
}

/* خلايا البيانات */
#reportsTable tbody td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

/* ألوان الصفوف البديلة (من DataTables) */
#reportsTable tbody tr:nth-child(even) {
    background-color: #f9fbfd;
}

#reportsTable tbody tr:hover {
    background-color: #f0f7ff;
    transition: background-color 0.2s ease;
}

/* أنماط الحالات (مثل "جديد"، "قيد التنفيذ") */
.status-badge,
.problem-type {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

/* زر الإجراءات */
#reportsTable .btn-action {
    width: 36px;
    height: 36px;
    font-size: 14px;
    margin: 0 4px;
}

/* التأكد من تمدد الجدول إلى الحافة اليسرى */
.table-responsive {
    overflow-x: auto;
    margin-left: -20px;
    margin-right: -20px;
    padding: 0 20px;
    width: calc(100% + 40px);
}

/* تصحيح عرض الجدول في وضع الاستجابة */
.dataTables_wrapper .dt-buttons,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    padding: 8px 20px;
    margin: 0;
}

/* شريط البحث */
.dataTables_filter input {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 6px 12px;
    margin-right: 8px; /* لأننا في RTL */
    direction: ltr;
    text-align: right;
}

/* القوائم المنسدلة (مثل "عرض 10 مدخلات") */
.dataTables_length select {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 4px 8px;
    margin-left: 8px; /* RTL */
}

/* أزرار التنقل */
.dataTables_paginate .paginate_button {
    padding: 6px 12px;
    margin: 0 2px;
    width: 70px;
    border-radius: 6px;
    background: #f1f1f1;
    color: #333 !important;
    border: 1px solid #ddd;

}
.paginate_button a {
    color:#908a67;
        text-decoration: none;
        list-style-type: none;

}

.dataTables_paginate .paginate_button.current,
.dataTables_paginate .paginate_button:hover {
    background: var(--primary-color);
    color: white !important;
    border-color: var(--primary-color);
}

/* تصحيح عرض الجدول عند وجود nowrap */
#reportsTable th,
#reportsTable td {
    white-space: nowrap;
}



