.schools-page {
    color: #173246;
}

.schools-page.modal-open {
    overflow: hidden;
}

.schools-page .page-hero .golden-hero-title {
    display: block;
    margin: 0 !important;
    padding: 0 0 20px !important;
    line-height: 1.4 !important;
    filter: none !important;
}

.schools-page .page-hero .hero-subtitle {
    display: block;
    margin: 0;
    padding-top: 4px;
    white-space: nowrap;
    font-size: clamp(0.78rem, 1.05vw, 0.95rem);
    line-height: 1.7;
    opacity: 0.95;
    color: rgba(255, 255, 255, 0.92);
    letter-spacing: 0;
}

@media (max-width: 900px) {
    .schools-page .page-hero .hero-subtitle {
        white-space: normal;
        font-size: 0.9rem;
    }
}



.schools-page .card:has(.schools-toolbar) {
    overflow: visible;
}

.schools-page .schools-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(220px, 0.7fr);
    gap: 14px;
    align-items: start;
    margin-bottom: 18px;
    overflow: visible;
    position: relative;
    z-index: 30;
}

.schools-page .toolbar-field {
    display: grid;
    gap: 6px;
}

.schools-page .toolbar-field label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #385365;
}

.schools-page .search-box,
.schools-page .year-select,
.schools-page .year-select-trigger {
    width: 100%;
    min-height: 46px;
    background: #fcfeff;
}

.schools-page .school-search-field,
.schools-page .year-search-field,
.schools-page .school-search-wrap {
    position: relative;
    overflow: visible;
}

.schools-page .school-search-field {
    z-index: 36;
}

.schools-page .year-search-field {
    z-index: 37;
}

.schools-page .year-select-native {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
    inset-inline-start: 0;
    top: 0;
}

.schools-page .year-select-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #c9d8e2;
    border-radius: 10px;
    color: #173246;
    font: inherit;
    font-size: 0.93rem;
    font-weight: 600;
    text-align: start;
    cursor: pointer;
}

.schools-page .year-select-trigger:focus {
    outline: none;
    border-color: rgba(56, 86, 103, 0.5);
    box-shadow: 0 0 0 3px rgba(56, 86, 103, 0.14);
}

.schools-page .year-select-caret {
    color: #5f7a88;
    font-size: 0.85rem;
    line-height: 1;
}

.schools-page .school-search-suggestions {
    position: absolute;
    inset-inline: 0;
    top: calc(100% + 4px);
    z-index: 1200;
    margin: 0;
    padding: 6px;
    list-style: none;
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid #c9d8e2;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(15, 34, 49, 0.12);
}

.schools-page .school-search-suggestions[hidden] {
    display: none !important;
}

.schools-page .school-search-suggestions li {
    margin: 0;
}

.schools-page .school-search-suggestions button {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 10px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #173246;
    font: inherit;
    text-align: start;
    cursor: pointer;
}

.schools-page .school-search-suggestions button:hover,
.schools-page .school-search-suggestions button.is-active {
    background: #eef7f3;
}

.schools-page .school-search-suggestions .suggestion-title {
    font-weight: 700;
    font-size: 0.92rem;
}

.schools-page .school-search-suggestions .suggestion-meta {
    color: #5f7a88;
    font-size: 0.8rem;
    font-weight: 600;
}

.schools-page .school-search-suggestions .school-search-empty {
    padding: 12px;
    color: #6a8290;
    font-size: 0.88rem;
    font-weight: 600;
}

.schools-page .schools-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.schools-page .summary-chip {
    border: 1px solid #d7e5ee;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
    padding: 14px 16px;
    display: grid;
    gap: 6px;
    box-shadow: 0 8px 22px rgba(15, 34, 49, 0.06);
}

.schools-page .summary-chip strong {
    font-family: var(--font-family, 'Tajawal', 'Cairo', sans-serif);
    font-size: 0.98rem;
    font-weight: 800;
    color: #1f6b52;
    line-height: 1.5;
}

.schools-page .summary-chip-label {
    color: #4c6878;
    font-size: 0.82rem;
    font-weight: 700;
}

.schools-page .summary-chip-wide strong {
    font-size: 0.95rem;
    font-weight: 800;
    color: #0f5c47;
    letter-spacing: 0;
    white-space: normal;
    word-break: keep-all;
}

.schools-page .schools-summary-text {
    margin: 0 0 18px;
    color: #557182;
    font-size: 0.95rem;
}

.schools-list {
    display: grid;
    gap: 14px;
}

.school-item {
    border: 1px solid #d8e5ed;
    border-radius: 18px;
    background: linear-gradient(180deg, #fbfdff 0%, #f6fafc 100%);
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(15, 34, 49, 0.06);
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.school-item:hover {
    border-color: #c6d8e4;
    box-shadow: 0 16px 34px rgba(15, 34, 49, 0.1);
}

.school-header {
    width: 100%;
    border: 0;
    background: linear-gradient(180deg, #f4f9fb 0%, #edf5f9 100%);
    padding: 16px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    text-align: right;
    font-family: inherit;
    transition: background-color 220ms ease;
}

.school-header:hover {
    background: linear-gradient(180deg, #ecf5f9 0%, #e4eef4 100%);
}

.school-header-copy {
    display: grid;
    gap: 5px;
}

.school-title {
    font-family: var(--font-family, 'Tajawal', 'Cairo', sans-serif);
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f5c47;
    line-height: 1.5;
    letter-spacing: 0;
}

.school-meta {
    font-size: 0.9rem;
    color: #4c6878;
}

.school-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: rgba(56, 86, 103, 0.09);
    color: #385667;
    font-size: 1rem;
    transition: transform 220ms ease, background-color 220ms ease;
    flex: 0 0 auto;
}

.school-item.expanded .school-arrow {
    transform: rotate(180deg);
    background: rgba(56, 86, 103, 0.16);
}

.school-body {
    padding: 18px;
    display: none;
    border-top: 1px solid #d8e5ed;
    background: rgba(255, 255, 255, 0.88);
}

.school-item.expanded .school-body {
    display: block;
}

.year-group {
    margin-bottom: 18px;
}

.year-group:last-child {
    margin-bottom: 0;
}

.year-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #385667;
    margin-bottom: 10px;
    border-bottom: 1px solid #e0e9ee;
    padding-bottom: 6px;
}

.year-count {
    font-size: 0.8rem;
    color: #607786;
    background: #eef7f7;
    padding: 4px 10px;
    border-radius: 999px;
}

.reports-flex {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 12px;
}

.report-chip {
    border: 1px solid #cfe0e8;
    border-radius: 16px;
    padding: 14px;
    cursor: pointer;
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease, background-color 220ms ease;
    display: grid;
    gap: 10px;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(15, 34, 49, 0.05);
    text-align: right;
    font-family: inherit;
}

.report-chip:hover {
    transform: translateY(-2px);
    border-color: #8fb8c9;
    background: #f8fcfe;
    box-shadow: 0 14px 28px rgba(15, 34, 49, 0.08);
}

.report-chip-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.type-badge {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 800;
}

.report-chip.type-diagnostic .type-badge {
    background: rgba(234, 88, 12, 0.12);
    color: #c2410c;
}

.report-chip.type-final .type-badge {
    background: rgba(22, 163, 74, 0.12);
    color: #15803d;
}

.chip-date {
    color: #566f80;
    font-size: 0.84rem;
    font-weight: 700;
}

.report-chip-meta {
    color: #4f6677;
    font-size: 0.88rem;
    line-height: 1.7;
}

.report-view-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.report-view-modal .modal-overlay {
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(5px);
}

.report-modal-content {
    position: relative;
    max-width: min(1160px, 96vw);
    width: 100%;
    max-height: 92vh;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid rgba(215, 229, 238, 0.8);
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
    z-index: 10000;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
}

.report-view-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    padding: 18px 20px;
    border-bottom: 1px solid #dde8ef;
    background: linear-gradient(180deg, #f8fbfd 0%, #f1f7fa 100%);
}

.report-modal-headings {
    display: grid;
    gap: 6px;
}

.report-modal-kicker {
    margin: 0;
    color: #385667;
    font-size: 0.82rem;
    font-weight: 800;
}

.report-view-modal .modal-header h2 {
    margin: 0;
    font-size: 1.35rem;
    color: #173246;
}

.report-modal-meta {
    margin: 0;
    color: #607786;
    font-size: 0.9rem;
}

.report-view-modal .modal-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.report-view-modal .close-btn {
    width: 42px;
    height: 42px;
    border: 1px solid #d4e3eb;
    border-radius: 12px;
    background: #ffffff;
    color: #173246;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.report-view-modal .close-btn:hover {
    transform: translateY(-1px);
    border-color: #9abccd;
    box-shadow: 0 10px 18px rgba(15, 34, 49, 0.08);
}

.report-view-modal .modal-body {
    padding: 24px;
    background: #ffffff;
    overflow-y: auto;
}

.empty-msg,
.loading-msg {
    text-align: center;
    color: #5a7384;
    padding: 24px;
    border: 1px dashed #d8e5ed;
    border-radius: 16px;
    background: #fbfdff;
}

.schools-page .previous-report-hero-action {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.schools-page .previous-report-hero-action .btn,
.schools-page .previous-report-hero-action .btn.secondary {
    background: linear-gradient(135deg, #c08a3d 0%, #a07530 100%);
    color: #fff;
    border: none;
    box-shadow: 0 6px 14px rgba(160, 117, 48, 0.18);
}

.schools-page .previous-report-hero-action .btn:hover,
.schools-page .previous-report-hero-action .btn.secondary:hover {
    background: linear-gradient(135deg, #c9954a 0%, #8f682a 100%);
    filter: brightness(1.03);
}

.schools-page .previous-report-card[hidden] {
    display: none !important;
}

.schools-page .previous-report-card {
    margin-bottom: 22px;
    border-color: #b8d5cc;
    background: linear-gradient(180deg, #ffffff 0%, #f7fcfa 100%);
}

.schools-page .previous-report-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
}

.schools-page .previous-report-card h2,
.schools-page .previous-report-card .section-note {
    margin-top: 0;
}

.schools-page .previous-report-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.schools-page .previous-report-form .field {
    display: grid;
    gap: 8px;
}

.schools-page .previous-report-form label {
    color: #173f35;
    font-weight: 800;
}

.schools-page .previous-report-form input,
.schools-page .previous-report-form select {
    width: 100%;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid #c9ddd6;
    border-radius: 12px;
    background: #ffffff;
    color: #173246;
    font: inherit;
}

.schools-page .previous-report-file-field,
.schools-page .previous-report-form-actions,
.schools-page .previous-report-status {
    grid-column: 1 / -1;
}

.schools-page .previous-report-file-field small {
    color: #607786;
}

.schools-page .previous-report-form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.schools-page .previous-report-status {
    min-height: 26px;
    margin: 0;
    font-weight: 700;
}

.schools-page .previous-report-status.success {
    color: #15803d;
}

.schools-page .previous-report-status.error {
    color: #b42318;
}

.schools-page .previous-report-status.loading {
    color: #385667;
}

.previous-report-document {
    display: grid;
    justify-items: start;
    gap: 10px;
    margin-bottom: 18px;
    padding: 18px;
    border: 1px solid #cfe0e8;
    border-radius: 16px;
    background: #f8fcfe;
}

.previous-report-document h3,
.previous-report-document p {
    margin: 0;
}

.previous-report-pdf-frame {
    width: 100%;
    min-height: 68vh;
    border: 1px solid #cfe0e8;
    border-radius: 14px;
    background: #ffffff;
}

@media (max-width: 980px) {
    .schools-page .schools-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .schools-page .schools-toolbar {
        grid-template-columns: 1fr;
    }

    .schools-page .schools-summary {
        grid-template-columns: 1fr;
    }

    .schools-page .previous-report-form {
        grid-template-columns: 1fr;
    }

    .schools-page .previous-report-card-head {
        align-items: stretch;
        flex-direction: column;
    }

    .school-header,
    .report-view-modal .modal-header {
        padding: 14px 16px;
    }

    .reports-flex {
        grid-template-columns: 1fr;
    }

    .report-view-modal.active {
        padding: 12px;
    }

    .report-view-modal .modal-body {
        padding: 16px;
    }
}
