:root {
    --ink: #17302b;
    --green: #0e6b55;
    --green-soft: #e3f1ec;
    --gold: #c99a2e;
    --line: #d9e3df;
    --bg: #f4f7f6;
    --danger-soft: #fbe9e7;
}

body {
    font-family: 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
    background: var(--bg);
    color: var(--ink);
}

.topbar {
    background: var(--green);
    padding: .7rem 0;
}

    .topbar .brand {
        color: #fff;
        font-weight: 800;
        font-size: 1.2rem;
        text-decoration: none;
    }

.page-head {
    border-bottom: 3px solid var(--green);
    padding-bottom: .75rem;
    margin-bottom: 1.5rem;
}

    .page-head h1 {
        font-size: 1.6rem;
        font-weight: 800;
        margin: 0;
    }

    .page-head .meta {
        color: #5b716c;
    }

.panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 1.1rem 1.25rem;
    margin-bottom: 1.25rem;
}

    .panel h2 {
        font-size: 1.1rem;
        font-weight: 700;
        margin-bottom: .9rem;
        color: var(--green);
    }

.kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: .75rem;
    margin-bottom: 1.25rem;
}

.kpi {
    background: #fff;
    border: 1px solid var(--line);
    border-right: 4px solid var(--green);
    border-radius: 8px;
    padding: .8rem 1rem;
}

    .kpi .v {
        font-size: 1.7rem;
        font-weight: 800;
        line-height: 1.1;
    }

    .kpi .l {
        color: #5b716c;
        font-size: .9rem;
    }

    .kpi.gold {
        border-right-color: var(--gold);
    }

.table-res {
    font-size: .92rem;
}

    .table-res thead th {
        background: var(--green-soft);
        color: var(--ink);
        font-weight: 700;
        vertical-align: middle;
        white-space: nowrap;
    }

    .table-res td, .table-res th {
        text-align: center;
        vertical-align: middle;
    }

        .table-res td.name, .table-res th.name {
            text-align: right;
            white-space: nowrap;
        }

.low {
    background: var(--danger-soft) !important;
    color: #a3271a;
    font-weight: 700;
}

.bar {
    height: 10px;
    background: var(--green-soft);
    border-radius: 5px;
    overflow: hidden;
    min-width: 80px;
}

    .bar > span {
        display: block;
        height: 100%;
        background: var(--green);
    }

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: end;
}

.print-head {
    display: none;
}

@media print {
    @page {
        size: A4;
        margin: 12mm;
    }

    body {
        background: #fff;
        font-size: 11pt;
    }

    .no-print {
        display: none !important;
    }

    .print-head {
        display: block;
        text-align: center;
        margin-bottom: 8mm;
    }

    .panel, .kpi {
        border-color: #999;
        break-inside: avoid;
    }

        .panel.break {
            break-before: page;
        }

    .table-res thead th {
        background: #e6e6e6 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .low, .bar > span {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    main.container {
        max-width: 100%;
        padding: 0;
    }
}

/* ===== تقرير الضعف والتفوق ===== */
.report-sheet {
    background: #fff;
    border: 1px solid var(--line);
    padding: 1.5rem;
}

.report-top {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: start;
    border-bottom: 2px solid #333;
    padding-bottom: .5rem;
    margin-bottom: 1rem;
    font-size: .95rem;
}

.report-title {
    text-align: center;
    font-weight: 700;
    line-height: 2;
    margin-bottom: .75rem;
}

.report-table {
    font-size: .85rem;
    table-layout: fixed;
    width: 100%;
}

    .report-table th, .report-table td {
        text-align: center;
        vertical-align: middle;
        padding: .3rem .15rem;
    }

    .report-table th {
        background: #b9c7e6 !important;
        font-size: .8rem;
    }

        .report-table th:nth-child(1) {
            width: 3%;
        }

        .report-table th:nth-child(2) {
            width: 12%;
        }

    .report-table td.text-nowrap {
        white-space: nowrap;
        font-size: .78rem;
    }

.report-chart {
    width: 100%;
    height: auto;
    border: 1px solid #999;
    margin-top: .5rem;
    break-inside: avoid;
}

@media print {
    .report-sheet {
        border: none;
        padding: 0;
    }

    .report-table th {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .report-chart rect {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* ===== الصفحة التعريفية ===== */
.landing-hero {
    padding: 2rem 0 3rem;
}

.landing-title {
    font-size: clamp(1.7rem, 3.4vw, 2.6rem);
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 1rem;
}

.landing-lead {
    font-size: 1.1rem;
    color: #3f5651;
    max-width: 34em;
    line-height: 1.9;
    margin-bottom: 1.5rem;
}

.landing-h2 {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 1rem;
    border-right: 5px solid var(--gold);
    padding-right: .6rem;
}

.preview-sheet {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 1rem 1.2rem;
    box-shadow: 0 10px 30px rgba(14, 107, 85, .12);
    transform: rotate(-1.5deg);
}

.preview-head {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    border-bottom: 2px solid var(--ink);
    padding-bottom: .4rem;
    margin-bottom: .8rem;
}

.preview-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 110px;
    border-bottom: 1px solid #999;
    direction: ltr;
}

.pgroup {
    display: flex;
    align-items: flex-end;
    gap: 3px;
}

.pbar {
    display: block;
    width: 10px;
    min-height: 2px;
}

    .pbar.b0 {
        background: #d64545;
    }

    .pbar.b1 {
        background: #f08a3c;
    }

    .pbar.b2 {
        background: #8e5bd0;
    }

    .pbar.b3 {
        background: #3d9be0;
    }

    .pbar.b4 {
        background: #3fb950;
    }

.preview-labels {
    display: flex;
    justify-content: space-around;
    font-size: .8rem;
    margin-top: .3rem;
    direction: ltr;
}

.feature {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 1.1rem;
    height: 100%;
}

    .feature i {
        font-size: 1.6rem;
        color: var(--green);
    }

    .feature h3 {
        font-size: 1.05rem;
        font-weight: 700;
        margin: .5rem 0 .4rem;
    }

    .feature p {
        margin: 0;
        color: #4c625d;
        font-size: .95rem;
        line-height: 1.8;
    }

.step {
    display: flex;
    gap: .8rem;
    align-items: flex-start;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 1rem;
    height: 100%;
}

    .step b {
        flex: 0 0 2.2rem;
        height: 2.2rem;
        border-radius: 50%;
        background: var(--green);
        color: #fff;
        display: grid;
        place-items: center;
        font-size: 1.1rem;
    }

.landing-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
    background: var(--green);
    color: #fff;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}


