/* ============================================================
   Nigerian Air Force — Directorate of Education
   Executive Information System  ·  Premium UI Theme
   ============================================================ */

:root {
    --naf-navy: #061a30;
    --naf-navy-2: #103a63;
    --naf-blue: #1769a8;
    --naf-air: #2e9bd6;
    --naf-air-light: #6cc3f0;
    --naf-sky: #93d6f7;
    --naf-gold: #d4af37;
    --naf-gold-soft: #f0c75e;

    --naf-success: #16a37b;
    --naf-warning: #e8a317;
    --naf-danger: #e0455e;
    --naf-info: #2f7fd6;

    --bg: #eef1f6;
    --surface: #ffffff;
    --ink: #1c2433;
    --ink-soft: #5b6577;
    --ink-faint: #95a0b3;
    --line: #e7ebf2;

    --radius: 18px;
    --radius-sm: 12px;
    --shadow-sm: 0 1px 2px rgba(16, 30, 54, .06), 0 2px 8px rgba(16, 30, 54, .05);
    --shadow: 0 4px 12px rgba(16, 30, 54, .07), 0 12px 32px rgba(16, 30, 54, .08);
    --shadow-lg: 0 18px 50px rgba(7, 20, 46, .18);
    --grad-navy: linear-gradient(162deg, #2389c8 0%, #15659b 52%, #0b4671 100%);
    --grad-sky: linear-gradient(162deg, #2e9bd6 0%, #15659b 60%, #0b4671 100%);
    --grad-air: linear-gradient(135deg, #2e9bd6 0%, #1769a8 100%);
    --grad-gold: linear-gradient(135deg, #f0c75e 0%, #d4af37 100%);
    --sidebar-w: 270px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, .display-title {
    font-family: 'Sora', 'Plus Jakarta Sans', sans-serif;
    letter-spacing: -.01em;
}

a { text-decoration: none; }

.text-gold { color: var(--naf-gold) !important; }
.bg-grad-air { background: var(--grad-air); }
.fw-800 { font-weight: 800; }

/* ============================================================
   APP SHELL
   ============================================================ */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w);
    flex: 0 0 var(--sidebar-w);
    background: var(--grad-navy);
    color: #cdd6e6;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255,255,255,.05);
    box-shadow: 6px 0 30px rgba(7,20,46,.18);
    transition: transform .3s ease;
}

.sidebar::before {
    content: "";
    position: absolute; inset: 0;
    background:
        radial-gradient(420px 220px at 80% -5%, rgba(46,155,214,.28), transparent 60%),
        radial-gradient(360px 260px at -10% 110%, rgba(212,175,55,.10), transparent 60%);
    pointer-events: none;
}

.sidebar-brand {
    display: flex; align-items: center; gap: .8rem;
    padding: 1.4rem 1.4rem 1.2rem;
    position: relative;
}
.brand-badge {
    width: 46px; height: 46px; border-radius: 13px;
    background: var(--grad-gold);
    display: grid; place-items: center;
    color: #061a30; font-size: 1.4rem;
    box-shadow: 0 6px 18px rgba(212,175,55,.4);
    flex: 0 0 auto;
}
.brand-text strong { display: block; color: #fff; font-family: 'Sora', sans-serif; font-size: .98rem; line-height: 1.1; }
.brand-text span { font-size: .72rem; color: var(--naf-sky); letter-spacing: .12em; text-transform: uppercase; }

.sidebar-section {
    font-size: .68rem; letter-spacing: .16em; text-transform: uppercase;
    color: #aed0e8; padding: 1.2rem 1.6rem .5rem;
}

.nav-rail { padding: 0 .9rem; position: relative; flex: 1; overflow-y: auto; }
.nav-rail::-webkit-scrollbar { width: 6px; }
.nav-rail::-webkit-scrollbar-thumb { background: rgba(255,255,255,.08); border-radius: 6px; }

.rail-link {
    display: flex; align-items: center; gap: .85rem;
    padding: .72rem .9rem;
    border-radius: 12px;
    color: #dbeaf6;
    font-weight: 600; font-size: .9rem;
    margin-bottom: .2rem;
    position: relative;
    transition: all .18s ease;
}
.rail-link i { font-size: 1.12rem; width: 22px; text-align: center; color: #bcdcef; transition: color .18s; }
.rail-link:hover { background: rgba(255,255,255,.12); color: #fff; }
.rail-link:hover i { color: #fff; }
.rail-link.active {
    background: linear-gradient(100deg, rgba(255,255,255,.22), rgba(255,255,255,.04));
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.22);
}
.rail-link.active i { color: var(--naf-gold-soft); }
.rail-link.active::before {
    content: ""; position: absolute; left: -.9rem; top: 50%; transform: translateY(-50%);
    width: 4px; height: 60%; border-radius: 0 4px 4px 0; background: var(--grad-gold);
}

.sidebar-foot {
    padding: 1rem 1.4rem 1.3rem; position: relative;
    border-top: 1px solid rgba(255,255,255,.12);
    font-size: .74rem; color: #bcd6ea;
}
.sidebar-foot .secure { display: flex; align-items: center; gap: .5rem; color: var(--naf-success); font-weight: 700; }

/* MAIN COLUMN */
.app-main {
    flex: 1;
    margin-left: var(--sidebar-w);
    min-width: 0;
    display: flex; flex-direction: column;
}

.topbar {
    position: sticky; top: 0; z-index: 1030;
    background: rgba(255,255,255,.85);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    padding: .85rem 1.8rem;
    display: flex; align-items: center; gap: 1rem;
}
.topbar h1 { font-size: 1.15rem; margin: 0; font-weight: 700; }
.topbar .crumb { font-size: .76rem; color: var(--ink-faint); letter-spacing: .04em; }

.topbar-search {
    margin-left: auto;
    position: relative; max-width: 320px; width: 100%;
    display: none;
}
.topbar-search input {
    width: 100%; border: 1px solid var(--line); background: #f6f8fb;
    border-radius: 11px; padding: .55rem .8rem .55rem 2.3rem; font-size: .86rem;
}
.topbar-search i { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--ink-faint); }

.topbar-actions { display: flex; align-items: center; gap: .65rem; margin-left: auto; }
.icon-btn {
    width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--line);
    background: #fff; color: var(--ink-soft); display: grid; place-items: center;
    position: relative; cursor: pointer; transition: .15s;
}
.icon-btn:hover { color: var(--naf-blue); border-color: var(--naf-air-light); }
.icon-btn .dot { position: absolute; top: 9px; right: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--naf-danger); box-shadow: 0 0 0 2px #fff; }

.user-chip { display: flex; align-items: center; gap: .65rem; padding-left: .4rem; }
.user-chip .avatar {
    width: 42px; height: 42px; border-radius: 12px; background: var(--grad-air);
    color: #fff; display: grid; place-items: center; font-weight: 800; font-family: 'Sora', sans-serif;
    box-shadow: var(--shadow-sm);
}
.user-chip .meta strong { display: block; font-size: .85rem; line-height: 1.1; }
.user-chip .meta span { font-size: .72rem; color: var(--ink-faint); }

.content { padding: 1.8rem; max-width: 1600px; width: 100%; margin: 0 auto; }

/* ============================================================
   PAGE HERO
   ============================================================ */
.page-hero {
    background: var(--grad-navy);
    border-radius: var(--radius);
    padding: 1.7rem 1.9rem;
    color: #eaf0fb;
    position: relative; overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}
.page-hero::after {
    content: ""; position: absolute; inset: 0;
    background:
        radial-gradient(540px 240px at 95% -30%, rgba(46,155,214,.4), transparent 65%),
        radial-gradient(360px 200px at 0% 130%, rgba(212,175,55,.16), transparent 60%);
}
.page-hero .jet {
    position: absolute; right: 1.6rem; bottom: -.4rem; font-size: 6.5rem;
    color: rgba(255,255,255,.07); transform: rotate(-12deg);
}
.page-hero .eyebrow { font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: #d6ecfa; font-weight: 700; }
.page-hero h2 { font-size: 1.7rem; font-weight: 800; margin: .35rem 0 .4rem; color: #fff; position: relative; }
.page-hero p { margin: 0; color: #dbeaf6; max-width: 640px; position: relative; }
.page-hero .hero-meta { display: flex; gap: 1.6rem; margin-top: 1.1rem; position: relative; flex-wrap: wrap; }
.page-hero .hero-meta div span { display: block; font-size: .7rem; color: #bcd9ee; text-transform: uppercase; letter-spacing: .1em; }
.page-hero .hero-meta div strong { font-size: 1.15rem; color: #fff; font-family: 'Sora', sans-serif; }

/* ============================================================
   CARDS
   ============================================================ */
.card-x {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease;
}
.card-x:hover { box-shadow: var(--shadow); }
.card-x .card-x-head {
    padding: 1.1rem 1.3rem; border-bottom: 1px solid var(--line);
    display: flex; align-items: center; gap: .7rem;
}
.card-x .card-x-head h3 { font-size: 1rem; margin: 0; font-weight: 700; }
.card-x .card-x-head .sub { font-size: .76rem; color: var(--ink-faint); }
.card-x .card-x-body { padding: 1.3rem; }

/* KPI cards */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }
.kpi {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 1.25rem 1.3rem;
    box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
    animation: rise .5s both;
}
.kpi:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.kpi::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
    background: var(--grad-air);
}
.kpi.kpi--gold::before { background: var(--grad-gold); }
.kpi.kpi--green::before { background: linear-gradient(var(--naf-success), #0c7a59); }
.kpi.kpi--red::before { background: linear-gradient(var(--naf-danger), #b3203a); }
.kpi-top { display: flex; align-items: flex-start; justify-content: space-between; }
.kpi-icon {
    width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
    font-size: 1.3rem; color: #fff; background: var(--grad-air); box-shadow: var(--shadow-sm);
}
.kpi--gold .kpi-icon { background: var(--grad-gold); color: #061a30; }
.kpi--green .kpi-icon { background: linear-gradient(135deg, #1ec896, #0c7a59); }
.kpi--red .kpi-icon { background: linear-gradient(135deg, #f06a82, #b3203a); }
.kpi-label { font-size: .76rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; margin-top: 1rem; }
.kpi-value { font-size: 1.85rem; font-weight: 800; font-family: 'Sora', sans-serif; line-height: 1.1; margin-top: .15rem; }
.kpi-value .unit { font-size: .9rem; color: var(--ink-faint); font-weight: 600; }
.kpi-foot { display: flex; align-items: center; gap: .4rem; margin-top: .65rem; font-size: .8rem; }
.trend-pill { display: inline-flex; align-items: center; gap: .25rem; font-weight: 700; padding: .15rem .5rem; border-radius: 50px; font-size: .74rem; }
.trend-up { color: var(--naf-success); background: rgba(22,163,123,.1); }
.trend-down { color: var(--naf-danger); background: rgba(224,69,94,.1); }
.trend-flat { color: var(--ink-soft); background: #eef1f6; }
.kpi-foot .muted { color: var(--ink-faint); }

/* progress meter */
.meter { height: 8px; background: #eef1f6; border-radius: 50px; overflow: hidden; margin-top: .8rem; }
.meter > span { display: block; height: 100%; border-radius: 50px; background: var(--grad-air); }
.meter.gold > span { background: var(--grad-gold); }
.meter.green > span { background: linear-gradient(90deg, #1ec896, #0c7a59); }

/* ============================================================
   FINANCE STRIP
   ============================================================ */
.fin-card {
    border-radius: var(--radius); padding: 1.3rem; color: #fff;
    position: relative; overflow: hidden; box-shadow: var(--shadow);
    min-height: 130px;
}
.fin-card .lbl { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; opacity: .82; font-weight: 700; }
.fin-card .val { font-size: 1.7rem; font-weight: 800; font-family: 'Sora', sans-serif; margin-top: .35rem; }
.fin-card .sub { font-size: .8rem; opacity: .8; margin-top: .25rem; }
.fin-card i.bg { position: absolute; right: -.5rem; bottom: -1rem; font-size: 5.5rem; opacity: .14; }
.fin-revenue { background: linear-gradient(140deg, #1769a8, #061a30); }
.fin-expense { background: linear-gradient(140deg, #b3203a, #6d1224); }
.fin-net { background: linear-gradient(140deg, #0c7a59, #064734); }
.fin-out { background: linear-gradient(140deg, #c98a12, #7a5208); }

/* ============================================================
   TABLE
   ============================================================ */
.table-toolbar { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; }
.table-toolbar .search-wrap { position: relative; flex: 1; min-width: 200px; }
.table-toolbar .search-wrap i { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--ink-faint); }
.table-toolbar input, .table-toolbar select {
    border: 1px solid var(--line); border-radius: 11px; padding: .55rem .85rem; font-size: .86rem; background: #f8fafc;
}
.table-toolbar .search-wrap input { width: 100%; padding-left: 2.3rem; }

.naf-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.naf-table thead th {
    font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft);
    font-weight: 700; padding: .8rem 1rem; border-bottom: 1px solid var(--line);
    cursor: pointer; user-select: none; white-space: nowrap;
}
.naf-table thead th.sortable:hover { color: var(--naf-blue); }
.naf-table thead th .arrow { opacity: .35; font-size: .7rem; }
.naf-table tbody td { padding: .85rem 1rem; border-bottom: 1px solid var(--line); font-size: .88rem; vertical-align: middle; }
.naf-table tbody tr { transition: background .15s; }
.naf-table tbody tr:hover { background: #f7f9fc; }
.naf-table tbody tr:last-child td { border-bottom: 0; }

.school-cell { display: flex; align-items: center; gap: .7rem; }
.school-cell .sc-badge {
    width: 38px; height: 38px; border-radius: 10px; background: var(--grad-air); color: #fff;
    display: grid; place-items: center; font-weight: 800; font-size: .78rem; flex: 0 0 auto; font-family: 'Sora', sans-serif;
}
.school-cell .sc-meta strong { display: block; font-size: .88rem; line-height: 1.15; }
.school-cell .sc-meta span { font-size: .73rem; color: var(--ink-faint); }

.badge-soft { padding: .28rem .6rem; border-radius: 50px; font-size: .72rem; font-weight: 700; display: inline-flex; align-items: center; gap: .3rem; }
.b-optimal { color: #0c7a59; background: rgba(22,163,123,.12); }
.b-stable { color: #2563c9; background: rgba(47,127,214,.12); }
.b-watch { color: #b8860b; background: rgba(232,163,23,.14); }
.b-critical { color: #b3203a; background: rgba(224,69,94,.12); }

.perf-bar { display: flex; align-items: center; gap: .55rem; min-width: 120px; }
.perf-bar .track { flex: 1; height: 7px; background: #eef1f6; border-radius: 50px; overflow: hidden; }
.perf-bar .track > span { display: block; height: 100%; border-radius: 50px; }
.perf-bar strong { font-size: .82rem; width: 34px; text-align: right; }

.pager { display: flex; align-items: center; justify-content: space-between; padding-top: 1rem; flex-wrap: wrap; gap: .6rem; }
.pager .info { font-size: .8rem; color: var(--ink-faint); }
.pager .pages { display: flex; gap: .3rem; }
.pager .pg {
    min-width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line);
    background: #fff; display: grid; place-items: center; font-size: .82rem; font-weight: 600;
    color: var(--ink-soft); cursor: pointer;
}
.pager .pg:hover:not(:disabled) { border-color: var(--naf-air-light); color: var(--naf-blue); }
.pager .pg.active { background: var(--naf-blue); color: #fff; border-color: var(--naf-blue); }
.pager .pg:disabled { opacity: .45; cursor: not-allowed; }

/* ============================================================
   INSIGHTS
   ============================================================ */
.insight {
    display: flex; gap: .9rem; padding: 1rem 1.1rem; border-radius: var(--radius-sm);
    border: 1px solid var(--line); background: #fff; align-items: flex-start;
    position: relative; overflow: hidden; transition: .18s; margin-bottom: .8rem;
}
.insight:hover { box-shadow: var(--shadow-sm); transform: translateX(2px); }
.insight::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.insight--positive::before { background: var(--naf-success); }
.insight--info::before { background: var(--naf-info); }
.insight--warning::before { background: var(--naf-warning); }
.insight--critical::before { background: var(--naf-danger); }
.insight .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.2rem; flex: 0 0 auto; }
.insight--positive .ic { background: rgba(22,163,123,.12); color: #0c7a59; }
.insight--info .ic { background: rgba(47,127,214,.12); color: #2563c9; }
.insight--warning .ic { background: rgba(232,163,23,.14); color: #b8860b; }
.insight--critical .ic { background: rgba(224,69,94,.12); color: #b3203a; }
.insight .body strong { display: block; font-size: .92rem; margin-bottom: .15rem; }
.insight .body p { margin: 0; font-size: .83rem; color: var(--ink-soft); line-height: 1.45; }
.insight .metric { margin-left: auto; font-family: 'Sora', sans-serif; font-weight: 800; font-size: 1.05rem; white-space: nowrap; padding-left: .6rem; }

.reco {
    display: flex; gap: .9rem; padding: 1.05rem; border-radius: var(--radius-sm);
    background: linear-gradient(180deg, #fbfcfe, #f4f7fb); border: 1px solid var(--line);
    height: 100%;
}
.reco .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--grad-air); color: #fff; display: grid; place-items: center; font-size: 1.25rem; flex: 0 0 auto; }
.reco strong { display: block; font-size: .92rem; }
.reco p { margin: .25rem 0 .5rem; font-size: .82rem; color: var(--ink-soft); }
.reco .impact { font-size: .76rem; font-weight: 700; color: #0c7a59; display: inline-flex; gap: .35rem; align-items: center; }

/* section heading */
.section-head { display: flex; align-items: center; justify-content: space-between; margin: .3rem 0 1rem; }
.section-head h3 { font-size: 1.12rem; font-weight: 800; margin: 0; }
.section-head .eyebrow { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--naf-air); font-weight: 700; }

.chart-box { position: relative; height: 300px; }
.chart-box.sm { height: 240px; }

.stat-mini { display: flex; align-items: center; gap: .8rem; padding: .7rem 0; }
.stat-mini .d { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 auto; }
.stat-mini .t { font-size: .84rem; }
.stat-mini .v { margin-left: auto; font-weight: 700; font-size: .9rem; }

/* ============================================================
   NOMINAL ROLL — CATEGORY CARDS
   ============================================================ */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }
.cat-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.25rem 1.3rem; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease; animation: rise .5s both;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.cat-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--cat, var(--naf-air)); }
.cat-top { display: flex; align-items: center; justify-content: space-between; }
.cat-icon {
    width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
    font-size: 1.3rem; color: #fff; background: var(--cat, var(--naf-air)); box-shadow: var(--shadow-sm);
}
.cat-pct { font-family: 'Sora', sans-serif; font-weight: 800; font-size: 1.05rem; color: var(--cat); }
.cat-name { font-size: .78rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; margin-top: 1rem; }
.cat-count { font-size: 1.85rem; font-weight: 800; font-family: 'Sora', sans-serif; line-height: 1.1; margin-top: .1rem; }
.cat-desc { font-size: .76rem; color: var(--ink-faint); margin-top: .65rem; line-height: 1.4; }

/* category chips (selected school summary) */
.chip-row { display: flex; flex-wrap: wrap; gap: .7rem; }
.cat-chip {
    display: flex; align-items: center; gap: .5rem; padding: .55rem .9rem; border-radius: 12px;
    background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--cat, var(--naf-air));
}
.cat-chip i { color: var(--cat); font-size: 1.05rem; }
.cat-chip .cc-name { font-size: .82rem; font-weight: 600; }
.cat-chip .cc-val { font-family: 'Sora', sans-serif; font-weight: 800; font-size: .95rem; }
.cat-chip .cc-pct { font-size: .74rem; color: var(--ink-faint); font-weight: 700; }

/* ============================================================
   NOMINAL ROLL — RANKINGS
   ============================================================ */
.rank-pill {
    display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 .5rem;
    border-radius: 8px; background: #eef3fb; color: var(--naf-blue); font-weight: 800;
    font-size: .8rem; font-family: 'Sora', sans-serif;
}
.rank-pill.top { background: var(--grad-gold); color: #07142e; box-shadow: 0 4px 12px rgba(212,175,55,.35); }

.rank-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }
.rank-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.2rem 1.25rem; box-shadow: var(--shadow-sm); animation: rise .5s both;
    transition: transform .2s ease, box-shadow .2s ease;
}
.rank-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.rank-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: .7rem; }
.rank-school { font-size: .9rem; font-weight: 700; line-height: 1.25; min-height: 2.3em; }
.rank-figure { display: flex; align-items: baseline; gap: .5rem; margin: .5rem 0 .2rem; }
.rank-num { font-size: 1.6rem; font-weight: 800; font-family: 'Sora', sans-serif; }
.rank-of { font-size: .74rem; color: var(--ink-faint); }

.svc-no { font-family: 'Sora', monospace; font-size: .78rem; font-weight: 700; color: var(--naf-blue); letter-spacing: .01em; }

/* anchor pagination + sortable header links */
.pager .pg.disabled { opacity: .45; pointer-events: none; }
a.pg { text-decoration: none; }
.th-sort { color: inherit; display: inline-flex; align-items: center; gap: .25rem; }
.th-sort:hover { color: var(--naf-blue); }

/* ============================================================
   NOMINAL ROLL — FILTER BAR / ADMIN
   ============================================================ */
.filter-grid { display: flex; gap: .9rem; align-items: flex-end; flex-wrap: wrap; }
.filter-field { display: flex; flex-direction: column; gap: .35rem; min-width: 180px; }
.filter-field.filter-grow { flex: 1; min-width: 220px; }
.filter-field label { font-size: .74rem; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .06em; }
.filter-field select, .filter-field input[type=text] {
    border: 1px solid var(--line); border-radius: 11px; padding: .6rem .85rem; font-size: .88rem; background: #f8fafc; width: 100%;
}
.filter-field .search-wrap { position: relative; }
.filter-field .search-wrap i { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--ink-faint); }
.filter-field .search-wrap input { padding-left: 2.3rem; }
.filter-actions { flex-direction: row; gap: .5rem; }
.btn-filter {
    border: 0; border-radius: 11px; padding: .62rem 1.1rem; font-weight: 700; font-size: .86rem; cursor: pointer;
    background: var(--grad-air); color: #fff; display: inline-flex; align-items: center; gap: .45rem;
    box-shadow: var(--shadow-sm); transition: .18s;
}
.btn-filter:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-filter.ghost { background: #fff; color: var(--ink-soft); border: 1px solid var(--line); box-shadow: none; }
.btn-filter.ghost:hover { color: var(--naf-blue); border-color: var(--naf-air-light); }

.btn-icon-sm {
    width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: #fff;
    color: var(--ink-soft); cursor: pointer; transition: .15s;
}
.btn-icon-sm:hover { color: var(--naf-blue); border-color: var(--naf-air-light); }
.btn-icon-sm.danger:hover { color: var(--naf-danger); border-color: #f3b5bf; }
.color-input { width: 46px; height: 42px; padding: 2px; border: 1px solid var(--line); border-radius: 11px; background: #fff; cursor: pointer; }

@media (max-width: 1200px) {
    .cat-grid, .rank-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .cat-grid, .rank-grid { grid-template-columns: 1fr; }
    .filter-field { min-width: 100%; }
}

/* ============================================================
   LOGIN
   ============================================================ */
.auth-body {
    margin: 0; min-height: 100vh; overflow-x: hidden;
    background: #eaf4fc;
    color: var(--ink);
    font-family: 'Plus Jakarta Sans', sans-serif;
}
.auth-stage {
    min-height: 100vh; position: relative; z-index: 2;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 1.3rem; padding: 2rem 1.2rem;
}

/* centered emblem */
.auth-emblem {
    position: relative; width: 96px; height: 96px; margin: 0 auto 1.3rem;
    display: grid; place-items: center; animation: rise .6s both;
}
.auth-emblem .roundel {
    width: 78px; height: 78px; border-radius: 50%;
    box-shadow: 0 12px 30px rgba(11,70,113,.28), 0 0 0 4px #fff, 0 0 0 5px rgba(46,155,214,.25);
}
.auth-emblem .emblem-ring {
    position: absolute; inset: 0; border-radius: 50%;
    border: 2px dashed rgba(46,155,214,.45);
    animation: spin 14s linear infinite;
}
.auth-card-head { text-align: center; margin-bottom: 1.6rem; }
.auth-card-head h1 {
    font-family: 'Sora', sans-serif; font-size: 1.5rem; font-weight: 800; margin: 0;
    color: #0c3a5e; letter-spacing: -.01em;
}
.auth-card-head .org {
    margin: .15rem 0 .9rem; font-size: .82rem; font-weight: 600; letter-spacing: .14em;
    text-transform: uppercase; color: var(--naf-blue);
}
.secure-pill {
    display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .85rem; border-radius: 50px;
    background: rgba(46,155,214,.1); border: 1px solid rgba(46,155,214,.28);
    color: var(--naf-blue); font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.auth-classified {
    margin: 0; font-size: .74rem; color: #5f7891; text-align: center;
    display: inline-flex; align-items: center; gap: .45rem; animation: rise .6s .3s both;
}
.auth-classified i { color: var(--naf-blue); }
.auth-bg {
    position: fixed; inset: 0; z-index: 0;
    background:
        radial-gradient(900px 620px at 16% 18%, rgba(46,155,214,.30), transparent 60%),
        radial-gradient(760px 680px at 92% 88%, rgba(46,155,214,.22), transparent 60%),
        radial-gradient(620px 520px at 70% 10%, rgba(212,175,55,.10), transparent 60%),
        linear-gradient(155deg, #f3f9fe 0%, #dceffb 45%, #c3e3f7 100%);
}
.auth-bg::before, .auth-bg::after {
    content: ""; position: absolute; border-radius: 50%; filter: blur(2px);
}
.grid-lines {
    position: fixed; inset: 0; z-index: 0; opacity: .7;
    background-image:
        linear-gradient(rgba(21,101,155,.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(21,101,155,.06) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(circle at 30% 40%, #000 10%, transparent 78%);
}
.orb { position: fixed; border-radius: 50%; z-index: 0; filter: blur(46px); opacity: .45; animation: float 14s ease-in-out infinite; }
.orb.o1 { width: 320px; height: 320px; left: -60px; top: 8%; background: radial-gradient(circle, #6cc3f0, transparent 70%); }
.orb.o2 { width: 260px; height: 260px; right: 12%; top: 55%; background: radial-gradient(circle, #f0c75e, transparent 70%); opacity: .35; animation-delay: -5s; }
.orb.o3 { width: 200px; height: 200px; left: 40%; bottom: -40px; background: radial-gradient(circle, #93d6f7, transparent 70%); animation-delay: -9s; }

/* sweeping radar */
.radar { position: fixed; right: -180px; bottom: -180px; width: 620px; height: 620px; z-index: 0; opacity: .35; }
.radar .ring { position: absolute; inset: 0; border: 1px solid rgba(21,101,155,.18); border-radius: 50%; }
.radar .ring.r2 { inset: 80px; } .radar .ring.r3 { inset: 160px; } .radar .ring.r4 { inset: 240px; }
.radar .sweep {
    position: absolute; inset: 0; border-radius: 50%;
    background: conic-gradient(from 0deg, rgba(46,155,214,.22), transparent 35%);
    animation: spin 6s linear infinite;
}

/* LEFT — hero */
.auth-hero {
    position: relative; z-index: 2; padding: 3.4rem 4rem;
    display: flex; flex-direction: column; justify-content: space-between;
}
.auth-brand { display: flex; align-items: center; gap: 1rem; }
.auth-brand .badge-x {
    width: 60px; height: 60px; border-radius: 17px; background: var(--grad-air);
    display: grid; place-items: center; color: #fff; font-size: 1.9rem;
    box-shadow: 0 14px 30px rgba(46,155,214,.4);
}
.auth-brand h1 { font-size: 1.15rem; margin: 0; font-family: 'Sora', sans-serif; color: #0c3a5e; }
.auth-brand p { margin: 0; font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; color: var(--naf-blue); font-weight: 600; }

.auth-hero-mid { max-width: 560px; }
.auth-tag {
    display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .9rem; border-radius: 50px;
    background: rgba(46,155,214,.12); border: 1px solid rgba(46,155,214,.28);
    font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--naf-blue); font-weight: 700;
    margin-bottom: 1.5rem;
}
.auth-hero-mid h2 {
    font-family: 'Sora', sans-serif; font-size: 3rem; line-height: 1.08; font-weight: 800; margin: 0 0 1.1rem;
    background: linear-gradient(120deg, #0a3a60 25%, #2e9bd6); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    animation: rise .7s both;
}
.auth-hero-mid p.lead-x { font-size: 1.05rem; color: #45617a; line-height: 1.6; margin: 0 0 2rem; animation: rise .7s .1s both; }

.auth-features { display: flex; gap: 1.8rem; flex-wrap: wrap; }
.auth-feature { display: flex; gap: .75rem; align-items: center; animation: rise .7s .2s both; }
.auth-feature .fi { width: 44px; height: 44px; border-radius: 12px; background: #fff; border: 1px solid rgba(46,155,214,.2); display: grid; place-items: center; color: var(--naf-air); font-size: 1.3rem; box-shadow: var(--shadow-sm); }
.auth-feature strong { display: block; font-size: .95rem; color: #143a5a; }
.auth-feature span { font-size: .78rem; color: #5f7891; }

.auth-stats { display: flex; gap: 3rem; margin-top: .5rem; }
.auth-stats .s strong { font-family: 'Sora', sans-serif; font-size: 1.7rem; background: linear-gradient(120deg,#0a3a60,#2e9bd6); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.auth-stats .s span { display: block; font-size: .76rem; color: #5f7891; text-transform: uppercase; letter-spacing: .08em; }

/* RIGHT — form */
.auth-panel {
    position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; padding: 2rem;
}
.auth-card {
    width: 100%; max-width: 410px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 26px;
    padding: 2.4rem 2.2rem;
    box-shadow: 0 30px 70px rgba(11,70,113,.18);
    animation: rise .7s .15s both;
}
.auth-card .lock { width: 56px; height: 56px; border-radius: 16px; background: var(--grad-air); display: grid; place-items: center; font-size: 1.6rem; color: #fff; box-shadow: 0 14px 30px rgba(46,155,214,.4); margin-bottom: 1.1rem; }
.auth-card h3 { font-family: 'Sora', sans-serif; font-size: 1.5rem; margin: 0 0 .3rem; color: var(--ink); }
.auth-card .sub { color: var(--ink-soft); font-size: .88rem; margin-bottom: 1.6rem; }

.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: .78rem; font-weight: 700; color: #34465c; margin-bottom: .45rem; letter-spacing: .03em; }
.field .input-wrap { position: relative; }
.field .input-wrap > i { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--naf-air); font-size: 1.05rem; }
.field input[type=text], .field input[type=password] {
    width: 100%; background: #f5f9fd; border: 1px solid #dbe6f1;
    border-radius: 13px; padding: .85rem 1rem .85rem 2.8rem; color: var(--ink); font-size: .95rem; transition: .18s;
}
.field input::placeholder { color: #9fb0c4; }
.field input:focus { outline: none; border-color: var(--naf-air); background: #fff; box-shadow: 0 0 0 4px rgba(46,155,214,.16); }
.toggle-eye { position: absolute; right: .9rem; top: 50%; transform: translateY(-50%); color: #9fb0c4; cursor: pointer; background: none; border: 0; }

.auth-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.3rem; }
.check-x { display: flex; align-items: center; gap: .5rem; font-size: .84rem; color: var(--ink-soft); cursor: pointer; }
.check-x input { width: 16px; height: 16px; accent-color: var(--naf-air); }
.auth-row a { font-size: .84rem; color: var(--naf-blue); font-weight: 600; }

.btn-command {
    width: 100%; border: 0; border-radius: 13px; padding: .95rem; cursor: pointer;
    background: var(--grad-air); color: #fff; font-weight: 800; font-size: .98rem; letter-spacing: .02em;
    display: flex; align-items: center; justify-content: center; gap: .6rem;
    box-shadow: 0 14px 30px rgba(23,105,168,.4); transition: .2s; font-family: 'Sora', sans-serif;
}
.btn-command:hover { transform: translateY(-2px); box-shadow: 0 20px 40px rgba(23,105,168,.5); }
.btn-command:active { transform: translateY(0); }

.auth-alert {
    display: flex; gap: .6rem; align-items: flex-start; padding: .8rem 1rem; border-radius: 12px;
    background: rgba(224,69,94,.1); border: 1px solid rgba(224,69,94,.35); color: #b3203a;
    font-size: .84rem; margin-bottom: 1.2rem; animation: shake .4s; font-weight: 600;
}
.auth-alert i { font-size: 1.1rem; margin-top: 1px; }
.field .field-error { color: #c2334b; font-size: .76rem; margin-top: .35rem; display: block; font-weight: 600; }

.auth-hint {
    margin-top: 1.5rem; padding: .85rem 1rem; border-radius: 12px;
    background: rgba(46,155,214,.07); border: 1px dashed rgba(46,155,214,.3);
    font-size: .78rem; color: #3a5d7a; text-align: center;
}
.auth-hint code { color: #946f00; background: rgba(212,175,55,.16); padding: .1rem .4rem; border-radius: 6px; font-weight: 700; }

.auth-foot { margin-top: 1.6rem; text-align: center; font-size: .76rem; color: var(--ink-faint); }
.auth-foot .secure { color: var(--naf-success); font-weight: 700; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-26px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shake { 0%,100%{transform:translateX(0)} 20%,60%{transform:translateX(-6px)} 40%,80%{transform:translateX(6px)} }
.stagger > * { animation: rise .5s both; }
.stagger > *:nth-child(2){animation-delay:.05s}.stagger > *:nth-child(3){animation-delay:.1s}
.stagger > *:nth-child(4){animation-delay:.15s}.stagger > *:nth-child(5){animation-delay:.2s}
.stagger > *:nth-child(6){animation-delay:.25s}.stagger > *:nth-child(7){animation-delay:.3s}
.stagger > *:nth-child(8){animation-delay:.35s}

/* ============================================================
   UTILITIES & RESPONSIVE
   ============================================================ */
.divider { height: 1px; background: var(--line); margin: 1.2rem 0; }
.chip { font-size: .72rem; font-weight: 700; padding: .25rem .6rem; border-radius: 50px; background: #eef3fb; color: var(--naf-blue); }
.text-soft { color: var(--ink-soft); }
.text-faint { color: var(--ink-faint); }

.sidebar-toggle { display: none; }
.scrim { display: none; }

@media (max-width: 1200px) {
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .auth-stage { grid-template-columns: 1fr; }
    .auth-hero { padding: 2.4rem; }
    .auth-hero-mid h2 { font-size: 2.3rem; }
}
@media (max-width: 992px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .app-main { margin-left: 0; }
    .sidebar-toggle { display: grid; }
    .scrim.show { display: block; position: fixed; inset: 0; background: rgba(7,20,46,.5); z-index: 1035; }
    .auth-hero { display: none; }
}
@media (max-width: 640px) {
    .kpi-grid { grid-template-columns: 1fr; }
    .content { padding: 1.1rem; }
    .topbar { padding: .75rem 1rem; }
    .auth-hero-mid h2 { font-size: 1.9rem; }
}
