* {
    box-sizing: border-box;
}

html {
    direction: rtl;
}

body {
    margin: 0;
    background: #f3f6f8;
    color: #173149;
    font-family: Cairo, Tahoma, Arial, sans-serif;
}


/* =========================
   الصفحة
   ========================= */

.jd-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 22px auto 60px;
}


/* =========================
   رأس الصفحة
   ========================= */

.jd-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;

    padding: 28px 32px;

    background:
        linear-gradient(
            135deg,
            #073654 0%,
            #052b45 55%,
            #031b2b 100%
        );

    color: #fff;

    border-radius: 18px;
    border-bottom: 3px solid #cfa846;

    box-shadow: 0 12px 30px rgba(10, 42, 63, 0.08);
}

.jd-head > div {
    min-width: 0;
}

.jd-head span {
    display: block;
    margin-bottom: 6px;

    color: #e0b84f;

    font-size: 13px;
    font-weight: 800;
}

.jd-head h1 {
    margin: 0;

    color: #fff;

    font-size: 31px;
    font-weight: 800;
    line-height: 1.35;
}

.jd-head p {
    margin: 8px 0 0;

    color: rgba(255,255,255,.78);

    font-size: 13px;
    line-height: 1.9;
}

.jd-head a {
    flex: 0 0 auto;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 108px;
    min-height: 44px;

    padding: 9px 16px;

    border: 1px solid rgba(255,255,255,.18);
    border-radius: 10px;

    color: #fff;
    text-decoration: none;

    font-size: 13px;
    font-weight: 700;

    transition: .18s ease;
}

.jd-head a:hover {
    background: rgba(255,255,255,.08);
}


/* =========================
   البحث والفلترة
   ========================= */

.jd-filter {
    display: grid;

    grid-template-columns:
        240px
        minmax(0, 1fr)
        72px;

    gap: 10px;

    margin: 16px 0 0;
    padding: 13px;

    background: #fff;

    border: 1px solid #dce5eb;
    border-radius: 14px;

    box-shadow: 0 5px 18px rgba(17, 49, 73, .035);
}

.jd-filter select,
.jd-filter input,
.jd-filter button {
    min-height: 46px;

    border-radius: 9px;

    font: inherit;
}

.jd-filter select,
.jd-filter input {
    width: 100%;

    padding: 0 13px;

    background: #fff;
    color: #173149;

    border: 1px solid #cedae2;

    outline: none;
}

.jd-filter select:focus,
.jd-filter input:focus {
    border-color: #b99a56;
    box-shadow: 0 0 0 3px rgba(185,154,86,.10);
}

.jd-filter input::placeholder {
    color: #8c99a2;
}

.jd-filter button {
    border: 0;

    background: #0a4d72;
    color: #fff;

    font-weight: 800;

    cursor: pointer;

    transition: .18s ease;
}

.jd-filter button:hover {
    background: #083e5e;
}


/* =========================
   عدد النتائج
   ========================= */

.jd-summary {
    display: flex;
    align-items: baseline;

    gap: 8px;

    margin: 25px 3px 18px;
}

.jd-summary strong {
    color: #ad7e19;

    font-size: 30px;
    font-weight: 800;

    line-height: 1;
}

.jd-summary span {
    color: #536a7a;

    font-size: 13px;
    font-weight: 700;
}


/* =========================
   شبكة المديريات
   ========================= */

.jd-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 14px;
}


/* =========================
   البطاقة
   ========================= */

.jd-card {
    position: relative;

    display: flex;
    flex-direction: column;

    min-height: 185px;

    padding: 18px;

    background: #fff;

    border: 1px solid #dde6eb;
    border-top: 3px solid #aab6bf;
    border-radius: 13px;

    color: #173149;
    text-decoration: none;

    box-shadow: 0 6px 18px rgba(17, 49, 73, .035);

    transition:
        transform .18s ease,
        box-shadow .18s ease,
        border-color .18s ease;
}

.jd-card:hover {
    transform: translateY(-3px);

    border-color: #c8d4dc;

    box-shadow: 0 12px 26px rgba(17, 49, 73, .08);
}


/* =========================
   أعلى البطاقة
   ========================= */

.jd-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;
}

.jd-card-top small {
    color: #708290;

    font-size: 11px;
    font-weight: 600;
}

.jd-card-top i {
    width: 8px;
    height: 8px;

    flex: 0 0 auto;

    border-radius: 50%;

    background: #aab6bf;
}


/* =========================
   اسم المديرية
   ========================= */

.jd-card h2 {
    margin: 18px 0 3px;

    color: #102f47;

    font-size: 19px;
    font-weight: 800;

    line-height: 1.4;
}

.jd-card > p {
    margin: 0;

    color: #8997a1;

    font-size: 11px;
}


/* =========================
   حالة البيانات
   ========================= */

.jd-score {
    display: flex;
    align-items: flex-end;

    gap: 8px;

    margin-top: auto;
    padding-top: 20px;
}

.jd-score b {
    color: #163750;

    font-family: Arial, sans-serif;
    font-size: 25px;
    font-weight: 800;

    line-height: 1;
}

.jd-score span {
    padding-bottom: 2px;

    color: #7c8c98;

    font-size: 10px;
}


/* =========================
   ألوان المؤشرات الحالية
   ========================= */

.jd-card.level-green {
    border-top-color: #2f9b63;
}

.jd-card.level-yellow {
    border-top-color: #d2a72e;
}

.jd-card.level-orange {
    border-top-color: #d77c31;
}

.jd-card.level-red {
    border-top-color: #c84d55;
}

.jd-card.level-green .jd-card-top i {
    background: #2f9b63;
}

.jd-card.level-yellow .jd-card-top i {
    background: #d2a72e;
}

.jd-card.level-orange .jd-card-top i {
    background: #d77c31;
}

.jd-card.level-red .jd-card-top i {
    background: #c84d55;
}


/* =========================
   عدم وجود نتائج
   ========================= */

.jd-empty {
    margin-top: 16px;

    padding: 38px 24px;

    background: #fff;

    border: 1px dashed #ccd7de;
    border-radius: 13px;

    color: #748591;

    text-align: center;
}


/* =========================
   عناصر قديمة محفوظة
   ========================= */

.jd-breadcrumb {
    display: flex;
    gap: 8px;

    margin: 0 4px 12px;

    font-size: 12px;
}

.jd-breadcrumb a {
    color: #286b94;
    text-decoration: none;
}

.jd-profile {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 24px;

    margin-bottom: 16px;
    padding: 26px 30px;

    border-radius: 16px;

    background:
        linear-gradient(
            135deg,
            #062e4b,
            #031927
        );

    color: #fff;

    border-bottom: 3px solid #d9ad49;
}

.jd-profile small {
    color: #efd47e;
    font-weight: 700;
}

.jd-profile h1 {
    margin: 5px 0;
    font-size: 28px;
}

.jd-profile p {
    margin: 0;
    color: #d3dde5;
}

.jd-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.jd-meta span {
    padding: 7px 10px;

    border: 1px solid rgba(255,255,255,.18);
    border-radius: 8px;

    font-size: 11px;
}

.jd-panel {
    margin-top: 14px;
    padding: 20px;

    background: #fff;

    border: 1px solid #dfe6eb;
    border-radius: 13px;
}

.jd-panel h2 {
    margin: 0 0 14px;
    font-size: 16px;
}

.jd-panel > p {
    color: #536b7d;
    line-height: 2;
}

.jd-indicators {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 10px;
}

.jd-indicator {
    padding: 14px;

    border: 1px solid #e2e8ec;
    border-top: 3px solid #aab6bf;
    border-radius: 10px;
}

.jd-map {
    height: 430px;

    overflow: hidden;

    border-radius: 10px;

    background: #edf2f5;
}

.jd-map iframe {
    width: 100%;
    height: 100%;

    border: 0;
}


/* =========================
   الاستجابة
   ========================= */

@media (max-width: 1000px) {

    .jd-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }
}


@media (max-width: 780px) {

    .jd-head {
        align-items: flex-start;
        flex-direction: column;

        padding: 24px;
    }

    .jd-filter {
        grid-template-columns:
            1fr 1fr;
    }

    .jd-filter button {
        grid-column: 1 / -1;
    }

    .jd-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}


@media (max-width: 560px) {

    .jd-shell {
        width: calc(100% - 18px);
        margin-top: 10px;
    }

    .jd-head {
        padding: 20px;
        border-radius: 14px;
    }

    .jd-head h1 {
        font-size: 24px;
    }

    .jd-filter {
        grid-template-columns: 1fr;
        padding: 11px;
    }

    .jd-filter button {
        grid-column: auto;
    }

    .jd-grid {
        grid-template-columns: 1fr;
    }

    .jd-card {
        min-height: 165px;
    }

    .jd-indicators {
        grid-template-columns: 1fr;
    }
}