@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&display=swap');

:root {
    --navy: #102d46;
    --navy2: #173e5b;
    --teal: #087f86;
    --teal2: #0c9998;
    --aqua: #58c4bf;
    --ink: #1b3449;
    --muted: #718397;
    --bg: #f3f6f9;
    --surface: #fff;
    --line: #e4ebf1;
    --soft: #f7fafc;
    --shadow: 0 5px 20px rgba(16, 45, 70, .055);
    --radius: 16px
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: "IBM Plex Sans Arabic", Tahoma, Arial, sans-serif;
    font-size: 13px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased
}

button,
input,
select {
    font: inherit
}

a {
    color: inherit;
    text-decoration: none
}

.hidden {
    display: none !important
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 245px minmax(0, 1fr)
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    background: var(--navy);
    color: #e8f1f7;
    padding: 25px 17px 18px;
    display: flex;
    flex-direction: column;
    z-index: 5
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 2px 9px 28px;
    border-bottom: 1px solid rgba(255, 255, 255, .1)
}

.brand-mark {
    width: 39px;
    height: 39px;
    border-radius: 12px;
    background: linear-gradient(145deg, #18a5a0, #08747c);
    display: grid;
    place-items: center;
    color: white;
    font-size: 21px;
    font-weight: 700;
    box-shadow: 0 5px 14px #061d2e55
}

.brand strong {
    display: block;
    font-size: 14px;
    color: #fff;
    font-weight: 600
}

.brand small {
    display: block;
    color: #9fb3c4;
    font-size: 10px;
    margin-top: 1px
}

.side-caption {
    padding: 25px 11px 10px;
    color: #7892a7;
    font-size: 10px;
    font-weight: 600
}

.side-nav {
    display: grid;
    gap: 6px
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 9px;
    color: #b8c9d6;
    font-size: 12px;
    transition: .18s
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, .1);
    color: #fff
}

.nav-link.active {
    box-shadow: inset -3px 0 #43c1bb
}

.nav-icon {
    width: 20px;
    text-align: center;
    font-size: 17px;
    color: #7dcac5
}

.sidebar-bottom {
    margin-top: auto
}

.side-help {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 10px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, .06);
    border-radius: 10px
}

.help-icon {
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    border: 1px solid #7094a9;
    border-radius: 50%;
    font-size: 12px;
    color: #c6e1e1
}

.side-help strong {
    display: block;
    font-size: 11px;
    color: #e6f0f5
}

.side-help small {
    display: block;
    font-size: 9px;
    color: #91aabc
}

.admin-shortcut {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 12px;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 9px;
    color: #d7e7ed;
    font-size: 11px
}

.admin-shortcut>span:first-child {
    color: #7dd0c8;
    font-size: 16px
}

.shortcut-arrow {
    margin-right: auto;
    color: #8eabba
}

.main-area {
    min-width: 0;
    padding: 0 30px 22px
}

.topbar {
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    margin-bottom: 24px
}


.topbar-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #688091;
    font-size: 10px
}

.live-dot,
.secure-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2eae83;
    box-shadow: 0 0 0 3px #e2f5ed
}

.topbar-divider {
    height: 15px;
    width: 1px;
    background: var(--line);
    margin: 0 5px
}

.top-date {
    color: #91a0ad
}

.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 22px
}

.eyebrow {
    color: var(--teal);
    font-size: 11px;
    font-weight: 600
}

.eyebrow span {
    color: #aab8c3;
    margin: 0 5px
}

.page-heading h1,
.admin-welcome h1 {
    font-size: 25px;
    line-height: 1.4;
    margin: 5px 0;
    color: var(--navy);
    font-weight: 700
}

.page-heading p,
.admin-welcome p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 11px
}

.heading-date {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    background: white;
    border-radius: 11px;
    min-width: 155px
}

.calendar-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: #e8f5f4;
    color: var(--teal);
    display: grid;
    place-items: center;
    font-size: 17px
}

.heading-date small,
.heading-date strong {
    display: block
}

.heading-date small {
    color: var(--muted);
    font-size: 9px
}

.heading-date strong {
    color: var(--ink);
    font-size: 11px;
    margin-top: 2px
}

.filter-panel,
.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow)
}

.filter-panel {
    padding: 15px 18px;
    margin-bottom: 23px
}

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

.filter-title strong {
    display: block;
    font-size: 12px;
    color: var(--ink)
}

.filter-title small {
    display: block;
    color: #96a4b1;
    font-size: 9px;
    margin-top: 1px
}

.filter-symbol {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #eff7f7;
    color: var(--teal);
    font-size: 16px
}

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

label {
    display: block;
    margin-bottom: 5px;
    color: #718397;
    font-size: 10px;
    font-weight: 500
}

select,
input {
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #dce5ec;
    border-radius: 9px;
    background: #fff;
    color: var(--ink);
    outline: none;
    transition: border-color .15s, box-shadow .15s
}

select:focus,
input:focus {
    border-color: #31a5a3;
    box-shadow: 0 0 0 3px #0c999817
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px
}

.section-heading h2 {
    font-size: 15px;
    color: var(--navy);
    margin: 0;
    font-weight: 700
}

.section-heading p {
    font-size: 10px;
    color: #8a9aaa;
    margin: 2px 0 0
}

.section-chip,
.table-count {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 20px;
    background: #edf7f6;
    color: #18817f;
    font-size: 9px;
    font-weight: 500
}

.kpi-section {
    margin-bottom: 22px
}

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

.kpi {
    position: relative;
    overflow: hidden;
    min-height: 126px;
    padding: 15px 17px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow)
}

.kpi:after {
    content: "";
    position: absolute;
    width: 90px;
    height: 90px;
    left: -38px;
    bottom: -54px;
    border-radius: 50%;
    background: var(--tint, #e8f5f4)
}

.kpi-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #738699;
    font-size: 10px;
    font-weight: 500
}

.kpi-icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: var(--tint, #e8f5f4);
    color: var(--accent, var(--teal));
    font-size: 17px
}

.kpi strong {
    display: block;
    font-size: 31px;
    line-height: 1.3;
    margin: 7px 0 1px;
    color: var(--navy);
    font-weight: 700;
    font-variant-numeric: tabular-nums
}

.kpi>small {
    color: #9aa8b4;
    font-size: 9px
}

.kpi-students {
    --tint: #e4f3f2;
    --accent: #07858a
}

.kpi-schools {
    --tint: #edf1ff;
    --accent: #647dd0
}

.kpi-classes {
    --tint: #fff3e8;
    --accent: #d58b45
}

.kpi-teachers {
    --tint: #f1ebfb;
    --accent: #9071bd
}

.analytics-section {
    margin-top: 2px
}

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

.panel {
    min-width: 0;
    padding: 17px 18px
}

.chart-panel {
    min-height: 220px
}

.panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 17px
}

.panel-heading h3 {
    font-size: 12px;
    color: var(--navy);
    margin: 0;
    font-weight: 600
}

.panel-heading p {
    font-size: 9px;
    color: #98a5b1;
    margin: 3px 0 0
}

.panel-menu {
    font-size: 13px;
    letter-spacing: 2px;
    color: #9aa9b5;
    padding: 0 5px
}

.bars {
    display: flex;
    flex-direction: column;
    gap: 14px
}

.barrow {
    display: grid;
    grid-template-columns: 95px minmax(35px, 1fr) 42px;
    gap: 9px;
    align-items: center;
    font-size: 10px;
    color: #62788a
}

.barrow>b {
    font-size: 10px;
    font-weight: 600;
    color: #314d63;
    font-variant-numeric: tabular-nums
}

.track {
    height: 10px;
    background: #edf2f5;
    border-radius: 20px;
    overflow: hidden
}

.fill {
    height: 100%;
    background: linear-gradient(90deg, #087f86, #20aaa5);
    border-radius: 20px;
    transition: width .3s
}

.fill.alt {
    background: linear-gradient(90deg, #55bdbb, #8ad9d1)
}

.legend {
    display: flex;
    gap: 15px;
    align-items: center;
    color: #8293a1;
    font-size: 9px;
    margin: -5px 0 15px
}

.dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: 5px;
    background: #087f86
}

.dot.alt {
    background: #69c9c4
}

.type-name {
    margin: 3px 0 8px;
    color: #526c80;
    font-size: 10px;
    font-weight: 600
}

.type-subrow {
    margin-top: 7px
}

.data-summary {
    min-height: 220px
}

.data-summary .table-scroll {
    max-height: 210px
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 10px
}

th,
td {
    padding: 10px 9px;
    text-align: right;
    border-bottom: 1px solid #edf1f4;
    white-space: nowrap
}

/* =========================================================
   Education Dashboard - polished public and admin UI
   ========================================================= */
:root {
    --navy: #12324b;
    --navy2: #1a4964;
    --teal: #078b89;
    --teal2: #12a49c;
    --aqua: #73d0c7;
    --bg: #f2f6f8;
    --line: #e1e9ee;
    --shadow: 0 12px 34px rgba(18, 50, 75, .07);
}

body {
    background: var(--bg);
}

.brand {
    align-items: center;
}

.brand-logo-wrap {
    width: 100%;
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    background: #ffffff00;
    border-radius: 13px;
    overflow: hidden;
}

.brand-logo {
    display: block;
    width: 100%;
    max-width: 190px;
    height: 62px;
    object-fit: contain;
}

.brand>span:last-child {
    min-width: 0;
}

.brand>span:last-child strong {
    font-size: 13px;
}

.brand>span:last-child small {
    font-size: 10px;
}

.sidebar {
    padding: 20px 16px;
    background: linear-gradient(180deg, #102f49 0%, #153e58 100%);
    box-shadow: 5px 0 24px rgba(13, 39, 58, .08);
}

.brand {
    padding: 0 0 20px;
    border-bottom-color: rgba(255, 255, 255, .13);
}

.side-caption {
    padding-top: 22px;
}

.nav-link {
    padding: 12px 13px;
    border-radius: 10px;
}

.nav-link.active {
    background: rgba(255, 255, 255, .12);
}

.main-area {
    max-width: 1700px;
    width: 100%;
    padding: 0 34px 28px;
    margin-inline: auto;
}

.topbar {
    height: 68px;
    margin-bottom: 26px;
}

.page-heading {
    margin-bottom: 25px;
}

.page-heading h1 {
    font-size: clamp(23px, 2.1vw, 31px);
    letter-spacing: -.3px;
}

.page-heading p {
    font-size: 12px;
}

.heading-date {
    min-width: 178px;
    padding: 12px 15px;
    box-shadow: 0 5px 18px rgba(18, 50, 75, .04);
}

.filter-panel {
    padding: 18px 20px 20px;
    margin-bottom: 26px;
}

.filters {
    gap: 15px;
}

select,
input {
    min-height: 43px;
    border-radius: 10px;
}

.section-heading {
    margin-bottom: 15px;
}

.section-heading h2 {
    font-size: 17px;
}

.section-heading p {
    font-size: 11px;
}

.kpis {
    gap: 15px;
}

.kpi {
    min-height: 143px;
    padding: 19px 20px;
    border-radius: 16px;
    box-shadow: 0 7px 22px rgba(18, 50, 75, .045);
    transition: transform .2s ease, box-shadow .2s ease;
}

.kpi:hover {
    transform: translateY(-3px);
    box-shadow: 0 13px 28px rgba(18, 50, 75, .09);
}

.kpi-top {
    font-size: 11px;
}

.kpi-icon {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    font-size: 19px;
}

.kpi strong {
    font-size: 34px;
    margin-top: 8px;
}

.kpi>small {
    font-size: 10px;
}

.analytics-section {
    margin-top: 27px;
}

.grid {
    gap: 16px;
}

.panel {
    padding: 21px 22px;
    border-radius: 16px;
    box-shadow: 0 7px 22px rgba(18, 50, 75, .045);
}

.chart-panel {
    min-height: 252px;
}

.panel-heading {
    margin-bottom: 23px;
}

.panel-heading h3 {
    font-size: 14px;
}

.panel-heading p {
    font-size: 10px;
}

.bars {
    gap: 18px;
}

.barrow {
    grid-template-columns: 105px minmax(35px, 1fr) 52px;
    gap: 12px;
    font-size: 11px;
}

.barrow>b {
    font-size: 11px;
}

.track {
    height: 12px;
    background: #edf2f5;
}

.fill {
    background: linear-gradient(90deg, #087f86, #25b0a8);
}

.fill.alt {
    background: linear-gradient(90deg, #61c5be, #9adfd7);
}

.legend {
    font-size: 10px;
    gap: 18px;
    margin-bottom: 19px;
}

.type-name {
    font-size: 11px;
    margin-bottom: 10px;
}

.type-subrow {
    margin-top: 10px;
}

.note {
    margin-top: 20px;
    padding: 13px 16px;
    border: 1px solid #e1ebef;
    border-right: 3px solid #36aaa3;
    border-radius: 11px;
    background: #f9fbfc;
    color: #738697;
    font-size: 10px;
    line-height: 1.9;
}

.footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 17px 2px 0;
    color: #8b9ba8;
    font-size: 10px;
}

/* Admin page */
.admin-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 10% 0%, rgba(18, 164, 156, .08), transparent 27rem),
        #f2f6f8;
}

.admin-app {
    min-height: 100vh;
}

.admin-topbar {
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px max(28px, calc((100vw - 1320px)/2));
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 4px 18px rgba(18, 50, 75, .035);
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 0;
    border: 0;
    color: var(--navy);
}

.admin-brand .brand-logo-wrap {
    width: 170px;
    min-height: 75px;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 0;
}

.admin-brand .brand-logo {
    width: 100%;
    height: 75px;
    max-width: none;
    object-fit: contain;
}

.admin-brand strong {
    color: var(--navy) !important;
    font-size: 14px !important;
}

.admin-brand small {
    color: #8395a3 !important;
    font-size: 10px !important;
}

.back-public {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 10px 14px;
    color: #426174;
    background: #f3f7f8;
    border: 1px solid #e5edf0;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    transition: .2s;
}

.back-public:hover {
    background: #e9f4f3;
    color: var(--teal);
}

.admin-main {
    width: min(1320px, calc(100% - 48px));
    margin: 0 auto;
    padding: 36px 0 25px;
}

.login-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(380px, .95fr);
    max-width: 1050px;
    min-height: 540px;
    margin: 22px auto 50px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e3ebef;
    border-radius: 22px;
    box-shadow: 0 22px 65px rgba(18, 50, 75, .11);
}

.login-intro {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 54px 52px;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(145deg, #102f49 0%, #15546a 65%, #087f86 100%);
}

.login-intro::before,
.login-intro::after {
    content: "";
    position: absolute;
    z-index: -1;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 50%;
}

.login-intro::before {
    width: 380px;
    height: 380px;
    left: -170px;
    bottom: -185px;
}

.login-intro::after {
    width: 270px;
    height: 270px;
    left: -115px;
    bottom: -130px;
}

.login-emblem {
    display: flex;
    align-items: right;
    justify-content: right;
    width: 210px;
    min-height: 112px;
    margin-bottom: 38px;
    background: #ffffff00;
}

.login-emblem img {
    display: block;
    width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.login-intro .eyebrow {
    color: #8de1d6;
    font-size: 11px;
}

.login-intro h1 {
    margin: 10px 0 12px;
    color: #fff;
    font-size: clamp(27px, 3vw, 37px);
    line-height: 1.45;
}

.login-intro>p {
    max-width: 440px;
    color: #d0e1e8;
    font-size: 13px;
    line-height: 2;
}

.login-security {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 36px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, .17);
    border-radius: 12px;
    background: rgba(255, 255, 255, .08);
}

.login-security>span {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(112, 220, 196, .17);
    color: #8de1d6;
    font-weight: 700;
}

.login-security strong,
.login-security small {
    display: block;
}

.login-security strong {
    font-size: 11px;
}

.login-security small {
    color: #bdd1dc;
    font-size: 10px;
    margin-top: 2px;
}

.login-card {
    align-self: center;
    padding: 48px clamp(28px, 5vw, 58px);
    background: #fff;
}

.login-card-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 34px;
}


.login-card-heading h2 {
    margin: 0;
    color: var(--navy);
    font-size: 22px;
}

.login-card-heading p {
    margin: 4px 0 0;
    color: #8a9aa7;
    font-size: 11px;
}

.form-grid {
    display: grid;
    gap: 19px;
}

.field label {
    margin-bottom: 8px;
    color: #425e72;
    font-size: 11px;
    font-weight: 600;
}

.field input,
.field select {
    min-height: 48px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 12px;
}

.password-wrap {
    position: relative;
    width: 100%;
}

.password-wrap input {
    width: 100%;
    padding-left: 45px;
}

.toggle-password {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    border: none;
    background: transparent;
    color: #718397;
    cursor: pointer;
}

.toggle-password:hover {
    color: var(--teal);
}

.toggle-password svg {
    width: 20px;
    height: 20px;
}

.login-submit,
.primary-button {
    min-height: 47px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 18px;
    border: 0;
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(100deg, #087f86, #0b9c98);
    box-shadow: 0 7px 16px rgba(8, 127, 134, .17);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: .2s;
}

.login-submit:hover,
.primary-button:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
}

.login-submit span {
    font-size: 17px;
}

.login-card-foot {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid #edf1f3;
    color: #8798a5;
    font-size: 10px;
}

.login-card-foot .secure-dot {
    flex: 0 0 7px;
}

.message {
    min-height: 18px;
    font-size: 11px;
}

.admin-workspace {
    display: block;
}

.admin-welcome {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 22px;
    margin-bottom: 24px;
    padding: 25px 28px;
    border: 1px solid #e2eaee;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 7px 22px rgba(18, 50, 75, .045);
}

.admin-welcome .eyebrow {
    font-size: 10px;
}

.admin-welcome h1 {
    margin: 5px 0;
    font-size: 23px;
}

.admin-welcome p {
    font-size: 11px;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border: 1px solid #e5ecef;
    border-radius: 12px;
    background: #f9fbfc;
}

.user-avatar {
    width: 39px;
    height: 39px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: #e2f3f1;
    color: var(--teal);
    font-weight: 700;
}

.admin-user strong,
.admin-user small {
    display: block;
    max-width: 210px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-user strong {
    color: var(--navy);
    font-size: 11px;
}

.admin-user small {
    color: #8798a5;
    font-size: 9px;
}

.logout-button {
    margin-right: 5px;
    padding: 9px 12px;
    border: 1px solid #f0dede;
    border-radius: 9px;
    background: #fff5f4;
    color: #b44d4a;
    font: inherit;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
}

.logout-button:hover {
    background: #ffe9e7;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.admin-stat {
    position: relative;
    padding: 19px 21px;
    background: #fff;
    border: 1px solid #e2eaee;
    border-radius: 15px;
    box-shadow: 0 6px 20px rgba(18, 50, 75, .04);
}

.admin-stat::before {
    content: "";
    position: absolute;
    right: 0;
    top: 18px;
    bottom: 18px;
    width: 3px;
    border-radius: 3px 0 0 3px;
    background: #1aa39d;
}

.admin-stat>span,
.admin-stat>small {
    display: block;
    color: #8496a4;
    font-size: 10px;
}

.admin-stat strong {
    display: block;
    margin: 7px 0 4px;
    color: var(--navy);
    font-size: 22px;
}

.admin-stat .online-status {
    color: #18845e;
    font-size: 17px;
}

.admin-form-panel,
.records-panel {
    padding: 25px;
    border-radius: 16px;
}

.admin-panel-heading,
.records-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 21px;
}

.panel-kicker {
    color: var(--teal);
    font-size: 10px;
    font-weight: 700;
}

.admin-panel-heading h2,
.records-heading h2 {
    margin: 5px 0;
    color: var(--navy);
    font-size: 18px;
}

.admin-panel-heading p,
.records-heading p {
    margin: 0;
    color: #8a9aa7;
    font-size: 10px;
}

.form-heading-icon {
    width: 43px;
    height: 43px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #e7f5f3;
    color: var(--teal);
    font-size: 24px;
}

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

.record-grid .field {
    min-width: 0;
}

.form-actions {
    display: flex;
    align-items: end;
    gap: 9px;
}

.primary-button {
    min-height: 43px;
    padding: 0 18px;
}

.primary-button span {
    margin-right: 3px;
}

.secondary {
    min-height: 43px;
    padding: 0 16px;
    border: 1px solid #e0e8ed;
    border-radius: 10px;
    background: #f5f8fa;
    color: #536e80;
    font: inherit;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
}

.secondary:hover {
    background: #eaf2f5;
}

.records-panel {
    margin-top: 20px;
}

.records-heading {
    align-items: center;
}

.table-count {
    padding: 7px 12px;
    font-size: 10px;
}

.table-scroll {
    overflow: auto;
    border: 1px solid #edf1f3;
    border-radius: 11px;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 10px;
}

th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f4f8f9;
    color: #60798a;
    font-weight: 700;
}

th,
td {
    padding: 12px 11px;
    text-align: right;
    border-bottom: 1px solid #edf1f4;
    white-space: nowrap;
}

tbody tr:hover {
    background: #f8fbfc;
}

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

.actions {
    display: flex;
    gap: 6px;
}

.small {
    padding: 7px 11px;
    border: 0;
    border-radius: 7px;
    font: inherit;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
}

.small.secondary {
    min-height: 0;
    padding: 7px 11px;
}

.small.danger {
    background: #fff0ef;
    color: #b34b48;
}

.small.danger:hover {
    background: #ffdfdd;
}

.admin-footer {
    padding: 25px 10px;
    color: #91a0ad;
    font-size: 10px;
    text-align: center;
}

.admin-footer span {
    margin: 0 6px;
}

@media (max-width: 1050px) {
    .main-area {
        padding-inline: 22px;
    }

    .kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-main {
        width: min(100% - 32px, 1320px);
    }
}

@media (max-width: 760px) {
    .app-shell {
        display: block;
    }

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        padding: 12px 15px;
    }

    .brand {
        display: flex;
        flex-direction: row;
        gap: 10px;
        padding: 0 0 10px;
    }

    .brand-logo-wrap {
        width: 100px;
        min-height: 48px;
        padding: 4px;
    }

    .brand-logo {
        height: 40px;
    }

    .side-caption,
    .sidebar-bottom {
        display: none;
    }

    .side-nav {
        display: flex;
        overflow: auto;
        margin-top: 10px;
    }

    .nav-link {
        white-space: nowrap;
        padding: 8px 10px;
    }

    .main-area {
        padding: 0 13px 18px;
    }

    .topbar {
        height: 52px;
        margin-bottom: 18px;
    }

    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .heading-date {
        min-width: 0;
    }

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

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

    .footer {
        flex-direction: column;
    }

    .admin-topbar {
        padding: 12px 16px;
    }

    .admin-main {
        width: calc(100% - 26px);
        padding: 20px 0;
    }

    .login-layout {
        grid-template-columns: 1fr;
        min-height: 0;
        margin: 5px auto 28px;
    }

    .login-intro {
        padding: 30px 27px;
    }

    .login-emblem {
        width: 165px;
        min-height: 90px;
        margin-bottom: 22px;
    }

    .login-card {
        padding: 30px 25px;
    }

    .admin-welcome {
        align-items: flex-start;
        flex-direction: column;
        padding: 21px;
    }

    .admin-user {
        width: 100%;
        flex-wrap: wrap;
    }

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

    .admin-stat:last-child {
        grid-column: 1/-1;
    }

    .record-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .record-grid {
        grid-template-columns: 1fr;
    }

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

    .admin-welcome h1 {
        font-size: 19px;
    }

    .section-chip {
        display: none;
    }

    .kpi {
        min-height: 120px;
        padding: 14px;
    }

    .kpi strong {
        font-size: 25px;
    }

    .panel {
        padding: 16px 14px;
    }

    .barrow {
        grid-template-columns: 82px minmax(25px, 1fr) 38px;
        gap: 7px;
    }

    .admin-brand .brand-logo-wrap {
        width: 83px;
    }

    .back-public {
        font-size: 9px;
        padding: 8px 9px;
    }

    .login-card-heading h2 {
        font-size: 19px;
    }
}


/* ===== Requested dashboard refinements: varied charts + centered ministry identity ===== */
.brand {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    text-align: center;
    padding: 0 0 20px;
}

.brand-logo-wrap {
    width: 100%;
    min-height: 88px;
    padding: 7px 10px;
    border-radius: 14px;
}

.brand-logo {
    width: 100%;
    max-width: 205px;
    height: 76px;
    object-fit: contain;
}

.brand>span:last-child {
    display: block;
    width: 100%;
    text-align: center;
}

.brand>span:last-child strong {
    font-size: 14px;
    letter-spacing: .1px;
}

.brand>span:last-child small {
    margin-top: 2px;
    font-size: 10px;
}

.side-nav {
    margin-top: 2px;
}

.chart-panel {
    min-height: 300px;
}

.chart-panel .bars {
    min-height: 205px;
    justify-content: center;
}

.column-chart-wrap {
    width: 100%;
    overflow: hidden;
}

.column-chart {
    display: block;
    width: 100%;
    height: auto;
    min-height: 205px;
    overflow: visible;
}

.axis-label {
    fill: #8a9aaa;
    font: 10px "IBM Plex Sans Arabic", Tahoma, sans-serif;
}

.axis-category {
    fill: #526b7e;
    font: 11px "IBM Plex Sans Arabic", Tahoma, sans-serif;
}

.bar-value {
    fill: #29465d;
    font: 10px "IBM Plex Sans Arabic", Tahoma, sans-serif;
    font-weight: 600;
}

.donut-layout {
    min-height: 205px;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    gap: 22px;
    padding: 5px 4px 12px;
}

.donut-chart {
    width: 176px;
    height: 176px;
    flex: 0 0 176px;
    border-radius: 50%;
    background: var(--donut-bg);
    display: grid;
    place-items: center;
    position: relative;
}

.donut-hole {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 12px rgba(16, 45, 70, .06);
}

.donut-hole strong {
    color: var(--navy);
    font-size: 20px;
    line-height: 1.3;
    font-weight: 700;
}

.donut-hole small {
    color: #91a0ad;
    font-size: 9px;
}

.chart-legend {
    flex: 1;
    min-width: 125px;
    display: grid;
    gap: 15px;
}

.legend-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 5px 12px;
    padding-bottom: 9px;
    border-bottom: 1px solid #edf1f4;
}

.legend-name {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #63798b;
    font-size: 11px;
}

.legend-name i,
.chart-series-legend i {
    width: 9px;
    height: 9px;
    flex: 0 0 9px;
    border-radius: 50%;
    background: var(--legend-color);
    display: inline-block;
}

.legend-row strong {
    color: var(--navy);
    font-size: 12px;
    font-weight: 700;
}

.legend-row small {
    grid-column: 1 / -1;
    color: #9aa8b4;
    font-size: 10px;
    padding-right: 17px;
}

.chart-series-legend {
    display: flex;
    gap: 17px;
    justify-content: center;
    margin: -5px 0 8px;
}

.chart-series-legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #718397;
    font-size: 10px;
}

.note {
    margin-top: 20px;
}

@media (max-width: 760px) {
    .brand {
        flex-direction: row;
        align-items: center;
        text-align: right;
    }

    .brand-logo-wrap {
        width: 116px;
        min-height: 58px;
        flex: 0 0 116px;
    }

    .brand-logo {
        height: 48px;
    }

    .brand>span:last-child {
        text-align: right;
    }

    .donut-layout {
        flex-wrap: wrap;
        gap: 14px;
    }

    .donut-chart {
        width: 150px;
        height: 150px;
        flex-basis: 150px;
    }

    .donut-hole {
        width: 96px;
        height: 96px;
    }

    .chart-legend {
        min-width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .chart-panel {
        min-height: 270px;
    }

    .column-chart {
        min-height: 180px;
    }

    .donut-layout {
        justify-content: center;
    }
}


/* ===== Improved Dashboard Typography ===== */

/* الخط الأساسي */
body {
    font-size: 15px;
    line-height: 1.8;
}

/* القائمة الجانبية */
.brand strong {
    font-size: 17px;
}

.brand small {
    font-size: 12px;
}

.side-caption {
    font-size: 12px;
}

.nav-link {
    font-size: 14px;
}

.side-help strong {
    font-size: 13px;
}

.side-help small {
    font-size: 11px;
}

.admin-shortcut {
    font-size: 13px;
}

/* الشريط العلوي */
.breadcrumb,
.topbar-meta {
    font-size: 12px;
}

/* عنوان الصفحة */
.eyebrow {
    font-size: 13px;
}

.page-heading h1 {
    font-size: 30px;
}

.page-heading p {
    font-size: 14px;
}

.heading-date small {
    font-size: 12px;
}

.heading-date strong {
    font-size: 14px;
}

/* التصفية */
.filter-title strong {
    font-size: 15px;
}

.filter-title small {
    font-size: 12px;
}

label {
    font-size: 13px;
}

select,
input {
    font-size: 14px;
    padding: 12px;
}

/* عناوين الأقسام */
.section-heading h2 {
    font-size: 19px;
}

.section-heading p {
    font-size: 13px;
}

.section-chip,
.table-count {
    font-size: 12px;
}

/* البطاقات الرئيسية */
.kpi-top {
    font-size: 14px;
}

.kpi strong {
    font-size: 36px;
}

.kpi>small {
    font-size: 12px;
}

/* الرسوم البيانية */
.panel-heading h3 {
    font-size: 16px;
}

.panel-heading p {
    font-size: 12px;
}

.barrow {
    font-size: 13px;
    grid-template-columns: 105px minmax(35px, 1fr) 48px;
}

.barrow>b {
    font-size: 13px;
}

.legend {
    font-size: 12px;
}

.type-name {
    font-size: 13px;
}

/* الجداول */
table {
    font-size: 13px;
}

th,
td {
    font-size: 13px;
    padding: 12px;
}

/* الملاحظات والتذييل */
.note,
.footer {
    font-size: 12px;
}

/* تحسين الشاشات الصغيرة */
@media(max-width: 760px) {
    .page-heading h1 {
        font-size: 24px;
    }

    .section-heading h2 {
        font-size: 17px;
    }

    .kpi strong {
        font-size: 29px;
    }

    .panel-heading h3 {
        font-size: 15px;
    }

    .barrow {
        font-size: 12px;
    }
}


/* =====================================
   FINAL TYPOGRAPHY OVERRIDE
   تكبير الخطوط في لوحة التحكم بالكامل
===================================== */

/* الخط الأساسي */
body {
    font-size: 17px !important;
    line-height: 1.9 !important;
}

/* القائمة الجانبية */
.brand strong {
    font-size: 19px !important;
}

.brand small {
    font-size: 14px !important;
}

.side-caption {
    font-size: 14px !important;
}

.nav-link {
    font-size: 16px !important;
}

.side-help strong {
    font-size: 15px !important;
}

.side-help small {
    font-size: 13px !important;
}

.admin-shortcut {
    font-size: 15px !important;
}

/* الشريط العلوي */
.breadcrumb,
.topbar-meta {
    font-size: 14px !important;
}

/* عنوان الصفحة */
.eyebrow {
    font-size: 15px !important;
}

.page-heading h1 {
    font-size: 34px !important;
}

.page-heading p {
    font-size: 16px !important;
}

.heading-date small {
    font-size: 14px !important;
}

.heading-date strong {
    font-size: 16px !important;
}

/* التصفية */
.filter-title strong {
    font-size: 17px !important;
}

.filter-title small {
    font-size: 14px !important;
}

label {
    font-size: 15px !important;
}

select,
input {
    font-size: 16px !important;
    min-height: 48px !important;
}

/* عناوين الأقسام */
.section-heading h2 {
    font-size: 22px !important;
}

.section-heading p {
    font-size: 15px !important;
}

.section-chip,
.table-count {
    font-size: 14px !important;
}

/* بطاقات المؤشرات */
.kpi-top {
    font-size: 16px !important;
}

.kpi strong {
    font-size: 40px !important;
}

.kpi>small {
    font-size: 14px !important;
}

/* عناوين الرسوم البيانية */
.panel-heading h3 {
    font-size: 19px !important;
}

.panel-heading p {
    font-size: 14px !important;
}

/* الرسوم البيانية العادية */
.barrow,
.barrow>b {
    font-size: 15px !important;
}

.legend {
    font-size: 14px !important;
}

.type-name {
    font-size: 15px !important;
}

/* النصوص داخل الرسوم SVG */
.axis-label,
.axis-category,
.bar-value,
svg text {
    font-size: 14px !important;
    font-family: "IBM Plex Sans Arabic", Tahoma, sans-serif !important;
}

.bar-value {
    font-weight: 700 !important;
}

.axis-category {
    font-size: 15px !important;
}

/* الرسم الدائري */
.donut-hole strong {
    font-size: 24px !important;
}

.donut-hole small {
    font-size: 13px !important;
}

.legend-name {
    font-size: 15px !important;
}

.legend-row strong {
    font-size: 16px !important;
}

.legend-row small {
    font-size: 13px !important;
}

.chart-series-legend span {
    font-size: 14px !important;
}

/* الملاحظات والتذييل */
.note,
.footer {
    font-size: 14px !important;
}

/* تحسين الجداول إن وجدت */
table,
th,
td {
    font-size: 14px !important;
}

/* صفحة تسجيل الدخول والإدارة */
.login-card-heading h2 {
    font-size: 25px !important;
}

.login-card-heading p {
    font-size: 14px !important;
}

.field label {
    font-size: 15px !important;
}

.field input,
.field select {
    font-size: 16px !important;
}

.login-submit,
.primary-button {
    font-size: 16px !important;
}

.admin-welcome h1 {
    font-size: 29px !important;
}

.admin-welcome p {
    font-size: 15px !important;
}

.admin-stat>span,
.admin-stat>small {
    font-size: 14px !important;
}

.admin-stat strong {
    font-size: 27px !important;
}

.admin-panel-heading h2,
.records-heading h2 {
    font-size: 21px !important;
}

.admin-panel-heading p,
.records-heading p {
    font-size: 14px !important;
}

/* ===== Editable statistical tables in admin ===== */
.statistics-tables {
    display: grid;
    gap: 24px;
}

.admin-stat-table-section {
    border: 1px solid #e5edf1;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}

.admin-stat-table-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 17px 20px;
    background: #f7fafb;
    border-bottom: 1px solid #e5edf1;
}

.admin-stat-table-heading h3 {
    margin: 0;
    color: var(--navy);
    font-size: 18px;
}

.admin-stat-table-heading p {
    margin: 3px 0 0;
    color: #718397;
    font-size: 13px;
}

.admin-stat-table-scroll {
    overflow-x: auto;
}

.admin-stat-table {
    width: 100%;
    min-width: 1120px;
    border-collapse: collapse;
    text-align: center;
    font-size: 13px;
}

.admin-stat-table th,
.admin-stat-table td {
    border: 1px solid #e2e9ed;
    padding: 8px 7px;
    white-space: nowrap;
}

.admin-stat-table thead th {
    background: #dff7f5;
    color: #16465a;
    font-weight: 700;
}

.admin-stat-table .gender-row th {
    background: #edf3f6;
    color: #173c54;
    text-align: right;
    padding: 10px 13px;
}

.admin-stat-table .stage-cell {
    min-width: 100px;
    background: #f8fafb;
}

.stat-cell-input {
    width: 78px;
    min-width: 65px;
    min-height: 36px !important;
    height: 36px;
    padding: 5px 7px !important;
    text-align: center;
    border: 1px solid #dce6eb;
    border-radius: 7px;
    background: #fff;
    color: #173c54;
    font: inherit;
}

.stat-cell-input:focus {
    outline: 2px solid rgba(8, 127, 134, .2);
    border-color: var(--teal);
}

.admin-stat-table .total-row th,
.admin-stat-table .total-row td {
    background: #edf0f2;
    font-weight: 700;
    color: #173c54;
}

.save-type-button {
    white-space: nowrap;
}

@media (max-width: 760px) {
    .admin-stat-table-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .save-type-button {
        width: 100%;
    }
}

.admin-brand .brand-logo-wrap {
    width: 170px;
    min-height: 75px;
    padding: 0;
    border: 0;
    background: transparent;
}

.admin-brand .brand-logo {
    width: 100%;
    height: 75px;
    max-width: none;
    object-fit: contain;
}

.login-emblem {
    width: 260px;
    min-height: 145px;
    padding: 8px;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.login-emblem img {
    display: block;
    width: 100%;
    max-height: 140px;
    object-fit: contain;
}

/* KPI Icons */
.kpi-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.kpi-icon svg {
    width: 21px;
    height: 21px;
    stroke-width: 1.8;
}