/* ============================================================================
   HRDashboardRedesign.css
   Scope: HR Management > Default > Dashboard_Index and all its lazy-loaded
          dashboard partials (Employee Strength, Pay Slip, Birthday, Employee
          Status, Salary Statement, Probation, 25-Years-Completion, Attendance,
          Leave Applications, Retirement).
   Prefix / scope class: .hrdb-scope  (added once, to the outer container of
          Dashboard_Index.cshtml and to the root element of every partial that
          can also be loaded standalone into a modal, so this file never
          affects any other AdminLTE-skinned page).
   Everything below is a pure re-skin of EXISTING markup/classes (.box,
   .box-header, table.table, .nav-tabs-custom, .products-list, plus the
   Chart.js htmlLegend classes .scroll/.listContainer/.li/.boxSpan/
   .textContainer already emitted by Dashboard_Index.cshtml's chart JS) — no
   id, form action, or JS hook is renamed here.
   ========================================================================= */

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

.hrdb-scope {
    --hrdb-bg: #F3F5FB;
    --hrdb-surface: #FFFFFF;
    --hrdb-surface-2: #FAFBFF;
    --hrdb-line: #E7E9F4;
    --hrdb-ink: #262A41;
    --hrdb-ink-soft: #6B7094;
    --hrdb-ink-faint: #A6ABC7;
    --hrdb-primary: #5B5FEF;
    --hrdb-primary-dark: #4347C4;
    --hrdb-primary-tint: #EDEEFD;
    --hrdb-teal: #14B8A6;
    --hrdb-teal-tint: #E3F8F5;
    --hrdb-coral: #FF8A65;
    --hrdb-coral-tint: #FFEDE5;
    --hrdb-amber: #F5B942;
    --hrdb-amber-tint: #FDF3DE;
    --hrdb-violet: #8A3FFC;
    --hrdb-violet-tint: #F2E9FF;
    --hrdb-success: #2FBE8F;
    --hrdb-danger: #F0576B;
    --hrdb-radius-lg: 20px;
    --hrdb-radius-md: 14px;
    --hrdb-radius-sm: 9px;
    --hrdb-shadow-soft: 0 1px 2px rgba(38,42,65,0.04), 0 8px 24px -10px rgba(38,42,65,0.12);
    --hrdb-font-display: 'Space Grotesk', sans-serif;
    --hrdb-font-body: 'Inter', sans-serif;
    --hrdb-font-mono: 'IBM Plex Mono', monospace;
    font-family: var(--hrdb-font-body);
    color: var(--hrdb-ink);
}

    /* ---------- Panels (.box) ---------- */
    .hrdb-scope .box {
        background: var(--hrdb-surface);
        border-radius: var(--hrdb-radius-lg) !important;
        box-shadow: var(--hrdb-shadow-soft);
        border: 1px solid var(--hrdb-line);
        overflow: hidden;
    }

    .hrdb-scope .box-header {
        background: transparent;
        border-bottom: 1px solid var(--hrdb-line);
        padding: 14px 18px;
    }

        .hrdb-scope .box-header .box-title,
        .hrdb-scope .box-title {
            font-family: var(--hrdb-font-display);
            font-weight: 600;
            font-size: 14.5px;
            color: var(--hrdb-ink);
        }

    .hrdb-scope .box-body {
        padding: 14px 18px;
    }

    /* ---------- Card panel (replacement for AdminLTE .box/.box-header/.box-body,
   used where the view no longer relies on those global classes) ---------- */
    .hrdb-scope .hrdb-panel {
        background: var(--hrdb-surface);
        border-radius: 5px !important;
        box-shadow: 0 0 1px rgba(0, 0, 0, .125), 0 1px 3px rgba(0, 0, 0, .2);
        border: 1px solid var(--hrdb-line);
        overflow: hidden;
        display: flex;
        flex-direction: column;
        height: 110mm !important;
    }

    .hrdb-scope .hrdb-panel-body {
        padding: 14px 18px;
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
    }
        /* Thin custom scrollbar — same as Employee Strength legend/hbar lists */
        .hrdb-scope .hrdb-panel-body::-webkit-scrollbar,
        .hrdb-scope .table-responsive::-webkit-scrollbar,
        .hrdb-scope .tab-pane::-webkit-scrollbar,
        .hrdb-scope #staffBirthdayDiv::-webkit-scrollbar,
        .hrdb-scope .hrdb-drawer-body::-webkit-scrollbar {
            width: 5px;
            height: 5px;
        }

        .hrdb-scope .hrdb-panel-body::-webkit-scrollbar-thumb,
        .hrdb-scope .table-responsive::-webkit-scrollbar-thumb,
        .hrdb-scope .tab-pane::-webkit-scrollbar-thumb,
        .hrdb-scope #staffBirthdayDiv::-webkit-scrollbar-thumb,
        .hrdb-scope .hrdb-drawer-body::-webkit-scrollbar-thumb {
            background: var(--hrdb-line);
            border-radius: 99px !important;
        }

        .hrdb-scope .hrdb-panel-body::-webkit-scrollbar-track,
        .hrdb-scope .table-responsive::-webkit-scrollbar-track,
        .hrdb-scope .tab-pane::-webkit-scrollbar-track,
        .hrdb-scope #staffBirthdayDiv::-webkit-scrollbar-track,
        .hrdb-scope .hrdb-drawer-body::-webkit-scrollbar-track {
            background: transparent;
        }

    /* ---------- Panel header — reused (class names + layout) from
   MCampusUI/Areas/Enquiry/Views/Default/EnquiryAnalyticsDashboard_New.cshtml's
   .enqad-panel-head/.enqad-panel-title/.enqad-panel-hd-right/.enqad-viewtoggle/
   .enqad-vt-btn/.enqad-box-btn system, recolored with this stylesheet's
   --hrdb-* tokens instead of introducing a second (--enqad-*) palette onto
   this page. Unlike the reference's own container-query-based stacking, the
   title here truncates instead of wrapping onto its own line — this keeps the
   tool icons pinned to the header's right edge on every width without
   depending on @container query support (which isn't guaranteed in every
   client browser this app runs in), rather than the icons ever collapsing to
   the left edge on a narrow render. ---------- */
    .hrdb-scope .enqad-panel-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        border-bottom: 1px solid var(--hrdb-line);
        padding: 14px 18px;
        flex-wrap: nowrap;
        position: relative;
        overflow: visible;
        z-index: 2;
    }
        /* Html.BeginForm() renders a <form> that becomes .enqad-panel-head's ONLY
   direct child (wrapping .enqad-panel-title/.enqad-panel-hd-right inside it) —
   without this, the flex rules above never reach the title/tools because
   they're grandchildren, not direct children, and the plain block-level <form>
   just stacks them vertically regardless. Making the form itself the flex
   container is what actually keeps title-left/tools-right on one row. */
        .hrdb-scope .enqad-panel-head > form {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            width: 100%;
            min-width: 0;
        }

    .hrdb-scope .enqad-panel-title {
        font-family: var(--hrdb-font-display);
        font-size: 14.5px;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 8px;
        color: var(--hrdb-ink);
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
    }

        .hrdb-scope .enqad-panel-title span {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .hrdb-scope .enqad-panel-title i {
            color: var(--hrdb-primary-dark);
            font-size: 13px;
            flex-shrink: 0;
        }

    .hrdb-scope .hrdb-panel-subtitle {
        font-family: var(--hrdb-font-body);
        font-size: 10.5px;
        font-weight: 500;
        color: var(--hrdb-ink-faint);
        margin-top: 1px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
    }

    .hrdb-scope .enqad-panel-hd-right {
        display: flex;
        align-items: center;
        gap: 6px;
        flex: none;
        flex-wrap: nowrap;
    }

    .hrdb-scope .enqad-viewtoggle {
        display: inline-flex;
        align-items: center;
        border: none;
        border-radius: 0 !important;
        overflow: visible;
        background: transparent;
        height: auto;
        gap: 4px;
    }

    .hrdb-scope .enqad-vt-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        border: 1px solid var(--hrdb-primary);
        border-radius: 6px !important;
        background: var(--hrdb-surface);
        color: var(--hrdb-primary);
        padding: 0;
        cursor: pointer;
        font-size: 12px;
        transition: .15s;
    }

        .hrdb-scope .enqad-vt-btn:hover {
            background: var(--hrdb-primary);
            color: #fff;
            border-color: var(--hrdb-primary);
        }

        .hrdb-scope .enqad-vt-btn.is-active {
            background: var(--hrdb-primary);
            color: #fff;
            border-color: var(--hrdb-primary);
        }

    .hrdb-scope .enqad-box-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        border: 1px solid var(--hrdb-primary);
        background: var(--hrdb-surface);
        color: var(--hrdb-primary);
        border-radius: 7px !important;
        cursor: pointer;
        font-size: 11px;
        padding: 0;
        transition: .15s;
    }

        .hrdb-scope .enqad-box-btn:hover {
            background: var(--hrdb-primary);
            color: #fff;
            border-color: var(--hrdb-primary);
        }
    /* Dropdown inside the header must float above panel content */
    .hrdb-scope .enqad-panel-hd-right .dropdown-menu {
        z-index: 1055 !important;
        margin-top: 3px;
    }
    /* Normalize the month-filter select to match button height */
    .hrdb-scope .enqad-panel-hd-right select.form-control {
        height: 28px !important;
        padding: 0 6px !important;
        line-height: 28px;
        font-size: 11px;
        border-radius: 7px !important;
        width: auto !important;
        display: inline-block !important;
    }
    /* Select2 v4 container inside panel header — fallback if MCampusSelectBox can't be removed */
    .hrdb-scope .enqad-panel-hd-right .select2-container {
        width: auto !important;
        min-width: 110px;
        display: inline-block !important;
        vertical-align: middle;
    }

        .hrdb-scope .enqad-panel-hd-right .select2-container .select2-selection--single {
            height: 28px !important;
            line-height: 26px !important;
            border-radius: 7px !important;
            border: 1px solid var(--hrdb-line) !important;
            background: var(--hrdb-surface-2) !important;
            font-size: 11px !important;
        }

            .hrdb-scope .enqad-panel-hd-right .select2-container .select2-selection--single .select2-selection__rendered {
                line-height: 26px !important;
                padding-left: 8px !important;
                padding-right: 24px !important;
                color: var(--hrdb-ink) !important;
                font-size: 11px !important;
            }

            .hrdb-scope .enqad-panel-hd-right .select2-container .select2-selection--single .select2-selection__arrow {
                height: 26px !important;
                top: 0 !important;
                right: 4px !important;
            }

    .hrdb-scope .enqad-box-btn:hover {
        background: var(--hrdb-primary);
        border-color: var(--hrdb-primary);
        color: #fff;
    }
    /* Bootstrap nav-tabs styled as pill tab-group — matches reference .tab-group.
   Used in panel-hd-right (Employee Status, Probation) and panel-body
   (Leave Applications). Bootstrap manages <li class="active"> on click. */
    .hrdb-scope .enqad-status-tabs {
        display: inline-flex;
        gap: 4px;
        border: 1px solid var(--hrdb-line);
        border-radius: 999px !important;
        background: var(--hrdb-surface-2);
        padding: 4px;
        margin: 0;
        list-style: none;
    }

        .hrdb-scope .enqad-status-tabs > li {
            float: none;
            margin: 0;
            border: none;
        }

            .hrdb-scope .enqad-status-tabs > li > a {
                display: flex;
                align-items: center;
                border: none !important;
                border-radius: 999px !important;
                background: transparent !important;
                color: var(--hrdb-ink-soft) !important;
                font-size: 11.5px;
                font-weight: 600;
                font-family: var(--hrdb-font-body);
                padding: 6px 12px !important;
                margin: 0 !important;
                transition: background .15s, color .15s;
                white-space: nowrap;
            }

                .hrdb-scope .enqad-status-tabs > li > a:hover {
                    background: rgba(91, 95, 239, 0.08) !important;
                    color: var(--hrdb-primary-dark) !important;
                }

            .hrdb-scope .enqad-status-tabs > li.active > a,
            .hrdb-scope .enqad-status-tabs > li.active > a:focus,
            .hrdb-scope .enqad-status-tabs > li.active > a:hover {
                background: var(--hrdb-primary) !important;
                color: #fff !important;
            }
/* Small phones: title has already truncated to make room, but tighten the
   tool row's own spacing/sizing a little further too. */
@media (max-width: 380px) {
    .hrdb-scope .enqad-panel-head {
        padding: 12px 14px;
        gap: 6px;
    }

    .hrdb-scope .enqad-panel-hd-right {
        gap: 4px;
    }

    .hrdb-scope .enqad-box-btn {
        width: 24px;
        height: 24px;
    }

    .hrdb-scope .enqad-vt-btn {
        width: 24px;
        height: 24px;
    }
}

/* ============================================================
   Staff Birthday Widget
   ============================================================ */
@keyframes bdayGlowBg {
    0%,100% {
        box-shadow: 0 0 0 0 rgba(255,138,101,0);
    }

    50% {
        box-shadow: 0 4px 18px -4px rgba(255,138,101,.35);
    }
}

@keyframes bdayRing {
    0%,100% {
        box-shadow: 0 0 0 0 rgba(255,138,101,.45);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(255,138,101,0);
    }
}

@keyframes bdayPulse {
    0%,100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.06);
    }
}

@keyframes confettiFloat {
    0% {
        opacity: 0;
        transform: translateY(6px) rotate(0deg);
    }

    15% {
        opacity: 1;
    }

    80% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translateY(-22px) rotate(200deg);
    }
}

.hrdb-scope .bday-list {
    list-style: none;
    padding: 6px 8px 10px;
    margin: 0;
}

.hrdb-scope .bday-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 10px;
    border-radius: 12px !important;
    position: relative;
    transition: background .15s ease;
}

    .hrdb-scope .bday-item:hover {
        background: var(--hrdb-surface-2);
    }

    .hrdb-scope .bday-item.is-today {
        background: linear-gradient(90deg, var(--hrdb-coral-tint), var(--hrdb-amber-tint) 70%);
        border-radius: 14px !important;
        animation: bdayGlowBg 2.6s ease-in-out infinite;
    }

        .hrdb-scope .bday-item.is-today:hover {
            background: linear-gradient(90deg, var(--hrdb-coral-tint), var(--hrdb-amber-tint) 70%);
        }

.hrdb-scope .bday-avatar {
    width: 40px;
    height: 40px;
    border-radius: 11px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: var(--hrdb-font-display);
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
    letter-spacing: .4px;
}

.hrdb-scope .bday-item.is-today .bday-avatar {
    background: linear-gradient(135deg, var(--hrdb-coral), var(--hrdb-amber)) !important;
    animation: bdayRing 1.8s ease-in-out infinite;
}

.hrdb-scope .bday-info {
    flex: 1;
    min-width: 0;
}

    .hrdb-scope .bday-info .bday-name {
        font-size: 12.5px;
        font-weight: 600;
        display: block;
        color: var(--hrdb-ink);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

.hrdb-scope .bday-item.is-today .bday-name {
    color: #B5401F;
}

.hrdb-scope .bday-info .bday-school {
    font-size: 11.5px;
    color: var(--hrdb-ink-soft);
    margin-top: 1px;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hrdb-scope .bday-date {
    font-family: var(--hrdb-font-mono);
    font-size: 11px;
    font-weight: 600;
    background: var(--hrdb-primary-tint);
    color: var(--hrdb-primary-dark);
    padding: 5px 10px;
    border-radius: 8px !important;
    flex-shrink: 0;
    white-space: nowrap;
}

.hrdb-scope .bday-badge-today {
    font-size: 10.5px;
    font-weight: 700;
    background: linear-gradient(120deg, var(--hrdb-coral), var(--hrdb-amber));
    color: #fff;
    padding: 5px 10px;
    border-radius: 8px !important;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    animation: bdayPulse 1.6s ease-in-out infinite;
}

.hrdb-scope .confetti-bit {
    position: absolute;
    top: 6px;
    font-size: 11px;
    pointer-events: none;
    opacity: 0;
    animation: confettiFloat 3.2s ease-in infinite;
}

/* ---------- Title icon-chip (append class hrdb-ic + a color modifier to the
   existing <i class="fa ..."> that already precedes each panel's title) ---- */
.hrdb-scope .hrdb-ic {
    width: 30px;
    height: 30px;
    border-radius: 9px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    margin-right: 6px;
    vertical-align: middle;
}

.hrdb-scope .hrdb-ic-indigo {
    background: var(--hrdb-primary-tint);
    color: var(--hrdb-primary-dark);
}

.hrdb-scope .hrdb-ic-teal {
    background: var(--hrdb-teal-tint);
    color: #0D8A7C;
}

.hrdb-scope .hrdb-ic-coral {
    background: var(--hrdb-coral-tint);
    color: #D9502F;
}

.hrdb-scope .hrdb-ic-amber {
    background: var(--hrdb-amber-tint);
    color: #A8730B;
}

.hrdb-scope .hrdb-ic-violet {
    background: var(--hrdb-violet-tint);
    color: var(--hrdb-violet);
}

/* ---------- Outlined-primary tool buttons (filter, export, view-more, search) ---------- */
.hrdb-scope .btn-social-icon.btn-bitbucket,
.hrdb-scope .box-tools .btn-primary,
.hrdb-scope .btnAttendance,
.hrdb-scope #btnAttendanceChart {
    background: var(--hrdb-surface) !important;
    border: 1px solid var(--hrdb-primary) !important;
    color: var(--hrdb-primary) !important;
    border-radius: 9px !important;
    transition: all .15s ease;
}

    .hrdb-scope .btn-social-icon.btn-bitbucket:hover,
    .hrdb-scope .box-tools .btn-primary:hover,
    .hrdb-scope .btnAttendance:hover,
    .hrdb-scope #btnAttendanceChart:hover {
        background: var(--hrdb-primary) !important;
        border-color: var(--hrdb-primary) !important;
        color: #fff !important;
    }

/* ---------- Form controls ---------- */
.hrdb-scope select.form-control,
.hrdb-scope input.form-control,
.hrdb-scope .form-control {
    font-family: var(--hrdb-font-body);
    font-size: 12px;
    font-weight: 500;
    color: var(--hrdb-ink);
    background: var(--hrdb-surface-2);
    border: 1px solid var(--hrdb-line);
    border-radius: 9px !important;
    box-shadow: none;
}

    .hrdb-scope .form-control:focus {
        border-color: var(--hrdb-primary);
        box-shadow: none;
    }

/* ---------- Attendance filter row ---------- */
.hrdb-scope .hrdb-filter-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: flex-end;
}

    .hrdb-scope .hrdb-filter-row > div {
        flex: 1 1 140px;
        min-width: 120px;
    }

/* ---------- Tables ---------- */
.hrdb-scope table.table {
    font-size: 12.5px;
    border-collapse: collapse;
}

    .hrdb-scope table.table > thead > tr > th,
    .hrdb-scope table.table thead th {
        text-align: left;
        background: var(--hrdb-surface-2);
        color: var(--hrdb-ink-soft);
        font-weight: 700;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        padding: 10px 14px;
        border-bottom: 1px solid var(--hrdb-line);
        border-top: none !important;
        white-space: nowrap;
    }
    /* header rows that aren't inside a real <thead> (several partials use plain <tr><th>) */
    .hrdb-scope table.table > tr:first-child > th,
    .hrdb-scope table.table tbody > tr > th {
        background: var(--hrdb-surface-2);
        color: var(--hrdb-ink-soft);
        font-weight: 700;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        border-top: none !important;
    }

    .hrdb-scope table.table td,
    .hrdb-scope table.table th {
        padding: 11px 14px;
        border-bottom: 1px solid var(--hrdb-line);
        border-top: none !important;
        vertical-align: top;
    }

    .hrdb-scope table.table.table-striped > tbody > tr:nth-of-type(odd) {
        background: transparent;
    }

    .hrdb-scope table.table tbody tr:hover td {
        background: var(--hrdb-surface-2);
    }

    .hrdb-scope table.table tr.btn-primary td,
    .hrdb-scope table.table tr.btn-primary th {
        background: var(--hrdb-primary) !important;
        color: #fff;
    }


/* ---------- Birthday list (.products-list.product-list-in-box) ---------- */
.hrdb-scope .products-list {
    padding: 0;
    margin: 0;
    list-style: none;
}

    .hrdb-scope .products-list > .item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px;
        border-radius: 12px !important;
        transition: background .15s ease;
        list-style: none;
        border-bottom: none !important;
    }

        .hrdb-scope .products-list > .item:hover {
            background: var(--hrdb-surface-2);
        }

        .hrdb-scope .products-list > .item.btn-primary {
            background: var(--hrdb-primary) !important;
        }

    .hrdb-scope .products-list .product-img {
        flex-shrink: 0;
        width: auto;
    }

        .hrdb-scope .products-list .product-img img.thumbnail {
            width: 42px;
            height: 42px;
            border-radius: 11px !important;
            object-fit: cover;
            border: 2px solid var(--hrdb-line);
        }

    .hrdb-scope .products-list .product-info {
        flex: 1;
        min-width: 0;
    }

    .hrdb-scope .products-list .product-title {
        font-size: 12.5px;
        font-weight: 600;
        display: block;
    }

        .hrdb-scope .products-list .product-title .label {
            font-family: var(--hrdb-font-mono);
            font-size: 11px !important;
            font-weight: 600;
            background: var(--hrdb-primary-tint);
            color: var(--hrdb-primary-dark);
            padding: 5px 10px;
            border-radius: 8px !important;
        }

    .hrdb-scope .products-list > .item.btn-primary .product-title .label {
        background: rgba(255,255,255,0.25);
        color: #fff;
    }

    .hrdb-scope .products-list .product-description {
        font-size: 11.5px;
        color: var(--hrdb-ink-soft);
        margin-top: 1px;
    }

/* ---------- Donut-chart legend (classes already emitted by the existing
   Chart.js htmlLegend plugin in Dashboard_Index.cshtml and
   _Employee_Strength_Details_Report.cshtml — restyle only, do not rename) --- */
.hrdb-scope .scroll {
    background: var(--hrdb-surface);
}

    .hrdb-scope .scroll::-webkit-scrollbar {
        width: 5px;
    }

    .hrdb-scope .scroll::-webkit-scrollbar-thumb {
        background: var(--hrdb-line);
        border-radius: 99px !important;
    }

.hrdb-scope .listContainer {
    padding: 0 !important;
    margin: 0;
    list-style: none;
}

.hrdb-scope .li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 8px !important;
    transition: background .15s ease;
    list-style: none;
}

    .hrdb-scope .li:hover {
        background: var(--hrdb-surface-2);
    }

.hrdb-scope .boxSpan {
    width: 10px !important;
    height: 10px !important;
    min-width: 10px !important;
    border-radius: 50% !important;
    border: none !important;
    flex-shrink: 0;
    cursor: pointer;
}

.hrdb-scope .textContainer {
    font-family: var(--hrdb-font-body);
    font-size: 11.5px !important;
    font-weight: 600 !important;
    color: var(--hrdb-ink);
    margin: 0 !important;
    padding: 0 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.hrdb-scope .chart-container {
    position: relative;
}

/* ---------- Donut + progress-bar legend — mirrors the Enquiry Analytics
   dashboard's proven .enqad-donut-flex / .enqad-legend design (see
   MCampusUI/Areas/Enquiry/Views/Default/EnquiryAnalyticsDashboard_New.cshtml
   and its .enqad-* rules in this same stylesheet file) so the two systems read
   as one visual language. Center total is drawn directly on the canvas by a
   Chart.js plugin (see hrdbCenterText in the chart scripts), same as enqad's
   enqadCenterText — no separate absolutely-positioned overlay div needed, so
   it always stays centered through any responsive resize. ---------- */
.hrdb-scope .hrdb-donut-flex {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.hrdb-scope .hrdb-chart-wrap {
    position: relative;
    flex: 1 1 190px;
    min-width: 170px;
    max-width: 260px;
    height: 220px;
    z-index: 2; /* canvas above legend so tooltip overlaps it */
}

.hrdb-scope .hrdb-legend {
    position: relative;
    z-index: 1;
}

.hrdb-scope #jsAttendanceChartSection .hrdb-chart-wrap {
    max-width: 190px;
    height: 180px;
}

.hrdb-scope .hrdb-legend {
    flex: 1 1 220px;
    min-width: 200px;
    max-height: 260px;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-right: 4px;
}

    .hrdb-scope .hrdb-legend::-webkit-scrollbar {
        width: 5px;
    }

    .hrdb-scope .hrdb-legend::-webkit-scrollbar-thumb {
        background: var(--hrdb-line);
        border-radius: 99px !important;
    }

.hrdb-scope .hrdb-legend-row {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 6px 8px;
    border-radius: 8px !important;
    cursor: pointer;
    transition: background .12s ease;
}

    .hrdb-scope .hrdb-legend-row:hover {
        background: var(--hrdb-surface-2);
    }

.hrdb-scope .hrdb-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50% !important;
    flex: none;
}

.hrdb-scope .hrdb-legend-name {
    font-family: var(--hrdb-font-body);
    font-size: 12px;
    font-weight: 600;
    color: var(--hrdb-ink);
    flex: 0 1 34%;
    min-width: 90px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hrdb-scope .hrdb-legend-track {
    flex: 1 1 auto;
    height: 6px;
    background: var(--hrdb-surface-2);
    border: 1px solid var(--hrdb-line);
    border-radius: 99px !important;
    overflow: hidden;
    min-width: 40px;
}

.hrdb-scope .hrdb-legend-fill {
    display: block;
    height: 100%;
    border-radius: 99px !important;
}

.hrdb-scope .hrdb-legend-val {
    font-family: var(--hrdb-font-mono);
    font-size: 11.5px;
    font-weight: 700;
    color: var(--hrdb-ink-soft);
    flex: none;
    min-width: 32px;
    text-align: right;
}

@media (max-width: 768px) {
    .hrdb-scope .hrdb-donut-flex {
        justify-content: center;
    }

    .hrdb-scope .hrdb-chart-wrap {
        margin: 0 auto;
    }
}

@media (max-width: 380px) {
    .hrdb-scope .hrdb-legend-track {
        display: none;
    }
}

/* ---------- Horizontal bar list (replaces the donut for Employee Strength's own
   main widget + drawer breakdown) — labelled progress bars, one per category,
   scrollable when there are many. ---------- */
.hrdb-scope .hrdb-hbar-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 4px;
}

    .hrdb-scope .hrdb-hbar-list::-webkit-scrollbar {
        width: 5px;
    }

    .hrdb-scope .hrdb-hbar-list::-webkit-scrollbar-thumb {
        background: var(--hrdb-line);
        border-radius: 99px !important;
    }
/* Inside a panel-body the panel itself is the scroll container — remove the list's
   own cap so only one scrollbar appears. The standalone drawer hbar-list keeps its cap. */
.hrdb-scope .hrdb-panel-body .hrdb-hbar-list {
    max-height: none;
    overflow-y: visible;
}

.hrdb-scope .hrdb-hbar-row {
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 8px !important;
    transition: background .12s ease;
}

    .hrdb-scope .hrdb-hbar-row:hover {
        background: var(--hrdb-surface-2);
    }

.hrdb-scope .hrdb-hbar-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--hrdb-font-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--hrdb-ink);
    margin-bottom: 6px;
}

.hrdb-scope .hrdb-hbar-num {
    font-family: var(--hrdb-font-mono);
    color: var(--hrdb-ink-soft);
    font-weight: 700;
    text-transform: none;
    letter-spacing: normal;
}

.hrdb-scope .hrdb-hbar-track {
    height: 9px;
    background: var(--hrdb-surface-2);
    border: 1px solid var(--hrdb-line);
    border-radius: 20px !important;
    overflow: hidden;
}

.hrdb-scope .hrdb-hbar-fill {
    display: block;
    height: 100%;
    border-radius: 20px !important;
    transition: width .5s ease;
}

/* ---------- Donut table view (toggled alongside the chart view) ---------- */
.hrdb-scope .hrdb-table-view-donut {
    display: none;
    padding: 4px 14px 14px;
}

    .hrdb-scope .hrdb-table-view-donut.active {
        display: block;
    }

    .hrdb-scope .hrdb-table-view-donut tfoot th {
        background: var(--hrdb-surface-2);
        border-top: 1px solid var(--hrdb-line);
    }

/* ---------- Status tag chips (attendance remarks / leave-type badges) ---------- */
.hrdb-scope .hrdb-tag {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 7px !important;
}

.hrdb-scope .hrdb-tag-odd,
.hrdb-scope .hrdb-tag-lm,
.hrdb-scope .hrdb-tag-eg,
.hrdb-scope .hrdb-tag-hd {
    background: var(--hrdb-coral-tint);
    color: #D9502F;
}

.hrdb-scope .hrdb-tag-holiday {
    background: var(--hrdb-teal-tint);
    color: #0D8A7C;
}

/* ---------- Empty state (all widgets, replaces plain Bootstrap alert) ---------- */
.hrdb-scope .hrdb-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 36px 20px 40px;
    text-align: center;
}

.hrdb-scope .hrdb-empty-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px !important;
    background: var(--hrdb-surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    font-size: 24px;
    color: var(--hrdb-primary);
    opacity: .65;
    flex-shrink: 0;
}

.hrdb-scope .hrdb-empty-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--hrdb-ink-soft);
    margin: 0 0 4px;
}

.hrdb-scope .hrdb-empty-sub {
    font-size: 11.5px;
    color: var(--hrdb-ink-soft);
    opacity: .65;
    margin: 0;
}

/* ---------- bday-list section label (PayerGroup / category dividers) ---------- */
.hrdb-scope .bday-group-hdr {
    padding: 8px 10px 2px;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--hrdb-ink-soft);
    text-transform: uppercase;
    letter-spacing: .55px;
    list-style: none;
}

/* ---------- Retiring-this-month highlight (retirement report) ---------- */
.hrdb-scope .bday-item.is-retiring {
    background: linear-gradient(90deg, var(--hrdb-coral-tint), var(--hrdb-amber-tint) 70%);
    border-radius: 14px !important;
}

    .hrdb-scope .bday-item.is-retiring:hover {
        background: linear-gradient(90deg, var(--hrdb-coral-tint), var(--hrdb-amber-tint) 70%);
    }

.hrdb-scope .bday-item-retiring-name {
    color: #B5401F !important;
}

/* ---------- Attendance list (bday-list style) ---------- */
.hrdb-scope .att-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.hrdb-scope .att-time {
    font-family: var(--hrdb-font-mono);
    font-size: 11px;
    font-weight: 600;
    color: var(--hrdb-ink-soft);
    white-space: nowrap;
}

.hrdb-scope .att-tag-present {
    background: #DCFCE7;
    color: #166534;
}

.hrdb-scope .att-tag-absent {
    background: #FEE2E2;
    color: #B91C1C;
}

.hrdb-scope .att-tag-late {
    background: #FEF3C7;
    color: #92400E;
}

.hrdb-scope .att-tag-oddpunch {
    background: var(--hrdb-coral-tint);
    color: #D9502F;
}

.hrdb-scope .att-avatar-absent {
    opacity: .55;
}

.hrdb-scope .att-name-absent {
    color: var(--hrdb-ink-soft) !important;
}

/* ---------- Latest Statement of Salary (bday-list card style) ---------- */
.hrdb-scope .salary-month-hdr {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px 4px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--hrdb-ink-soft);
}

.hrdb-scope .salary-month-label {
    color: var(--hrdb-ink);
    font-family: var(--hrdb-font-mono);
}

.hrdb-scope .salary-month-vs {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.hrdb-scope .salary-amt {
    font-family: var(--hrdb-font-mono);
    font-size: 12px;
    font-weight: 700;
    color: var(--hrdb-ink);
    white-space: nowrap;
}

.hrdb-scope .salary-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px 12px;
    border-top: 1px solid var(--hrdb-line);
    margin-top: 4px;
    list-style: none;
}

.hrdb-scope .salary-total-label {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--hrdb-ink);
}

    .hrdb-scope .salary-total-label small {
        font-weight: 400;
        color: var(--hrdb-ink-soft);
    }

.hrdb-scope .salary-total-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.hrdb-scope .salary-total-amt {
    font-size: 13.5px;
}

/* ---------- Modals ---------- */
.hrdb-scope .modal-content {
    border-radius: var(--hrdb-radius-lg) !important;
    border: 1px solid var(--hrdb-line);
    box-shadow: var(--hrdb-shadow-soft);
}

/* ---------- Right-side drill-down drawer (Employee Strength V2) ----------
   Local to the widget that renders it (see _Employee_Strength_Report_V2.cshtml)
   — a lighter-weight alternative to the shared #HR_Report_Modal_New modal,
   used only for this widget's own slice/legend drill-down. ---------- */
.hrdb-scope .hrdb-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
    z-index: 1050;
}

    .hrdb-scope .hrdb-drawer-backdrop.is-open {
        opacity: 1;
        pointer-events: auto;
    }

.hrdb-scope .hrdb-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 50%;
    background: var(--hrdb-surface);
    box-shadow: -8px 0 32px -8px rgba(15, 23, 42, .25);
    transform: translateX(100%);
    transition: transform .25s ease;
    z-index: 1051;
    display: flex;
    flex-direction: column;
}

    .hrdb-scope .hrdb-drawer.is-open {
        transform: translateX(0);
    }

.hrdb-scope .hrdb-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--hrdb-line);
    flex: none;
}

.hrdb-scope .hrdb-drawer-title {
    font-family: var(--hrdb-font-display);
    font-weight: 600;
    font-size: 15px;
    color: var(--hrdb-ink);
}

.hrdb-scope .hrdb-drawer-close {
    width: 28px;
    height: 28px;
    border-radius: 8px !important;
    background: var(--hrdb-surface-2);
    border: 1px solid var(--hrdb-line);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--hrdb-ink-soft);
    font-size: 12px;
    padding: 0;
    transition: all .15s ease;
}

    .hrdb-scope .hrdb-drawer-close:hover {
        border-color: var(--hrdb-primary);
        color: var(--hrdb-primary-dark);
    }

.hrdb-scope .hrdb-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 18px;
}

.hrdb-scope .hrdb-drawer-breadcrumb {
    font-family: var(--hrdb-font-display);
    font-weight: 600;
    font-size: 13.5px;
    color: var(--hrdb-ink);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hrdb-scope .hrdb-drawer-back {
    color: var(--hrdb-ink-soft);
    font-size: 13px;
    cursor: pointer;
}

    .hrdb-scope .hrdb-drawer-back:hover {
        color: var(--hrdb-primary-dark);
    }

.hrdb-scope .hrdb-drawer-dim-switch {
    margin-bottom: 14px;
}

.hrdb-scope .hrdb-drawer-emplist-title {
    font-family: var(--hrdb-font-display);
    font-weight: 600;
    font-size: 13px;
    color: var(--hrdb-ink);
    padding-top: 14px;
    margin-bottom: 8px;
    border-top: 1px solid var(--hrdb-line);
}

.hrdb-scope .hrdb-drawer-dim-switch select {
    font-family: var(--hrdb-font-body);
    font-size: 12px;
    font-weight: 500;
    color: var(--hrdb-ink);
    background: var(--hrdb-surface-2);
    border: 1px solid var(--hrdb-line);
    border-radius: 9px !important;
    padding: 7px 10px;
    width: 100%;
}

.hrdb-scope .hrdb-drawer-empty {
    padding: 30px 10px;
    text-align: center;
    color: var(--hrdb-ink-faint);
    font-size: 12.5px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .hrdb-scope .hrdb-drawer {
        width: 95%;
    }
}


/* ---------- Quick search inside drill-down drawer ---------- */
.hrdb-scope .hrdb-drawer-search-wrap {
    margin-bottom: 10px;
}

.hrdb-scope .hrdb-drawer-search {
    background: var(--hrdb-surface-2);
    border: 1px solid var(--hrdb-line);
    border-radius: 9px !important;
    font-size: 12px;
    padding: 7px 12px;
    width: 100%;
    box-shadow: none;
}

    .hrdb-scope .hrdb-drawer-search:focus {
        border-color: var(--hrdb-primary);
        outline: none;
        box-shadow: none;
    }

/* ---------- Student Strength bar-chart host panel (BarChartStudentStrength) ---------- */
/* Outer panel: allow the report-type dropdown to overflow panel bounds */
.hrdb-scope .ssbar-outer-panel {
    /*overflow: visible !important;*/
}

    .hrdb-scope .ssbar-outer-panel > .enqad-panel-head {
        overflow: visible !important;
        z-index: 10 !important;
    }

        .hrdb-scope .ssbar-outer-panel > .enqad-panel-head .dropdown-menu {
            z-index: 1060 !important;
        }
/* Inner chart wrapper: keep below the outer dropdown, clip to panel's bottom radius */
.ssbar-inner-wrap {
    position: relative;
    z-index: 1;
    border-bottom-left-radius: var(--hrdb-radius-lg);
    border-bottom-right-radius: var(--hrdb-radius-lg);
    overflow: hidden;
}
    /* Inner panel: strip duplicate chrome and allow chart to overflow without clipping */
    .ssbar-inner-wrap .hrdb-panel {
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        margin: 0 !important;
        overflow: visible !important;
    }

    .ssbar-inner-wrap .hrdb-panel-body {
        overflow: visible !important;
    }

    .ssbar-inner-wrap .enqad-panel-head {
        border-top: 1px solid var(--hrdb-line);
        border-radius: 0 !important;
    }
/* ═══ SchoolFilterGraph, YearFilterGraph & FullSchoolYearFilterModal — centred overlay + hrdb design ═══ */
/* Bootstrap sets overflow:hidden on .modal — override so flex centering works */
#SchoolFilterGraph, #YearFilterGraph, #FullSchoolYearFilterModal,
body > #SchoolFilterGraph, body > #YearFilterGraph, body > #FullSchoolYearFilterModal {
    z-index: 10500 !important;
    overflow: auto !important;
}

    #SchoolFilterGraph.in, #SchoolFilterGraph.show, #YearFilterGraph.in, #YearFilterGraph.show,
    #FullSchoolYearFilterModal.in, #FullSchoolYearFilterModal.show {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
    /*.modal-backdrop, body > .modal-backdrop {
    z-index: 10490 !important;
}*/
    #SchoolFilterGraph .modal-dialog, #YearFilterGraph .modal-dialog, #FullSchoolYearFilterModal .modal-dialog {
        margin: 20px auto;
        width: 92%;
        max-width: 880px;
    }

    #SchoolFilterGraph .modal-content, #YearFilterGraph .modal-content, #FullSchoolYearFilterModal .modal-content {
        border-radius: 14px !important;
        border: 1px solid var(--hrdb-line);
        box-shadow: 0 24px 64px rgba(0,0,0,.22);
        overflow: hidden;
        background: #ffffff !important;
    }

    /* Header */
    #SchoolFilterGraph .modal-header, #YearFilterGraph .modal-header, #FullSchoolYearFilterModal .modal-header {
        background: #ffffff !important;
        border-bottom: 1px solid var(--hrdb-line) !important;
        padding: 16px 20px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    #SchoolFilterGraph .modal-title, #YearFilterGraph .modal-title, #FullSchoolYearFilterModal .modal-title {
        font-size: 15px !important;
        font-weight: 800 !important;
        color: var(--hrdb-ink, #1e293b) !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        margin: 0 !important;
    }

    #FullSchoolYearFilterModal .close {
        font-size: 24px !important;
        color: #64748b !important;
        opacity: 0.8 !important;
        margin: 0 !important;
        outline: none !important;
    }

display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--hrdb-line); background: var(--hrdb-surface);
}

#SchoolFilterGraph .modal-header .modal-title, #YearFilterGraph .modal-header .modal-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--hrdb-ink);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

    #SchoolFilterGraph .modal-header .modal-title i, #YearFilterGraph .modal-header .modal-title i {
        color: var(--hrdb-primary);
        font-size: 14px;
    }

#SchoolFilterGraph .modal-header .close, #YearFilterGraph .modal-header .close {
    font-size: 18px;
    color: var(--hrdb-ink-soft);
    opacity: 1;
    margin: 0;
    padding: 0;
    line-height: 1;
    background: none;
    border: none;
    cursor: pointer;
    order: 1;
}

    #SchoolFilterGraph .modal-header .close:hover, #YearFilterGraph .modal-header .close:hover {
        color: var(--hrdb-ink);
    }

/* Body */
#SchoolFilterGraph .modal-body, #YearFilterGraph .modal-body {
    padding: 20px;
    max-height: 58vh;
    overflow-y: auto;
}

/* Footer */
#SchoolFilterGraph .modal-footer, #YearFilterGraph .modal-footer {
    padding: 12px 20px;
    background: var(--hrdb-surface-2);
    border-top: 1px solid var(--hrdb-line);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Strip AdminLTE box chrome from injected content */
#SchoolFilterGraph .box, #YearFilterGraph .box {
    box-shadow: none !important;
    border: none !important;
    margin-bottom: 0 !important;
    background: transparent !important;
}

#SchoolFilterGraph .box-header.with-border, #YearFilterGraph .box-header.with-border {
    display: none !important;
}

#SchoolFilterGraph .box-body, #YearFilterGraph .box-body {
    padding: 0 !important;
}

/* School & Year cards */
#SchoolFilterGraph .statistics.box-group,
#YearFilterGraph .year-card {
    position: relative !important;
    height: auto !important;
    min-height: 72px;
    padding: 10px 10px 8px !important;
    border: 2px solid var(--hrdb-line) !important;
    border-radius: 10px !important;
    background: var(--hrdb-surface) !important;
    box-shadow: none !important;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, transform .15s ease;
    text-align: center !important;
    margin-bottom: 10px;
}

    #SchoolFilterGraph .statistics.box-group:hover,
    #YearFilterGraph .year-card:hover {
        border-color: var(--hrdb-primary) !important;
        transform: translateY(-2px);
    }

    #SchoolFilterGraph .statistics.box-group .school-check,
    #YearFilterGraph .year-card .chkYearWiseLC {
        position: absolute !important;
        top: 6px !important;
        right: 6px !important;
        width: 15px;
        height: 15px;
        accent-color: var(--hrdb-primary);
        cursor: pointer;
        z-index: 1;
    }

    #YearFilterGraph .year-card.is-selected {
        border-color: var(--hrdb-primary) !important;
        background: var(--hrdb-primary-tint) !important;
    }
    /* Icon / image row → vertical stack */
    #SchoolFilterGraph .statistics.box-group > div {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px;
    }

    #SchoolFilterGraph .statistics.box-group .fa-university {
        font-size: 22px !important;
        color: var(--hrdb-primary);
        display: block;
        margin: 4px auto 2px;
    }

    #SchoolFilterGraph .statistics.box-group img {
        height: 32px !important;
        width: 32px !important;
        border-radius: 6px !important;
        border: 1px solid var(--hrdb-line) !important;
        object-fit: contain;
        display: block;
        margin: 0 auto;
    }

    #SchoolFilterGraph .statistics.box-group span {
        font-size: 9.5px !important;
        font-weight: 700 !important;
        color: var(--hrdb-ink) !important;
        text-transform: uppercase !important;
        word-break: break-word !important;
        line-height: 1.4;
        padding-right: 0 !important;
        display: block;
    }

/* sscht: hidden toolbar source + outer header slots */
.sscht-tb {
    display: none !important;
}

.ssbar-outer-panel .sscht-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.ssbar-outer-panel .sscht-graph-subtitle {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--hrdb-ink-soft);
    letter-spacing: 0.01em;
}

#sscht-sw-ctrls {
    display: none;
    align-items: center;
    gap: 4px;
}
/* sscht body: inner content area (replaces stripped hrdb-panel-body) */
/* min-height matches chart view height so table view never shrinks the panel */
.ssbar-inner-wrap .sscht-body {
    overflow-y: auto;
    padding: 8px;
    min-height: 280px;
}

/* ── Equal-height row: Student Strength + Student Attendance ── */
.mi2-equal-row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    min-height: 454px;
}

    .mi2-equal-row > [class*="col-"] {
        display: flex;
        flex-direction: column;
    }
        /* !important on > * so the clientLazyLoading wrapper always stays a flex column  */
        .mi2-equal-row > [class*="col-"] > * {
            flex: 1 !important;
            display: flex !important;
            flex-direction: column !important;
        }
    /* hrdb-scope is a CSS-var scope only (no display) — must add flex here to pass height to hrdb-panel */
    .mi2-equal-row .hrdb-scope {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .mi2-equal-row .hrdb-panel {
        flex: 1;
        height: auto !important;
        min-height: 454px;
    }

/* ---------- Student Attendance widget (ManagementIndex2 mi2sa) ---------- */
.hrdb-scope .mi2sa-outer {
    /* overflow: hidden inherited from .hrdb-panel — keeps rounded corners */
}

    .hrdb-scope .mi2sa-outer > .enqad-panel-head {
        overflow: visible !important;
        z-index: 10 !important;
        flex-wrap: wrap;
        gap: 6px;
    }

        .hrdb-scope .mi2sa-outer > .enqad-panel-head .dropdown-menu {
            z-index: 1060 !important;
        }

#mi2-sa-filter-lbl {
    display: none !important;
}

.hrdb-scope .mi2sa-lbl {
    font-size: 11px;
    font-weight: 600;
    color: var(--hrdb-ink-soft);
    white-space: nowrap;
    flex-shrink: 0;
}

.hrdb-scope .mi2sa-dateinput {
    background: var(--hrdb-surface-2);
    border: 1px solid var(--hrdb-line);
    border-radius: 6px;
    color: var(--hrdb-ink);
    padding: 0 8px;
    font-size: 11px;
    height: 26px;
    outline: none;
    cursor: pointer;
    width: 108px;
    flex-shrink: 0;
}

    .hrdb-scope .mi2sa-dateinput:focus {
        border-color: var(--hrdb-primary);
    }

.hrdb-scope .mi2sa-body {
    padding: 0 !important;
    display: flex;
    flex-direction: column;
}

.hrdb-scope .mi2-sa-ddmenu {
    border-radius: 8px !important;
    border: 1px solid var(--hrdb-line) !important;
    box-shadow: 0 4px 16px rgba(0,0,0,.12) !important;
    padding: 4px 0 !important;
}

    .hrdb-scope .mi2-sa-ddmenu li a {
        padding: 8px 16px !important;
        color: var(--hrdb-ink) !important;
        display: block;
        font-size: 13px;
    }

    .hrdb-scope .mi2-sa-ddmenu li.active,
    .hrdb-scope .mi2-sa-ddmenu li.active > a,
    .hrdb-scope .mi2-sa-ddmenu li.active > a:hover,
    .hrdb-scope .mi2-sa-ddmenu li.active > a:focus {
        background: rgba(91,95,239,.08) !important;
        color: var(--hrdb-primary) !important;
        font-weight: 700;
    }

    .hrdb-scope .mi2-sa-ddmenu li:hover a {
        background: var(--hrdb-surface-2) !important;
    }
/* Suppress inner view chrome + propagate panel height via flex */
#AttendanceDetails {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

    #AttendanceDetails .saa-tb {
        display: none !important;
    }

    #AttendanceDetails .saa {
        flex: 1;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    #AttendanceDetails .saa-wrap {
        flex: 1 !important;
        min-height: 0 !important;
        height: auto !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        border: none !important;
    }

    #AttendanceDetails .box {
        border-radius: 0 !important;
        box-shadow: none !important;
        border: none !important;
        margin-bottom: 0 !important;
    }

    #AttendanceDetails .box-header.with-border {
        display: none !important;
    }

    #AttendanceDetails .box-body {
        padding: 8px 12px !important;
    }
/* sw-ctrls controls moved from inner view by mi2SaLoadSwCtrls() */
#mi2-sw-ctrls .jsDatePicker {
    background: var(--hrdb-surface-2) !important;
    border: 1px solid var(--hrdb-line) !important;
    border-radius: 6px !important;
    color: var(--hrdb-ink) !important;
    padding: 0 8px !important;
    font-size: 11px !important;
    height: 26px !important;
    outline: none !important;
    width: 108px !important;
    cursor: pointer;
}

#mi2-sw-ctrls .btn {
    background: var(--hrdb-surface-2) !important;
    border: 1px solid var(--hrdb-line) !important;
    color: var(--hrdb-ink) !important;
    box-shadow: none !important;
    padding: 3px 8px !important;
    border-radius: 6px !important;
    font-size: 13px !important;
}

    #mi2-sw-ctrls .btn:hover {
        background: var(--hrdb-surface-3, #e8eaf0) !important;
    }

/* ═══════════════════════════════════════════════════════════════
   School Attendance Analytics — saa-* component styles
   (sourced from _SchoolAttendanceAnalytics.cshtml, v7)
═══════════════════════════════════════════════════════════════ */

/* base reset scoped to .saa */
.saa * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.saa {
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 12px;
}

/* card wrapper — standalone usage; stripped inside ManagementIndex2 by #AttendanceDetails rule */
.saa-wrap {
    background: var(--hrdb-surface);
    border-radius: var(--hrdb-radius-lg) !important;
    box-shadow: 0 2px 14px rgba(0,0,0,.09);
    border: 1px solid var(--hrdb-line);
    display: flex;
    flex-direction: column;
    height: 416px;
    overflow: hidden;
    position: relative;
}

/* toolbar — visual handled by enqad-panel-head; .saa-tb kept as hook for ManagementIndex2 hide rule */
.saa-tb-lbl {
    font-size: 11px;
    font-weight: 600;
    color: var(--hrdb-ink-soft);
    white-space: nowrap;
    flex-shrink: 0;
}

.saa-title {
    font-size: 12px;
    font-weight: 800;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* icon button overrides on top of enqad-box-btn */
.saa-ico-refresh.enqad-box-btn {
    background: linear-gradient(135deg, var(--hrdb-primary), #8b5cf6) !important;
    border-color: transparent !important;
    color: #fff !important;
}

    .saa-ico-refresh.enqad-box-btn:hover {
        filter: brightness(1.1);
    }

.saa-eye-btn.on {
    background: var(--hrdb-primary) !important;
    color: #fff !important;
    border-color: var(--hrdb-primary) !important;
}

/* body */
.saa-body {
    flex: 1;
    min-height: 0;
    position: relative;
    overflow: hidden;
    border-radius: 0 0 var(--hrdb-radius-lg) var(--hrdb-radius-lg) !important;
}

/* chart / table sections — absolute fill, toggle via .show */
.saa-chart-sec, .saa-tbl-sec {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
}

.saa-tbl-sec {
    display: none;
}

    .saa-tbl-sec.show {
        display: flex;
    }

/* chart inner layout */
.saa-chart-top {
    padding: 7px 12px 0;
    flex-shrink: 0;
}

.saa-sec-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
}

.saa-sec-ttl {
    font-size: 11px;
    font-weight: 800;
    color: var(--hrdb-ink);
    display: flex;
    align-items: center;
    gap: 4px;
}

.sdot {
    width: 6px;
    height: 6px;
    border-radius: 50% !important;
    flex-shrink: 0;
    display: inline-block;
}

.saa-chip {
    font-size: 9px;
    color: var(--hrdb-ink-soft);
    font-weight: 600;
    background: var(--hrdb-surface-2);
    padding: 1px 6px;
    border-radius: 20px !important;
}

/* legend */
.saa-leg {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    padding: 0 12px 5px;
    flex-shrink: 0;
}

.saa-lp {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 6px;
    border-radius: 20px !important;
    font-size: 9px;
    font-weight: 700;
    color: #fff;
}

.saa-lp-dot {
    width: 4px;
    height: 4px;
    border-radius: 50% !important;
    background: rgba(255,255,255,.75);
}

/* bars */
.saa-bars-wrap {
    flex: 1;
    min-height: 0;
    padding: 8px 12px 44px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    display: flex;
    flex-direction: column;
}

    .saa-bars-wrap::-webkit-scrollbar {
        display: none;
    }

.saa-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

    .saa-bars .saa-br {
        display: flex;
        align-items: center;
        gap: 8px;
        position: relative;
        height: 34px;
        flex-shrink: 0;
    }

.saa-br-lbl {
    width: 80px;
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 700;
    color: var(--hrdb-ink);
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.saa-br-track {
    flex: 1;
    height: 28px;
    background: var(--hrdb-surface-2);
    border-radius: 28px !important;
    display: flex;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    transition: filter .13s, box-shadow .13s;
}

    .saa-br-track:hover {
        filter: brightness(1.07);
        box-shadow: 0 2px 7px rgba(0,0,0,.12);
    }

.saa-br-inner {
    display: flex;
    width: 100%;
    height: 100%;
    border-radius: 28px !important;
    overflow: hidden;
}

.saa-br-seg {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 800;
    color: rgba(255,255,255,.92);
    min-width: 0;
    overflow: hidden;
}

.saa-br-track::after {
    content: '↗';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 9px;
    color: rgba(255,255,255,.45);
    pointer-events: none;
}

.saa-br-tot {
    width: 44px;
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 700;
    color: var(--hrdb-ink-soft);
    text-align: left;
}

/* float tooltip */
.saa-float-tip {
    display: none;
    position: absolute;
    z-index: 300;
    background: #0f172a;
    color: #f8fafc;
    border-radius: 8px !important;
    padding: 6px 10px;
    font-size: 9px;
    min-width: 170px;
    max-width: 220px;
    box-shadow: 0 5px 18px rgba(0,0,0,.35);
    pointer-events: none;
    border: 1px solid rgba(99,102,241,.3);
}

    .saa-float-tip b {
        color: #a5f3fc;
        font-size: 10px;
        display: block;
        margin-bottom: 3px;
    }

.saa-tip-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 2px;
}

.saa-tip-dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50% !important;
    margin-right: 2px;
    vertical-align: middle;
}

.saa-tip-foot {
    margin-top: 4px;
    font-size: 8px;
    color: #7dd3fc;
    border-top: 1px solid rgba(255,255,255,.1);
    padding-top: 3px;
}

/* skeleton */
.saa-sk {
    display: block;
    border-radius: 4px !important;
    height: 11px;
    background: linear-gradient(90deg, var(--hrdb-surface-2) 25%, var(--hrdb-line) 50%, var(--hrdb-surface-2) 75%);
    background-size: 200% 100%;
    animation: saa-sksh 1.4s infinite;
}

.saa-sk-bar {
    height: 28px;
    border-radius: 28px !important;
    flex: 1;
    background: linear-gradient(90deg, var(--hrdb-surface-2) 25%, var(--hrdb-line) 50%, var(--hrdb-surface-2) 75%);
    background-size: 200% 100%;
    animation: saa-sksh 1.4s infinite;
}

@keyframes saa-sksh {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* pager */
.saa-pager {
    display: none;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 36px;
    border-top: 1px solid var(--hrdb-line);
    background: var(--hrdb-surface-2);
    z-index: 2;
}

.saa-pager.show {
    display: block;
}

/* Guarantee pagers inside hidden parent views can NEVER render */
.saa-chart-sec[style*="display: none"] .saa-pager,
.saa-chart-sec[style*="display:none"] .saa-pager,
.saa-tbl-sec:not(.show) .saa-pager,
.saa-tbl-sec[style*="display: none"] .saa-pager,
.saa-tbl-sec[style*="display:none"] .saa-pager {
    display: none !important;
}

.saa-pg-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    height: 100%;
}

.saa-pager .pg-lbl {
    text-align: center;
    font-size: 9px;
    font-weight: 800;
    color: var(--hrdb-ink-soft);
    white-space: nowrap;
}

.pg-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    padding: 4px 14px !important;
    border-radius: 20px !important;
    border: none !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    cursor: pointer !important;
    touch-action: manipulation;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    transition: all .14s ease !important;
    box-shadow: 0 1px 4px rgba(0,0,0,.12) !important;
}

.pg-btn.btn-prev,
.pg-btn#saa-c-prev, .pg-btn#saa-t-prev,
.pg-btn#syw-c-prev, .pg-btn#syw-t-prev {
    background: var(--hrdb-primary, #1d6fb5) !important;
    color: #ffffff !important;
}

.pg-btn.btn-prev:hover:not(:disabled),
.pg-btn#saa-c-prev:hover:not(:disabled), .pg-btn#saa-t-prev:hover:not(:disabled),
.pg-btn#syw-c-prev:hover:not(:disabled), .pg-btn#syw-t-prev:hover:not(:disabled) {
    background: var(--hrdb-primary-dark, #1565c0) !important;
    color: #ffffff !important;
    box-shadow: var(--hrdb-shadow-soft, 0 2px 8px rgba(29,111,181,.4)) !important;
    transform: translateY(-1px);
}

.pg-btn.btn-next,
.pg-btn#saa-c-next, .pg-btn#saa-t-next,
.pg-btn#syw-c-next, .pg-btn#syw-t-next {
    background: linear-gradient(135deg, var(--hrdb-primary, #1d6fb5), var(--hrdb-primary-dark, #1565c0)) !important;
    color: #ffffff !important;
}

.pg-btn.btn-next:hover:not(:disabled),
.pg-btn#saa-c-next:hover:not(:disabled), .pg-btn#saa-t-next:hover:not(:disabled),
.pg-btn#syw-c-next:hover:not(:disabled), .pg-btn#syw-t-next:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--hrdb-primary-dark, #1565c0), #0d47a1) !important;
    color: #ffffff !important;
    box-shadow: var(--hrdb-shadow-soft, 0 2px 8px rgba(21,101,192,.4)) !important;
    transform: translateY(-1px);
}

.pg-btn:disabled {
    background: #cbd5e1 !important;
    color: #94a3b8 !important;
    opacity: 0.65 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

/* summary strip */
.saa-sum {
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 12px;
    background: var(--hrdb-surface-2);
    border-bottom: 1px solid var(--hrdb-line);
}

.saa-sum-card {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px !important;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
    border: 1px solid transparent;
}

.saa-sum-lbl {
    font-size: 9px;
    font-weight: 600;
    opacity: .75;
}

.saa-sum-val {
    font-size: 11px;
    font-weight: 900;
}

/* table */
.saa-tbl-hdr {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    border-bottom: 1px solid var(--hrdb-surface-2);
    gap: 6px;
}

.saa-srch {
    border: 1.5px solid var(--hrdb-line);
    border-radius: 6px !important;
    padding: 2px 8px;
    font-size: 10px;
    outline: none;
    background: var(--hrdb-surface-2);
    width: 128px;
    height: 24px;
}

    .saa-srch:focus {
        border-color: var(--hrdb-primary);
        background: var(--hrdb-surface);
    }

.saa-tbl-wrap {
    flex: 1;
    min-height: 0;
    overflow-x: auto;
    overflow-y: auto;
    padding-bottom: 38px;
}

.saa-tbl {
    width: 100%;
    border-collapse: collapse;
    font-size: 10px;
    table-layout: fixed;
}

    .saa-tbl col.c-rk {
        width: 28px;
    }

    .saa-tbl col.c-sc {
        width: 140px;
    }

    .saa-tbl col.c-ty {
        width: 62px;
    }

    .saa-tbl col.c-to {
        width: 54px;
    }

    .saa-tbl col.c-pc {
        width: 88px;
    }

    .saa-tbl thead tr th {
        position: sticky;
        top: 0;
        z-index: 2;
        background: var(--hrdb-surface-2);
        color: var(--hrdb-ink-soft);
        font-weight: 800;
        padding: 4px 6px;
        text-align: left;
        border-bottom: 2px solid var(--hrdb-line);
        border-right: 1px solid var(--hrdb-line);
        white-space: nowrap;
        font-size: 9px;
        text-transform: uppercase;
        letter-spacing: .3px;
        cursor: pointer;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .saa-tbl thead th:last-child {
        border-right: none;
    }

    .saa-tbl thead th:hover {
        background: var(--hrdb-primary-tint, #ede9fe);
        color: var(--hrdb-primary, #6d28d9);
    }

    .saa-tbl thead th.saa-srt {
        background: var(--hrdb-primary-tint, #ede9fe);
        color: var(--hrdb-primary, #6d28d9);
    }

        .saa-tbl thead th.saa-srt::after {
            content: ' ↕';
            font-size: 7px;
        }

    .saa-tbl tbody td {
        padding: 4px 6px;
        border-bottom: 1px solid var(--hrdb-surface-2);
        border-right: 1px solid var(--hrdb-surface-2);
        vertical-align: middle;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

        .saa-tbl tbody td:last-child {
            border-right: none;
        }

    .saa-tbl tbody tr:hover td {
        background: var(--hrdb-primary-tint, #f5f3ff) !important;
    }

    .saa-tbl tr.saa-rg td {
        background: #f0fdf4;
    }

    .saa-tbl tr.saa-ro td {
        background: #fffbeb;
    }

    .saa-tbl tr.saa-rr td {
        background: #fff1f2;
    }

    .saa-tbl tr.saa-rtot td {
        background: var(--hrdb-primary-tint, #ede9fe) !important;
        font-weight: 900;
        border-top: 2px solid var(--hrdb-primary, #c4b5fd);
        border-bottom: none;
    }

/* school cell */
.saa-sc-cell {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.saa-sc-av {
    width: 20px;
    height: 20px;
    border-radius: 4px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 900;
    color: #fff;
    flex-shrink: 0;
}

.saa-sc-nm {
    font-weight: 700;
    color: var(--hrdb-ink);
    font-size: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.saa-rk {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border-radius: 3px !important;
    font-size: 8px;
    font-weight: 900;
}

.saa-rk1 {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #fff;
}

.saa-rk2 {
    background: linear-gradient(135deg, #94a3b8, #64748b);
    color: #fff;
}

.saa-rk3 {
    background: linear-gradient(135deg, #fb923c, #f97316);
    color: #fff;
}

.saa-rkn {
    background: var(--hrdb-surface-2);
    color: var(--hrdb-ink-soft);
}

.saa-bdg {
    display: inline-block;
    padding: 1px 5px;
    border-radius: 20px !important;
    font-size: 9px;
    font-weight: 800;
    white-space: nowrap;
}

.saa-pc-val {
    font-size: 10px;
    font-weight: 900;
}

.saa-pc-bar {
    height: 3px;
    border-radius: 2px !important;
    background: var(--hrdb-surface-2);
    overflow: hidden;
    margin-top: 2px;
}

.saa-pc-fill {
    height: 100%;
    border-radius: 2px !important;
}

.saa-nodata {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 5px;
    color: var(--hrdb-ink-soft);
    text-align: center;
}

    .saa-nodata i {
        font-size: 20px;
    }

    .saa-nodata p {
        font-size: 10px;
    }

#AttendanceDetails .saa-body {
    border-radius: 0 !important;
}

/* ---- Attendance report drawer inline loader (saaOpenReport) ---- */
.saa-rpt-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    gap: 18px;
}

.saa-rpt-spin {
    width: 44px;
    height: 44px;
    border-radius: 50% !important;
    border: 3px solid #E7E9F4;
    border-top-color: #5B5FEF;
    border-right-color: #8B5CF6;
    animation: saa-rpt-spin 0.8s linear infinite;
}

@keyframes saa-rpt-spin {
    to {
        transform: rotate(360deg);
    }
}

.saa-rpt-lbl {
    font-size: 12px;
    font-weight: 600;
    color: #6B7094;
    font-family: 'Inter', system-ui, sans-serif;
    letter-spacing: .2px;
}

.saa-rpt-err {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 30px 20px;
    color: #ef4444;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', system-ui, sans-serif;
}

/* ---- Panel footer note strip ---- */
.hrdb-scope .hrdb-panel-footer {
    padding: 7px 14px 9px;
    background: var(--hrdb-surface-2);
    border-top: 1px solid var(--hrdb-line);
    flex-shrink: 0;
}

.hrdb-scope .hrdb-panel-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.hrdb-note-collapsible {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.hrdb-note-summary {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    list-style: none;
    outline: none;
    user-select: none;
}

.hrdb-note-summary::-webkit-details-marker,
.hrdb-note-summary::marker {
    display: none !important;
}

.hrdb-note-arrow {
    font-size: 9px;
    color: var(--hrdb-primary);
    margin-left: 4px;
    transition: transform .2s ease;
    display: inline-block;
}

details.hrdb-note-collapsible:not([open]) .hrdb-note-arrow {
    transform: rotate(0deg);
}

details.hrdb-note-collapsible[open] .hrdb-note-arrow {
    transform: rotate(180deg);
}

.hrdb-scope .hrdb-note-ic {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    border-radius: 50% !important;
    background: var(--hrdb-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

    .hrdb-scope .hrdb-note-ic i {
        font-size: 8px;
        color: #fff;
        line-height: 1;
    }

.hrdb-scope .hrdb-note-body {
    flex: 1;
    min-width: 0;
}

.hrdb-scope .hrdb-note-lbl {
    font-size: 10px;
    font-weight: 700;
    color: var(--hrdb-primary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.hrdb-scope .hrdb-note-body ul {
    margin: 0;
    padding-left: 13px;
    list-style: disc;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hrdb-scope .hrdb-note-body li {
    font-size: 10.5px;
    color: var(--hrdb-ink-soft);
    line-height: 1.5;
}

/* ─── Desktop & Laptop View (min-width: 992px) — 100% UNTOUCHED FIXED HEIGHT & EXPANDED NOTE ─── */
@media (min-width: 992px) {
    .hrdb-note-summary {
        cursor: default;
        pointer-events: none;
    }
    .hrdb-note-arrow {
        display: none !important;
    }
    details.hrdb-note-collapsible .hrdb-note-body {
        display: block !important;
        margin-top: 2px;
    }
}

/* ─── Mobile Header Responsiveness (max-width: 768px) ─── */
@media (max-width: 768px) {
    .hrdb-scope .enqad-panel-head,
    .enqad-panel-head {
        flex-wrap: wrap !important;
        padding: 10px 14px !important;
        gap: 6px !important;
    }

    .hrdb-scope .enqad-panel-head > form {
        flex-wrap: wrap !important;
        gap: 6px !important;
    }

    .hrdb-scope .enqad-panel-title,
    .enqad-panel-title {
        flex: 1 1 100% !important;
        width: 100% !important;
        min-width: 0 !important;
        margin-bottom: 2px !important;
    }

    .hrdb-scope .enqad-panel-hd-right,
    .enqad-panel-hd-right {
        width: 100% !important;
        justify-content: flex-end !important;
        gap: 6px !important;
        flex-wrap: wrap !important;
        margin-top: 2px;
    }

    #mi2-saa-ctrls,
    #mi2-sw-ctrls {
        flex-wrap: wrap !important;
        justify-content: flex-end !important;
    }
}

/* ─── Mobile & Tablet View (max-width: 991px) — DYNAMIC EXPANDED BODY & COMPACT COLLAPSIBLE NOTE ─── */
@media (max-width: 991px) {
    /*.hrdb-scope .hrdb-panel,*/
    .hrdb-scope .hrdb-panel.mi2sa-outer {
        height: auto !important;
        min-height: 480px !important;
        max-height: none !important;
    }
    .hrdb-scope .hrdb-panel-body,
    .hrdb-scope .mi2sa-body {
        flex: 1 1 auto !important;
        min-height: 380px !important;
        max-height: none !important;
        /*overflow: visible !important;*/
    }
    #AttendanceDetails,
    #AttendanceDetails .saa,
    #AttendanceDetails .saa-wrap,
    .saa-wrap {
        height: auto !important;
        min-height: 380px !important;
        max-height: none !important;
        overflow: visible !important;
    }
    .saa-chart-sec {
        min-height: 380px !important;
        height: auto !important;
    }
    .saa-bars-wrap {
        min-height: 220px !important;
        padding-bottom: 44px !important;
        overflow: visible !important;
    }
    .saa-tbl-sec {
        min-height: 320px !important;
        height: auto !important;
    }
    .saa-tbl-wrap {
        min-height: 260px !important;
        max-height: none !important;
        overflow-x: auto !important;
        overflow-y: visible !important;
    }

    /* Compact sleek note footer on mobile & tablet */
    .hrdb-scope .hrdb-panel-footer {
        padding: 6px 12px !important;
        background: #f8fafc !important;
        border-top: 1px solid var(--hrdb-line) !important;
    }
    .hrdb-note-summary {
        font-size: 10px !important;
        padding: 1px 0;
    }
    .hrdb-note-body {
        margin-top: 4px;
        padding-top: 4px;
        border-top: 1px dashed rgba(99,102,241,0.25);
    }
    .hrdb-scope .hrdb-note-body ul {
        padding-left: 14px !important;
    }
    .hrdb-scope .hrdb-note-body li {
        font-size: 9.5px !important;
        line-height: 1.4 !important;
    }
}

/* ---- Attendance Type Pie Chart inner view (atpc) ---- */
#AttendanceDetails .hrdb-scope {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.hrdb-scope .atpc-wrap {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

#AttendanceDetails .atpc-tb {
    display: none !important;
}

.hrdb-scope .atpc-tb {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 8px;
    flex-shrink: 0;
    border-bottom: 1px solid var(--hrdb-line);
    min-height: 38px;
}

.hrdb-scope .atpc-tb-left {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.hrdb-scope .atpc-hd-lbl {
    font-size: 11px;
    font-weight: 600;
    color: var(--hrdb-ink-soft);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hrdb-scope .atpc-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px;
}

/* ─── atpc Table & Toolbar ─── */
.atpc-tbl {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

    .atpc-tbl thead th {
        background: var(--hrdb-surface-2, #f8fafc);
        color: var(--hrdb-primary, #4338ca);
        font-weight: 800;
        padding: 6px 10px;
        text-align: left;
        border-bottom: 2px solid var(--hrdb-primary, #6366f1);
        border-right: 1px solid var(--hrdb-line, #e9ecef);
        white-space: nowrap;
        font-size: 10px;
        text-transform: uppercase;
        letter-spacing: .3px;
    }

        .atpc-tbl thead th:last-child {
            border-right: none;
        }

    .atpc-tbl tbody td {
        padding: 5px 10px;
        border-bottom: 1px solid var(--hrdb-line, #f1f5f9);
        border-right: 1px solid var(--hrdb-surface-2, #f8fafc);
        vertical-align: middle;
        color: var(--hrdb-ink, #1e293b);
    }

        .atpc-tbl tbody td:last-child {
            border-right: none;
        }

    .atpc-tbl tbody tr:hover td {
        background: var(--hrdb-primary-tint, #f5f3ff) !important;
    }

    .atpc-tbl tfoot td,
    .atpc-tbl tfoot th {
        background: var(--hrdb-primary-tint, #ede9fe);
        color: var(--hrdb-primary, #4338ca);
        font-weight: 900;
        padding: 5px 10px;
        border-top: 2px solid var(--hrdb-primary, #6366f1);
        border-right: 1px solid var(--hrdb-line, #e9ecef);
    }

.atpc-school-row {
    cursor: pointer;
}

    .atpc-school-row.is-open td {
        background: var(--hrdb-primary-tint, #e8f4fd) !important;
    }

.hrps-tbl-drillrow { cursor: pointer; }
.hrdb-tbl-drillrow { cursor: pointer; }
.hrps-card-drillrow { cursor: pointer; }
.hrdb-card-drillrow { cursor: pointer; }

.atpc-tbl-hdr-row th, .atpc-tbl-hdr-row td {
    background: var(--hrdb-primary, #4338ca) !important;
    color: #fff !important;
    font-weight: 700;
}

.atpc-tbl-hdr-inner th, .atpc-tbl-hdr-inner td {
    background: var(--hrdb-primary-tint, #ede9fe) !important;
    color: var(--hrdb-primary, #4338ca) !important;
    font-weight: 700;
}

/* Toolbar Excel/PDF buttons — outlined primary */
.hrdb-scope .atpc-tb .enqad-box-btn {
    border-color: var(--hrdb-primary, #4338ca) !important;
    background: var(--hrdb-surface, #fff) !important;
    color: var(--hrdb-primary, #4338ca) !important;
}

    .hrdb-scope .atpc-tb .enqad-box-btn:hover {
        background: var(--hrdb-primary, #4338ca) !important;
        color: #fff !important;
        border-color: var(--hrdb-primary, #4338ca) !important;
    }

/* ---------- Responsive (mirrors the reference design breakpoints) ---------- */
@media (max-width: 1180px) {
    .hrdb-scope .col-lg-4 {
        width: 50%;
    }
}

@media (max-width: 980px) {
    .hrdb-scope .chart-container .col-md-4,
    .hrdb-scope .chart-container .col-md-8 {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .hrdb-scope .box-header {
        padding: 12px 14px;
    }

    .hrdb-scope .box-body {
        padding: 12px 14px;
    }

    .hrdb-scope table.table {
        font-size: 11.5px;
    }
}

/* ═══ Stacked Bar Chart Widget (sbc) ═══════════════════════════════ */
/* toolbar hidden — controls hoisted into outer panel header by mi2SaLoadSwCtrls() */
.sbc-tb {
    display: none !important;
}

.sbc-body {
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 260px;
}

.sbc-chart-sec {
    flex: 1;
    min-height: 0;
    position: relative;
}

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

.sbc-tbl-sec {
    flex: 1;
    min-height: 0;
    overflow-x: auto;
    overflow-y: auto;
}

.sbc-tbl {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    color: var(--hrdb-ink);
    background: var(--hrdb-surface);
}

    .sbc-tbl th, .sbc-tbl td {
        padding: 6px 10px;
        border: 1px solid var(--hrdb-line);
        text-align: center;
        white-space: nowrap;
    }

    .sbc-tbl thead tr:first-child th {
        background: var(--hrdb-primary);
        color: #fff;
        font-weight: 700;
        font-size: 12px;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    .sbc-tbl thead tr:nth-child(2) th {
        background: var(--hrdb-surface-2, #f8fafc);
        color: var(--hrdb-primary, #4338ca);
        font-weight: 800;
        font-size: 10px;
        text-transform: uppercase;
        letter-spacing: .3px;
        border-bottom: 2px solid var(--hrdb-primary, #6366f1);
        position: sticky;
        top: 28px;
        z-index: 1;
    }

        .sbc-tbl thead tr:nth-child(2) th:nth-child(2) {
            text-align: left;
        }

    .sbc-tbl tbody td:nth-child(2) {
        text-align: left;
    }

    .sbc-tbl tbody tr:hover td {
        background: var(--hrdb-primary-tint, #f5f3ff) !important;
    }

    .sbc-tbl tbody tr:nth-child(even) td {
        background: inherit;
    }

.sbc-cell-total {
    background: var(--hrdb-primary) !important;
    color: #fff !important;
    font-weight: 700;
}

.sbc-tbl tfoot td {
    background: var(--hrdb-primary-tint, #ede9fe) !important;
    font-weight: 900;
    border-top: 2px solid var(--hrdb-primary, #6366f1) !important;
    color: var(--hrdb-primary, #4338ca);
}

.sbc-tbl tfoot .sbc-cell-total {
    background: var(--hrdb-primary) !important;
    color: #fff !important;
}

/* ── SBC Year-Filter Modal (sbc-yf-*) ──────────────────────────── */
.sbc-yf-dialog {
    max-width: 840px;
    width: 92%;
    margin: 30px auto;
}

.sbc-yf-content {
    border-radius: 14px !important;
    border: none;
    box-shadow: 0 25px 60px rgba(0,0,0,.3);
    overflow: hidden;
    background: #ffffff !important;
}

.sbc-yf-header {
    position: relative;
    padding: 16px 20px;
    border-bottom: 1px solid var(--hrdb-line, #e2e8f0);
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sbc-yf-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--hrdb-ink, #1e293b);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.sbc-yf-ico {
    color: var(--hrdb-primary, #4338ca);
    font-size: 16px;
}

.sbc-yf-close {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    color: #64748b;
    opacity: .7;
    border: none;
    background: transparent;
    cursor: pointer;
}

    .sbc-yf-close:hover {
        opacity: 1;
    }

.sbc-yf-body {
    padding: 20px;
    background: #fafafa;
}

.sbc-yf-footer {
    padding: 12px 20px;
    border-top: 1px solid #f1f5f9;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.sbc-yf-cancel {
    border-radius: 8px !important;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 16px;
    border: 1px solid #cbd5e1;
}

.sbc-yf-apply {
    background: var(--hrdb-primary, #4338ca);
    color: #fff;
    border: none;
    border-radius: 8px !important;
    font-size: 11px;
    font-weight: 800;
    padding: 6px 18px;
    box-shadow: var(--hrdb-shadow-soft, 0 2px 6px rgba(67,56,202,.3));
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

    .sbc-yf-apply:hover {
        background: var(--hrdb-primary-dark, #3730a3);
    }

.sbc-nodata-msg {
    text-align: center;
}

/* outer panel subtitle slot (mi2sa-outer) */
.mi2sa-outer .mi2sa-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.mi2sa-outer .mi2sa-subtitle {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--hrdb-ink-soft);
    letter-spacing: 0.01em;
}

/* ═══════════════════════════════════════════
   SCHOOL YEAR-WISE STRENGTH ANALYTICS (saa / syw)
   ═══════════════════════════════════════════ */
.saa * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.saa {
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 12px;
}

/* Equal height row support (.mi2-equal-row) */
.mi2-equal-row {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
}

    .mi2-equal-row > [class*="col-"] {
        display: flex !important;
        flex-direction: column !important;
    }
        /* right-col: hrdb-scope is direct child of col */
        .mi2-equal-row > [class*="col-"] > .hrdb-scope {
            flex: 1 !important;
            display: flex !important;
            flex-direction: column !important;
            width: 100%;
        }
        /* left-col: clientLazyLoading is direct child of col; hrdb-scope lives inside it */
        .mi2-equal-row > [class*="col-"] > .clientLazyLoading {
            flex: 1 !important;
            display: flex !important;
            flex-direction: column !important;
        }

    .mi2-equal-row .clientLazyLoading > .hrdb-scope {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        width: 100%;
    }

    .mi2-equal-row > [class*="col-"] > .hrdb-scope > .hrdb-panel,
    .mi2-equal-row .mi2sa-outer,
    .mi2-equal-row .ssbar-outer-panel {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important;
        min-height: 350px !important;
    }
    /* body scrolls rather than overflowing into panel's overflow:hidden */
    .mi2-equal-row .hrdb-panel-body {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        min-height: 0;
        overflow-y: auto;
    }

    .mi2-equal-row .StudentStrengthChratDIV {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important;
    }
    /* saa flex-fill chain: hrdb-panel-body (flex col) → #AttendanceDetails → .saa → .saa-wrap */
    .mi2-equal-row #AttendanceDetails {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        min-height: 0;
    }

        .mi2-equal-row #AttendanceDetails > .saa {
            flex: 1 !important;
            display: flex !important;
            flex-direction: column !important;
            min-height: 0;
        }

.saa-wrap {
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    overflow: hidden !important;
    position: relative !important;
}

/* Toolbar */
.saa-tb {
    flex-shrink: 0;
    height: 38px;
    background: linear-gradient(135deg,#1565c0 0%,#6d28d9 55%,#1d6fb5 100%);
    padding: 0 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-radius: 12px 12px 0 0 !important;
    box-shadow: 0 2px 8px rgba(21,101,192,.3);
    position: relative;
    z-index: 10;
}

.saa-title {
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 5px;
}

.saa-tb-lbl {
    color: rgba(255,255,255,.55);
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.saa-date-inp {
    background: rgba(255,255,255,.13);
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 6px !important;
    color: #fff;
    padding: 0 8px;
    font-size: 11px;
    height: 24px;
    outline: none;
    cursor: pointer;
    width: 108px;
    flex-shrink: 0;
}

    .saa-date-inp:focus {
        border-color: #93c5fd;
    }

.saa-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 6px !important;
    border: 1px solid rgba(255,255,255,.28);
    background: rgba(255,255,255,.13);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .14s;
    position: relative;
}

    .saa-ico:hover:not(:disabled) {
        background: rgba(255,255,255,.26);
    }

    .saa-ico:disabled {
        opacity: .4;
        cursor: not-allowed;
    }

.saa-ico-refresh {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    border-color: transparent;
    box-shadow: 0 1px 5px rgba(99,102,241,.35);
}

    .saa-ico-refresh:hover:not(:disabled) {
        filter: brightness(1.1);
    }

/* Body */
.saa-body {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0;
    position: relative;
    overflow: hidden;
    border-radius: 0 0 12px 12px !important;
    padding-bottom: 34px;
}

.saa-chart-sec {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    min-height: 0;
}

.saa-tbl-sec {
    width: 100%;
    display: flex;
    flex-direction: column;
    display: none;
    background: #fff;
    z-index: 5;
    height: 100%;
}

    .saa-tbl-sec.show {
        display: flex;
    }

/* Chart Top Section */
.saa-chart-top {
    padding: 4px 14px 0;
    flex-shrink: 0;
}

.saa-sec-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.saa-sec-ttl {
    font-size: 11px;
    font-weight: 800;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sdot {
    width: 6px;
    height: 6px;
    border-radius: 50% !important;
    flex-shrink: 0;
    display: inline-block;
}

/* Legend Chips */
.saa-leg {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 0 14px 4px;
    flex-shrink: 0;
}

.saa-lp {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 20px !important;
    font-size: 9.5px;
    font-weight: 700;
    color: #fff;
}

.saa-lp-dot {
    width: 4px;
    height: 4px;
    border-radius: 50% !important;
    background: rgba(255,255,255,.85);
}

/* Bars Area — 24px bar track capsule */
.saa-bars-wrap {
    flex: 1 !important;
    min-height: 0;
    padding: 2px 14px 36px;
    overflow: visible;
    display: flex !important;
    flex-direction: column !important;
}

.saa-bars {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-evenly !important;
    flex: 1 !important;
    gap: 4px;
    width: 100%;
}

    .saa-bars .saa-br {
        display: flex;
        align-items: center;
        gap: 8px;
        position: relative;
        height: 24px !important;
        min-height: 24px !important;
        max-height: 24px !important;
        flex-shrink: 0;
    }

.saa-br-lbl {
    width: 70px;
    flex-shrink: 0;
    font-size: 10.5px;
    font-weight: 800;
    color: #334155;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    text-transform: uppercase;
}

/* Bar Capsule Track — 24px height */
.saa-br-track {
    flex: 1;
    height: 24px !important;
    max-height: 24px !important;
    background: #f1f5f9;
    border-radius: 9999px !important;
    display: flex;
    position: relative;
    cursor: pointer;
    overflow: hidden !important;
    transition: filter .13s, box-shadow .13s;
}

    .saa-br-track:hover {
        filter: brightness(1.07);
        box-shadow: 0 2px 8px rgba(0,0,0,.14);
    }

.saa-br-inner {
    display: flex;
    width: 100%;
    height: 100%;
}

.saa-br-seg {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 800;
    color: rgba(255,255,255,.95);
    min-width: 0;
    overflow: hidden;
    border-radius: 0 !important;
}

.saa-br-tot {
    width: 54px;
    flex-shrink: 0;
    font-size: 10.5px;
    font-weight: 800;
    color: #1e293b;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 4px;
}

/* Floating Tooltip */
.syw-float-tip,
.saa-float-tip {
    display: none;
    position: absolute;
    z-index: 9999 !important;
    background: #0f172a;
    color: #f8fafc;
    border-radius: 8px !important;
    padding: 6px 10px;
    font-size: 9px;
    min-width: 170px;
    max-width: 230px;
    box-shadow: 0 5px 18px rgba(0,0,0,.35);
    pointer-events: none;
    border: 1px solid rgba(99,102,241,.3);
}

    .saa-float-tip b {
        color: #a5f3fc;
        font-size: 10px;
        display: block;
        margin-bottom: 3px;
    }

.saa-tip-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 2px;
}

/* ─── Shared Pager Footer ─── */
.saa-pager {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 34px !important;
    border-top: 1px solid var(--hrdb-line, #e9ecef) !important;
    background: var(--hrdb-surface-2, #f8fafc) !important;
    border-radius: 0 0 12px 12px !important;
    z-index: 10 !important;
}

.saa-pg-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    height: 100%;
    margin: 0 auto;
}

.saa-pager .pg-lbl {
    text-align: center;
    font-size: 10px;
    font-weight: 800;
    color: var(--hrdb-ink-soft, #475569);
    white-space: nowrap;
    letter-spacing: .1px;
}

.pg-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 16px;
    border-radius: 20px !important;
    border: none !important;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .2px;
    cursor: pointer;
    touch-action: manipulation;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all .14s;
    box-shadow: 0 1px 4px rgba(0,0,0,.12);
}

    .pg-btn.btn-prev {
        background: var(--hrdb-primary, #4f46e5) !important;
        color: #fff !important;
    }

        .pg-btn.btn-prev:hover:not(:disabled) {
            background: var(--hrdb-primary-dark, #3730a3) !important;
            color: #fff !important;
            box-shadow: var(--hrdb-shadow-soft, 0 2px 8px rgba(79,70,229,.4));
            transform: translateY(-1px);
        }

    .pg-btn.btn-next {
        background: linear-gradient(135deg, var(--hrdb-primary, #6366f1), var(--hrdb-primary-dark, #4f46e5)) !important;
        color: #fff !important;
    }

        .pg-btn.btn-next:hover:not(:disabled) {
            background: linear-gradient(135deg, var(--hrdb-primary-dark, #4f46e5), var(--hrdb-primary-dark, #3730a3)) !important;
            box-shadow: var(--hrdb-shadow-soft, 0 2px 8px rgba(79,70,229,.4));
            transform: translateY(-1px);
        }

    .pg-btn:disabled {
        opacity: .35;
        cursor: not-allowed;
        transform: none !important;
        box-shadow: none !important;
    }

/* ─── Table View ─── */
.saa-sum {
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 12px;
    background: var(--hrdb-surface-2, #f8fafc);
    border-bottom: 1px solid var(--hrdb-line, #e9ecef);
}

.saa-sum-card {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px !important;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.saa-tbl-hdr {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    border-bottom: 1px solid var(--hrdb-line, #f1f5f9);
    gap: 6px;
}

.saa-srch {
    border: 1.5px solid var(--hrdb-line, #e2e8f0);
    border-radius: 6px !important;
    padding: 2px 8px;
    font-size: 10px;
    outline: none;
    background: var(--hrdb-surface-2, #f8fafc);
    width: 140px;
    height: 24px;
}

    .saa-srch:focus {
        border-color: var(--hrdb-primary, #6366f1);
        background: var(--hrdb-surface, #fff);
    }

.saa-tbl-wrap {
    flex: 1;
    min-height: 0;
    overflow-x: auto;
    overflow-y: auto;
    padding-bottom: 38px;
}

.saa-tbl {
    width: 100%;
    border-collapse: collapse;
    font-size: 10px;
    table-layout: auto;
}

    .saa-tbl thead tr th {
        position: sticky;
        top: 0;
        z-index: 2;
        background: var(--hrdb-surface-2, #f8fafc);
        color: var(--hrdb-ink-soft, #64748b);
        font-weight: 800;
        padding: 6px 8px;
        text-align: left;
        border-bottom: 2px solid var(--hrdb-line, #d1d5db);
        border-right: 1px solid var(--hrdb-line, #e9ecef);
        white-space: nowrap;
        font-size: 9px;
        text-transform: uppercase;
        letter-spacing: .3px;
    }

    .saa-tbl thead th:last-child {
        border-right: none;
    }

    .saa-tbl tbody td {
        padding: 5px 8px;
        border-bottom: 1px solid var(--hrdb-line, #f1f5f9);
        border-right: 1px solid var(--hrdb-line, #f8fafc);
        vertical-align: middle;
        white-space: nowrap;
    }

        .saa-tbl tbody td:last-child {
            border-right: none;
        }

    .saa-tbl tbody tr:hover td {
        background: var(--hrdb-primary-tint, #f5f3ff) !important;
    }

.saa-sc-cell {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.saa-sc-av {
    width: 20px;
    height: 20px;
    border-radius: 4px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 900;
    color: #fff;
    flex-shrink: 0;
    background: var(--hrdb-primary, #6366f1);
}

.saa-sc-nm {
    font-weight: 700;
    color: var(--hrdb-ink, #1e293b);
    font-size: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.saa-rk {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 3px !important;
    font-size: 8px;
    font-weight: 900;
}

.saa-rk1 {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #fff;
}

.saa-rk2 {
    background: linear-gradient(135deg, #94a3b8, #64748b);
    color: #fff;
}

.saa-rk3 {
    background: linear-gradient(135deg, #fb923c, #f97316);
    color: #fff;
}

.saa-rkn {
    background: var(--hrdb-surface-2, #f1f5f9);
    color: var(--hrdb-ink-soft, #64748b);
}

.saa-bdg {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px !important;
    font-size: 9px;
    font-weight: 800;
    white-space: nowrap;
}

/* ─── Combined Modal Item Styling ─── */
.syw-fbadge {
    background: var(--hrdb-primary, #4338ca);
    color: #fff;
    border-radius: 50% !important;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 900;
    margin-left: 4px;
}

.syw-fitem {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid var(--hrdb-line, #e2e8f0);
    border-radius: 8px !important;
    background: var(--hrdb-surface, #fff);
    cursor: pointer;
    transition: all .15s ease;
    user-select: none;
}

    .syw-fitem:hover {
        border-color: var(--hrdb-line, #cbd5e1);
        background: var(--hrdb-surface-2, #f8fafc);
    }

    .syw-fitem.is-selected {
        border-color: var(--hrdb-primary, #4338ca) !important;
        background: var(--hrdb-primary-tint, #eef2ff) !important;
    }

    .syw-fitem input[type="checkbox"] {
        width: 15px;
        height: 15px;
        accent-color: var(--hrdb-primary, #4338ca);
        cursor: pointer;
        flex-shrink: 0;
    }

.syw-fitem-lbl {
    font-size: 11px;
    font-weight: 700;
    color: var(--hrdb-ink, #1e293b);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.saa-skel {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 0;
    width: 100%;
    flex: 1;
}

.saa-sk-row {
    height: 24px;
    background: linear-gradient(90deg, var(--hrdb-surface-2, #f1f5f9) 25%, var(--hrdb-line, #e2e8f0) 50%, var(--hrdb-surface-2, #f1f5f9) 75%);
    background-size: 200% 100%;
    animation: saaSk 1.4s infinite;
    border-radius: 9999px !important;
}

@keyframes saaSk {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.saa-nodata {
    text-align: center;
    padding: 40px 10px;
    color: var(--hrdb-ink-soft, #64748b);
}

/* ─── Table utility classes ─── */
.saa-bdg-neutral {
    background: var(--hrdb-surface-2, #f1f5f9);
    color: var(--hrdb-ink, #1e293b);
}

.saa-tbl-total-val {
    color: var(--hrdb-primary, #4338ca);
    font-size: 11px;
    font-weight: 900;
}

.saa-rtot-lbl {
    color: var(--hrdb-primary-dark, #4c1d95);
    font-weight: 900;
}

.saa-rtot-val {
    text-align: right;
    font-weight: 900;
    color: var(--hrdb-primary-dark, #4c1d95);
}

/* Top Header Control Slots (#sscht-sw-ctrls) */
#sscht-sw-ctrls {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin-right: 6px;
}

    #sscht-sw-ctrls .saa-tb-btn, #sscht-sw-ctrls .enqad-box-btn {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 28px !important;
        height: 28px !important;
        border-radius: 6px !important;
        border: 1px solid var(--hrdb-primary, #4338ca) !important;
        background: var(--hrdb-surface, #ffffff) !important;
        color: var(--hrdb-primary, #4338ca) !important;
        font-size: 13px !important;
        cursor: pointer !important;
        transition: all .14s ease !important;
    }

        #sscht-sw-ctrls .saa-tb-btn:hover, #sscht-sw-ctrls .enqad-box-btn:hover {
            background: var(--hrdb-primary, #4338ca) !important;
            color: #ffffff !important;
            border-color: var(--hrdb-primary, #4338ca) !important;
        }

        #sscht-sw-ctrls .saa-tb-btn.on, #sscht-sw-ctrls .enqad-box-btn.on {
            background: var(--hrdb-primary, #4338ca) !important;
            color: #ffffff !important;
            border-color: var(--hrdb-primary, #4338ca) !important;
        }

/* FullSchoolYearFilterModal & SchoolFilterGraph Header, Z-Index & Close Button Alignment */
#FullSchoolYearFilterModal,
#SchoolFilterGraph,
#YearFilterGraph {
    z-index: 1055 !important;
}

    #FullSchoolYearFilterModal .modal-dialog,
    #SchoolFilterGraph .modal-dialog,
    #YearFilterGraph .modal-dialog {
        position: relative !important;
        z-index: 1056 !important;
        max-width: 840px !important;
        width: 92% !important;
        margin: 30px auto !important;
    }

    #FullSchoolYearFilterModal .modal-content,
    #SchoolFilterGraph .modal-content,
    #YearFilterGraph .modal-content {
        border-radius: 14px !important;
        border: none !important;
        box-shadow: 0 25px 60px rgba(0,0,0,0.3) !important;
        overflow: hidden !important;
        background: #ffffff !important;
    }

    #FullSchoolYearFilterModal .modal-header,
    #SchoolFilterGraph .modal-header,
    #YearFilterGraph .modal-header {
        position: relative !important;
        padding: 16px 20px !important;
        border-bottom: 1px solid #e2e8f0 !important;
        background: #ffffff !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        min-height: 56px !important;
    }

        #FullSchoolYearFilterModal .modal-header::before,
        #FullSchoolYearFilterModal .modal-header::after,
        #SchoolFilterGraph .modal-header::before,
        #SchoolFilterGraph .modal-header::after,
        #YearFilterGraph .modal-header::before,
        #YearFilterGraph .modal-header::after {
            display: none !important;
        }

    #FullSchoolYearFilterModal .modal-title,
    #SchoolFilterGraph .modal-title,
    #YearFilterGraph .modal-title {
        font-size: 15px !important;
        font-weight: 800 !important;
        color: #1e293b !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        margin: 0 !important;
        padding: 0 !important;
        line-height: 1.3 !important;
        float: none !important;
    }

    #FullSchoolYearFilterModal button.close,
    #SchoolFilterGraph button.close,
    #YearFilterGraph button.close {
        position: absolute !important;
        right: 18px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        font-size: 24px !important;
        font-weight: 400 !important;
        line-height: 1 !important;
        color: #64748b !important;
        opacity: 0.7 !important;
        background: transparent !important;
        border: none !important;
        outline: none !important;
        padding: 4px 8px !important;
        margin: 0 !important;
        float: none !important;
        cursor: pointer !important;
        transition: all .15s ease !important;
    }

        #FullSchoolYearFilterModal button.close:hover,
        #SchoolFilterGraph button.close:hover,
        #YearFilterGraph button.close:hover {
            color: #0f172a !important;
            opacity: 1 !important;
            transform: translateY(-50%) scale(1.15) !important;
        }

/* View Toggle Pill (.enqad-viewtoggle) */
/* ── Global pill (used outside sscht-sw-ctrls) ── */
.enqad-viewtoggle {
    display: inline-flex !important;
    align-items: center !important;
    border: 1px solid var(--hrdb-line, #cbd5e1) !important;
    border-radius: 8px !important;
    background: var(--hrdb-surface-2, #f8fafc) !important;
    padding: 2px !important;
    gap: 2px !important;
    height: 28px !important;
    width: auto !important;
    min-width: 58px !important;
    box-sizing: border-box !important;
}

.enqad-vt-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 22px !important;
    width: 26px !important;
    border: none !important;
    border-radius: 6px !important;
    background: transparent !important;
    color: var(--hrdb-ink-soft, #64748b) !important;
    font-size: 12px !important;
    cursor: pointer !important;
    transition: all .15s ease !important;
    padding: 0 !important;
    outline: none !important;
    box-sizing: border-box !important;
}

    .enqad-vt-btn:hover:not(.is-active) {
        color: var(--hrdb-primary, #4338ca) !important;
        background: var(--hrdb-primary-tint, #eef2ff) !important;
    }

    .enqad-vt-btn.is-active {
        background: var(--hrdb-primary, #4338ca) !important;
        color: #ffffff !important;
        box-shadow: var(--hrdb-shadow-soft, 0 1px 4px rgba(67,56,202,0.3)) !important;
    }

/* ── #sscht-sw-ctrls: strip the pill — each vt-btn becomes its own
       outlined square matching enqad-box-btn (28×28) ── */
#sscht-sw-ctrls .enqad-viewtoggle {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    height: auto !important;
    min-width: 0 !important;
    gap: 4px !important;
    border-radius: 0 !important;
}

#sscht-sw-ctrls .enqad-vt-btn {
    width: 28px !important;
    height: 28px !important;
    border: 1px solid var(--hrdb-primary, #4338ca) !important;
    border-radius: 6px !important;
    background: var(--hrdb-surface, #ffffff) !important;
    color: var(--hrdb-primary, #4338ca) !important;
    font-size: 12px !important;
}

    #sscht-sw-ctrls .enqad-vt-btn:hover:not(.is-active) {
        background: var(--hrdb-primary, #4338ca) !important;
        color: #ffffff !important;
        border-color: var(--hrdb-primary, #4338ca) !important;
    }

    #sscht-sw-ctrls .enqad-vt-btn.is-active {
        background: var(--hrdb-primary, #4338ca) !important;
        color: #ffffff !important;
        border-color: var(--hrdb-primary, #4338ca) !important;
        box-shadow: var(--hrdb-shadow-soft, 0 1px 4px rgba(67,56,202,0.3)) !important;
    }

/* ═══ School & Year Filter Card (.syw-fitem) ═════════════════════ */
.syw-fitem,
label.syw-fitem,
.year-card.syw-fitem {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    width: 100% !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 8px 14px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    background: #ffffff !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    user-select: none !important;
    box-sizing: border-box !important;
}

    .syw-fitem:hover,
    label.syw-fitem:hover {
        border-color: #cbd5e1 !important;
        background: #f8fafc !important;
    }

    .syw-fitem.is-selected,
    label.syw-fitem.is-selected,
    .year-card.syw-fitem.is-selected,
    .syw-fitem:has(input[type="checkbox"]:checked) {
        border: 1.5px solid var(--hrdb-primary, #4338ca) !important;
        background: var(--hrdb-primary-tint, #eef2ff) !important;
        box-shadow: 0 2px 8px rgba(67,56,202,.12) !important;
    }

    /* Custom Rounded Checkbox */
    .syw-fitem input[type="checkbox"],
    .syw-sch-chk {
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
        appearance: none !important;
        width: 18px !important;
        height: 18px !important;
        min-width: 18px !important;
        min-height: 18px !important;
        border: 2px solid #cbd5e1 !important;
        border-radius: 5px !important;
        background-color: #ffffff !important;
        margin: 0 !important;
        padding: 0 !important;
        cursor: pointer !important;
        position: relative !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        transition: all 0.15s ease !important;
        flex-shrink: 0 !important;
        outline: none !important;
    }

        .syw-fitem input[type="checkbox"]:hover,
        .syw-sch-chk:hover {
            border-color: var(--hrdb-primary, #4338ca) !important;
        }

        .syw-fitem input[type="checkbox"]:checked,
        .syw-sch-chk:checked,
        .syw-fitem.is-selected input[type="checkbox"] {
            background-color: var(--hrdb-primary, #4338ca) !important;
            border-color: var(--hrdb-primary, #4338ca) !important;
        }

            .syw-fitem input[type="checkbox"]:checked::after,
            .syw-sch-chk:checked::after,
            .syw-fitem.is-selected input[type="checkbox"]::after {
                content: '' !important;
                display: block !important;
                width: 5px !important;
                height: 9px !important;
                border: solid #ffffff !important;
                border-width: 0 2.2px 2.2px 0 !important;
                transform: rotate(45deg) translate(-0.5px, -0.5px) !important;
            }

.syw-fitem-lbl {
    font-size: 11.5px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    flex: 1 !important;
    line-height: 1.3 !important;
    margin: 0 !important;
    padding: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    cursor: pointer !important;
}

.syw-fitem.is-selected .syw-fitem-lbl {
    color: var(--hrdb-primary-dark, #3730a3) !important;
}

/* ════════════════════════════════════════════════════════════════════
   SELECTION WIDGET — Layout Shell
   Used by: SchoolSelectionForChart.cshtml, CommonYear_Selection.cshtml
   Classes: .syw-wrap  .syw-head  .syw-head-title  .syw-head-icon
            .syw-grid  .syw-col   .syw-empty  .syw-empty-img
            .syw-empty-icon  .syw-empty-msg
   ════════════════════════════════════════════════════════════════════ */

/* ── :root defaults so --hrdb-primary resolves outside .hrdb-scope ── */
:root {
    --hrdb-primary: #4338ca;
    --hrdb-primary-dark: #3730a3;
    --hrdb-primary-tint: #eef2ff;
}

/* Outer wrapper */
.syw-wrap {
    padding: 4px;
}

/* Header bar */
.syw-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--hrdb-line, #e2e8f0);
}

/* Header title text */
.syw-head-title {
    font-size: 12px;
    font-weight: 800;
    color: var(--hrdb-ink, #1e293b);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Header icon — skin-aware */
.syw-head-icon {
    color: var(--hrdb-primary, #4338ca);
}

/* Grid of item cards */
.syw-grid {
    margin: 0 -4px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 0;
}

/* Each item column */
.syw-col {
    padding: 0 4px;
}

/* Empty state */
.syw-empty {
    text-align: center;
    padding: 30px;
}

.syw-empty-img {
    height: 160px;
}

.syw-empty-icon {
    font-size: 32px;
}

.syw-empty-msg {
    margin-top: 10px;
    font-weight: 600;
    color: #64748b;
}

/* ════════════════════════════════════════════════════════════════════
   SKIN OVERRIDES — HRDashboardRedesign
   ─────────────────────────────────────────────────────────────────
   Remaps the three primary tokens so every component that consumes
   --hrdb-primary / --hrdb-primary-dark / --hrdb-primary-tint
   automatically tracks the AdminLTE body.skin-* class.

   Pattern mirrors MCampusCardLayout.css (hrc-wrapper + rd-wrapper
   sections): declare on body (cascades everywhere) AND on the
   wrapper class directly (beats any :root specificity).

   Colour reference:
     skin-blue        #3c8dbc / #367fa9   (AdminLTE steel-blue)
     skin-purple      #605ca8 / #555299
     skin-green       #00a65a / #008d4c
     skin-red         #dd4b39 / #c23321
     skin-yellow      #d68910 / #b7770d   (darkened amber — contrast-safe on white)
     skin-black       #444444 / #222222
     skin-blue-yellow #017acf / #0161a4   (custom project skin)
   ════════════════════════════════════════════════════════════════════ */

/* ── skin-blue ──────────────────────────────────────────────────── */
body.skin-blue,
body.skin-blue .hrdb-scope,
body.skin-blue-light,
body.skin-blue-light .hrdb-scope {
    --hrdb-primary: #3c8dbc;
    --hrdb-primary-dark: #367fa9;
    --hrdb-primary-tint: #d6eaf8;
    --hrdb-shadow-soft: 0 1px 2px rgba(60,141,188,.05), 0 8px 24px -10px rgba(60,141,188,.16);
}

/* ── skin-purple ────────────────────────────────────────────────── */
body.skin-purple,
body.skin-purple .hrdb-scope,
body.skin-purple-light,
body.skin-purple-light .hrdb-scope {
    --hrdb-primary: #605ca8;
    --hrdb-primary-dark: #555299;
    --hrdb-primary-tint: #ede9fe;
    --hrdb-shadow-soft: 0 1px 2px rgba(96,92,168,.05), 0 8px 24px -10px rgba(96,92,168,.16);
}

/* ── skin-green ─────────────────────────────────────────────────── */
body.skin-green,
body.skin-green .hrdb-scope,
body.skin-green-light,
body.skin-green-light .hrdb-scope {
    --hrdb-primary: #00a65a;
    --hrdb-primary-dark: #008d4c;
    --hrdb-primary-tint: #d1fae5;
    --hrdb-shadow-soft: 0 1px 2px rgba(0,166,90,.05), 0 8px 24px -10px rgba(0,166,90,.16);
}

/* ── skin-red ───────────────────────────────────────────────────── */
body.skin-red,
body.skin-red .hrdb-scope,
body.skin-red-light,
body.skin-red-light .hrdb-scope {
    --hrdb-primary: #dd4b39;
    --hrdb-primary-dark: #c23321;
    --hrdb-primary-tint: #fee2e2;
    --hrdb-shadow-soft: 0 1px 2px rgba(221,75,57,.05), 0 8px 24px -10px rgba(221,75,57,.16);
}

/* ── skin-yellow ────────────────────────────────────────────────── */
/* Using #d68910 (darkened amber) so --hrdb-primary stays contrast-safe
   on white backgrounds (icon text, active button text, borders).       */
body.skin-yellow,
body.skin-yellow .hrdb-scope,
body.skin-yellow-light,
body.skin-yellow-light .hrdb-scope {
    --hrdb-primary: #d68910;
    --hrdb-primary-dark: #b7770d;
    --hrdb-primary-tint: #fef3c7;
    --hrdb-shadow-soft: 0 1px 2px rgba(214,137,16,.05), 0 8px 24px -10px rgba(214,137,16,.16);
}

/* ── skin-black ─────────────────────────────────────────────────── */
body.skin-black,
body.skin-black .hrdb-scope,
body.skin-black-light,
body.skin-black-light .hrdb-scope {
    --hrdb-primary: #444444;
    --hrdb-primary-dark: #222222;
    --hrdb-primary-tint: #f1f5f9;
    --hrdb-shadow-soft: 0 1px 2px rgba(68,68,68,.05), 0 8px 24px -10px rgba(68,68,68,.16);
}

/* ── skin-blue-yellow (custom project skin — primary is the blue) ── */
body.skin-blue-yellow,
body.skin-blue-yellow .hrdb-scope,
body.skin-blue-yellow-light,
body.skin-blue-yellow-light .hrdb-scope {
    --hrdb-primary: #017acf;
    --hrdb-primary-dark: #0161a4;
    --hrdb-primary-tint: #d4eaf7;
    --hrdb-shadow-soft: 0 1px 2px rgba(1,122,207,.05), 0 8px 24px -10px rgba(1,122,207,.16);
}

/* ═══ School Year-Wise Strength Analytics (SYW) ══════════════════ */
.syw-embedded-wrap {
    border-radius: 0 0 12px 12px !important;
    border: none;
    box-shadow: none;
}

.syw-tblhdr-lbl {
    font-weight: 800;
    color: var(--hrdb-ink, #1e293b);
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.syw-tblhdr-ico {
    color: var(--hrdb-primary, #6366f1);
}

/* SYW Filter Modal */
.syw-modal-dialog {
    max-width: 840px;
    width: 94%;
    margin: 24px auto;
}

.syw-modal-content {
    border-radius: 14px !important;
    border: 1px solid var(--hrdb-line, #e2e8f0);
    box-shadow: 0 20px 50px rgba(0,0,0,.18);
    overflow: hidden;
    background: #ffffff !important;
}

.syw-modal-ico {
    color: var(--hrdb-primary, #4338ca);
    font-size: 16px;
}

.syw-modal-body-panel {
    padding: 16px 20px;
    background: #fafafa;
}

.syw-modal-intro {
    font-size: 11px;
    color: #64748b;
    margin-bottom: 14px;
    line-height: 1.4;
}

.syw-modal-row {
    margin: 0 -8px;
    display: flex;
    flex-wrap: wrap;
}

.syw-modal-col {
    padding: 0 8px;
}

.syw-modal-panel {
    background: #fff;
    border: 1px solid var(--hrdb-line, #e2e8f0);
    border-radius: 12px !important;
    padding: 14px;
    display: flex;
    flex-direction: column;
    height: 330px;
}

.syw-modal-panel-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.syw-modal-panel-title {
    font-size: 11px;
    font-weight: 900;
    color: var(--hrdb-ink, #1e293b);
    letter-spacing: 0.5px;
}

.syw-sel-all {
    font-size: 10px;
    font-weight: 800;
    color: var(--hrdb-primary, #4338ca);
    text-decoration: none;
}

    .syw-sel-all:hover {
        color: var(--hrdb-primary-dark, #3730a3);
        text-decoration: underline;
    }

.syw-srch-wrap {
    position: relative;
    margin-bottom: 10px;
}

.syw-srch-ico {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 11px;
}

.syw-srch-inp {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 8px !important;
    padding: 6px 10px 6px 28px;
    font-size: 11px;
    outline: none;
}

.syw-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-right: 4px;
}

.syw-modal-footer-inner {
    padding: 12px 20px;
    border-top: 1px solid #f1f5f9;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.syw-cancel-btn {
    border-radius: 8px !important;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 16px;
    border: 1px solid #cbd5e1;
}

.syw-apply-btn {
    background: var(--hrdb-primary, #4338ca);
    color: #fff;
    border: none;
    border-radius: 8px !important;
    font-size: 11px;
    font-weight: 800;
    padding: 6px 18px;
    box-shadow: var(--hrdb-shadow-soft, 0 2px 6px rgba(67,56,202,.3));
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

    .syw-apply-btn:hover {
        background: var(--hrdb-primary-dark, #3730a3);
    }

/* ═══ School Attendance Analytics (SAA) extras ════════════════════ */
.saa-vt-gap {
    margin-right: 2px;
}

.saa-chip-hint {
    background: transparent;
    color: #94a3b8;
}

/* ═══ ManagementIndex2 — Attendance panel header controls ════════
   Scope: .mi2sa-outer .enqad-panel-hd-right
   Covers: #mi2-saa-ctrls, #mi2-sw-ctrls, and the filter btn-group.
   All buttons equal 28×28, outlined primary, white base bg.
   ════════════════════════════════════════════════════════════════ */

/* Layout shells (replace inline styles) */
#mi2-saa-ctrls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

#mi2-sw-ctrls {
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* Date input — align height with buttons */
.hrdb-scope .mi2sa-dateinput {
    height: 28px !important;
}

/* Dropdown min-width (moved from inline) */
.hrdb-scope .mi2-sa-ddmenu {
    min-width: 200px !important;
}

/* Strip the toggle pill — each vt-btn becomes its own outlined square */
.mi2sa-outer .enqad-panel-hd-right .enqad-viewtoggle {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    height: auto !important;
    min-width: 0 !important;
    gap: 4px !important;
    border-radius: 0 !important;
}

/* vt-btn: 28×28 outlined primary */
.mi2sa-outer .enqad-panel-hd-right .enqad-vt-btn {
    width: 28px !important;
    height: 28px !important;
    border: 1px solid var(--hrdb-primary, #4338ca) !important;
    border-radius: 6px !important;
    background: var(--hrdb-surface, #ffffff) !important;
    color: var(--hrdb-primary, #4338ca) !important;
    font-size: 12px !important;
}

.mi2sa-outer .enqad-panel-hd-right .enqad-vt-btn:hover:not(.is-active) {
    background: var(--hrdb-primary, #4338ca) !important;
    color: #ffffff !important;
    border-color: var(--hrdb-primary, #4338ca) !important;
}

.mi2sa-outer .enqad-panel-hd-right .enqad-vt-btn.is-active {
    background: var(--hrdb-primary, #4338ca) !important;
    color: #ffffff !important;
    border-color: var(--hrdb-primary, #4338ca) !important;
    box-shadow: var(--hrdb-shadow-soft, 0 1px 4px rgba(67,56,202,.3)) !important;
}

/* enqad-box-btn: 28×28 outlined primary */
.mi2sa-outer .enqad-panel-hd-right .enqad-box-btn {
    width: 28px !important;
    height: 28px !important;
    border-radius: 6px !important;
    border: 1px solid var(--hrdb-primary, #4338ca) !important;
    background: var(--hrdb-surface, #ffffff) !important;
    color: var(--hrdb-primary, #4338ca) !important;
    font-size: 13px !important;
}

.mi2sa-outer .enqad-panel-hd-right .enqad-box-btn:hover {
    background: var(--hrdb-primary, #4338ca) !important;
    color: #ffffff !important;
    border-color: var(--hrdb-primary, #4338ca) !important;
}

/* ═══ Student Strength Chart (SSC) ═══════════════════════════════
   Used by: StudentStrengthChart.cshtml
   Classes: .ssc-sf-ico  .ssc-sf-body  .ssc-sf-footer
            .ssc-sf-cancel  .ssc-sf-apply
            .ssc-donut-flex  .ssc-chart-wrap  .ssc-legend
            .ssc-schoolwise-note  .ssc-schoolwise-total
   ════════════════════════════════════════════════════════════════ */

/* SchoolFilterGraph modal — icon in header */
.ssc-sf-ico {
    color: var(--hrdb-primary, #4338ca);
    font-size: 16px;
}

/* SchoolFilterGraph modal — body */
.ssc-sf-body {
    padding: 16px 20px !important;
    background: #fafafa !important;
}

/* SchoolFilterGraph modal — footer */
.ssc-sf-footer {
    padding: 12px 20px !important;
    border-top: 1px solid var(--hrdb-line, #f1f5f9) !important;
    background: #fff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
}

/* SchoolFilterGraph — Cancel button */
.ssc-sf-cancel {
    border-radius: 8px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    padding: 6px 16px !important;
    border: 1px solid #cbd5e1 !important;
}

/* SchoolFilterGraph — Apply button (theme-aware) */
.ssc-sf-apply {
    background: var(--hrdb-primary, #4338ca) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    padding: 6px 18px !important;
    box-shadow: var(--hrdb-shadow-soft, 0 2px 6px rgba(67,56,202,.3)) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    cursor: pointer !important;
}

    .ssc-sf-apply:hover {
        background: var(--hrdb-primary-dark, #3730a3) !important;
    }

/* Donut chart flex container — size overrides for student strength context */
.ssc-donut-flex {
    align-items: center;
    min-height: 240px;
}

/* Donut chart canvas wrapper */
.ssc-chart-wrap {
    height: 240px;
    flex: 0 0 240px;
    max-width: 240px;
}

/* Legend scroll cap */
.ssc-legend {
    max-height: 240px;
}

/* "Total Academic Strength of Selected Schools" note beneath chart */
.ssc-schoolwise-note {
    padding: 8px 2px 0;
    font-size: 12px;
    color: var(--hrdb-ink-soft, #64748b);
}

/* Bold total count inside the note */
.ssc-schoolwise-total {
    color: var(--hrdb-danger, #ef4444);
}

/* ═══ Student Strength Bar-Chart Outer Panel (SSBAR) ═════════════
   Used by: BarChartStudentStrength.cshtml
   Classes: .ssbar-outer-panel  .ssbar-dd-menu  .ssbar-dd-ico
            .ssbar-dd-ico-primary  .ssbar-loader
            .ssbar-loader-ic  .ssbar-loader-txt
   ════════════════════════════════════════════════════════════════ */

/* Outer panel — remove fixed height so inner chart content dictates height */
.ssbar-outer-panel {
    height: auto !important;
    min-height: 0 !important;
}

    /* Inner panel body — flush padding so chart sits edge-to-edge */
    .ssbar-outer-panel .hrdb-panel-body {
        padding: 0 !important;
        overflow: visible !important;
    }

/* Report-type dropdown button (outside #sscht-sw-ctrls) — match outline-primary style */
.ssbar-outer-panel .enqad-panel-hd-right > .btn-group > .enqad-box-btn {
    border: 1px solid var(--hrdb-primary, #4338ca) !important;
    background: var(--hrdb-surface, #ffffff) !important;
    color: var(--hrdb-primary, #4338ca) !important;
}

.ssbar-outer-panel .enqad-panel-hd-right > .btn-group > .enqad-box-btn:hover {
    background: var(--hrdb-primary, #4338ca) !important;
    color: #ffffff !important;
    border-color: var(--hrdb-primary, #4338ca) !important;
}

/* Report-type dropdown menu */
.ssbar-dd-menu {
    min-width: 210px;
}

/* Dropdown menu icons — muted/opacity variant */
.ssbar-dd-ico {
    width: 16px;
    margin-right: 6px;
    opacity: .6;
}

/* Dropdown menu icons — primary-colour variant */
.ssbar-dd-ico-primary {
    width: 16px;
    margin-right: 6px;
    color: var(--hrdb-primary, #4338ca);
}

/* Inner-view loader overlay — layout only (display:none toggled by JS) */
.ssbar-loader {
    text-align: center;
    padding: 48px 20px;
}

/* Loader spinner icon */
.ssbar-loader-ic {
    color: var(--hrdb-primary, #4338ca);
}

/* Loader text */
.ssbar-loader-txt {
    font-size: 12px;
    color: var(--hrdb-ink-soft, #64748b);
    margin-top: 10px;
}

/* ─── Mobile: pager tap + summary row ────────────────────────────────
   Two bugs on narrow screens (≤767 px):
   1. .saa-sum wraps to 2+ rows, eating all available panel height.
   2. .saa-pager (position:absolute;bottom:0) sits in .saa-body's
      padding-bottom area; iOS Safari blocks pointer-events inside the
      padding zone of an overflow:hidden container, making the buttons
      visually present but untappable.
   Fix 1: single horizontally-scrollable pill row.
   Fix 2: promote pager to a normal flex item (removes padding dep).
   ─────────────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
    /* Summary pills — single scrollable row, no wrap */
    .saa-sum {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .saa-sum-card {
        flex-shrink: 0 !important;
    }

    /* Pager — flow item instead of absolute, so it is in the
       content area and iOS pointer-events always reach it */
    .saa-pager {
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;
        height: 34px !important;
    }

    /* saa-body no longer needs padding-bottom reserved for absolute pager */
    .saa-body {
        padding-bottom: 0 !important;
    }

    /* bars-wrap had padding-bottom to clear the chart pager — not needed in flow */
    .saa-bars-wrap {
        padding-bottom: 0 !important;
    }
}
