/* ==========================================================================
   منظومة الطعون الإلكترونية - مشيخة الأزهر الشريف
   تصميم كلاسيكي بسيط وخفيف ومتجاوب
   ========================================================================== */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    direction: rtl;
    text-align: right;
    font-family: 'Droid Arabic Kufi', Tahoma, 'Segoe UI', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    background-color: #f4f6f8;
    color: #333333;
}

/* --- الهيدر الرئيسي --- */
.azhar-header {
    background-color: #005944; /* اللون الأخضر الأزهري الرسمي */
    border-bottom: 3px solid #c5a059; /* خط ذهبي كلاسيكي */
    padding: 12px 0;
    color: #ffffff;
}

.azhar-header-container {
    max-width: 1170px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.azhar-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: #ffffff;
}

.azhar-brand img {
    height: 65px;
    width: auto;
}

.azhar-brand-text h1 {
    margin: 0;
    font-size: 19px;
    font-weight: bold;
    color: #ffffff;
}

.azhar-brand-text h2 {
    margin: 4px 0 0 0;
    font-size: 13px;
    color: #dfc288;
    font-weight: normal;
}

.azhar-user-bar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.azhar-user-badge {
    color: #ffffff;
    font-weight: bold;
    font-size: 13px;
    margin-left: 10px;
}

.azhar-logout-btn {
    background-color: #d9534f;
    color: #ffffff !important;
    border: 1px solid #d43f3a;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    text-decoration: none !important;
    cursor: pointer;
}
.azhar-logout-btn:hover {
    background-color: #c9302c;
}

/* --- الحاوية الرئيسية --- */
.azhar-main-content {
    max-width: 1170px;
    margin: 20px auto 35px auto;
    padding: 0 15px;
    min-height: 520px;
}

/* --- البانلات والكروت البسيطة --- */
.azhar-card, .portal-box {
    background: #ffffff;
    border: 1px solid #dcdcdc;
    border-radius: 4px;
    margin-bottom: 20px;
    padding: 18px 20px;
}

.azhar-card-title {
    font-size: 16px;
    font-weight: bold;
    color: #005944;
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e5e5;
}

/* --- تقسيم الشبكة (Grids) --- */
.azhar-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.azhar-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.azhar-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

@media (max-width: 768px) {
    .azhar-grid-2, .azhar-grid-3, .azhar-grid-4 {
        grid-template-columns: 1fr;
    }
}

.azhar-info-item {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 10px 14px;
}

.azhar-info-label {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 4px;
    font-weight: bold;
}

.azhar-info-value {
    font-size: 14px;
    font-weight: bold;
    color: #212529;
}

/* --- حقول الإدخال --- */
.form-group, .azhar-form-group {
    margin-bottom: 15px;
}

.form-group label, .azhar-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 13px;
    color: #333333;
}

.form-control, .azhar-input, select.form-control, input[type="text"], input[type="password"], input[type="number"] {
    width: 100% !important;
    max-width: 100%;
    height: 38px;
    padding: 6px 12px;
    font-size: 14px;
    color: #333333;
    background-color: #ffffff;
    border: 1px solid #cccccc;
    border-radius: 4px;
    font-family: inherit;
}

.form-control:focus, .azhar-input:focus, select.form-control:focus, input:focus {
    border-color: #005944 !important;
    outline: none !important;
    box-shadow: 0 0 4px rgba(0, 89, 68, 0.3) !important;
}

/* --- الأزرار الكلاسيكية --- */
.btn, .azhar-btn {
    display: inline-block;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    text-decoration: none !important;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 4px;
    line-height: 1.42857143;
}

.btn-primary, .azhar-btn-primary {
    background-color: #005944;
    border-color: #004d3b;
    color: #ffffff !important;
}
.btn-primary:hover, .azhar-btn-primary:hover {
    background-color: #004535;
}

.btn-success, .azhar-btn-success {
    background-color: #449d44;
    border-color: #398439;
    color: #ffffff !important;
}
.btn-success:hover, .azhar-btn-success:hover {
    background-color: #398439;
}

.btn-danger, .azhar-btn-danger {
    background-color: #d9534f;
    border-color: #d43f3a;
    color: #ffffff !important;
}
.btn-danger:hover, .azhar-btn-danger:hover {
    background-color: #c9302c;
}

.btn-default {
    background-color: #ffffff;
    border-color: #cccccc;
    color: #333333;
}
.btn-default:hover {
    background-color: #e6e6e6;
}

/* --- الجداول الكلاسيكية --- */
.table, .azhar-table-responsive table {
    width: 100%;
    max-width: 100%;
    margin-bottom: 18px;
    border-collapse: collapse;
    background-color: #ffffff;
}

.table th, .table td, .azhar-table-responsive th, .azhar-table-responsive td {
    padding: 8px 12px;
    vertical-align: middle;
    border: 1px solid #ddd;
    text-align: center;
}

.table th, .azhar-table-responsive th {
    background-color: #f2f4f4;
    color: #005944;
    font-weight: bold;
    font-size: 13px;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: #fcfcfc;
}

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

.azhar-table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 15px;
}

/* --- التنبيهات --- */
.alert {
    padding: 12px 16px;
    margin-bottom: 18px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 13px;
}
.alert-danger {
    color: #a94442;
    background-color: #f2dede;
    border-color: #ebccd1;
}
.alert-success {
    color: #3c763d;
    background-color: #dff0d8;
    border-color: #d6e9c6;
}
.alert-warning {
    color: #8a6d3b;
    background-color: #fcf8e3;
    border-color: #faebcc;
}
.alert-info {
    color: #31708f;
    background-color: #d9edf7;
    border-color: #bce8f1;
}

/* --- الشارات (Badges) --- */
.azhar-badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 3px;
    color: #fff;
}
.azhar-badge-success { background-color: #5cb85c; }
.azhar-badge-warning { background-color: #f0ad4e; }
.azhar-badge-danger  { background-color: #d9534f; }
.azhar-badge-info    { background-color: #5bc0de; }

/* --- التبويبات الكلاسيكية --- */
.azhar-tabs {
    display: flex;
    gap: 4px;
    padding: 0;
    margin: 0 0 15px 0;
    list-style: none;
    border-bottom: 2px solid #005944;
}

.azhar-tabs li a {
    display: block;
    padding: 8px 16px;
    color: #555;
    background-color: #e9ecef;
    border: 1px solid #ddd;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    font-weight: bold;
    font-size: 13px;
    text-decoration: none;
}

.azhar-tabs li.active a, .azhar-tabs li a:hover {
    background-color: #005944;
    color: #ffffff;
    border-color: #005944;
}

/* --- صندوق تسجيل الدخول البسيط --- */
.portal-login-box {
    max-width: 440px;
    margin: 35px auto;
    background: #ffffff;
    border: 1px solid #dcdcdc;
    border-radius: 4px;
    padding: 25px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.portal-login-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eeeeee;
}

/* --- تنسيق صفحة تسجيل المواد والطعون (SubjectAdd) --- */
.azhar-subjects-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.azhar-subjects-main {
    flex: 1 1 68%;
    min-width: 0;
}

.azhar-subjects-sidebar {
    flex: 0 0 32%;
    min-width: 300px;
    position: sticky;
    top: 20px;
}

@media (max-width: 991px) {
    .azhar-subjects-layout {
        flex-direction: column;
    }
    .azhar-subjects-main, .azhar-subjects-sidebar {
        flex: 1 1 100%;
        width: 100%;
        min-width: 100%;
        position: static;
    }
}

/* تنسيق قائمة المواد (Checklist) */
.checklist {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}

.azhar-column-heading {
    font-size: 15px;
    font-weight: bold;
    color: #005944;
    background: #eef5f2;
    padding: 8px 12px;
    border-radius: 4px;
    border-right: 4px solid #005944;
    margin: 15px 0 10px 0;
}

.checklist .div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    margin-bottom: 6px;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.checklist .div:hover {
    background-color: #f8fafb;
    border-color: #cbd5e1;
}

.checklist .div input[type="checkbox"].single-checkbox {
    width: 18px !important;
    height: 18px !important;
    margin: 0 0 0 10px !important;
    cursor: pointer;
    vertical-align: middle;
    flex-shrink: 0;
}

.checklist .div label {
    margin: 0;
    font-size: 14px;
    font-weight: bold;
    color: #2d3748;
    cursor: pointer;
    flex-grow: 1;
}

.checklist .div span {
    flex-shrink: 0;
    margin-right: 15px;
    min-width: 180px;
}

.checklist .div select.form-control {
    height: 34px !important;
    padding: 4px 8px;
    font-size: 13px;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
    background-color: #ffffff;
}

/* مظهر المادة الملونة غير المتاحة للطعن */
.checklist .div label.colo {
    display: block;
    width: 100%;
    padding: 7px 12px;
    border-radius: 4px;
    color: #ffffff !important;
    font-size: 13px;
    font-weight: bold;
    text-align: center;
    margin: 0;
}

@media (max-width: 768px) {
    .checklist .div {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .checklist .div span {
        width: 100%;
        margin-right: 0;
    }
    .checklist .div select.form-control {
        width: 100% !important;
    }
}

/* --- الفوتر --- */
.azhar-footer {
    background-color: #eaeaea;
    border-top: 1px solid #d5d5d5;
    color: #555555;
    text-align: center;
    padding: 15px 0;
    font-size: 13px;
}
