@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800&display=swap');

:root {
    --green: #146b4a;
    --green-dark: #0f5138;
    --green-light: #eaf6f0;
    --gold: #c7a65a;
    --dark: #24342d;
    --muted: #6b7c73;
    --border: #dce7e1;
    --bg: #f6f8f7;
    --white: #ffffff;
    --red: #b42318;
    --red-bg: #fff1f0;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Tajawal', Arial, sans-serif;
    direction: rtl;
    background:
        radial-gradient(circle at top right, rgba(20, 107, 74, 0.10), transparent 36%),
        linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
    color: var(--dark);
    min-height: 100vh;
}

.header {
    background: linear-gradient(135deg, #0f5138, #177452);
    color: #fff;
    padding: 34px 20px;
    text-align: center;
    border-bottom: 5px solid var(--gold);
}

.header h1 {
    margin: 0;
    font-size: 30px;
    line-height: 1.7;
    font-weight: 800;
}

.header p {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 17px;
}

.container {
    width: min(1180px, calc(100% - 28px));
    margin: 28px auto;
}

.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 24px;
    box-shadow: 0 14px 35px rgba(20, 107, 74, 0.08);
}

.search-card {
    max-width: 720px;
    margin: 42px auto;
    text-align: center;
}

.search-card h2 {
    margin: 0 0 12px;
    color: var(--green);
    font-size: 25px;
}

.search-card p {
    color: var(--muted);
    line-height: 1.8;
    margin: 0;
}

.form-row {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

input[type="text"],
input[type="password"],
input[type="file"] {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 15px 16px;
    font-size: 18px;
    font-family: inherit;
    outline: none;
    background: #fbfdfc;
}

input[type="text"]:focus,
input[type="password"]:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 4px rgba(20, 107, 74, 0.10);
}

button,
.btn {
    border: 0;
    background: var(--green);
    color: white;
    padding: 14px 22px;
    font-family: inherit;
    font-size: 17px;
    font-weight: 800;
    border-radius: 14px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

button:hover,
.btn:hover {
    background: var(--green-dark);
}

.btn-light {
    background: #eef6f2;
    color: var(--green);
    border: 1px solid #d5e9df;
}

.btn-light:hover {
    background: #dff0e8;
}

.alert {
    border-radius: 16px;
    padding: 15px 18px;
    margin: 16px 0;
    font-weight: 700;
    line-height: 1.8;
}

.alert-error {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid #ffd2cc;
}

.alert-info {
    background: var(--green-light);
    color: var(--green);
    border: 1px solid #cfebde;
}

.school-title {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 16px;
    margin-bottom: 18px;
}

.school-title h2 {
    margin: 0;
    color: var(--green);
    font-size: 27px;
}

.school-title p {
    margin: 8px 0 0;
    color: var(--muted);
}

.badge {
    display: inline-block;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--green-light);
    color: var(--green);
    font-weight: 800;
    border: 1px solid #d2eadf;
}

.grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 13px;
}

.item {
    border: 1px solid var(--border);
    background: #fbfdfc;
    border-radius: 16px;
    padding: 14px;
    min-height: 78px;
}

.item span {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 7px;
}

.item strong {
    font-size: 17px;
    color: var(--dark);
}

.notes {
    margin-top: 22px;
    border: 1px solid #d9e9e1;
    background: linear-gradient(135deg, #f3fbf7, #ffffff);
    border-radius: 20px;
    padding: 20px;
}

.notes h3 {
    margin: 0 0 12px;
    color: var(--green);
    font-size: 22px;
}

.notes ol {
    margin: 0;
    padding-right: 22px;
    line-height: 2;
    color: var(--dark);
    font-size: 17px;
}

.confirm-box {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.confirm-box label {
    font-weight: 800;
}

input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--green);
}

.table-card {
    margin-top: 24px;
}

.table-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.table-title h3 {
    margin: 0;
    color: var(--green);
    font-size: 23px;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 16px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 980px;
    background: white;
}

th {
    background: #f0f7f3;
    color: var(--green);
    font-weight: 800;
    border-bottom: 1px solid var(--border);
    padding: 13px 12px;
    text-align: right;
}

td {
    border-bottom: 1px solid #edf2ef;
    padding: 12px;
    color: #2f3f38;
    vertical-align: top;
}

tr:last-child td {
    border-bottom: 0;
}

.empty {
    text-align: center;
    padding: 28px;
    color: var(--muted);
}

.import-help {
    text-align: right;
    line-height: 2;
    color: var(--muted);
}

.import-help code {
    background: #f0f7f3;
    color: var(--green);
    padding: 3px 7px;
    border-radius: 8px;
    direction: ltr;
    display: inline-block;
}

.required-columns {
    background: #fbfdfc;
    border: 1px dashed var(--border);
    border-radius: 16px;
    padding: 14px;
    text-align: right;
    line-height: 2.1;
}

.footer {
    text-align: center;
    color: var(--muted);
    padding: 24px 10px;
    font-size: 14px;
}

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

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

    .school-title {
        flex-direction: column;
    }
}

@media (max-width: 540px) {
    .header h1 {
        font-size: 22px;
    }

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

    .card {
        padding: 18px;
    }
}
