.nx-staff-report {
    --report-ink: #142b3d;
    --report-muted: #536b7c;
    --report-line: #dbe5ec;
    --report-soft: #f3f7fa;
    --report-accent: #075a66;
    color: var(--report-ink);
    margin-bottom: 1rem;
}

.nx-report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: .75rem;
}
.nx-report-header :is(h1,h2,h3,p) { margin: 0; }
.nx-report-header :is(time,p), .nx-report-note { color: #536b7c; font-size: .875rem; }
.nx-report-header :is(h1,h2) { line-height: 1.2; }
.nx-report-header h1 { font-size: clamp(1.45rem, 2.5vw, 1.85rem); }
.nx-report-header h2 { font-size: 1.2rem; }
.nx-report-note { margin: .9rem 0 0; }
.nx-report-shortcut { margin-bottom: .65rem; }

.nx-report-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.9rem), 1fr));
    gap: .55rem;
    margin: 1rem 0;
}
.nx-report-metric,
button.nx-report-metric {
    display: grid;
    align-content: space-between;
    justify-content: start;
    text-align: start;
    gap: .3rem;
    min-height: 75px;
    padding: .7rem .8rem;
    border: 1px solid var(--report-line);
    border-radius: .78rem;
    background: var(--report-soft);
    color: var(--report-ink);
    text-decoration: none;
    white-space: normal;
}
.nx-report-metric span { color: var(--report-muted); font-size: .79rem; font-weight: 620; }
.nx-report-metric strong { font-size: 1.45rem; line-height: 1.3; font-variant-numeric: tabular-nums; }
.nx-report-metric:is([aria-current],[aria-pressed="true"]) {
    background: #e5f3f3;
    border-color: #8fc0c3;
    color: var(--report-accent);
}

.nx-report-table-wrap { overflow: auto; border: 1px solid var(--report-line); border-radius: .75rem; }
.nx-report-table { width: 100%; border-collapse: collapse; }
.nx-report-table :is(th,td) { padding: .67rem .8rem; text-align: start; border-bottom: 1px solid var(--report-line); }
.nx-report-table thead { background: var(--report-soft); }
.nx-report-table thead th { font-size: .79rem; color: var(--report-muted); }
.nx-report-table tbody tr:last-child :is(th,td) { border-bottom: 0; }
.nx-report-table th small, .nx-report-students small { display: block; color: #536b7c; font-weight: 500; }
.nx-report-table details summary { cursor: pointer; color: #075a66; font-weight: 660; }
.nx-report-progress-cell { min-width: 6rem; }
.nx-report-progress-cell strong { font-variant-numeric: tabular-nums; }
.nx-staff-report progress { display: block; height: 8px; width: 100%; accent-color: #107680; }
.nx-report-progress-cell progress { max-width: 9rem; margin-top: .2rem; }
.nx-report-tag {
    display: inline-flex;
    align-items: center;
    gap: .32rem;
    color: #415a6b;
    background: #eaf0f4;
    padding: .16rem .48rem;
    border-radius: .45rem;
    font-size: .75rem;
    white-space: normal;
}
.nx-report-tag.is-good { color: #195839; background: #e4f5eb; }
.nx-report-tag.is-warn { color: #784409; background: #fcf0d9; }
.nx-report-tag.is-gap { color: #8a283b; background: #fce8ed; }
.nx-report-filters {
    display: flex;
    align-items: end;
    gap: .55rem;
    flex-wrap: wrap;
    margin: 1rem 0 .65rem;
}
.nx-report-filters label { display: grid; flex: 1 1 10rem; gap: .3rem; color: var(--report-muted); font-weight: 630; font-size: .8rem; }
.nx-report-filters label:last-of-type { flex: 0 1 10rem; }
.nx-report-filters :is(input,select,button) { min-height: 42px; }
.nx-result-completion { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: .7rem; font-size: .86rem; }
.nx-report-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin: .75rem 0; }
.nx-report-tabs a[aria-current] { background: #dff2f3; color: #074952; border-color: #8fc0c3; }

.nx-live-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
.nx-live-list { display: grid; gap: .4rem; }
.nx-live-parents [data-live-status] { color: var(--report-muted); }
.nx-live-parents [data-live-status]:empty { display: none; }
button.nx-live-parent {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto auto;
    align-items: center;
    gap: .65rem;
    text-align: start;
    padding: .52rem .72rem;
    min-height: 44px;
    border: 1px solid #dbe5ec;
    border-radius: .65rem;
    background: #fff;
    color: #142b3d;
}
button.nx-live-parent:hover { background: #f3f7fa; }
.nx-live-parent-name { display: grid; overflow-wrap: anywhere; }
.nx-live-parent .nx-report-tag::before { content: ''; flex: 0 0 7px; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.nx-live-parent small { color: #536b7c; font-variant-numeric: tabular-nums; }
.nx-report-pager { display: flex; align-items: center; justify-content: center; gap: .6rem; margin: .7rem 0 0; }
.nx-report-pager[hidden] { display: none; }
.nx-report-dialog {
    width: min(520px, calc(100vw - 28px));
    max-height: calc(100vh - 28px);
    padding: 1.2rem;
    border: 1px solid #dbe5ec;
    border-radius: 1rem;
    background: #fff;
    color: #142b3d;
    box-shadow: 0 24px 70px #1c37513b;
}
.nx-report-dialog::backdrop { background: #0b21347a; }
.nx-report-dialog :is(h2,h3) { margin: 0 0 .65rem; }
.nx-report-dialog [data-live-detail] { margin-top: .85rem; }
.nx-report-detail { display: grid; grid-template-columns: auto minmax(0,1fr); gap: .3rem .8rem; margin: 0 0 1rem; overflow-wrap: anywhere; }
.nx-report-detail dt { color: #536b7c; }
.nx-report-detail dd { margin: 0; font-weight: 650; }
.nx-report-students { display: grid; gap: .4rem; padding: 0; list-style: none; }
.nx-report-students li { padding: .4rem .55rem; border: 1px solid #dbe5ec; border-radius: .5rem; }
.nx-report-students a { color: #075a66; }
.nx-install-link {
    padding: 0;
    border: 0;
    background: transparent;
    color: #075a66;
    font: inherit;
    font-weight: 690;
    cursor: pointer;
}
.nx-install-link[hidden], .nx-account-option[hidden] { display: none !important; }
.nx-nav-choices { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .25rem; padding: .62rem .7rem; border-top: 1px solid #dbe5ec; }
.nx-nav-choices strong { grid-column: 1 / -1; font-size: .78rem; color: #536b7c; }
.nx-nav-choices button { min-height: 42px; padding: .3rem; border: 1px solid #dbe5ec; border-radius: .55rem; background: #fff; color: #142b3d; }
.nx-nav-choices button[aria-pressed="true"] { border-color: #8fc0c3; background: #e5f3f3; color: #075a66; }
.staff-app .nx-account-option { display: flex; align-items: center; gap: .55rem; width: 100%; min-height: 42px; border: 0; background: transparent; text-align: start; color: #075a66; }
.nx-attendance-picker {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: .6rem;
    margin: 1rem 0 .5rem;
}
.nx-attendance-picker label { display: grid; gap: .35rem; font-size: .8rem; font-weight: 650; color: var(--report-muted); }
.nx-attendance-picker :is(input,button,a) { min-height: 44px; }
.nx-attendance-date-links { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }

.nx-activity-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    padding: .45rem;
    margin-bottom: .85rem;
}
.nx-activity-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-height: 44px;
    padding: .45rem .9rem;
    border: 1px solid transparent;
    border-radius: .65rem;
    color: #365568;
    font-weight: 680;
    text-decoration: none;
}
.nx-activity-tab:hover { background: #f3f7fa; }
.nx-activity-tab[aria-current="page"] { border-color: #a4d4d4; background: #e6f4f4; color: #075862; }
.nx-activity-tab:focus-visible { outline: 2px solid #0b747b; outline-offset: 2px; }

#staffTopNavigation:empty { display: none; }
html[data-staff-nav="top"] .staff-app :is(.sidebar,.sidebar-backdrop,[data-toggle-sidebar],.staff-mobile-nav) { display: none !important; }
html[data-staff-nav="top"] .staff-app .app-shell { grid-template-columns: minmax(0,1fr); display: grid; }
html[data-staff-nav="top"] .staff-app .main-panel { margin-inline-start: 0; min-width: 0; grid-column: 1 / -1; }
html[data-staff-nav="top"] .staff-app .staff-topbar { left: 0; }
#staffTopNavigation {
    --top-ink: #183342;
    --top-teal: #075d66;
    --top-selected: #e7f4f4;
    --top-border: #d6e4e9;
    position: relative;
    z-index: 500;
    padding: .6rem clamp(.55rem, 2.2vw, 1.5rem);
    border-bottom: 1px solid #e3ebef;
    background: #f5f9fa;
}
.staff-app #staffTopNavigation .sidebar-nav {
    display: flex;
    gap: .25rem;
    align-items: stretch;
    width: min(100%, 89rem);
    margin: 0 auto;
    padding: .3rem !important;
    overflow: visible;
    border: 1px solid var(--top-border);
    border-radius: .95rem;
    background: #fff;
    box-shadow: 0 2px 8px #163b4d0a;
}
.staff-app #staffTopNavigation .nav-group {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
}
.staff-app #staffTopNavigation :is(.nx-top-dashboard, .nav-group-toggle) {
    display: flex;
    align-items: center;
    gap: .48rem;
    justify-content: center;
    min-width: 0;
    min-height: 46px;
    padding: .45rem .65rem;
    border: 1px solid transparent;
    border-radius: .65rem;
    background: transparent;
    color: var(--top-ink) !important;
    font-size: .86rem;
    font-weight: 690;
    line-height: 1.22;
    white-space: normal;
    text-decoration: none;
    transition: background-color .16s ease, color .16s ease, border-color .16s ease;
}
.staff-app #staffTopNavigation .nav-group-toggle { width: 100%; }
.staff-app #staffTopNavigation .nx-top-dashboard { flex: 1 1 0; }
.staff-app #staffTopNavigation :is(.nx-top-dashboard em, .nav-group-toggle strong) {
    flex: 0 1 auto;
    color: inherit;
    font-size: inherit !important;
    font-weight: 690;
    letter-spacing: normal;
    text-transform: none;
}
.staff-app #staffTopNavigation :is(.nx-top-dashboard, .nav-group-toggle) .material-symbols-outlined { color: inherit; }
.staff-app #staffTopNavigation :is(.nx-top-dashboard, .nav-group-toggle):hover { background: #f0f6f8; }
.staff-app #staffTopNavigation .nx-top-dashboard.active,
.staff-app #staffTopNavigation .nav-group:is(.open,:has(.active)) .nav-group-toggle {
    border-color: #b6d9dc;
    background: var(--top-selected);
    color: var(--top-teal) !important;
}
.staff-app #staffTopNavigation :is(a, button):focus-visible {
    outline: 2px solid #0c7981;
    outline-offset: 2px;
}
.staff-app #staffTopNavigation .nav-group:not(.open) .nav-submenu { display: none; }
.staff-app #staffTopNavigation .nav-group.open .nav-submenu {
    position: absolute;
    inset: calc(100% + .55rem) auto auto 0;
    display: grid;
    gap: .15rem;
    width: max(100%, 14rem);
    max-height: min(60vh, 27rem);
    min-width: 0;
    margin: 0;
    padding: .42rem;
    overflow: auto;
    opacity: 1;
    visibility: visible;
    border: 1px solid var(--top-border);
    border-radius: .8rem;
    background: #fff;
    box-shadow: 0 14px 36px #17344725, 0 2px 8px #17344712;
}
.staff-app #staffTopNavigation .nav-group.open:last-child .nav-submenu { inset-inline: auto 0; }
.staff-app #staffTopNavigation .nav-submenu .nav-link {
    min-height: 42px;
    padding: .48rem .6rem;
    border-radius: .55rem;
    white-space: normal;
    overflow-wrap: anywhere;
    color: var(--top-ink);
}
.staff-app #staffTopNavigation .nav-submenu .nav-link:hover { background: #f0f6f8; }
.staff-app #staffTopNavigation .nav-submenu .nav-link.active { background: var(--top-selected); color: var(--top-teal); }

@media (max-width: 760px) {
    .staff-app #staffTopNavigation .sidebar-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .staff-app #staffTopNavigation .sidebar-nav:has(> :nth-child(5)) { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .staff-app #staffTopNavigation .sidebar-nav:has(> :nth-child(5)) > :nth-child(-n + 3) { grid-column: span 2; }
    .staff-app #staffTopNavigation .sidebar-nav:has(> :nth-child(5)) > :nth-child(n + 4) { grid-column: span 3; }
    .staff-app #staffTopNavigation .nav-group { position: static; }
    .staff-app #staffTopNavigation :is(.nx-top-dashboard, .nav-group-toggle) {
        justify-content: center;
        gap: .28rem;
        padding-inline: .3rem;
        font-size: .76rem;
        overflow-wrap: anywhere;
    }
    .staff-app #staffTopNavigation .nav-group.open .nav-submenu,
    .staff-app #staffTopNavigation .nav-group.open:last-child .nav-submenu {
        inset: calc(100% - .2rem) .6rem auto;
        width: auto;
    }
    .nx-activity-tab { flex: 1 1 auto; padding-inline: .45rem; }
}
@media (max-width: 365px) {
    .staff-app #staffTopNavigation .nav-group-toggle i { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .staff-app #staffTopNavigation :is(.nx-top-dashboard, .nav-group-toggle) { transition: none; }
}

@media (max-width: 700px) {
    .nx-report-table :is(th,td) { padding: .5rem; font-size: .85rem; }
    button.nx-live-parent { gap: .3rem .5rem; }
    .nx-live-parent > small:last-child { grid-column: 2 / -1; text-align: end; }
    .nx-live-parent-name { grid-row: span 2; }
}

@media print {
    #staffTopNavigation { display: none !important; }
}
