:root {
    --blue: #244b97;
    --blue-deep: #173775;
    --blue-light: #edf3ff;
    --ink: #24334f;
    --muted: #718097;
    --line: #e4e9f1;
    --bg: #f5f7fb;
    --green: #26866b;
    --red: #bc4850;
    --shadow: 0 12px 36px #203c7010
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    font-size: 14px
}

button,
input,
select {
    font: inherit
}

button,
a,
input,
select {
    outline-offset: 4px
}

button {
    cursor: pointer
}

button:disabled {
    cursor: wait;
    opacity: .6
}

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

[hidden] {
    display: none !important
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: 3px;
    font-weight: 750;
    font-size: 24px;
    color: var(--blue)
}

.brand small {
    display: block;
    font-size: 9px;
    letter-spacing: 5px;
    margin-top: 3px
}

.brand-icon {
    font-size: 49px;
    line-height: 1;
    font-weight: 400
}

.eyebrow {
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 2px;
    color: var(--blue)
}

.muted {
    color: var(--muted);
    line-height: 1.65
}

.login-screen {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr
}

.welcome {
    padding: 58px 9%;
    background: #eaf0fa;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 700px
}

.welcome:after {
    content: "";
    position: absolute;
    right: -200px;
    bottom: -240px;
    width: 600px;
    height: 600px;
    border: 80px solid #dbe5f6;
    border-radius: 50%;
    pointer-events: none
}

.welcome-copy,
.school-flow,
.welcome-bottom {
    position: relative;
    z-index: 1
}

.welcome h1 {
    font-size: clamp(32px, 3.3vw, 50px);
    line-height: 1.2;
    margin: 22px 0;
    color: var(--blue-deep);
    letter-spacing: -1.4px
}

.welcome p {
    font-size: 18px;
    line-height: 1.8;
    color: #5a6f90
}

.school-flow {
    display: flex;
    align-items: center;
    gap: 14px
}

.school-flow span {
    padding: 15px;
    border: 1px solid #c4d2ea;
    border-radius: 12px;
    background: #f5f8ff;
    font-size: 12px;
    color: var(--blue);
    font-weight: 650
}

.school-flow i {
    color: #889dbb
}

.welcome-bottom {
    font-size: 11px;
    color: #7e91ac
}

.login-side {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background: white;
    padding: 50px 8%
}

.login-card {
    width: 100%;
    max-width: 390px
}

.login-card h2 {
    font-size: 30px;
    letter-spacing: -.8px;
    margin: 18px 0 8px
}

.login-card form {
    margin-top: 33px
}

label {
    display: block;
    font-size: 12px;
    font-weight: 650;
    margin-bottom: 8px
}

input,
select {
    width: 100%;
    padding: 12px 13px;
    border: 1px solid #d8dfeb;
    border-radius: 7px;
    background: white;
    color: var(--ink);
    min-height: 44px
}

input:focus,
select:focus {
    border-color: var(--blue);
    outline: 2px solid #244b9718
}

input::placeholder {
    color: #9aa6b7
}

.login-card label:not(:first-child) {
    margin-top: 22px
}

.password-wrap {
    position: relative
}

.password-wrap input {
    padding-right: 80px
}

.password-toggle {
    position: absolute;
    right: 8px;
    top: 8px;
    border: none;
    padding: 6px;
    background: none;
    font-size: 11px;
    color: var(--blue)
}

.primary {
    background: var(--blue);
    border: 1px solid var(--blue);
    border-radius: 6px;
    color: white;
    font-weight: 600;
    padding: 11px 17px;
    display: inline-flex;
    gap: 10px;
    align-items: center;
    justify-content: center
}

.primary:hover {
    background: var(--blue-deep)
}

.login-submit {
    width: 100%;
    justify-content: center;
    margin-top: 24px;
    border-radius: 20px;
}

.text-button {
    border: 0;
    background: none;
    color: var(--blue);
    font-size: 12px;
    padding: 0;
    margin-top: 22px
}

.help {
    padding: 12px;
    background: var(--blue-light);
    line-height: 1.6;
    border-radius: 6px;
    font-size: 12px
}

.login-note {
    margin-top: 42px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    font-size: 12px;
    color: var(--muted)
}

.login-side footer {
    margin-top: 60px;
    font-size: 10px;
    color: #97a1b2
}

.error {
    color: var(--red);
    background: #fff1f2;
    padding: 12px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.6
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 225px 1fr
}

.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 225px;
    background: white;
    border-right: 1px solid var(--line);
    padding: 32px 20px;
    display: flex;
    flex-direction: column;
    z-index: 20
}

.sidebar .brand {
    font-size: 19px;
    gap: 9px;
    padding: 0 9px
}

.sidebar .brand-icon {
    font-size: 38px
}

.sidebar .brand small {
    font-size: 7px
}

.nav-caption {
    font-size: 9px;
    letter-spacing: 1.5px;
    color: #9ba7b9;
    font-weight: 700;
    margin: 42px 12px 13px
}

nav {
    display: flex;
    flex-direction: column;
    gap: 5px
}

nav a,
.sidebar-bottom button {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 550;
    color: #65728a
}

nav a:hover,
.sidebar-bottom button:hover {
    background: var(--bg)
}

nav a.active {
    background: var(--blue-light);
    color: var(--blue)
}

nav a span {
    font-size: 18px;
    width: 20px;
    text-align: center
}

nav a .nav-dot {
    width: 5px;
    height: 5px;
    background: #aab5c6;
    border-radius: 50%;
    margin-left: auto
}

nav .nav-separator {
    height: 1px;
    background: var(--line);
    margin: 12px
}

.sidebar-bottom {
    margin-top: auto;
    padding-top: 30px
}

.sidebar-bottom button {
    width: 100%;
    border: 0;
    background: none;
    text-align: left
}

.sidebar-bottom button span {
    font-size: 20px;
    width: 20px
}

.app-main {
    grid-column: 2;
    min-width: 0
}

.topbar {
    height: 76px;
    background: #ffffffb8;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    font-size: 12px;
    color: var(--muted)
}

.account {
    display: flex;
    align-items: center;
    gap: 14px
}

.account-label small {
    display: block
}

.avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--blue-light);
    color: var(--blue);
    display: grid;
    place-items: center;
    font-weight: 700
}

main {
    padding: 35px 40px;
    max-width: 1500px;
    margin: 0 auto;
    min-height: calc(100vh - 120px)
}

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

.page-heading h1 {
    font-size: 27px;
    font-weight: 650;
    letter-spacing: -.8px;
    margin: 8px 0
}

.page-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6
}

.app-footer {
    padding: 12px 40px;
    color: #97a1b2;
    display: flex;
    justify-content: space-between;
    font-size: 10px
}

.cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 25px
}

.stat-card {
    background: white;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 22px;
    box-shadow: var(--shadow)
}

.stat-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--muted)
}

.stat-icon {
    font-size: 22px;
    color: var(--blue);
    background: var(--blue-light);
    padding: 8px 10px;
    border-radius: 7px
}

.stat-value {
    font-size: 31px;
    font-weight: 650;
    margin: 17px 0 8px;
    letter-spacing: -1px
}

.stat-caption {
    font-size: 11px;
    color: var(--muted)
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 22px
}

.panel {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: white;
    box-shadow: var(--shadow);
    overflow: hidden
}

.panel-header {
    padding: 20px 22px;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px
}

.panel-header h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 650
}

.panel-body {
    padding: 22px
}

.quick-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px
}

.quick-link {
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 18px;
    text-align: left;
    background: white;
    color: var(--ink)
}

.quick-link:hover {
    border-color: #a9bcdf;
    background: #fafcff
}

.quick-link b {
    display: block;
    font-size: 13px;
    margin-bottom: 6px
}

.quick-link span {
    font-size: 11px;
    color: var(--muted)
}

.status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid var(--line);
    font-size: 12px
}

.status-row:last-child {
    border: 0
}

.badge {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    border-radius: 20px;
    background: #eaf7f1;
    color: var(--green);
    padding: 5px 10px;
    font-size: 10px;
    font-weight: 600
}

.badge.inactive {
    background: #f3f4f7;
    color: #8994a5
}

.badge.blue {
    background: var(--blue-light);
    color: var(--blue)
}

.badge:before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor
}

.toolbar {
    display: flex;
    gap: 13px;
    align-items: center;
    flex-wrap: wrap;
    padding: 18px 22px
}

.search {
    flex: 1;
    min-width: 180px;
    max-width: 480px;
    background: #fafbfd
}

.tabs {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    padding: 0 22px 18px
}

.tab {
    border: 1px solid var(--line);
    border-radius: 5px;
    background: white;
    padding: 7px 10px;
    font-size: 11px;
    color: #718097
}

.tab.active {
    border-color: #acc0e8;
    background: var(--blue-light);
    color: var(--blue)
}

.secondary {
    border: 1px solid #d7dfec;
    background: white;
    border-radius: 6px;
    padding: 10px 14px;
    color: #566984;
    font-size: 12px
}

.secondary:hover {
    background: var(--bg)
}

.icon-button {
    border: none;
    background: none;
    font-size: 24px;
    color: #718097;
    padding: 3px 8px
}

.table-wrap {
    overflow: auto
}

table {
    border-collapse: collapse;
    width: 100%;
    text-align: left;
    white-space: nowrap
}

th {
    font-size: 10px;
    letter-spacing: .4px;
    color: #8792a5;
    font-weight: 650;
    background: #fafbfd;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 12px 22px
}

td {
    padding: 15px 22px;
    border-bottom: 1px solid #edf0f6;
    font-size: 12px;
    color: #596983
}

td strong {
    color: var(--ink);
    font-weight: 600
}

td small {
    display: block;
    margin-top: 5px;
    font-size: 10px;
    color: #8b96a9
}

.row-name {
    display: flex;
    gap: 12px;
    align-items: center
}

.row-name .avatar {
    font-size: 10px;
    width: 31px;
    height: 31px;
    border-radius: 9px
}

.row-actions {
    display: flex;
    gap: 7px
}

.row-actions button {
    padding: 6px 9px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 5px;
    color: var(--blue);
    font-size: 10px
}

.row-actions .danger {
    color: var(--red)
}

.empty {
    padding: 50px 25px;
    text-align: center;
    color: var(--muted);
    white-space: normal
}

.empty h3 {
    color: var(--ink);
    font-size: 15px;
    font-weight: 600
}

.empty p {
    font-size: 12px;
    line-height: 1.7
}

.table-footer {
    padding: 15px 22px;
    font-size: 10px;
    color: #8c98aa;
    display: flex;
    justify-content: space-between;
    gap: 15px
}

.table-footer button {
    font-size: 10px;
    padding: 5px 10px
}

.module-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px
}

.module-card {
    padding: 25px
}

.module-card h3 {
    font-size: 15px;
    margin: 15px 0 8px
}

.module-card p {
    font-size: 12px;
    line-height: 1.7;
    color: var(--muted)
}

.notice {
    padding: 17px 20px;
    background: var(--blue-light);
    border: 1px solid #d4e1fa;
    border-radius: 8px;
    color: #577099;
    line-height: 1.7;
    font-size: 12px;
    margin-bottom: 22px
}

.notice b {
    color: var(--blue)
}

.flow {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 12px;
    padding: 28px 0;
    flex-wrap: wrap
}

.flow span {
    border: 1px solid var(--line);
    background: var(--bg);
    border-radius: 8px;
    padding: 20px;
    font-size: 12px;
    text-align: center
}

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px
}

.profile-item {
    padding: 15px 0;
    border-bottom: 1px solid var(--line)
}

.profile-item span {
    font-size: 11px;
    color: var(--muted);
    display: block;
    margin-bottom: 8px
}

.profile-item b {
    font-size: 13px
}

.mobile-only {
    display: none
}

dialog {
    border: 1px solid var(--line);
    border-radius: 13px;
    padding: 0;
    width: min(620px, calc(100% - 30px));
    max-height: 90vh;
    color: var(--ink);
    box-shadow: 0 25px 100px #182b4938
}

dialog::backdrop {
    background: #13233e66;
    backdrop-filter: blur(3px)
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 1px solid var(--line)
}

.modal-header h2 {
    font-size: 21px;
    margin: 7px 0 0;
    font-weight: 650
}

.modal-content {
    padding: 24px 28px
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px
}

.field.full {
    grid-column: 1/-1
}

.form-help {
    font-size: 10px;
    color: var(--muted);
    line-height: 1.7;
    margin: 6px 0 0
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid var(--line)
}

.checkbox-list {
    display: grid;
    gap: 8px;
    max-height: 180px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 12px
}

.checkbox-list label {
    display: flex;
    gap: 9px;
    align-items: center;
    font-weight: 400;
    margin: 0;
    font-size: 12px
}

.checkbox-list input {
    width: 15px;
    min-height: 15px
}

.wizard-steps {
    display: flex;
    justify-content: space-between;
    gap: 5px;
    margin-bottom: 26px
}

.wizard-step {
    font-size: 10px;
    color: #9ba6b6;
    display: flex;
    gap: 6px;
    align-items: center
}

.wizard-step b {
    display: grid;
    place-items: center;
    width: 23px;
    height: 23px;
    border-radius: 50%;
    border: 1px solid var(--line)
}

.wizard-step.active {
    color: var(--blue)
}

.wizard-step.active b {
    background: var(--blue);
    border-color: var(--blue);
    color: white
}

.review-list {
    margin: 0
}

.review-list dt {
    font-size: 11px;
    color: var(--muted);
    margin-top: 16px
}

.review-list dd {
    margin: 6px 0 0;
    font-size: 13px
}

.toast {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 100;
    background: var(--blue-deep);
    color: white;
    border-radius: 8px;
    padding: 16px 20px;
    max-width: min(430px, calc(100% - 40px));
    font-size: 12px;
    box-shadow: 0 8px 30px #10295833
}

.toast.failure {
    background: #a63e48
}

.loading {
    padding: 60px;
    text-align: center;
    color: var(--muted)
}

@media(min-width:1500px) {
    .login-card {
        max-width: 430px
    }
}

@media(max-width:1100px) {
    .cards {
        grid-template-columns: 1fr 1fr
    }

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

    .app-shell {
        grid-template-columns: 200px 1fr
    }

    .sidebar {
        width: 200px
    }

    main {
        padding: 28px
    }

    .topbar {
        padding: 0 28px
    }

    .row-actions {
        flex-wrap: wrap
    }
}

@media(max-width:750px) {
    .login-screen {
        grid-template-columns: 1fr
    }

    .welcome {
        min-height: 220px;
        padding: 28px;
        gap: 20px
    }

    .welcome h1 {
        font-size: 28px;
        margin: 12px 0
    }

    .welcome-copy p,
    .school-flow,
    .welcome-bottom {
        display: none
    }

    .welcome .eyebrow {
        display: none
    }

    .welcome:after {
        width: 300px;
        height: 300px;
        bottom: -220px;
        right: -100px
    }

    .login-side {
        padding: 38px 25px
    }

    .login-side footer {
        margin-top: 35px
    }

    .app-shell {
        grid-template-columns: 1fr
    }

    .app-main {
        grid-column: 1
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform .2s;
        width: 225px;
        box-shadow: 10px 0 30px #10295825
    }

    .sidebar.open {
        transform: translateX(0)
    }

    .mobile-only {
        display: block
    }

    .topbar {
        padding: 0 18px;
        height: 65px;
        gap: 12px
    }

    .topbar #breadcrumb {
        margin-right: auto
    }

    .account #account-label {
        display: none
    }

    main {
        padding: 24px 18px
    }

    .page-heading {
        align-items: flex-start
    }

    .page-heading h1 {
        font-size: 23px
    }

    .page-heading>.primary {
        font-size: 11px;
        padding: 10px
    }

    .cards {
        gap: 10px
    }

    .stat-card {
        padding: 16px
    }

    .stat-value {
        font-size: 27px
    }

    .stat-top {
        font-size: 10px
    }

    .stat-icon {
        font-size: 18px;
        padding: 5px 7px
    }

    .stat-caption {
        font-size: 10px
    }

    .profile-grid,
    .module-grid {
        grid-template-columns: 1fr
    }

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

    .field.full {
        grid-column: auto
    }

    .modal-content {
        padding: 22px
    }

    .modal-header {
        padding: 22px
    }

    .wizard-step {
        font-size: 9px;
        gap: 4px
    }

    .wizard-step b {
        width: 19px;
        height: 19px
    }

    .app-footer {
        padding: 12px 18px
    }

    .quick-links {
        grid-template-columns: 1fr
    }

    .table-footer {
        flex-wrap: wrap
    }

    .toast {
        right: 18px;
        bottom: 18px
    }
}