:root {
    --admin-navy-950: #071426;
    --admin-navy-900: #0a1b32;
    --admin-blue: #2878ff;
    --admin-cyan: #22c3d6;
    --admin-border: rgba(37, 68, 105, 0.14);
    --admin-text: #182b43;
    --admin-muted: #667d98;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 14px;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--admin-text);
    background: #eef3f9;
}

.top-header .navbar {
    background: rgba(255, 255, 255, 0.96);
    border-bottom-color: var(--admin-border);
    box-shadow: 0 4px 18px rgba(27, 54, 87, 0.06);
    backdrop-filter: blur(14px);
}

.top-header .navbar .btn-toggle-menu,
.topbar-icon {
    color: #314b69;
    background: #f5f8fc;
    border: 1px solid var(--admin-border);
}

.top-header .navbar .btn-toggle-menu:hover,
.topbar-icon:hover {
    color: #1768e5;
    background: #e9f1ff;
    border-color: rgba(40, 120, 255, 0.35);
}

.topbar-heading {
    line-height: 1.15;
}

.topbar-heading strong,
.topbar-heading span {
    display: block;
}

.topbar-heading strong {
    color: #182b43;
    font-size: 0.96rem;
}

.topbar-eyebrow {
    margin-bottom: 0.2rem;
    color: var(--admin-muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.school-year {
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.8rem;
    color: #536c89;
    font-size: 0.82rem;
    font-weight: 600;
    background: #f6f9fc;
    border: 1px solid var(--admin-border);
    border-radius: 0.7rem;
}

.language-selector {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 132px;
    padding: 0.25rem 0.35rem 0.25rem 0.6rem;
    color: #536c89;
    background: #f6f9fc;
    border: 1px solid var(--admin-border);
    border-radius: 0.7rem;
}

.language-selector i {
    color: #2878ff;
    font-size: 1.05rem;
}

.language-select {
    min-height: 30px;
    padding: 0.2rem 1.75rem 0.2rem 0.25rem;
    color: #314b69;
    font-size: 0.82rem;
    font-weight: 700;
    background-color: transparent;
    border: 0;
    box-shadow: none !important;
}

.topbar-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    font-size: 1.25rem;
    border-radius: 50%;
}

.notification-dot {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 7px;
    height: 7px;
    background: #ff5b70;
    border: 2px solid #fff;
    border-radius: 50%;
}

.profile-button {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0;
    color: #182b43;
    background: transparent;
    border: 0;
}

.profile-avatar,
.student-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: #fff;
    font-weight: 700;
    border-radius: 50%;
}

.profile-avatar {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #2878ff, #6559e8);
    box-shadow: 0 0 0 3px rgba(40, 120, 255, 0.14);
}

.profile-copy {
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
}

.profile-copy strong {
    max-width: 130px;
    overflow: hidden;
    font-size: 0.82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-copy small {
    margin-top: 0.25rem;
    color: var(--admin-muted);
    font-size: 0.7rem;
}

.profile-menu {
    min-width: 210px;
    padding: 0.5rem;
    background: #fff;
    border: 1px solid var(--admin-border);
    border-radius: 0.8rem;
    box-shadow: 0 14px 35px rgba(27, 54, 87, 0.14);
}

.profile-menu .dropdown-item {
    padding: 0.65rem 0.75rem;
    color: #425a75;
    border-radius: 0.5rem;
}

.profile-menu .dropdown-item:hover {
    color: #175fcb;
    background: #edf4ff;
}

.sidebar-wrapper,
.sidebar-wrapper .sidebar-header,
.sidebar-wrapper .sidebar-nav {
    background: #fff !important;
    border-color: var(--admin-border) !important;
}

.sidebar-wrapper {
    box-shadow: 8px 0 30px rgba(27, 54, 87, 0.05);
}

.sidebar-wrapper .sidebar-header {
    gap: 0.7rem;
}

.brand-mark {
    display: flex;
    align-items: center;
    width: 118px;
    height: 40px;
    padding: 0.35rem 0.5rem;
    overflow: hidden;
    background: var(--admin-navy-900);
    border-radius: 0.65rem;
}

.sidebar-wrapper .sidebar-header .logo-img {
    width: 102px;
    max-width: none;
    height: auto;
}

.sidebar-wrapper .sidebar-header .logo-name {
    display: none;
}

.sidebar-wrapper .sidebar-header .logo-name h5 {
    color: #415c7a;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.sidebar-close {
    width: 34px;
    height: 34px;
    padding: 0;
    color: #314b69;
    border: 0;
}

.sidebar-wrapper .metismenu a {
    color: #607895;
}

.sidebar-wrapper .metismenu a .parent-icon {
    color: #5b7593;
    background: #f5f8fc;
    border-color: var(--admin-border);
}

.sidebar-wrapper .metismenu .mm-active > a,
.sidebar-wrapper .metismenu a:hover {
    color: #1768e5;
}

.sidebar-wrapper .metismenu .mm-active > a .parent-icon,
.sidebar-wrapper .metismenu a:hover .parent-icon {
    color: #fff;
    background: linear-gradient(135deg, var(--admin-blue), #3e68dc);
    border-color: transparent;
    box-shadow: 0 5px 14px rgba(40, 120, 255, 0.25);
}

.sidebar-wrapper .metismenu ul {
    background: #f7f9fc;
}

.sidebar-wrapper .metismenu ul a {
    color: #6b819b;
    font-size: 0.88rem;
}

.sidebar-wrapper .metismenu ul a i {
    margin-right: 0.55rem;
    font-size: 0.85rem;
}

.disabled-link {
    cursor: default;
    opacity: 0.7;
    pointer-events: none;
}

.menu-label {
    margin-top: 0.9rem;
    color: #91a2b5;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0;
}

.page-content {
    min-height: calc(100vh - 60px);
    padding: 2rem;
    background:
        radial-gradient(circle at 90% 0%, rgba(40, 120, 255, 0.08), transparent 26rem),
        #eef3f9;
}

.dashboard-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.8rem;
}

.page-kicker {
    color: #5495ff;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0;
}

.dashboard-heading h1 {
    margin: 0.45rem 0 0.4rem;
    color: #162c46;
    font-size: 2.1rem;
    font-weight: 750;
}

.dashboard-heading p {
    margin: 0;
    color: var(--admin-muted);
}

.dashboard-action {
    padding: 0.65rem 1rem;
    border-radius: 0.65rem;
    box-shadow: 0 8px 22px rgba(40, 120, 255, 0.22);
}

.summary-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 145px;
    padding: 1.25rem;
    overflow: hidden;
    background: linear-gradient(145deg, #fff, #f8fbff);
    border: 1px solid var(--admin-border);
    border-radius: 1rem;
    box-shadow: 0 12px 30px rgba(27, 54, 87, 0.08);
}

.summary-card::after {
    position: absolute;
    right: -30px;
    bottom: -45px;
    width: 120px;
    height: 120px;
    content: "";
    background: currentColor;
    border-radius: 50%;
    opacity: 0.06;
}

.summary-card span,
.summary-card strong,
.summary-card small {
    display: block;
}

.summary-card span {
    color: var(--admin-muted);
    font-size: 0.82rem;
    font-weight: 600;
}

.summary-card strong {
    margin: 0.45rem 0 0.65rem;
    color: #172e49;
    font-size: 1.85rem;
    line-height: 1;
}

.summary-card small {
    color: #7489a1;
    font-size: 0.72rem;
}

.summary-card small b {
    color: currentColor;
}

.summary-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 49px;
    height: 49px;
    color: currentColor;
    font-size: 1.5rem;
    background: currentColor;
    border-radius: 0.9rem;
}

.summary-icon i {
    color: #fff;
}

.accent-blue {
    color: #3e8cff;
}

.accent-cyan {
    color: #20bdd2;
}

.accent-violet {
    color: #7768ee;
}

.accent-orange {
    color: #f09b4b;
}

.dashboard-table-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--admin-border);
    border-radius: 1rem;
    box-shadow: 0 16px 38px rgba(27, 54, 87, 0.08);
}

.dashboard-table-card .card-header {
    padding: 1.25rem 1.35rem;
    background: #f8fafd;
    border-bottom: 1px solid var(--admin-border);
}

.dashboard-table-card .card-header h2 {
    margin: 0;
    color: #172e49;
    font-size: 1.05rem;
}

.dashboard-table-card .card-header p {
    margin: 0.3rem 0 0;
    color: var(--admin-muted);
    font-size: 0.8rem;
}

.dashboard-table-card .card-body {
    padding: 1.25rem 1.35rem;
}

.dashboard-table {
    --bs-table-bg: transparent;
    --bs-table-color: #526b87;
    --bs-table-border-color: var(--admin-border);
}

.dashboard-table thead th {
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
    color: #7890aa;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
    white-space: nowrap;
}

.dashboard-table tbody td {
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
    color: #536c87;
    white-space: nowrap;
}

.student-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 230px;
}

.student-cell strong,
.student-cell small {
    display: block;
}

.student-cell strong {
    color: #1d344f;
    font-size: 0.84rem;
}

.student-cell small {
    margin-top: 0.2rem;
    color: #8094aa;
    font-size: 0.7rem;
}

.student-avatar {
    width: 38px;
    height: 38px;
    font-size: 0.7rem;
}

.avatar-blue {
    background: linear-gradient(135deg, #2878ff, #4c9cff);
}

.avatar-cyan {
    background: linear-gradient(135deg, #13aabd, #2dd4bf);
}

.avatar-orange {
    background: linear-gradient(135deg, #ed8a3f, #ffb357);
}

.status-pill {
    display: inline-flex;
    padding: 0.3rem 0.6rem;
    font-size: 0.68rem;
    font-weight: 700;
    border-radius: 999px;
}

.status-active {
    color: #1f9d70;
    background: rgba(40, 199, 142, 0.12);
}

.settings-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.settings-summary-card,
.academy-pricing-card {
    background: #fff;
    border: 1px solid var(--admin-border);
    border-radius: 1rem;
    box-shadow: 0 14px 34px rgba(27, 54, 87, 0.07);
}

.settings-summary-card {
    padding: 1rem;
}

.settings-summary-card span,
.settings-account-grid span {
    display: block;
    color: var(--admin-muted);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.settings-summary-card strong,
.settings-account-grid strong {
    display: block;
    margin-top: 0.45rem;
    color: #182b43;
    font-size: 1.2rem;
    line-height: 1.2;
}

.settings-summary-card small {
    display: block;
    margin-top: 0.5rem;
    color: #7087a1;
    font-size: 0.76rem;
}

.settings-status-active {
    color: #1f9d70 !important;
}

.settings-status-inactive {
    color: #dc3545 !important;
}

.settings-usage-card {
    margin-bottom: 1.2rem;
}

.settings-usage-track {
    height: 12px;
    overflow: hidden;
    background: #edf3fa;
    border-radius: 999px;
}

.settings-usage-track span {
    display: block;
    height: 100%;
    min-width: 0;
    background: linear-gradient(90deg, #2878ff, #22c3d6);
    border-radius: inherit;
}

.settings-usage-copy {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.85rem;
    color: var(--admin-muted);
    font-size: 0.82rem;
}

.settings-usage-copy a {
    color: #1768e5;
    font-weight: 800;
    text-decoration: none;
}

.settings-expiry-note {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin-top: 0.95rem;
    padding: 0.8rem 0.9rem;
    color: #46627f;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.45;
    background: #f8fbff;
    border: 1px solid rgba(40, 120, 255, 0.14);
    border-radius: 0.75rem;
}

.settings-expiry-note i {
    flex: 0 0 auto;
    color: #2878ff;
    font-size: 1.15rem;
    line-height: 1.25;
}

.public-link-shell {
    display: grid;
    gap: 1rem;
}

.public-link-value span,
.public-link-meta span {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--admin-muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.public-link-value .form-control {
    color: #17314f;
    font-weight: 800;
    background: #f8fbff;
}

.public-link-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.public-link-meta div {
    padding: 0.85rem;
    background: #f8fbff;
    border: 1px solid #e2eaf3;
    border-radius: 0.75rem;
}

.public-link-meta strong {
    display: block;
    color: #17314f;
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}

.history-event-count {
    display: block;
    color: #233c5a;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.25;
}

.history-events {
    display: block;
    max-width: 240px;
    margin-top: 0.2rem;
    color: var(--admin-muted);
    font-size: 0.72rem;
    line-height: 1.3;
}

.billing-capacity-message {
    margin: 0;
    color: #46627f;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.5;
}

.settings-tabbar {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0 0 1rem;
    padding: 0.35rem;
    background: #fff;
    border: 1px solid var(--admin-border);
    border-radius: 0.9rem;
    box-shadow: 0 12px 28px rgba(27, 54, 87, 0.06);
}

.settings-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 38px;
    padding: 0.55rem 0.8rem;
    color: #59728f;
    font-size: 0.78rem;
    font-weight: 800;
    background: transparent;
    border: 0;
    border-radius: 0.65rem;
}

.settings-tab:hover,
.settings-tab.is-active {
    color: #1768e5;
    background: #eaf2ff;
}

.settings-panel {
    display: none;
}

.settings-panel.is-active {
    display: block;
}

.settings-change-note {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    color: #46627f;
    font-size: 0.82rem;
    font-weight: 700;
    background: #f5f9ff;
    border: 1px solid rgba(40, 120, 255, 0.14);
    border-radius: 0.75rem;
}

.settings-change-note i {
    color: #2878ff;
    font-size: 1.2rem;
}

.academy-pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.academy-pricing-card {
    --plan-accent: #2878ff;
    --plan-accent-soft: rgba(40, 120, 255, 0.12);
    display: flex;
    position: relative;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    overflow: hidden;
    isolation: isolate;
    border-top: 4px solid var(--plan-accent);
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease, background 220ms ease;
}

.academy-pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 45px rgba(27, 54, 87, 0.12);
}

.academy-pricing-card::before {
    position: absolute;
    inset: 0;
    pointer-events: none;
    content: "";
    background: radial-gradient(circle at 88% 12%, var(--plan-accent-soft), transparent 34%);
    opacity: 0.7;
    z-index: 0;
}

.academy-pricing-card > * {
    position: relative;
    z-index: 1;
}

.academy-pricing-card.plan-starter {
    --plan-accent: #2878ff;
    --plan-accent-soft: rgba(40, 120, 255, 0.13);
}

.academy-pricing-card.plan-growth {
    --plan-accent: #13aabd;
    --plan-accent-soft: rgba(19, 170, 189, 0.14);
}

.academy-pricing-card.plan-plus {
    --plan-accent: #f0a334;
    --plan-accent-soft: rgba(240, 163, 52, 0.17);
}

.academy-pricing-card.plan-advanced {
    --plan-accent: #c98616;
    --plan-accent-soft: rgba(240, 177, 56, 0.22);
}

.academy-pricing-card.plan-premium {
    --plan-accent: #d9a11b;
    --plan-accent-soft: rgba(255, 205, 84, 0.26);
}

.academy-pricing-card.plan-enterprise {
    --plan-accent: #a97816;
    --plan-accent-soft: rgba(220, 171, 66, 0.24);
}

.academy-pricing-card.is-premium-tier {
    background: linear-gradient(145deg, #fff 0%, #fff8e8 56%, var(--plan-accent-soft) 132%);
}

.academy-pricing-card.is-premium-tier:not(.is-current) {
    animation: pricing-tier-breathe 6.8s ease-in-out infinite;
}

.academy-pricing-card.is-premium-tier:hover {
    transform: translateY(-8px) scale(1.012);
    border-color: #f3c557;
    box-shadow: 0 28px 60px rgba(96, 65, 13, 0.18), 0 0 0 1px rgba(243, 197, 87, 0.36), 0 0 34px var(--plan-accent-soft);
}

.academy-pricing-card.is-premium-tier::after {
    position: absolute;
    top: 0;
    left: -45%;
    width: 34%;
    height: 100%;
    content: "";
    background: linear-gradient(90deg, transparent, rgba(255, 222, 136, 0.72), rgba(255, 255, 255, 0.75), transparent);
    transform: skewX(-16deg);
    animation: pricing-sheen 5.5s ease-in-out infinite;
    z-index: 2;
}

@keyframes pricing-tier-breathe {
    0%,
    100% {
        box-shadow: 0 14px 34px rgba(27, 54, 87, 0.07), 0 0 0 0 rgba(40, 120, 255, 0);
    }

    50% {
        box-shadow: 0 18px 46px rgba(27, 54, 87, 0.12), 0 0 0 4px var(--plan-accent-soft);
    }
}

@keyframes pricing-sheen {
    0%,
    62% {
        left: -45%;
        opacity: 0;
    }

    72% {
        opacity: 0.8;
    }

    100% {
        left: 118%;
        opacity: 0;
    }
}

.academy-pricing-card.is-current {
    border-color: var(--plan-accent);
    box-shadow: 0 16px 38px var(--plan-accent-soft);
}

.academy-pricing-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.academy-pricing-head h3 {
    margin: 0;
    color: #172e49;
    font-size: 1rem;
}

.academy-pricing-head p {
    margin: 0.3rem 0 0;
    color: var(--admin-muted);
    font-size: 0.78rem;
}

.academy-pricing-price strong {
    display: inline-block;
    color: var(--plan-accent);
    font-size: 1.7rem;
    line-height: 1;
    transition: transform 220ms ease, filter 220ms ease;
}

.academy-pricing-card.is-premium-tier:hover .academy-pricing-price strong {
    transform: translateY(-2px) scale(1.035);
    filter: drop-shadow(0 8px 14px rgba(217, 161, 27, 0.26));
}

.academy-pricing-price span {
    margin-left: 0.35rem;
    color: var(--admin-muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.academy-pricing-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
    margin: 0;
}

.academy-pricing-meta div,
.settings-account-grid div {
    padding: 0.8rem;
    background: #f8fafd;
    border: 1px solid rgba(37, 68, 105, 0.08);
    border-radius: 0.75rem;
}

.academy-pricing-card.is-premium-tier .academy-pricing-meta div,
.academy-pricing-card.plan-enterprise .enterprise-contact {
    transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease, background 220ms ease;
}

.academy-pricing-card.is-premium-tier:hover .academy-pricing-meta div,
.academy-pricing-card.plan-enterprise:hover .enterprise-contact {
    transform: translateY(-2px);
    background: #fffdf7;
    border-color: var(--plan-accent-soft);
    box-shadow: 0 10px 22px rgba(96, 65, 13, 0.1);
}

.academy-pricing-meta dt {
    margin-bottom: 0.25rem;
    color: var(--admin-muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.academy-pricing-meta dd {
    margin: 0;
    color: #1f3855;
    font-size: 0.84rem;
    font-weight: 800;
}

.settings-account-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.enterprise-contact {
    padding: 0.75rem 0.85rem;
    background: #f8fafd;
    border: 1px solid rgba(37, 68, 105, 0.08);
    border-radius: 0.75rem;
}

.enterprise-contact span {
    display: block;
    color: var(--admin-muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.enterprise-contact strong {
    display: block;
    margin-top: 0.25rem;
    color: #1f3855;
    font-size: 0.9rem;
}

.status-review {
    color: #8a5b0a;
    background: rgba(255, 213, 111, 0.24);
    border: 1px solid rgba(217, 161, 27, 0.22);
}

.academy-pricing-card.is-premium-tier .status-review {
    animation: pricing-badge-pulse 2.8s ease-in-out infinite;
}

@keyframes pricing-badge-pulse {
    0%,
    100% {
        transform: translateY(0);
        box-shadow: 0 0 0 0 rgba(240, 155, 75, 0);
    }

    50% {
        transform: translateY(-1px);
        box-shadow: 0 0 0 4px rgba(240, 155, 75, 0.13);
    }
}

@media (prefers-reduced-motion: reduce) {
    .academy-pricing-card,
    .academy-pricing-card.is-premium-tier,
    .academy-pricing-card.is-premium-tier::before,
    .academy-pricing-card.is-premium-tier::after,
    .academy-pricing-card.is-premium-tier .status-review,
    .academy-pricing-card.is-premium-tier .academy-pricing-price strong,
    .academy-pricing-card.is-premium-tier .academy-pricing-meta div {
        animation: none;
        transition: none;
    }
}

.teacher-alert {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    border-radius: 0.75rem;
}

.teacher-alert span {
    flex: 1;
}

.teacher-alert .btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

.subject-routing-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #fff;
    border: 1px solid rgba(37, 68, 105, 0.08);
    border-radius: 0.75rem;
    box-shadow: 0 14px 34px rgba(27, 54, 87, 0.06);
}

.subject-routing-toolbar > div:first-child {
    width: min(360px, 100%);
}

.subject-routing-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    align-items: start;
}

.subject-routing-column {
    min-height: 360px;
    padding: 0.85rem;
    background: #fff;
    border: 1px solid rgba(37, 68, 105, 0.08);
    border-top: 4px solid #2878ff;
    border-radius: 0.75rem;
    box-shadow: 0 14px 34px rgba(27, 54, 87, 0.06);
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.subject-routing-column.is-unassigned {
    border-top-color: #f0a334;
}

.subject-routing-column.is-drag-over {
    border-color: #69a0f5;
    box-shadow: 0 18px 42px rgba(40, 120, 255, 0.14);
    transform: translateY(-2px);
}

.subject-routing-column-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid rgba(37, 68, 105, 0.08);
}

.subject-routing-column-head span,
.subject-routing-column-head small {
    display: block;
    color: var(--admin-muted);
    font-size: 0.72rem;
}

.subject-routing-column-head strong {
    display: block;
    color: #1f3855;
    font-size: 0.95rem;
}

.subject-routing-column-head b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    color: #1768e5;
    background: #edf4ff;
    border-radius: 999px;
    font-size: 0.85rem;
}

.subject-routing-students {
    display: grid;
    gap: 0.65rem;
    min-height: 260px;
}

.subject-routing-student {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem;
    color: #253e5b;
    background: #f8fafd;
    border: 1px solid rgba(37, 68, 105, 0.08);
    border-radius: 0.65rem;
    cursor: grab;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.subject-routing-student > div {
    min-width: 0;
    flex: 1 1 auto;
}

.subject-routing-remove {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    margin-left: auto;
    padding: 0;
    color: #dc3545;
    background: #fff1f2;
    border: 1px solid #ffd1d6;
    border-radius: 0.55rem;
    text-decoration: none;
}

.subject-routing-remove:hover,
.subject-routing-remove:focus {
    color: #b4232f;
    background: #ffe4e7;
    border-color: #ffb5be;
}

.subject-routing-student:hover {
    background: #fff;
    border-color: #bfd2ea;
    box-shadow: 0 12px 26px rgba(27, 54, 87, 0.08);
    transform: translateY(-1px);
}

.subject-routing-student.is-dragging {
    opacity: 0.65;
    cursor: grabbing;
}

.subject-routing-student strong,
.subject-routing-student small {
    display: block;
}

.subject-routing-student small {
    color: var(--admin-muted);
    font-size: 0.75rem;
}

.subject-routing-phone {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.35rem;
    padding: 0.25rem 0.45rem;
    color: #1768e5;
    font-size: 0.72rem;
    font-weight: 800;
    background: #edf4ff;
    border: 1px solid #d4e4ff;
    border-radius: 999px;
    text-decoration: none;
}

.subject-routing-phone:hover,
.subject-routing-phone:focus {
    color: #0b5ed7;
    background: #e3efff;
}

.subject-routing-savebar {
    position: sticky;
    bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    color: #253e5b;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(37, 68, 105, 0.08);
    border-radius: 0.75rem;
    box-shadow: 0 18px 42px rgba(27, 54, 87, 0.12);
    backdrop-filter: blur(10px);
    z-index: 5;
}

@media (max-width: 767.98px) {
    .subject-routing-toolbar,
    .subject-routing-savebar {
        align-items: stretch;
        flex-direction: column;
    }
}

.teacher-alert i {
    font-size: 1.25rem;
}

.teacher-count {
    flex: 0 0 auto;
    padding: 0.38rem 0.7rem;
    color: #2768c7;
    font-size: 0.72rem;
    font-weight: 700;
    background: #eaf2ff;
    border-radius: 999px;
}

.dashboard-year-form {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.dashboard-year-form .form-select {
    min-width: 112px;
    min-height: 42px;
    border-color: #ccd8e5;
    border-radius: 0.6rem;
}

.dashboard-year-form .dashboard-switcher {
    min-width: 220px;
}

.dashboard-year-form .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 42px;
    border-radius: 0.6rem;
    font-weight: 700;
}

.page-action-group,
.row-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
}

.row-actions .btn,
.row-actions form {
    flex: 0 0 auto;
}

.academy-management-modal {
    border: 0;
    border-radius: 12px;
    box-shadow: 0 24px 70px rgba(31, 58, 91, 0.18);
}

.academy-management-modal .modal-header,
.academy-management-modal .modal-footer {
    border-color: #e5edf6;
}

.academy-management-modal .modal-title {
    color: #223b57;
    font-size: 1rem;
    font-weight: 800;
}

.academy-management-modal .form-label {
    color: #546f8b;
    font-size: 0.78rem;
    font-weight: 800;
}

.contact-parent-summary {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem;
    background: #f7fbff;
    border: 1px solid #e3edf8;
    border-radius: 10px;
}

.contact-parent-summary strong,
.contact-parent-summary small {
    display: block;
}

.contact-parent-summary small {
    color: #6c7f95;
    font-size: 0.82rem;
}

.contact-parent-list {
    display: grid;
    gap: 0.55rem;
}

.contact-parent-item,
.contact-parent-empty {
    padding: 0.75rem 0.85rem;
    background: #f8fbff;
    border: 1px solid #e5edf6;
    border-radius: 10px;
}

.contact-parent-item strong,
.contact-parent-item small {
    display: block;
}

.contact-parent-item strong {
    color: #223b57;
    font-size: 0.92rem;
}

.contact-parent-item small,
.contact-parent-empty {
    color: #6c7f95;
    font-size: 0.82rem;
}

.contact-parent-history-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.contact-parent-history-heading small {
    color: #7a8ca0;
    font-size: 0.78rem;
}

.contact-parent-history {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    max-height: 300px;
    overflow-y: auto;
    padding: 0.85rem;
    background: #f6f9fd;
    border: 1px solid #e4edf7;
    border-radius: 10px;
}

.contact-parent-history-empty {
    color: #6c7f95;
    font-size: 0.86rem;
    text-align: center;
    padding: 1.25rem 0.75rem;
}

.contact-parent-message {
    max-width: min(82%, 520px);
}

.contact-parent-message.from-academy {
    align-self: flex-end;
}

.contact-parent-message.from-parent {
    align-self: flex-start;
}

.contact-parent-message-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    color: #7a8ca0;
    font-size: 0.72rem;
    margin-bottom: 0.25rem;
}

.contact-parent-message-meta strong {
    color: #405a76;
    font-size: 0.75rem;
}

.contact-parent-message-body {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    padding: 0.72rem 0.85rem;
    border-radius: 10px;
    border: 1px solid #dde8f5;
    background: #ffffff;
    color: #243b53;
    font-size: 0.9rem;
    line-height: 1.45;
}

.contact-parent-message.from-academy .contact-parent-message-body {
    background: #eaf4ff;
    border-color: #cae1fb;
}

.contact-parent-message.from-parent .contact-parent-message-body {
    background: #ffffff;
}

.student-preview-heading {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem;
    margin-bottom: 1rem;
    background: #f7fbff;
    border: 1px solid #e3edf8;
    border-radius: 10px;
}

.student-preview-heading strong,
.student-preview-heading small {
    display: block;
}

.student-preview-heading strong {
    color: #213a56;
    font-size: 1rem;
}

.student-preview-heading small {
    color: #6e839b;
}

.academy-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
    margin: 0;
}

.academy-detail-grid div {
    padding: 0.75rem;
    background: #ffffff;
    border: 1px solid #e2ebf5;
    border-radius: 8px;
}

.academy-detail-grid dt {
    margin-bottom: 0.2rem;
    color: #7890aa;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
}

.academy-detail-grid dd {
    margin: 0;
    color: #2d435c;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.enroll-preview-state {
    padding: 0.85rem;
    color: #a34922;
    background: #fff4ed;
    border: 1px solid #ffd8c3;
    border-radius: 8px;
    font-weight: 700;
}

.statistics-filter-form {
    margin: -0.5rem 0 1.5rem;
    padding: 1rem;
    border: 1px solid #e1eaf4;
    border-radius: 0.85rem;
    background: #fff;
    box-shadow: 0 10px 30px rgba(31, 58, 91, 0.06);
}

.statistics-filter-main {
    display: grid;
    grid-template-columns: minmax(240px, 1.4fr) minmax(120px, 0.55fr) minmax(150px, 0.7fr) minmax(150px, 0.7fr);
    gap: 0.85rem;
    align-items: end;
}

.statistics-filter-main.date-only {
    grid-template-columns: minmax(120px, 0.5fr) minmax(150px, 0.7fr) minmax(150px, 0.7fr);
}

.statistics-filter-field {
    min-width: 0;
}

.statistics-filter-field .form-label {
    margin-bottom: 0.35rem;
    color: #55708d;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.statistics-filter-form .form-select,
.statistics-filter-form .form-control {
    min-height: 42px;
    border-color: #ccd8e5;
    border-radius: 0.6rem;
}

.statistics-picker {
    position: relative;
}

.statistics-picker-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 42px;
    padding: 0.55rem 0.75rem;
    color: #2f4054;
    border: 1px solid #ccd8e5;
    border-radius: 0.6rem;
    background: #fff;
    font-weight: 700;
    text-align: left;
}

.statistics-picker-toggle i {
    color: #66809c;
    font-size: 1.1rem;
}

.statistics-picker-menu {
    position: absolute;
    z-index: 35;
    top: calc(100% + 0.4rem);
    left: 0;
    display: none;
    width: min(100%, 460px);
    min-width: 320px;
    padding: 0.65rem;
    border: 1px solid #dbe6f2;
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: 0 18px 45px rgba(31, 58, 91, 0.14);
}

.statistics-picker.open .statistics-picker-menu {
    display: block;
}

.statistics-picker-search {
    margin-bottom: 0.55rem;
}

.statistics-picker-options {
    max-height: 260px;
    overflow: auto;
}

.statistics-picker-option {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.55rem 0.45rem;
    border-radius: 0.55rem;
    cursor: pointer;
}

.statistics-picker-option:hover {
    background: #f3f7fb;
}

.statistics-picker-option input {
    margin-top: 0.2rem;
}

.statistics-picker-option span {
    display: block;
    min-width: 0;
}

.statistics-picker-option strong,
.statistics-picker-option small {
    display: block;
}

.statistics-picker-option small {
    color: #6c7f94;
    font-size: 0.75rem;
}

.statistics-filter-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.65rem;
    margin-top: 0.9rem;
}

.statistics-filter-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 42px;
    border-radius: 0.6rem;
    font-weight: 700;
}

.dashboard-chart-card .card-body {
    min-height: 300px;
}

.dashboard-chart-card canvas {
    width: 100% !important;
    height: 260px !important;
}

.summary-card-link {
    display: block;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.summary-card-link .summary-card {
    height: 100%;
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.summary-card-link:hover .summary-card {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(31, 58, 91, 0.12);
}

.detail-status {
    display: inline-flex;
    padding: 0.28rem 0.55rem;
    color: #2768c7;
    background: #eaf2ff;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
}

.detail-table td {
    max-width: 360px;
    vertical-align: top;
}

.detail-table td.detail-text-cell {
    max-width: 520px;
    white-space: normal;
}

.detail-table td.detail-question-cell {
    min-width: 430px;
    max-width: 680px;
    white-space: normal;
}

.detail-question-list {
    display: grid;
    gap: 0.75rem;
    max-height: 360px;
    padding: 0.15rem 0.2rem 0.15rem 1.25rem;
    margin: 0;
    overflow: auto;
}

.detail-question-list li {
    padding: 0.75rem 0.85rem;
    color: #455f79;
    background: #f8fbff;
    border: 1px solid #e1ebf6;
    border-radius: 8px;
}

.detail-question-text {
    color: #20364f;
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.45;
    white-space: normal;
}

.detail-question-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.55rem;
}

.detail-question-meta span {
    display: inline-flex;
    max-width: 100%;
    padding: 0.2rem 0.5rem;
    color: #526b87;
    background: #ffffff;
    border: 1px solid #dde8f4;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.35;
    white-space: normal;
}

.payment-risk {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 28px;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-weight: 800;
}

.payment-risk.ok {
    color: #116548;
    background: #e8f8f1;
}

.payment-risk.warn {
    color: #8a4d00;
    background: #fff4dc;
}

.dashboard-progress {
    width: 120px;
    height: 8px;
    margin-bottom: 0.25rem;
    overflow: hidden;
    background: #eaf0f7;
    border-radius: 999px;
}

.dashboard-progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #2878ff, #00a6a6);
    border-radius: inherit;
}

.recent-payment-list {
    display: grid;
    gap: 0.75rem;
}

.recent-payment-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem;
    color: #253e5b;
    text-decoration: none;
    background: #f8fafd;
    border: 1px solid #e2e9f2;
    border-radius: 0.7rem;
}

.recent-payment-item:hover {
    color: #253e5b;
    border-color: #bfd2ea;
}

.recent-payment-item strong,
.recent-payment-item small {
    display: block;
}

.recent-payment-item small {
    color: #7489a1;
    font-weight: 600;
}

.recent-payment-item b {
    color: #116548;
    white-space: nowrap;
}

.academy-form {
    margin: 0;
}

.academy-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.academy-form-grid.single {
    grid-template-columns: 1fr;
}

.academy-form-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.academy-form-wide {
    grid-column: 1 / -1;
}

.course-form-section {
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
    background: #f8fbff;
    border: 1px solid var(--admin-border);
    border-radius: 0.75rem;
}

.course-form-section h6 {
    margin: 0;
    color: #172e49;
    font-size: 0.86rem;
    font-weight: 800;
}

.course-end-preview strong {
    color: #172e49;
}

.course-schedule-grid {
    display: grid;
    gap: 0.6rem;
}

.course-day-row {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) minmax(0, 120px) minmax(0, 120px);
    gap: 0.6rem;
    align-items: center;
}

.course-day-toggle {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 42px;
    padding: 0.55rem 0.7rem;
    color: #253e5b;
    font-size: 0.82rem;
    font-weight: 700;
    background: #fff;
    border: 1px solid #d7e2ef;
    border-radius: 0.6rem;
}

.course-day-toggle input {
    width: 16px;
    height: 16px;
    accent-color: #3e8cff;
}

.class-list-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.class-period-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0.2rem 0.5rem;
    color: #236092;
    background: #edf5ff;
    border: 1px solid #cfe2fb;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    white-space: nowrap;
}

.activity-switcher {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.class-activity-list {
    display: grid;
    gap: 0.75rem;
}

.class-activity-item {
    overflow: hidden;
    background: #fff;
    border: 1px solid #dce6f1;
    border-radius: 0.7rem;
}

.class-activity-item.is-empty {
    background: #fbfcfe;
}

.class-activity-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 1rem;
    padding: 0.85rem 1rem;
    color: #253e5b;
    text-align: left;
    background: transparent;
    border: 0;
}

.class-activity-toggle strong,
.class-activity-toggle small {
    display: block;
}

.class-activity-toggle small {
    color: #7489a1;
    font-size: 0.78rem;
    font-weight: 700;
}

.class-activity-details {
    display: grid;
    gap: 0.75rem;
    padding: 0 1rem 1rem;
}

.activity-detail-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    padding: 0.85rem;
    background: #f8fafd;
    border: 1px solid #dce6f1;
    border-radius: 0.65rem;
}

.activity-detail-card strong,
.activity-detail-card small {
    display: block;
}

.activity-detail-card small {
    color: #7489a1;
    font-size: 0.78rem;
    font-weight: 700;
}

.activity-detail-values {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.65rem;
    margin: 0;
}

.activity-detail-values div {
    min-width: 0;
}

.activity-detail-values div.wide {
    grid-column: 1 / -1;
}

.activity-detail-values dt {
    color: #7489a1;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.activity-detail-values dd {
    margin: 0.15rem 0 0;
    color: #253e5b;
    font-size: 0.84rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.empty-state.compact {
    padding: 0.8rem;
}

.course-schedule-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.course-schedule-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 42px;
    padding: 0.55rem 0.8rem;
    color: #253e5b;
    background: #f8fbff;
    border: 1px solid var(--admin-border);
    border-radius: 0.7rem;
}

.course-schedule-chip strong {
    color: #172e49;
    font-size: 0.82rem;
}

.course-schedule-chip span {
    color: #6f849b;
    font-size: 0.78rem;
    font-weight: 700;
}

.academy-form .form-label,
.academy-inline-form .form-label {
    margin-bottom: 0.4rem;
    color: #405a76;
    font-size: 0.78rem;
    font-weight: 700;
}

.academy-form .form-control,
.academy-form .form-select,
.academy-inline-form .form-control {
    min-height: 44px;
    color: #253e5b;
    background: #fff;
    border-color: #ccd8e5;
    border-radius: 0.6rem;
}

.academy-form textarea.form-control {
    min-height: 92px;
}

.academy-form .form-control:focus,
.academy-form .form-select:focus,
.academy-inline-form .form-control:focus {
    border-color: #69a0f5;
    box-shadow: 0 0 0 0.2rem rgba(40, 120, 255, 0.12);
}

.academy-inline-form {
    display: flex;
    align-items: end;
    gap: 0.9rem;
}

.class-enroll-form {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 320px;
}

.class-enroll-form .form-control {
    min-width: 190px;
    min-height: 40px;
    color: #253e5b;
    background: #fff;
    border-color: #ccd8e5;
    border-radius: 0.6rem;
}

.class-enroll-form .form-control:focus {
    border-color: #69a0f5;
    box-shadow: 0 0 0 0.2rem rgba(40, 120, 255, 0.12);
}

.class-enroll-form .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 40px;
    border-radius: 0.6rem;
    font-weight: 700;
    white-space: nowrap;
}

.academy-page-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.academy-page-tile {
    display: flex;
    align-items: center;
    gap: 0.95rem;
    min-height: 112px;
    padding: 1.1rem;
    color: #253e5b;
    text-decoration: none;
    background: #fff;
    border: 1px solid #e2e9f2;
    border-radius: 0.75rem;
    box-shadow: 0 10px 28px rgba(37, 62, 91, 0.06);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.academy-page-tile:hover {
    color: #253e5b;
    border-color: #bfd2ea;
    box-shadow: 0 16px 36px rgba(37, 62, 91, 0.1);
    transform: translateY(-2px);
}

.academy-page-tile strong,
.academy-page-tile small {
    display: block;
}

.academy-page-tile strong {
    margin-bottom: 0.2rem;
    font-size: 0.98rem;
}

.academy-page-tile small {
    color: #7489a1;
    font-weight: 600;
    line-height: 1.35;
}

.tile-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    border-radius: 0.7rem;
    color: #fff;
    font-size: 1.45rem;
}

.payment-filter-form {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.payment-filter-form .form-select {
    min-width: 190px;
    min-height: 40px;
    border-color: #ccd8e5;
    border-radius: 0.6rem;
}

.payment-filter-form .year-select {
    min-width: 105px;
}

.payment-table-wrap {
    max-height: 68vh;
}

.payment-grid {
    min-width: 1060px;
}

.payment-grid th,
.payment-grid td {
    text-align: center;
    vertical-align: middle;
}

.payment-grid .payment-student-col {
    position: sticky;
    left: 0;
    z-index: 1;
    min-width: 230px;
    text-align: left;
    background: #fff;
}

.payment-grid thead .payment-student-col {
    z-index: 2;
}

.payment-cell {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 72px;
    min-height: 48px;
    padding: 0.35rem;
    color: #405a76;
    background: #f8fafd;
    border: 1px solid #dce6f1;
    border-radius: 0.55rem;
    font-weight: 700;
}

.payment-cell small {
    color: #7489a1;
    font-size: 0.68rem;
    font-weight: 700;
}

.payment-cell.paid {
    color: #116548;
    background: #e8f8f1;
    border-color: #a8e3c8;
}

.payment-cell.paid.negative {
    color: #b42318;
    background: #fff1f0;
    border-color: #f4b3b3;
}

.payment-cell.unpaid:hover,
.payment-cell.paid:hover {
    border-color: #69a0f5;
    box-shadow: 0 0 0 0.2rem rgba(40, 120, 255, 0.1);
}

.payment-row-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 246px;
}

.payment-row-actions .btn {
    justify-content: center;
    white-space: nowrap;
}

.academy-payment-modal .form-label {
    margin-bottom: 0.4rem;
    color: #405a76;
    font-size: 0.78rem;
    font-weight: 700;
}

.academy-payment-modal .form-control {
    min-height: 44px;
    color: #253e5b;
    border-color: #ccd8e5;
    border-radius: 0.6rem;
}

.academy-check {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 44px;
    padding: 0.65rem 0.75rem;
    color: #253e5b;
    background: #f8fafd;
    border: 1px solid #dce6f1;
    border-radius: 0.6rem;
    font-weight: 700;
}

.academy-check .form-check-input {
    margin: 0;
}

.bulk-payment-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--admin-border);
}

.bulk-payment-toolbar strong,
.bulk-payment-total span {
    display: block;
    color: #172e49;
    font-size: 0.9rem;
    font-weight: 800;
}

.bulk-payment-toolbar small {
    display: block;
    color: #7489a1;
    font-size: 0.76rem;
    font-weight: 600;
}

.bulk-payment-months {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.6rem;
    max-height: 240px;
    margin-top: 0.85rem;
    overflow: auto;
}

.bulk-payment-month-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem;
    color: #253e5b;
    background: #f8fafd;
    border: 1px solid #dce6f1;
    border-radius: 0.6rem;
}

.bulk-payment-month-row input {
    width: 17px;
    height: 17px;
}

.bulk-payment-month-row strong,
.bulk-payment-month-row small {
    display: block;
    line-height: 1.25;
}

.bulk-payment-month-row small {
    color: #7489a1;
    font-size: 0.76rem;
    font-weight: 700;
}

.bulk-payment-month-row b,
.bulk-payment-total strong {
    color: #116548;
    font-weight: 900;
}

.bulk-payment-month-row b.is-negative,
.bulk-payment-total strong.is-negative,
.dashboard-table strong.is-negative {
    color: #b42318;
}

.bulk-payment-month-row b {
    grid-column: 2;
    font-size: 0.82rem;
}

.bulk-payment-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.75rem;
    padding: 0.7rem 0.85rem;
    background: #e8f8f1;
    border: 1px solid #a8e3c8;
    border-radius: 0.65rem;
}

.invoice-months .bulk-payment-month-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.subject-payment-history-list {
    display: grid;
    gap: 0.85rem;
    max-height: 56vh;
    overflow: auto;
}

.subject-payment-history-class {
    border: 1px solid #dce6f1;
    border-radius: 0.7rem;
    overflow: hidden;
}

.subject-payment-history-class-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem 0.95rem;
    color: #172e49;
    background: #f8fafd;
    border-bottom: 1px solid #dce6f1;
}

.subject-payment-history-class-head strong,
.subject-payment-history-class-head small {
    display: block;
}

.subject-payment-history-class-head small {
    color: #7489a1;
    font-size: 0.76rem;
    font-weight: 700;
}

.subject-payment-history-class-head b {
    color: #116548;
}

.subject-payment-history-class-head b.is-negative {
    color: #b42318;
}

.subject-payment-history-total {
    margin-top: 0.9rem;
}

.form-help {
    margin: 0;
    color: #7489a1;
    font-size: 0.78rem;
    font-weight: 600;
}

.empty-state {
    padding: 1.4rem;
    color: #7489a1;
    font-weight: 700;
    background: #f8fafd;
    border: 1px dashed #ccd8e5;
    border-radius: 0.75rem;
}

.validation-summary:empty {
    display: none;
}

.student-history-profile {
    display: grid;
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    gap: 0.75rem;
}

.student-history-profile div {
    min-width: 0;
    padding: 0.75rem;
    background: #f8fafd;
    border: 1px solid #e2eaf3;
    border-radius: 0.65rem;
}

.student-history-profile span {
    display: block;
    color: #7489a1;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.student-history-profile strong {
    display: block;
    margin-top: 0.25rem;
    color: #172e49;
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}

.student-history-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.student-history-metrics span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.55rem;
    color: #255aa8;
    font-size: 0.76rem;
    font-weight: 700;
    background: #edf5ff;
    border: 1px solid #cfe0ff;
    border-radius: 999px;
}

.student-history-metrics b {
    color: #173f7c;
}

.report-export-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.report-filter-form .report-scope-filters {
    grid-template-columns: repeat(3, minmax(220px, 1fr)) repeat(3, minmax(140px, 0.65fr));
}

@media (max-width: 1399px) {
    .report-filter-form .report-scope-filters {
        grid-template-columns: repeat(3, minmax(220px, 1fr));
    }
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

@media (max-width: 1199px) {
    .settings-summary-grid,
    .academy-pricing-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .student-history-profile {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .page-content {
        padding: 1.25rem;
    }

    .dashboard-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .top-header .language-selector {
        min-width: 92px;
        padding-left: 0.45rem;
    }

    .top-header .language-selector i {
        display: none;
    }

    .dashboard-action {
        width: 100%;
    }

    .dashboard-year-form {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .dashboard-year-form .form-select,
    .dashboard-year-form .btn {
        width: 100%;
    }

    .statistics-filter-main {
        grid-template-columns: 1fr;
    }

    .statistics-filter-main.date-only {
        grid-template-columns: 1fr;
    }

    .statistics-picker-menu {
        width: 100%;
        min-width: 0;
    }

    .statistics-filter-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .statistics-filter-actions .btn {
        width: 100%;
    }

    .dashboard-table-card .card-body {
        padding: 1rem;
    }

    .academy-form-grid {
        grid-template-columns: 1fr;
    }

    .academy-form-grid.two,
    .course-day-row {
        grid-template-columns: 1fr;
    }

    .academy-inline-form {
        align-items: stretch;
        flex-direction: column;
    }

    .academy-page-grid {
        grid-template-columns: 1fr;
    }

    .payment-filter-form {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .payment-filter-form .form-select,
    .payment-filter-form .btn {
        width: 100%;
    }

    .settings-summary-grid,
    .academy-pricing-grid,
    .settings-account-grid {
        grid-template-columns: 1fr;
    }

    .settings-tabbar {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .settings-tab {
        justify-content: center;
    }

    .settings-usage-copy {
        align-items: flex-start;
        flex-direction: column;
    }

    .public-link-meta {
        grid-template-columns: 1fr;
    }

    .student-history-profile {
        grid-template-columns: 1fr;
    }
}
