/*
 * MATHNUSA brand layer, loaded last on every layout.
 * One typeface (Poppins) and the logo palette: navy #0C2343, red #EA1D25, white.
 */
:root {
    --mn-navy: #0c2343;
    --mn-navy-700: #132e55;
    --mn-navy-500: #1b3a6b;
    --mn-navy-300: #3d5a8a;
    --mn-navy-50: #eef2f9;
    --mn-red: #ea1d25;
    --mn-red-700: #b8141b;
    --mn-red-50: #fdeced;
    --mn-white: #ffffff;
    --mn-ink: #1d2740;
    --mn-muted: #5b6478;
    --mn-font: "Poppins", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- One typeface everywhere ---------- */
html body,
body .navbar, body .main-menu, body .navigation, body .content-wrapper, body .card,
body h1, body h2, body h3, body h4, body h5, body h6,
body .h1, body .h2, body .h3, body .h4, body .h5, body .h6,
body .btn, body input, body select, body textarea, body button, body label, body table,
body .form-control, body .dropdown-menu, body .badge, body .modal, body .alert,
body .select2-container, body .note-editor, body .popover, body .tooltip {
    font-family: var(--mn-font) !important;
}
/* Text colours only inside the app panels; the marketing pages manage their own light/dark sections. */
body.vertical-layout { color: var(--mn-ink); }
body.vertical-layout h1, body.vertical-layout h2, body.vertical-layout h3, body.vertical-layout h4,
body.vertical-layout h5, body.vertical-layout h6, body.vertical-layout .card-title,
body.vertical-layout .content-header-title { color: var(--mn-navy); }

/* Theme text set in Comfortaa/Muli (breadcrumbs, labels, list items): same typeface, icons excluded. */
body :is(p, span, li, a, div, td, th, small, strong, b, em, dt, dd, legend, figcaption, blockquote):not([class*="la-"]):not(.la):not([class*="ft-"]):not([class*="fa-"]):not(.fa):not(.fas):not(.far):not(.fab):not([class*="icon-"]):not([class*="feather"]) {
    font-family: var(--mn-font) !important;
}
.content-header .breadcrumb, .content-header .breadcrumb a, .content-header .breadcrumb .breadcrumb-item.active {
    color: rgba(255, 255, 255, .85) !important;
}
.content-header .breadcrumb a:hover { color: var(--mn-white) !important; text-decoration: underline; }
.content-header .breadcrumb-item + .breadcrumb-item::before { color: rgba(255, 255, 255, .6); }

/* ---------- Admin chrome: header bar and the band behind page titles ---------- */
.header-navbar .navbar-container.content,
.content-wrapper-before {
    background-image: linear-gradient(90deg, var(--mn-navy) 0%, var(--mn-navy-500) 100%) !important;
    background-color: var(--mn-navy) !important;
}
.header-navbar .navbar-container .nav-link,
.header-navbar .navbar-container .nav-link i { color: var(--mn-white) !important; }

/* Theme gradient helpers (dashboard tiles, etc.) mapped onto the logo palette. */
.bg-gradient-x-purple-blue, .bg-gradient-x-purple-red, .bg-gradient-y-purple-blue {
    background-image: linear-gradient(90deg, var(--mn-navy), var(--mn-navy-500)) !important;
}
.bg-gradient-x-blue-green, .bg-gradient-x-blue-cyan, .bg-gradient-y-blue-green {
    background-image: linear-gradient(90deg, var(--mn-navy-500), var(--mn-navy-300)) !important;
}
.bg-gradient-x-red-pink, .bg-gradient-x-orange-yellow, .bg-gradient-y-red-pink {
    background-image: linear-gradient(90deg, var(--mn-red-700), var(--mn-red)) !important;
}

/* Sidebar */
.main-menu.menu-light .navigation > li.active > a,
.main-menu.menu-light .navigation > li .active > a,
.main-menu.menu-light .navigation > li ul .active > a {
    background: var(--mn-navy-50) !important;
    color: var(--mn-navy) !important;
    box-shadow: none !important;
}
.main-menu.menu-light .navigation > li > a:hover,
.main-menu.menu-light .navigation li a:hover { color: var(--mn-red) !important; }

/* ---------- Buttons, badges, links ---------- */
.btn-primary, .btn-primary:not(:disabled):not(.disabled):active, .btn-primary:focus,
.bg-primary, .badge-primary, .page-item.active .page-link,
.wizard > .actions > ul > li > a, .wizard > .steps .current a, .wizard > .steps .current a:hover {
    background-color: var(--mn-navy) !important;
    border-color: var(--mn-navy) !important;
    color: var(--mn-white) !important;
}
.btn-primary:hover, .wizard > .actions > ul > li > a:hover { background-color: var(--mn-navy-500) !important; border-color: var(--mn-navy-500) !important; }
.btn-outline-primary { color: var(--mn-navy) !important; border-color: var(--mn-navy) !important; }
.btn-outline-primary:hover, .btn-outline-primary.active { background-color: var(--mn-navy) !important; color: var(--mn-white) !important; }
.btn-danger, .badge-danger, .bg-danger { background-color: var(--mn-red) !important; border-color: var(--mn-red) !important; }
.btn-danger:hover { background-color: var(--mn-red-700) !important; border-color: var(--mn-red-700) !important; }
.btn-outline-danger { color: var(--mn-red) !important; border-color: var(--mn-red) !important; }
.btn-outline-danger:hover { background-color: var(--mn-red) !important; color: var(--mn-white) !important; }
.text-primary { color: var(--mn-navy) !important; }
.text-danger { color: var(--mn-red) !important; }
.badge-info { background-color: var(--mn-navy-500) !important; }
.page-link { color: var(--mn-navy); }
body.vertical-layout a:not(.btn) { color: var(--mn-navy-500); }
body.vertical-layout a:not(.btn):hover { color: var(--mn-red); }
.form-control:focus, .custom-select:focus {
    border-color: var(--mn-navy-300) !important;
    box-shadow: 0 0 0 .15rem rgba(12, 35, 67, .15) !important;
}
:focus-visible { outline: 2px solid var(--mn-red); outline-offset: 2px; }

/* Student quiz top bar and other "topbar" headers */
.student-quiz-page .quiz-topbar {
    background: linear-gradient(135deg, var(--mn-navy) 0%, var(--mn-navy-500) 100%) !important;
}

/* Marketing hero: navy ground, so the brand word uses the logo red for contrast. */
.slider-container.hero-pro .hero-mathnusa-word .highlighted-word { color: var(--mn-red) !important; }

/* Login / register / password pages: logo navy ground with a soft red glow instead of the purple stock photo. */
body.bg-full-screen-image {
    background-image:
        radial-gradient(circle at 85% 15%, rgba(234, 29, 37, .28), transparent 42%),
        radial-gradient(circle at 10% 90%, rgba(61, 90, 138, .45), transparent 45%),
        linear-gradient(135deg, var(--mn-navy) 0%, var(--mn-navy-500) 100%) !important;
    background-color: var(--mn-navy) !important;
}
body.bg-full-screen-image .btn-danger,
body.bg-full-screen-image .btn-login { background-color: var(--mn-red) !important; border-color: var(--mn-red) !important; }

/* Light badges (avatar, support level) read as navy outline chips instead of grey on grey. */
body.vertical-layout .badge-light {
    background: var(--mn-white) !important;
    color: var(--mn-navy) !important;
    border: 1px solid var(--mn-navy-300);
}
body.vertical-layout .badge-secondary { background-color: var(--mn-navy-300) !important; color: var(--mn-white) !important; }

/* Pickers and dialogs from the theme still used purple/blue. */
.select2-container--default .select2-selection--multiple .select2-selection__choice,
.select2-container--classic .select2-selection--multiple .select2-selection__choice {
    background-color: var(--mn-navy) !important;
    border-color: var(--mn-navy) !important;
    color: var(--mn-white) !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove { color: rgba(255, 255, 255, .8) !important; }
.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted { background-color: var(--mn-navy-500) !important; color: var(--mn-white) !important; }
.select2-container--default .select2-results__option[aria-selected="true"] { background-color: var(--mn-navy-50) !important; color: var(--mn-navy) !important; }
.datepicker table tr td.active, .datepicker table tr td.active:hover, .datepicker table tr td.active.active,
.datepicker table tr td.today, .datepicker table tr td span.active {
    background: var(--mn-red) !important;
    color: var(--mn-white) !important;
    text-shadow: none !important;
}
.modal-header.bg-primary .close, .modal-header[class*="bg-"] .close, .modal-header .close { color: var(--mn-white); opacity: .85; text-shadow: none; }
.modal-header:not([class*="bg-"]) .close { color: var(--mn-navy); }

/* Inline code samples in help text */
body.vertical-layout code { color: var(--mn-navy); background: var(--mn-navy-50); }

/* Shared stepper (CFU edit, question builder). */
.mn-steps { display: flex; gap: .5rem; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.mn-steps li { display: flex; align-items: center; gap: .45rem; font-size: .85rem; font-weight: 600; color: var(--mn-muted); }
.mn-steps li + li::before { content: ""; width: 24px; height: 1px; background: var(--line, #cfd5e3); margin-right: .25rem; }
.mn-step-dot { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    border: 1.5px solid var(--mn-navy-300); color: var(--mn-navy); font-size: .78rem; }
.mn-steps li.is-active { color: var(--mn-navy); }
.mn-steps li.is-active .mn-step-dot { background: var(--mn-red); border-color: var(--mn-red); color: var(--mn-white); }
.mn-steps li.is-done .mn-step-dot { background: var(--mn-navy); border-color: var(--mn-navy); color: var(--mn-white); }
.mn-step-footer { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap;
    border-top: 1px solid #e3e7f0; padding-top: 1rem; margin-top: 1rem; }

/* Bootstrap switches and checkboxes use the brand colours. */
.custom-control-input:checked ~ .custom-control-label::before {
    background-color: var(--mn-navy) !important;
    border-color: var(--mn-navy) !important;
}
.custom-control-input:focus ~ .custom-control-label::before { box-shadow: 0 0 0 .15rem rgba(12, 35, 67, .2) !important; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--mn-navy); }

/* CFU board cards: label and value share one row so long labels never push values out of line. */
.cfu-facts { margin: 0 0 .75rem; }
.cfu-facts > div { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .3rem 0; border-bottom: 1px dashed var(--mn-border, #e3e7ef); }
.cfu-facts > div:last-child { border-bottom: 0; }
.cfu-facts dt { font-weight: 500; color: var(--mn-muted, #5b6478); margin: 0; }
.cfu-facts dd { font-weight: 600; color: var(--mn-navy, #0c2343); margin: 0; text-align: right; }

/* Student CFU cards: soft card, no coloured accent stripe. */
.quiz-card { border-top: 0 !important; border-radius: 14px; padding: 18px 20px 20px !important; box-shadow: 0 8px 24px rgba(12, 35, 67, .08) !important; }
.quiz-card .quiz-name { color: var(--mn-navy); font-weight: 700; }
.quiz-card .cfu-actions .btn, .quiz-card .btn { min-width: 150px; }

/* CFU report card: custom.css zeroes .card-body padding globally. */
#invoice-template.card-body { padding: 1.5rem !important; }
#invoice-template .table th { color: var(--mn-navy); font-weight: 600; background: var(--mn-navy-50); }

/* CFU answer details: give the question text room to read. */
.cfu-q-col { min-width: 260px; }

/* Table action buttons stay on one line instead of wrapping out of the cell. */
.cfu-actions-cell { display: inline-flex; gap: .3rem; white-space: nowrap; }

/* Wide admin tables scroll sideways; show a slim scrollbar so cut-off columns read as scrollable. */
.table-responsive { scrollbar-width: thin; scrollbar-color: var(--mn-navy-300) var(--mn-navy-50); }
.table-responsive::-webkit-scrollbar { height: 8px; }
.table-responsive::-webkit-scrollbar-track { background: var(--mn-navy-50); border-radius: 8px; }
.table-responsive::-webkit-scrollbar-thumb { background: var(--mn-navy-300); border-radius: 8px; }

/* Any open pop-up dims the sidebar too (the theme puts the menu above the backdrop). */
body.modal-open .main-menu { z-index: 1030; }


/* ---------- Professional weights (Poppins 700 reads too heavy in the app) ---------- */
body.vertical-layout h1, body.vertical-layout h2, body.vertical-layout h3,
body.vertical-layout h4, body.vertical-layout h5, body.vertical-layout h6,
body.vertical-layout .card-title, body.vertical-layout .content-header-title { font-weight: 600 !important; }
body.vertical-layout strong, body.vertical-layout b, body.vertical-layout th { font-weight: 600; }
body.vertical-layout label { font-weight: 500; }

/* ---------- Sidebar: lighter text, compact rows, quiet icons ---------- */
body .main-menu .navigation li a,
body .main-menu .navigation li a .menu-title { font-weight: 500 !important; letter-spacing: 0 !important; }
body .main-menu .navigation > li > a {
    height: auto !important;
    margin: 2px 12px !important;
    padding: 8px 12px !important;
    border-radius: 10px !important;
    color: #3b4660 !important;
    display: flex !important;
    align-items: center;
}
body .main-menu .navigation > li > a .menu-title { line-height: 1.3 !important; height: auto !important; }
body .main-menu .navigation > li > a > i {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px;
    margin-right: 12px !important;
    border-radius: 8px !important;
    background: var(--mn-navy-50) !important;
    box-shadow: none !important;
    color: var(--mn-navy) !important;
    font-size: 15px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}
body .main-menu .navigation > li.active > a > i,
body .main-menu .navigation > li.open > a > i { background: var(--mn-navy) !important; color: #fff !important; }
body .main-menu .navigation > li.active > a,
body .main-menu .navigation > li.open > a { font-weight: 600 !important; }
body .main-menu .navigation > li.active > a .menu-title,
body .main-menu .navigation > li.open > a .menu-title { font-weight: 600 !important; color: var(--mn-navy) !important; }
body .main-menu .navigation li ul li > a {
    margin: 1px 12px !important;
    padding: 7px 12px 7px 56px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    color: #5b6478 !important;
}
body .main-menu .navigation li ul li.active > a { font-weight: 600 !important; color: var(--mn-navy) !important; background: var(--mn-navy-50) !important; }
body .main-menu .navigation > li > a:hover { background: #f6f8fc !important; }

/* ---------- Website (landing pages): calmer, readable weights ---------- */
body:not(.vertical-layout) h1, body:not(.vertical-layout) .h1 { font-weight: 700 !important; letter-spacing: -0.6px !important; }
body:not(.vertical-layout) h2, body:not(.vertical-layout) .h2 { font-weight: 600 !important; letter-spacing: -0.4px !important; }
body:not(.vertical-layout) h3, body:not(.vertical-layout) h4,
body:not(.vertical-layout) h5, body:not(.vertical-layout) h6 { font-weight: 600 !important; letter-spacing: -0.2px !important; text-transform: none !important; }
body:not(.vertical-layout) p, body:not(.vertical-layout) li { font-weight: 400 !important; }
body:not(.vertical-layout) header nav a, body:not(.vertical-layout) .navbar-nav a,
body:not(.vertical-layout) .nav-link { font-weight: 500 !important; letter-spacing: 0 !important; }

/* Site navbar: short title-case links, red underline on the active page, one red button on the right. */
@media (min-width: 992px) {
    #header .site-nav { flex-wrap: nowrap; align-items: center; }
    #header.header-home-light .header-nav-main nav > ul.site-nav > li > a.nav-link {
        text-transform: none !important;
        font-size: 15px !important;
        font-weight: 500 !important;
        letter-spacing: 0 !important;
        padding: 8px 14px !important;
        white-space: nowrap;
        color: #0C2343 !important;
    }
    #header.header-home-light .header-nav-main nav > ul.site-nav > li > a.nav-link:hover, #header.header-home-light .header-nav-main nav > ul.site-nav > li > a.nav-link.active { color: #EA1D25 !important; }
    #header.header-home-light .header-nav-main nav > ul.site-nav > li > a.nav-link::after { left: 14px; right: 14px; }
    #header.header-home-light .header-nav-main nav > ul.site-nav > li.nav-auth-item:not(.nav-auth-item ~ .nav-auth-item) { margin-left: 12px; }
    #header.header-home-light .header-nav-main nav > ul.site-nav > li > a.nav-account-btn {
        background: #EA1D25 !important;
        color: #fff !important;
        border-radius: 999px !important;
        padding: 9px 22px !important;
        font-weight: 600 !important;
        height: auto !important;
        min-height: 0 !important;
        line-height: 1.3 !important;
        align-self: center;
    }
    #header.header-home-light .header-nav-main nav > ul.site-nav > li > a.nav-account-btn:hover { background: #c8141b !important; color: #fff !important; }
    #header.header-home-light .header-nav-main nav > ul.site-nav > li > a.nav-account-btn::after { display: none !important; }
    #header.header-home-light .header-nav-main nav > ul.site-nav > li > a.nav-login-link::after { display: none !important; }
    #header .site-nav .dropdown-menu-right { left: auto !important; right: 0 !important; }
}
@media (min-width: 992px) and (max-width: 1199px) {
    #header.header-home-light .header-nav-main nav > ul.site-nav > li > a.nav-link { font-size: 14px !important; padding: 8px 9px !important; }
    #header.header-home-light .header-nav-main nav > ul.site-nav > li > a.nav-link::after { left: 9px; right: 9px; }
    #header.header-home-light .header-nav-main nav > ul.site-nav > li > a.nav-account-btn { padding: 8px 16px !important; }
}
@media (max-width: 991px) {
    #header.header-home-light .header-nav-main nav > ul.site-nav > li > a.nav-link { text-transform: none !important; font-size: 16px !important; }
    #header.header-home-light .header-nav-main nav > ul.site-nav > li > a.nav-account-btn { background: #EA1D25 !important; border-radius: 8px !important; margin-top: 8px; justify-content: center; width: 100%; padding: 10px 40px !important; }
}

/* Grade tile for grades that have no course yet. */
#gradeContent .welcome-course-thumb-wrap.grade-tile, .welcome-course-thumb-wrap.grade-tile {
    display: flex !important; flex-direction: column; align-items: center; justify-content: center;
    background: radial-gradient(circle at 82% 18%, rgba(234, 29, 37, .45), transparent 42%), linear-gradient(135deg, #0C2343, #1d4a8a) !important;
    color: #fff; font-family: 'Poppins', sans-serif; line-height: 1;
}
.grade-tile-num { display: flex; align-items: flex-start; font-size: 64px; font-weight: 700; letter-spacing: -1px; }
.grade-tile-num sup { font-size: 22px; font-weight: 600; top: 0; margin: 8px 0 0 3px; line-height: 1; }
.grade-tile-word { margin-top: 6px; font-size: 12px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; opacity: .75; }
.grade-soon-pill {
    align-self: center; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
    background: rgba(234, 29, 37, .15); color: #ff8a8f; border: 1px solid rgba(234, 29, 37, .4);
}

/* Decorative background dots must never widen the page. */
html, body { overflow-x: clip; }

/* Navbar dropdowns: white card, navy text, soft hover. */
@media (min-width: 992px) {
    #header.header-home-light .header-nav-main nav > ul.site-nav > li.dropdown .dropdown-menu {
        background: #fff !important;
        border: 1px solid #e6eaf1 !important;
        border-radius: 12px !important;
        box-shadow: 0 14px 34px rgba(12, 35, 67, .14) !important;
        padding: 8px !important;
        min-width: 220px;
        margin-top: 4px !important;
    }
    #header.header-home-light .header-nav-main nav > ul.site-nav > li.dropdown .dropdown-menu::before { display: none !important; }
    #header.header-home-light .header-nav-main nav > ul.site-nav > li.dropdown .dropdown-menu li { border: 0 !important; }
    #header.header-home-light .header-nav-main nav > ul.site-nav > li.dropdown .dropdown-menu .dropdown-item {
        display: flex !important; align-items: center; gap: 10px;
        color: #0C2343 !important; background: transparent !important;
        font-size: 14px !important; font-weight: 500 !important; text-transform: none !important;
        padding: 9px 12px !important; border-radius: 8px; border: 0 !important; white-space: nowrap;
    }
    #header.header-home-light .header-nav-main nav > ul.site-nav > li.dropdown .dropdown-menu .dropdown-item:hover {
        background: #f2f5fa !important; color: #EA1D25 !important;
    }
    #header.header-home-light .header-nav-main nav > ul.site-nav .dropdown-item i { width: 16px; text-align: center; color: #8a97ab; }
    #header.header-home-light .header-nav-main nav > ul.site-nav .dropdown-item.is-logout,
    #header.header-home-light .header-nav-main nav > ul.site-nav .dropdown-item.is-logout i { color: #EA1D25 !important; }
    #header.header-home-light .header-nav-main nav > ul.site-nav .dropdown-divider { margin: 6px 4px; border-top: 1px solid #edf0f5; }

}
/* Home: school cards. School page: grade tiles then courses. */
.school-grid { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 320px)); justify-content: center; gap: 20px; margin-top: 28px; }
.school-empty { position: relative; z-index: 2; }
.school-card {
    display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: 16px; text-decoration: none !important;
    background: #12305a; border: 1px solid rgba(255, 255, 255, .12); color: #fff;
    transition: transform .18s, border-color .18s, background .18s;
}
.school-card:hover { transform: translateY(-3px); border-color: #EA1D25; background: #16386b; }
.school-card-badge {
    width: 52px; height: 52px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center;
    background: #EA1D25; color: #fff; font: 700 18px/1 'Poppins', sans-serif;
}
.school-card-badge.is-large { width: 72px; height: 72px; border-radius: 18px; font-size: 26px; }
.school-card-name { font: 600 18px/1.3 'Poppins', sans-serif; color: #fff; }
.school-card-place { font-size: 13px; color: #b9c4d6; }
.school-card-grades { display: flex; flex-wrap: wrap; gap: 6px; }
.school-card-grades span { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .1); color: #fff; }
.school-card-grades span:not(.is-muted)::after { content: " grade"; font-weight: 400; opacity: .8; }
.school-card-grades .is-muted { background: transparent; color: #b9c4d6; padding-left: 0; }
.school-card-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .1); display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #b9c4d6; }
.school-card-foot i { color: #EA1D25; }
.school-empty { text-align: center; padding: 40px 16px; color: #fff; }
.school-empty-icon { display: inline-flex; width: 72px; height: 72px; border-radius: 50%; align-items: center; justify-content: center; background: rgba(234, 29, 37, .15); color: #EA1D25; font-size: 28px; margin-bottom: 14px; }
.school-empty h3 { color: inherit; font-size: 22px; margin-bottom: 18px; }
.school-empty-btn { display: inline-block; background: #EA1D25; color: #fff !important; padding: 11px 26px; border-radius: 999px; font-weight: 600; text-decoration: none !important; }
.school-empty-btn:hover { background: #c8141b; }

.school-page { padding-block: 40px 70px; }
.school-page .school-empty { color: #0C2343; }
.school-back { display: inline-flex; gap: 8px; align-items: center; color: #5b6b82; font-size: 14px; text-decoration: none !important; margin-bottom: 18px; }
.school-back:hover { color: #EA1D25; }
.school-head { display: flex; align-items: center; gap: 18px; margin-bottom: 30px; }
.school-head h1 { font-size: 32px; font-weight: 700; color: #0C2343; margin: 0; line-height: 1.2; }
.school-head p { margin: 4px 0 0; color: #5b6b82; }
.school-step { font-size: 15px; font-weight: 600; color: #5b6b82; text-transform: uppercase; letter-spacing: 1.5px; margin: 10px 0 14px; }
.school-grade-tiles { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }
.school-grade-tile {
    width: 130px; height: 120px; border: 3px solid transparent; border-radius: 16px; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; color: #fff;
    background: linear-gradient(135deg, #0C2343, #1d4a8a); opacity: .65; transition: opacity .15s, border-color .15s, transform .15s;
}
.school-grade-tile .grade-tile-num { font-size: 44px; }
.school-grade-tile .grade-tile-num sup { font-size: 16px; margin-top: 5px; }
.school-grade-tile:hover { opacity: .9; }
.school-grade-tile.is-active { opacity: 1; border-color: #EA1D25; transform: translateY(-2px); }

/* Logo lines up with the page content below it. */
#header .header-container.container .header-column-logo { padding-left: 0 !important; }
#header .header-container.container .header-logo a { margin-left: 0 !important; }
@media (min-width: 992px) {
    #header.header-home-light .header-nav-main nav > ul.site-nav > li.dropdown:hover > .dropdown-menu,
    #header.header-home-light .header-nav-main nav > ul.site-nav > li.dropdown.show > .dropdown-menu {
        display: block !important; opacity: 1 !important; visibility: visible !important; transform: none !important; top: 100% !important;
    }
}
.school-place { color: #5b6b82; margin: -8px 0 22px; }

/* Account button: avatar, first name, caret. Menu opens below the header on click. */
#header .nav-user { position: relative; display: flex; align-items: center; margin-left: 14px; }
#header .nav-user-btn {
    display: inline-flex; align-items: center; gap: 10px; padding: 4px 12px 4px 4px;
    background: #fff; border: 1px solid #e3e8f0; border-radius: 999px; cursor: pointer;
    font: 500 14px/1 'Poppins', sans-serif; color: #0C2343; transition: border-color .15s, box-shadow .15s;
}
#header .nav-user-btn:hover, #header .nav-user.is-open .nav-user-btn { border-color: #EA1D25; box-shadow: 0 4px 14px rgba(12, 35, 67, .1); }
#header .nav-user-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#header .nav-caret { width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .15s; }
#header .nav-user.is-open .nav-caret { transform: translateY(2px) rotate(225deg); }
.nav-avatar {
    position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 36px; height: 36px; border-radius: 50%; overflow: hidden;
    background: linear-gradient(135deg, #0C2343, #1d4a8a); color: #fff;
    font: 600 13px/1 'Poppins', sans-serif; letter-spacing: .5px;
}
.nav-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#header .nav-user-menu {
    display: none; position: absolute; top: calc(100% + 14px); right: 0; z-index: 1000; min-width: 250px;
    list-style: none; margin: 0; padding: 8px; background: #fff; border: 1px solid #e6eaf1; border-radius: 14px;
    box-shadow: 0 16px 36px rgba(12, 35, 67, .16);
}
#header .nav-user.is-open .nav-user-menu { display: block; animation: navMenuIn .14s ease-out; }
@keyframes navMenuIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
#header .nav-user-menu li { border: 0 !important; }
#header .nav-user-menu .nav-user-head { display: flex; align-items: center; gap: 12px; padding: 8px 10px 12px; margin-bottom: 6px; border-bottom: 1px solid #edf0f5 !important; }
#header .nav-user-menu .nav-user-head strong { display: block; color: #0C2343; font-size: 14px; font-weight: 600; line-height: 1.3; }
#header .nav-user-menu .nav-user-head small { display: block; color: #8a97ab; font-size: 12px; line-height: 1.3; }
#header .nav-user-menu .dropdown-item {
    display: flex !important; align-items: center; gap: 12px; padding: 9px 10px !important; border-radius: 8px;
    color: #0C2343 !important; background: transparent !important; font-size: 14px !important; font-weight: 500 !important;
    text-transform: none !important; white-space: nowrap; border: 0 !important;
}
#header .nav-user-menu .dropdown-item:hover { background: #f2f5fa !important; color: #EA1D25 !important; }
#header .nav-user-menu .dropdown-item i { width: 16px; text-align: center; color: #8a97ab; }
#header .nav-user-menu .dropdown-item:hover i { color: #EA1D25; }
#header .nav-user-menu .dropdown-item.is-logout, #header .nav-user-menu .dropdown-item.is-logout i { color: #EA1D25 !important; }
#header .nav-user-menu .dropdown-divider { margin: 6px 4px; border-top: 1px solid #edf0f5; }

/* Mobile: proper hamburger that turns into an X, and a clean slide-down panel. */
#header .nav-burger {
    width: 46px; height: 46px; padding: 0 !important; border: 0; border-radius: 12px; background: #0C2343 !important;
    display: none; flex-direction: column; align-items: center; justify-content: center; gap: 5px; box-shadow: none !important;
}
#header .nav-burger span { display: block; width: 22px; height: 2px; border-radius: 2px; background: #fff; transition: transform .2s, opacity .2s; }
#header .nav-burger[aria-expanded="true"] { background: #EA1D25 !important; }
#header .nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#header .nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
#header .nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 991px) {
    #header .nav-burger { display: inline-flex !important; }
    #header .header-nav-main nav.collapse.show { max-height: calc(100vh - 90px) !important; overflow-y: auto !important; }
    #header .header-nav-main nav { background: #0C2343 !important; border-radius: 0 0 16px 16px; padding: 8px 18px 18px !important; }
    #header.header-home-light .header-nav-main nav > ul.site-nav > li { border-bottom: 1px solid rgba(255, 255, 255, .08) !important; }
    #header.header-home-light .header-nav-main nav > ul.site-nav > li > a.nav-link {
        justify-content: flex-start !important; text-align: left !important; padding: 13px 6px !important;
        background: transparent !important; color: #fff !important; font-size: 16px !important;
    }
    #header.header-home-light .header-nav-main nav > ul.site-nav > li > a.nav-link.active { color: #ff8a8f !important; }
    #header .nav-user { display: block; margin: 10px 0 0; border-bottom: 0 !important; }
    #header .nav-user-btn { display: none; }
    #header .nav-user-menu { display: block; position: static; min-width: 0; background: rgba(255, 255, 255, .06); border: 0; box-shadow: none; }
    #header .nav-user-menu .nav-user-head { border-bottom-color: rgba(255, 255, 255, .1) !important; }
    #header .nav-user-menu .nav-user-head strong { color: #fff; }
    #header .nav-user-menu .nav-user-head small { color: #b9c4d6; }
    #header .nav-user-menu .dropdown-item { color: #fff !important; font-size: 15px !important; }
    #header .nav-user-menu .dropdown-item i { color: #b9c4d6; }
    #header .nav-user-menu .dropdown-item.is-logout, #header .nav-user-menu .dropdown-item.is-logout i { color: #ff8a8f !important; }
    #header .nav-user-menu .dropdown-divider { border-top-color: rgba(255, 255, 255, .1); }
}
#header .nav-user-btn:focus, #header .nav-burger:focus { outline: none; }
#header .nav-user-btn:focus-visible, #header .nav-burger:focus-visible { outline: 2px solid #EA1D25; outline-offset: 2px; }
@media (max-width: 991px) {
    #header .header-nav .header-btn-collapse-nav.nav-burger { background: #0C2343 !important; border-radius: 12px !important; width: 46px; height: 46px; }
    #header .header-nav .header-btn-collapse-nav.nav-burger[aria-expanded="true"] { background: #EA1D25 !important; }
    #header.header-home-light .header-nav-main nav > ul.site-nav { flex-direction: column !important; align-items: stretch !important; }
    #header.header-home-light .header-nav-main nav > ul.site-nav > li { display: block !important; width: 100% !important; }
    #header.header-home-light .header-nav-main nav > ul.site-nav > li > a.nav-link { display: flex !important; width: 100% !important; }
    #header.header-home-light .header-nav-main nav > ul.site-nav > li.nav-user { border-bottom: 0 !important; }
    #header .nav-user-menu { width: 100% !important; border-radius: 12px; }
}
@media (max-width: 991px) {
    #header.header-home-light .header-nav-main nav > ul.site-nav > li.dropdown > .dropdown-menu {
        position: static !important; float: none !important; transform: none !important; inset: auto !important;
        width: 100% !important; min-width: 0 !important; margin: 0 0 10px !important; padding: 6px !important;
        background: rgba(255, 255, 255, .06) !important; border: 0 !important; border-radius: 12px !important; box-shadow: none !important;
    }
    #header.header-home-light .header-nav-main nav > ul.site-nav > li.dropdown > .dropdown-menu li { border: 0 !important; }
    #header.header-home-light .header-nav-main nav > ul.site-nav > li.dropdown > .dropdown-menu .dropdown-item {
        display: block; color: #fff !important; background: transparent !important; text-align: left !important;
        font-size: 15px !important; text-transform: none !important; padding: 10px 12px !important; border-radius: 8px; border: 0 !important;
    }
    #header.header-home-light .header-nav-main nav > ul.site-nav > li.dropdown > .dropdown-menu .dropdown-divider { border-top-color: rgba(255, 255, 255, .1); margin: 4px 8px; }
}

/* Light sections: background dots stay soft so they never fight the text. Dark sections keep their own value. */
.has-section-bg-dots { --dot-opacity: 0.10; }

/* Admin dashboard: counters and the flow-ordered setup checklist. */
.dash-stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 20px; }
.dash-stat { display: flex; align-items: center; gap: 14px; padding: 18px; background: #fff; border-radius: 14px; box-shadow: 0 6px 18px rgba(12, 35, 67, .08); color: #5b6b82 !important; text-decoration: none !important; transition: transform .15s; }
.dash-stat:hover { transform: translateY(-2px); }
.dash-stat strong { display: block; font-size: 26px; line-height: 1.1; color: #0C2343; font-weight: 700; }
.dash-stat-icon { width: 46px; height: 46px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: rgba(234, 29, 37, .1); color: #EA1D25; font-size: 20px; flex: none; }
.dash-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 991px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } }
.dash-panel { padding: 20px 22px; border-radius: 14px; margin-bottom: 16px; min-width: 0; }
.dash-panel-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.dash-panel-head h4 { margin: 0; color: #0C2343; font-weight: 700; font-size: 17px; }
.dash-panel-head span { color: #8a97ab; font-size: 13px; }
.dash-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.dash-kpis div { background: #f5f7fb; border-radius: 10px; padding: 12px 14px; color: #5b6b82; font-size: 12px; }
.dash-kpis strong { display: block; font-size: 22px; color: #0C2343; font-weight: 700; font-variant-numeric: tabular-nums; }
.dash-bars { display: flex; align-items: flex-end; gap: 6px; height: 160px; }
.dash-bar { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; }
.dash-bar-fill { position: relative; display: flex; flex-direction: column; justify-content: flex-end; background: #c9d3e3; border-radius: 4px 4px 0 0; min-height: 2px; overflow: hidden; }
.dash-bar-ok { display: block; background: #0C2343; }
.dash-bar small { text-align: center; color: #8a97ab; font-size: 11px; margin-top: 4px; }
.dash-legend { display: flex; align-items: center; gap: 6px; margin-top: 10px; color: #5b6b82; font-size: 12px; }
.dash-legend span { width: 10px; height: 10px; border-radius: 2px; background: #c9d3e3; margin-left: 8px; }
.dash-legend span.is-ok { background: #0C2343; margin-left: 0; }
.dash-empty { color: #8a97ab; margin: 8px 0 4px; }
.dash-levels { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.dash-levels li { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.dash-level-label { color: #5b6b82; display: inline-flex; align-items: center; gap: 8px; }
.dash-level-label i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dash-levels strong { color: #0C2343; font-variant-numeric: tabular-nums; }
.dash-level-track { grid-column: 1 / -1; height: 6px; background: #edf0f5; border-radius: 3px; overflow: hidden; }
.dash-level-track span { display: block; height: 100%; }
.dash-levels .is-mastered { background: #1f9d55; }
.dash-levels .is-progress { background: #0C2343; }
.dash-levels .is-recovery { background: #EA1D25; }
.dash-levels .is-locked { background: #b6c0cf; }
.dash-table th { color: #8a97ab; font-weight: 600; font-size: 12px; border-top: 0; }
.dash-table td { color: #0C2343; font-variant-numeric: tabular-nums; }
.dash-content { list-style: none; margin: 0; padding: 0; }
.dash-content li { display: flex; justify-content: space-between; padding: 10px 0; border-top: 1px solid #edf0f5; }
.dash-content li:first-child { border-top: 0; }
.dash-content a { color: #5b6b82; }
.dash-content strong { color: #0C2343; font-variant-numeric: tabular-nums; }
.dash-setup { padding: 20px 22px; border-radius: 14px; }
.dash-setup-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.dash-setup-head h4 { margin: 0; color: #0C2343; font-weight: 700; }
.dash-setup-head span { color: #8a97ab; font-size: 13px; }
.dash-steps { list-style: none; margin: 0; padding: 0; }
.dash-steps li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid #edf0f5; }
.dash-step-num { width: 32px; height: 32px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; background: #0C2343; color: #fff; font-weight: 600; }
.dash-steps li.is-done .dash-step-num { background: #1f9d55; }
.dash-step-text { flex: 1; min-width: 0; color: #5b6b82; font-size: 13px; }
.dash-step-text strong { display: block; color: #0C2343; font-size: 15px; }
.dash-steps li.is-done .dash-step-text strong { color: #8a97ab; }

/* ===== Admin: Schools list, school card and add/edit popup ===== */
.sl-card { border-radius: 16px; box-shadow: 0 8px 24px rgba(12, 35, 67, .08); overflow: hidden; }
.sl-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 20px 22px 6px; flex-wrap: wrap; }
.sl-title { margin: 0; font-size: 20px; font-weight: 700; color: #0C2343; }
.sl-sub { margin: 2px 0 0; color: #8a97ab; font-size: 13px; }
.sl-add { background: #EA1D25 !important; border: 0 !important; color: #fff !important; border-radius: 10px !important; padding: 10px 18px !important; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; box-shadow: 0 6px 14px rgba(234, 29, 37, .25); }
.sl-add:hover { background: #c8141b !important; }
.sl-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 22px; flex-wrap: wrap; }
.sl-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.sl-tabs a { padding: 7px 14px; border-radius: 999px; background: #f1f4f9; color: #0C2343 !important; font-weight: 600; font-size: 13px; }
.sl-tabs a span { margin-left: 4px; color: #8a97ab; font-weight: 500; }
.sl-tabs a.is-on { background: #0C2343; color: #fff !important; }
.sl-tabs a.is-on span { color: #ffb3b6; }
.sl-search { position: relative; flex: 0 1 320px; min-width: 220px; }
.sl-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #8a97ab; }
.sl-search input { width: 100%; height: 40px; padding: 0 12px 0 36px; border: 1px solid #e3e8f0; border-radius: 10px; font-size: 14px; color: #0C2343; background: #fff; }
.sl-search input:focus { outline: none; border-color: #0C2343; box-shadow: none; }
.sl-table thead th { background: #f7f9fc; color: #5b6b82; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .6px; border: 0 !important; padding: 12px 16px; white-space: nowrap; }
.sl-table thead th:first-child { padding-left: 22px; }
.sl-table td { vertical-align: middle !important; border-top: 1px solid #eef1f6 !important; padding: 14px 16px; color: #3d4b60; }
.sl-table td:first-child { padding-left: 22px; }
.sl-table tbody tr:hover { background: #fafbfd; }
.sl-school { display: flex; align-items: center; gap: 12px; color: inherit !important; text-decoration: none !important; }
.sl-school strong { display: block; color: #0C2343; font-weight: 600; }
.sl-school:hover strong { color: #EA1D25; }
.sl-school small, .sl-person small { display: block; color: #8a97ab; font-size: 12px; }
.sl-badge { width: 40px; height: 40px; flex: none; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #0C2343, #1d4a8a); color: #fff; font-weight: 700; font-size: 14px; }
.sl-badge.is-lg { width: 56px; height: 56px; border-radius: 14px; font-size: 19px; }
.sl-person { color: #0C2343; }
.sl-num { font-variant-numeric: tabular-nums; font-weight: 600; color: #0C2343; }
.sl-status { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.sl-status-active { background: #e5f6ec; color: #15803d; }
.sl-status-inquiry { background: #fff4e0; color: #b45309; }
.sl-status-inactive { background: #f1f3f6; color: #6b7280; }
.sl-actions { white-space: nowrap; }
.sl-icon { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border-radius: 9px; border: 1px solid #e3e8f0; background: #fff; color: #0C2343 !important; cursor: pointer; transition: all .15s; }
.sl-icon + .sl-icon { margin-left: 6px; }
.sl-icon:hover { border-color: #EA1D25; color: #EA1D25 !important; }
.sl-empty { text-align: center; padding: 48px 16px !important; color: #8a97ab; }
.sl-empty > i { display: block; font-size: 34px; color: #EA1D25; margin-bottom: 8px; }
.sl-empty .btn { display: inline-flex; margin-top: 12px; }
.sl-empty strong { display: block; color: #0C2343; font-size: 16px; }
.sl-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 22px; border-top: 1px solid #eef1f6; color: #8a97ab; font-size: 13px; flex-wrap: wrap; }
.sl-foot .pagination { margin: 0; }
.sl-foot .page-item.active .page-link { background: #0C2343; border-color: #0C2343; }
.sl-foot .page-link { color: #0C2343; border-radius: 8px !important; margin: 0 2px; }
.sl-code { font-size: 12px; background: #f1f4f9; color: #0C2343; padding: 3px 8px; border-radius: 6px; margin-left: 6px; }

.sl-info { padding: 20px; }
.sl-info-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 16px; }
.sl-info-head h4 { margin: 0 0 6px; font-size: 18px; font-weight: 700; color: #0C2343; line-height: 1.3; }
.sl-facts { display: grid; grid-template-columns: 22px 1fr; gap: 10px 8px; margin: 0 0 14px; padding: 14px 0; border-top: 1px solid #eef1f6; border-bottom: 1px solid #eef1f6; }
.sl-facts dt { color: #EA1D25; font-weight: 400; }
.sl-facts dd { margin: 0; color: #3d4b60; font-size: 13.5px; word-break: break-word; }
.sl-facts dd small { display: block; color: #8a97ab; }
.sl-contact { padding: 10px 12px; border-radius: 10px; background: #f7f9fc; margin-bottom: 8px; }
.sl-contact-role { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .6px; color: #EA1D25; margin-bottom: 2px; }
.sl-contact strong { display: block; color: #0C2343; font-size: 14px; }
.sl-contact small { display: block; color: #8a97ab; font-size: 12.5px; word-break: break-word; }
.sl-since { margin: 10px 0 0; color: #8a97ab; font-size: 12.5px; }
.sl-info-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.min-w-0 { min-width: 0; }

.sf-modal .modal-content { border: 0; border-radius: 18px; overflow: hidden; }
.sf-modal .modal-header { align-items: flex-start; padding: 20px 24px 14px; border-bottom: 1px solid #eef1f6; background: #fff; }
.sf-modal .modal-title { color: #0C2343; font-weight: 700; font-size: 19px; margin: 0; }
.sf-sub { margin: 2px 0 0; color: #8a97ab; font-size: 12.5px; }
.sf-req { color: #EA1D25; }
.sf-modal .modal-body { padding: 18px 24px; background: #fafbfd; }
.sf-group { background: #fff; border: 1px solid #eef1f6; border-radius: 14px; padding: 16px 16px 4px; margin-bottom: 14px; }
.sf-group h5 { font-size: 13px; font-weight: 700; color: #0C2343; text-transform: uppercase; letter-spacing: .7px; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.sf-group h5 i { color: #EA1D25; }
.sf-group label { font-size: 12.5px; font-weight: 600; color: #3d4b60; margin-bottom: 4px; }
.sf-group .form-control { height: 42px; border-radius: 10px; border-color: #e3e8f0; color: #0C2343; font-size: 14px; }
.sf-group .form-control:focus { border-color: #0C2343; box-shadow: none; }
.sf-group .form-control.is-invalid { border-color: #EA1D25; background-image: none; padding-right: .75rem; }
.sf-group .invalid-feedback { color: #EA1D25; font-size: 12px; }
.sf-modal .modal-footer { padding: 14px 24px; border-top: 1px solid #eef1f6; background: #fff; }
.sf-save { background: #0C2343 !important; color: #fff !important; border-radius: 10px !important; padding: 10px 22px !important; font-weight: 600; }
.sf-save:hover { background: #EA1D25 !important; }
.sf-save:disabled { opacity: .7; }
/* School form stepper */
.sf-steps { list-style: none; display: flex; margin: 0; padding: 14px 24px; gap: 8px; background: #fff; border-bottom: 1px solid #eef1f6; }
.sf-steps li { flex: 1 1 0; display: flex; align-items: center; gap: 8px; min-width: 0; }
.sf-steps li:not(:last-child)::after { content: ""; flex: 1 1 auto; height: 2px; border-radius: 2px; background: #e3e8f0; }
.sf-steps li.is-done:not(:last-child)::after { background: #0C2343; }
.sf-step { display: flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 0; color: #8a97ab; font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.sf-step:disabled { cursor: default; }
.sf-step-num { width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 2px solid #e3e8f0; background: #fff; color: #8a97ab; font-size: 13px; }
.sf-step-num .ft-check { display: none; }
.sf-steps li.is-current .sf-step { color: #0C2343; }
.sf-steps li.is-current .sf-step-num { border-color: #EA1D25; background: #EA1D25; color: #fff; }
.sf-steps li.is-done .sf-step { color: #0C2343; }
.sf-steps li.is-done:not(.is-current) .sf-step-num { border-color: #0C2343; background: #0C2343; color: #fff; }
.sf-steps li.is-done:not(.is-current) .sf-step-digit { display: none; }
.sf-steps li.is-done:not(.is-current) .sf-step-num .ft-check { display: inline; }
.sf-pane .sf-group:last-child { margin-bottom: 0; }
.sf-footer { display: flex; align-items: center; gap: 8px; }
.sf-footer > * { margin: 0 !important; }
.sf-footer-gap { flex: 1 1 auto; }
.sf-footer .btn i { font-size: 13px; vertical-align: -1px; }
@media (max-width: 575.98px) {
    .sf-steps { padding: 12px 16px; }
    .sf-step-name { display: none; }
    .sf-steps li.is-current .sf-step-name { display: inline; }
}
.sl-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important; font-style: normal; white-space: nowrap; display: inline-block; margin: 4px 0 0; }
.sl-card > .alert-success, .content > .alert-success, .app-content .alert-success { background: #e5f6ec !important; color: #15803d !important; border: 0 !important; border-radius: 10px; }
.sl-card > .alert-success { margin: 6px 22px 0; }

/* ===== Admin sidebar: logo, headers and icons on one line; navy and red like the logo ===== */
body .main-menu.menu-light { background: #fff !important; border-right: 1px solid #eef1f6; }
body .main-menu.menu-light .navigation-background { display: none !important; }
body .main-menu.menu-light .navbar-header { height: 76px !important; padding: 0 !important; border-bottom: 1px solid #eef1f6; }
body .main-menu.menu-light .navbar-header .navbar-brand { padding: 0 !important; margin: 0 0 0 24px !important; height: 76px; display: flex !important; align-items: center; }
body .main-menu.menu-light .navbar-header .brand-logo { height: 38px !important; width: auto !important; margin: 0 !important; }
body .main-menu.menu-light .main-menu-content { padding: 10px 12px 24px; }
body .main-menu.menu-light .navigation { background: transparent !important; }
body .main-menu.menu-light .navigation .navigation-header { padding: 18px 12px 6px 12px !important; margin: 0 !important; }
body .main-menu.menu-light .navigation .navigation-header span { color: #EA1D25 !important; font-size: 11px !important; font-weight: 700 !important; letter-spacing: 1.2px; text-transform: uppercase; }
body .main-menu.menu-light .navigation > li { margin: 2px 0 !important; }
body .main-menu.menu-light .navigation > li > a {
    display: flex !important; align-items: center; gap: 12px; padding: 8px 12px !important; margin: 0 !important;
    border-radius: 12px !important; color: #0C2343 !important; font-weight: 500; background: transparent !important;
    position: relative; transition: background .15s, color .15s;
}
body .main-menu.menu-light .navigation > li > a i {
    width: 34px !important; height: 34px !important; margin: 0 !important; flex: none; border-radius: 10px !important;
    display: inline-flex !important; align-items: center; justify-content: center; font-size: 16px !important;
    background: transparent !important; color: #EA1D25 !important; font-size: 18px !important; transition: color .15s, transform .15s;
}
body .main-menu.menu-light .navigation > li > a .menu-title { color: inherit !important; font-size: 14px; }
body .main-menu.menu-light .navigation > li > a:hover { background: #f7f9fc !important; color: #EA1D25 !important; }
body .main-menu.menu-light .navigation > li > a:hover i { background: transparent !important; color: #EA1D25 !important; transform: scale(1.1); }
body .main-menu.menu-light .navigation > li.active > a,
body .main-menu.menu-light .navigation > li.open > a {
    background: #0C2343 !important; color: #fff !important; box-shadow: 0 8px 18px rgba(12, 35, 67, .18);
}
body .main-menu.menu-light .navigation > li.active > a i,
body .main-menu.menu-light .navigation > li.open > a i { background: transparent !important; color: #ff4d55 !important; }
body .main-menu.menu-light .navigation > li.active > a::before,
body .main-menu.menu-light .navigation > li.open > a::before { content: ""; position: absolute; left: -12px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: #EA1D25; }
body .main-menu.menu-light .navigation > li.has-sub > a::after, body .main-menu.menu-light .navigation > li.open > a::after { color: inherit !important; }
body .main-menu.menu-light .navigation > li .menu-content { background: transparent !important; padding: 4px 0 4px 58px !important; }
body .main-menu.menu-light .navigation > li .menu-content > li > a { padding: 7px 10px !important; border-radius: 8px; color: #5b6b82 !important; font-size: 13.5px; display: flex !important; align-items: center; gap: 8px; }
body .main-menu.menu-light .navigation > li .menu-content > li > a::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #c9d2df; flex: none; }
body .main-menu.menu-light .navigation > li .menu-content > li > a:hover { color: #EA1D25 !important; background: #f7f9fc !important; }
body .main-menu.menu-light .navigation > li .menu-content > li.active > a { color: #EA1D25 !important; font-weight: 600; background: rgba(234, 29, 37, .06) !important; }
body .main-menu.menu-light .navigation > li .menu-content > li.active > a::before { background: #EA1D25; }
.sl-page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 16px; position: relative; z-index: 1; }
.sl-page-head .sl-title { font-size: 24px; color: #0C2343; margin: 0; }
.sl-page-head .sl-sub { color: #8a97ab; }
.sl-page-head + .alert, .sl-page-head + .alert + .sl-card { position: relative; z-index: 1; }
.sl-card .sl-tools { padding-top: 18px; }
/* Schools table on narrower screens: names stay on one line, counters stay compact, actions stay visible. */
.sl-table td:first-child { min-width: 230px; max-width: 340px; }
.sl-school > span:last-child { min-width: 0; }
.sl-school strong, .sl-school small, .sl-person, .sl-person small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sl-person { display: block; max-width: 220px; }
@media (max-width: 1280px) {
    .sl-table th, .sl-table td { padding-left: 10px !important; padding-right: 10px !important; }
    .sl-table td:first-child, .sl-table th:first-child { padding-left: 18px !important; }
}
.sl-totals { display: inline-flex; gap: 6px; white-space: nowrap; }
.sl-totals span { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 8px; background: #f1f4f9; color: #0C2343; font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; }
.sl-totals i { color: #EA1D25; font-size: 13px; }
.sl-school > span:last-child { max-width: 260px; }
@media (max-width: 1280px) {
    .sl-school > span:last-child { max-width: 190px; }
    .sl-person { max-width: 160px; }
    .sl-table td:first-child { min-width: 0; }
}
@media (max-width: 1280px) {
    .sl-table th, .sl-table td { padding-left: 8px !important; padding-right: 8px !important; }
    .sl-person { max-width: 130px; }
    .sl-totals { gap: 4px; }
    .sl-totals span { padding: 4px 6px; gap: 4px; }
    .sl-icon { width: 30px; height: 30px; }
    .sl-icon + .sl-icon { margin-left: 4px; }
}

/* ===== Admin: one school page (header, tabs with counts, per-tab tables) ===== */
.sv-back { display: inline-flex; align-items: center; gap: 6px; color: #5b6b82 !important; font-size: 13.5px; margin-bottom: 12px; position: relative; z-index: 1; }
.sv-back:hover { color: #EA1D25 !important; }
.sv-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; position: relative; z-index: 1; }
.sv-head-text { flex: 1; min-width: 220px; }
.sv-head h3 { margin: 0 0 6px; font-size: 24px; font-weight: 700; color: #0C2343; }
.sv-head-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: #5b6b82; font-size: 13px; }
.sv-head-meta i { color: #EA1D25; }
.sv-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sv-btn-light { background: #fff !important; border: 1px solid #e3e8f0 !important; color: #0C2343 !important; border-radius: 10px !important; padding: 10px 16px !important; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.sv-btn-light:hover { border-color: #EA1D25 !important; color: #EA1D25 !important; }
.sv-tabs { display: flex; gap: 4px; border-bottom: 2px solid #e6eaf1; margin-bottom: 18px; overflow-x: auto; position: relative; z-index: 1; }
.sv-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px; margin-bottom: -2px; border-bottom: 3px solid transparent; color: #5b6b82 !important; font-weight: 600; font-size: 14px; white-space: nowrap; }
.sv-tabs a i { color: #EA1D25; }
.sv-tabs a:hover { color: #0C2343 !important; }
.sv-tabs a.is-on { color: #0C2343 !important; border-bottom-color: #EA1D25; }
.sv-count { min-width: 24px; padding: 2px 8px; border-radius: 999px; background: #eef1f6; color: #5b6b82; font-size: 12px; text-align: center; font-variant-numeric: tabular-nums; }
.sv-tabs a.is-on .sv-count { background: #EA1D25; color: #fff; }
.sv-overview { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; }
@media (max-width: 1100px) { .sv-overview { grid-template-columns: 1fr; } }
.sv-panel { padding: 20px 22px; }
.sv-panel-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; color: #0C2343; margin: 0 0 14px; }
.sv-request-actions { display: inline-flex; gap: 8px; margin: 0; }
.sv-dl { display: grid; grid-template-columns: 130px 1fr; gap: 12px 16px; margin: 0; }
.sv-dl dt { color: #8a97ab; font-weight: 500; font-size: 13px; }
.sv-dl dd { margin: 0; color: #0C2343; font-size: 14px; word-break: break-word; }
.sv-side { display: flex; flex-direction: column; gap: 14px; }
.sv-person { display: flex; gap: 14px; padding: 16px 18px; margin: 0; }
.sv-person-icon { width: 42px; height: 42px; border-radius: 12px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: rgba(234, 29, 37, .1); color: #EA1D25; font-size: 18px; }
.sv-person strong { display: block; color: #0C2343; font-size: 15px; }
.sv-person small { display: block; color: #5b6b82; font-size: 13px; word-break: break-word; }
.sv-person small i { color: #8a97ab; margin-right: 4px; }
.sv-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sv-stats a { background: #fff; border-radius: 14px; padding: 14px; text-align: center; color: #5b6b82 !important; font-size: 13px; box-shadow: 0 8px 24px rgba(12, 35, 67, .06); }
.sv-stats a strong { display: block; color: #0C2343; font-size: 22px; font-variant-numeric: tabular-nums; }
.sv-stats a:hover { box-shadow: 0 0 0 2px #EA1D25; }
.sv-name { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sv-name strong { display: block; color: #0C2343; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sv-name small { display: block; color: #8a97ab; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sv-avatar { width: 36px; height: 36px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #0C2343, #1d4a8a); color: #fff; font-size: 12.5px; font-weight: 600; }
.sv-role { height: 32px; padding: 0 28px 0 10px; border-radius: 8px; border: 1px solid #e3e8f0; font-size: 13px; font-weight: 600; color: #0C2343; background-color: #fff; cursor: pointer; }
.sv-role-leader { background-color: #fff1f1; border-color: #f5c2c4; color: #b3141b; }
.sv-role-coach { background-color: #eef4ff; border-color: #c9dbff; color: #1d4a8a; }
.sl-icon.is-danger:hover { border-color: #EA1D25; background: #EA1D25; color: #fff !important; }
.sv-checks { max-height: 320px; overflow-y: auto; border: 1px solid #eef1f6; border-radius: 12px; background: #fff; }
.sv-checks label { display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin: 0; border-bottom: 1px solid #f1f4f9; cursor: pointer; font-weight: 500; color: #0C2343; }
.sv-checks label:hover { background: #fafbfd; }
.sv-checks label small { display: block; color: #8a97ab; font-size: 12px; font-weight: 400; }
.sv-checks input { width: 18px; height: 18px; accent-color: #EA1D25; flex: none; }
.sv-filter { height: 40px; border-radius: 10px; }
.sv-overview { align-items: start; }
.card.sv-person { display: flex !important; flex-direction: row !important; align-items: flex-start; }
.sl-page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sl-page-head .sv-back { display: flex; margin-bottom: 4px; }
.sl-add, .sv-btn-light { text-decoration: none !important; }
.sl-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.sl-select { height: 40px; padding: 0 32px 0 12px; border: 1px solid #e3e8f0; border-radius: 10px; font-size: 14px; color: #0C2343; background-color: #fff; min-width: 150px; cursor: pointer; }
.sl-select:focus { outline: none; border-color: #0C2343; box-shadow: none; }
.sl-status-select { height: 32px; padding: 0 26px 0 10px; border-radius: 8px; border: 1px solid #e3e8f0; font-size: 13px; font-weight: 600; color: #0C2343; background-color: #fff; cursor: pointer; }
.sl-badge i { font-size: 17px; }

/* Course form */
.cf-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
@media (max-width: 1100px) { .cf-grid { grid-template-columns: 1fr; } }
.cf-main, .cf-side { padding: 16px 16px 4px; }
.cf-main .sf-group, .cf-side .sf-group { border: 0; padding: 4px 4px 0; margin-bottom: 12px; }
.cf-drop { display: flex; align-items: center; justify-content: center; height: 150px; width: 100%; max-width: 100%; border: 2px dashed #d5dce7; border-radius: 14px; background: #fafbfd; cursor: pointer; overflow: hidden; margin: 0; transition: border-color .15s; }
.cf-drop:hover { border-color: #EA1D25; }
.cf-drop.is-invalid { border-color: #EA1D25; background: #fff5f5; }
.cf-drop img { width: 100%; height: 100%; object-fit: cover; }
.cf-drop-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; color: #8a97ab; text-align: center; }
.cf-drop-empty i { font-size: 24px; color: #EA1D25; }
.cf-drop-empty strong { color: #0C2343; }
.cf-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.cf-form .select2-container--default .select2-selection--multiple { min-height: 42px; border-radius: 10px; border-color: #e3e8f0; }
.cf-form .select2-container--default .select2-selection--multiple .select2-selection__choice { background: #0C2343; border: 0; color: #fff; border-radius: 6px; }
.cf-form .select2-container--default .select2-selection--multiple .select2-selection__choice__remove { color: #ffb3b6; }
.cf-form .is-invalid + .select2-container .select2-selection { border-color: #EA1D25 !important; }
.cf-form .note-editor.note-frame { border-radius: 10px; border-color: #e3e8f0; }
body .main-menu.menu-light .navigation > li .menu-content > li > a::before { position: static !important; transform: none !important; margin: 0 !important; left: auto !important; top: auto !important; font-family: inherit !important; }
body .main-menu.menu-light .navigation > li .menu-content > li > a::after { display: none !important; }
.sl-cell-clip { max-width: 170px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sl-table .sl-actions { width: 1%; }
@media (max-width: 1200px) {
    .sl-hide-md { display: none !important; }
    .sl-status-select { padding-right: 22px; }
}
@media (max-width: 1200px) { .sl-school > span:last-child { max-width: 150px; } }

/* ===== Admin defaults: every form, card and table follows the same navy and red look ===== */
body.vertical-layout .app-content .card { border-radius: 16px; box-shadow: 0 8px 24px rgba(12, 35, 67, .07); border: 0; }
body.vertical-layout .app-content .card > .card-header { background: transparent; border-bottom: 1px solid #eef1f6; padding: 18px 22px; }
body.vertical-layout .app-content .card > .card-header .card-title { color: #0C2343; font-weight: 700; font-size: 17px; }
body.vertical-layout .app-content .card > .card-header .heading-elements a { color: #EA1D25 !important; font-weight: 600; }
body.vertical-layout .app-content label { color: #3d4b60; font-weight: 600; font-size: 13px; }
body.vertical-layout .app-content .form-control:not(textarea):not([multiple]) { min-height: 42px; }
body.vertical-layout .app-content .form-control { border-radius: 10px; border-color: #e3e8f0; color: #0C2343; }
body.vertical-layout .app-content .form-control:focus { border-color: #0C2343; box-shadow: none; }
body.vertical-layout .app-content .form-control::placeholder { color: #a7b2c3; }
body.vertical-layout .app-content .text-danger { color: #EA1D25 !important; font-size: 12.5px; }
body.vertical-layout .app-content .btn-primary { background: #0C2343 !important; border-color: #0C2343 !important; border-radius: 10px; font-weight: 600; padding: 10px 20px; }
body.vertical-layout .app-content .btn-primary:hover { background: #EA1D25 !important; border-color: #EA1D25 !important; }
body.vertical-layout .app-content .btn-danger { background: #EA1D25 !important; border-color: #EA1D25 !important; border-radius: 10px; }
body.vertical-layout .app-content .table thead th { background: #f7f9fc; color: #5b6b82; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .6px; border: 0; white-space: nowrap; }
body.vertical-layout .app-content .table td { vertical-align: middle; border-top-color: #eef1f6; color: #3d4b60; }
body.vertical-layout .app-content .table tbody tr:hover { background: #fafbfd; }
body.vertical-layout .app-content .table a:not(.btn):not(.sl-icon) { color: #0C2343; font-weight: 600; }
body.vertical-layout .app-content .table a:not(.btn):not(.sl-icon):hover { color: #EA1D25; }
body.vertical-layout .app-content .badge-primary { background: #0C2343; }
body.vertical-layout .app-content .alert-danger { background: #fff1f1 !important; color: #b3141b !important; border: 0 !important; border-radius: 10px; }
body.vertical-layout .app-content .alert-warning { background: #fff7e6 !important; color: #92400e !important; border: 0 !important; border-radius: 10px; }

/* DataTables lists in the same look */
.dt-card .card-body { padding: 0; }
.dt-card .dataTables_wrapper { padding: 0; }
.dt-card .dataTables_wrapper > .row:first-child { padding: 16px 22px 12px; margin: 0; align-items: center; }
.dt-card .dataTables_wrapper > .row:last-child { padding: 14px 22px; margin: 0; border-top: 1px solid #eef1f6; align-items: center; }
.dataTables_wrapper .dataTables_length label, .dataTables_wrapper .dataTables_filter label, .dataTables_wrapper .dataTables_info { color: #8a97ab; font-size: 13px; font-weight: 500; }
.dataTables_wrapper .dataTables_length select { height: 36px; border-radius: 8px; border: 1px solid #e3e8f0; color: #0C2343; margin: 0 6px; }
.dataTables_wrapper .dataTables_filter input { height: 40px; border-radius: 10px; border: 1px solid #e3e8f0; padding: 0 12px; color: #0C2343; min-width: 240px; margin-left: 8px; }
.dataTables_wrapper .dataTables_filter input:focus { outline: none; border-color: #0C2343; box-shadow: none; }
.dataTables_wrapper .paginate_button .page-link, .dataTables_wrapper .page-link { color: #0C2343; border-radius: 8px !important; margin: 0 2px; border-color: #e3e8f0; }
.dataTables_wrapper .page-item.active .page-link { background: #0C2343; border-color: #0C2343; color: #fff; }
.dataTables_wrapper table.dataTable { border-collapse: collapse !important; margin: 0 !important; }
.dataTables_wrapper td.dataTables_empty { padding: 40px 16px !important; color: #8a97ab; text-align: center; }
.dt-card .table-responsive { margin: 0; }
.gr-thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.sl-clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 320px; font-size: 13px; color: #5b6b82; line-height: 1.45; }
.sl-status { white-space: nowrap; }
body .main-menu .nav-count { margin-left: auto; min-width: 22px; padding: 2px 7px; border-radius: 999px; background: #EA1D25; color: #fff; font-size: 11px; font-weight: 700; text-align: center; line-height: 1.4; }

/* Admin header account button and menu */
.header-navbar .dropdown-user-link { display: flex !important; align-items: center; gap: 10px; padding: 6px 14px 6px 6px !important; margin-top: 0; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .15); }
.header-navbar .dropdown-user-link:hover { background: rgba(255, 255, 255, .14); }
.header-navbar .dropdown-user-link::after { color: #fff; }
.header-navbar .dropdown-user-link .avatar { margin: 0 !important; }
.header-navbar .dropdown-user-link .avatar .img-box { width: 34px; height: 34px; border-radius: 50%; background: #EA1D25 !important; color: #fff !important; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; }
.header-navbar .dropdown-user-link .avatar img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.header-navbar .avatar-online i, .header-navbar .avatar.avatar-online::after { display: none !important; }
.hdr-user-name { color: #fff; font-weight: 600; font-size: 14px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hdr-user-menu { min-width: 240px; border: 1px solid #e6eaf1 !important; border-radius: 14px !important; box-shadow: 0 16px 36px rgba(12, 35, 67, .16) !important; padding: 8px !important; margin-top: 8px !important; }
.hdr-user-menu .arrow_box_right::before, .hdr-user-menu .arrow_box_right::after { display: none !important; }
.hdr-user-head { padding: 8px 10px 12px; margin-bottom: 6px; border-bottom: 1px solid #edf0f5; }
.hdr-user-head strong { display: block; color: #0C2343; font-size: 14px; }
.hdr-user-head small { display: block; color: #8a97ab; font-size: 12px; word-break: break-all; }
.hdr-user-menu .dropdown-item { display: flex; align-items: center; gap: 10px; border-radius: 8px; padding: 9px 10px; color: #0C2343; font-weight: 500; }
.hdr-user-menu .dropdown-item i { color: #8a97ab; }
.hdr-user-menu .dropdown-item:hover { background: #f2f5fa; color: #EA1D25; }
.hdr-user-menu .dropdown-item:hover i { color: #EA1D25; }
.hdr-user-menu .dropdown-item.is-logout, .hdr-user-menu .dropdown-item.is-logout i { color: #EA1D25; }
/* Submenu rows as wide as the parent row; text still lines up under the parent title. */
body .main-menu.menu-light .navigation > li .menu-content { padding: 4px 0 !important; margin: 0 !important; }
body .main-menu.menu-light .navigation > li .menu-content > li { margin: 2px 0 !important; }
body .main-menu.menu-light .navigation > li .menu-content > li > a { padding: 9px 12px 9px 26px !important; border-radius: 12px !important; gap: 30px !important; margin: 0 !important; }
.qb-check-group { font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: #EA1D25; margin: 6px 0 4px; }
.cf-side-stack { display: flex; flex-direction: column; gap: 18px; }
.bf-note { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: 12.5px; color: #5b6b82; } .bf-note i { color: #EA1D25; margin-top: 2px; }
.sl-card:not(.dt-card) > .card-content > .card-body { padding: 18px 22px !important; }

/* Course and mission pages: missions, their sessions and each session's boards */
.ct-meta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: -6px 0 16px; color: #5b6b82; font-size: 13.5px; }
.ct-meta i { color: #EA1D25; margin-right: 4px; }
.ct-mission { padding: 6px 0; margin-bottom: 16px; }
.ct-mission-head { display: flex; align-items: center; gap: 14px; padding: 14px 22px; border-bottom: 1px solid #eef1f6; }
.ct-mission-name { display: block; color: #0C2343 !important; font-weight: 700; font-size: 16px; }
.ct-mission-name:hover { color: #EA1D25 !important; }
.ct-mission-head small { display: block; color: #8a97ab; }
.ct-session { display: flex; align-items: flex-start; gap: 14px; padding: 14px 22px 14px 40px; border-bottom: 1px solid #f3f5f9; }
.ct-session:last-child { border-bottom: 0; }
.ct-session-num { width: 30px; height: 30px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; background: #f1f4f9; color: #0C2343; font-weight: 700; font-size: 13px; }
.ct-session strong { display: block; color: #0C2343; font-weight: 600; margin-bottom: 6px; }
.ct-boards { display: flex; flex-wrap: wrap; gap: 8px; }
.ct-board { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 10px; background: #f7f9fc; border: 1px solid #e6eaf1; color: #0C2343 !important; font-size: 13px; font-weight: 600; }
.ct-board:hover { border-color: #EA1D25; }
.ct-board i { color: #EA1D25; }
.ct-board span { color: #8a97ab; font-weight: 500; }
.ct-board em { font-style: normal; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: #eef1f6; color: #6b7280; }
.ct-board em.is-on { background: #e5f6ec; color: #15803d; }
.ct-board.is-missing { background: #fff7e6; border-color: #fde3b0; color: #92400e !important; font-weight: 500; }
.ct-board.is-missing i { color: #b45309; }
.ct-empty { padding: 14px 22px 14px 40px; color: #8a97ab; font-size: 13.5px; }
.ct-empty a { color: #EA1D25; font-weight: 600; margin-left: 4px; }

/* Collapsed sidebar: icon rail with centred icons and the small logo; hovering opens it as usual. */
body .main-menu .brand-mark { display: none; }
body.menu-collapsed .main-menu.menu-light:not(.expanded) .navbar-header .navbar-brand { margin: 0 !important; width: 60px; justify-content: center; }
body.menu-collapsed .main-menu.menu-light:not(.expanded) .navbar-header .brand-logo { display: none !important; }
body.menu-collapsed .main-menu.menu-light:not(.expanded) .brand-mark { display: block; width: 40px; height: 40px; object-fit: contain; }
body.menu-collapsed .main-menu.menu-light:not(.expanded) .navbar-header .nav-toggle { display: none !important; }
body.menu-collapsed .main-menu.menu-light:not(.expanded) .main-menu-content { padding: 10px 0 24px !important; }
body.menu-collapsed .main-menu.menu-light:not(.expanded) .navigation .navigation-header { padding: 10px 0 4px !important; text-align: center; }
body.menu-collapsed .main-menu.menu-light:not(.expanded) .navigation .navigation-header span { display: none !important; }
body.menu-collapsed .main-menu.menu-light:not(.expanded) .navigation > li > a { width: 44px; height: 44px; padding: 0 !important; margin: 0 auto !important; justify-content: center; gap: 0 !important; }
body.menu-collapsed .main-menu.menu-light:not(.expanded) .navigation > li > a .menu-title,
body.menu-collapsed .main-menu.menu-light:not(.expanded) .navigation > li > a .nav-count,
body.menu-collapsed .main-menu.menu-light:not(.expanded) .navigation > li > a::after,
body.menu-collapsed .main-menu.menu-light:not(.expanded) .navigation > li .menu-content { display: none !important; }
body.menu-collapsed .main-menu.menu-light:not(.expanded) .navigation > li.active > a::before,
body.menu-collapsed .main-menu.menu-light:not(.expanded) .navigation > li.open > a::before { left: -8px; }

/* Portal typography (admin, teacher, student): Poppins at 400 for text, 500 for labels and controls, 600 only for
   titles and key numbers. Hierarchy comes from size and color, not weight. Website pages are not affected. */
body.vertical-layout, body.vertical-layout p, body.vertical-layout td, body.vertical-layout .form-control { font-weight: 400; }
body.vertical-layout label, body.vertical-layout .app-content label, body.vertical-layout .sf-group label,
body.vertical-layout th, body.vertical-layout .table thead th,
body.vertical-layout .btn, body.vertical-layout .app-content .btn-primary, body.vertical-layout .badge,
body.vertical-layout .app-content .table a:not(.btn):not(.sl-icon), body.vertical-layout .nav-tabs .nav-link,
body.vertical-layout h5, body.vertical-layout h6 { font-weight: 500 !important; }
body.vertical-layout .main-menu .navigation li a .menu-title { font-weight: 400 !important; }
body.vertical-layout .main-menu .navigation > li.active > a .menu-title,
body.vertical-layout .main-menu .navigation > li.open > a .menu-title,
body.vertical-layout .main-menu .navigation li ul li.active > a { font-weight: 500 !important; }
body.vertical-layout h1, body.vertical-layout h2, body.vertical-layout h3, body.vertical-layout h4,
body.vertical-layout .card-title, body.vertical-layout .content-header-title,
body.vertical-layout .app-content .card > .card-header .card-title, body.vertical-layout strong, body.vertical-layout b,
.sl-title, .sv-head h3, .sl-info-head h4, .sf-modal .modal-title, .dash-setup-head h4, .dash-stat strong,
.ct-mission-name, .quiz-card .quiz-name, .sf-group h5, .sv-panel-title, .qb-check-group,
body .main-menu.menu-light .navigation .navigation-header span { font-weight: 600 !important; }

/* School page: courses grouped by grade */
.sv-group-row th { background:#f3f5f9; color:#0c2343; font-size:.8rem; font-weight:700; letter-spacing:.04em; text-transform:uppercase; padding:.55rem 1rem !important; border-top:1px solid #e3e7ef; }
.sv-group-row th span { margin-left:.5rem; color:#6b7590; font-weight:500; text-transform:none; letter-spacing:0; }

/* Grades: active / inactive switch */
.gr-switch { display:inline-flex; align-items:center; gap:.5rem; background:none; border:0; padding:0; cursor:pointer; color:#6b7590; font-size:.85rem; font-weight:600; }
.gr-switch-track { position:relative; width:2.25rem; height:1.25rem; border-radius:1rem; background:#cfd5e1; transition:background .15s; }
.gr-switch-dot { position:absolute; top:.15rem; left:.15rem; width:.95rem; height:.95rem; border-radius:50%; background:#fff; box-shadow:0 1px 2px rgba(12,35,67,.25); transition:left .15s; }
.gr-switch.is-on { color:#0c2343; }
.gr-switch.is-on .gr-switch-track { background:#0c2343; }
.gr-switch.is-on .gr-switch-dot { left:1.15rem; }
.gr-switch:focus-visible .gr-switch-track { box-shadow:0 0 0 3px rgba(12,35,67,.18); }

/* Select2 multi pickers: no focus outline on the inline search box, and chosen items leave the list */
.select2-container .select2-search--inline .select2-search__field,
.select2-container .select2-search--inline .select2-search__field:focus,
.select2-container .select2-search--inline .select2-search__field:focus-visible { outline: none !important; box-shadow: none !important; }
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--multiple { border-color: #0c2343 !important; box-shadow: none; }
.select2-container--default .select2-results__option[aria-selected="true"] { display: none; }
.select2-dropdown { border-color: #e3e8f0 !important; border-radius: 10px !important; box-shadow: 0 8px 24px rgba(12,35,67,.12); overflow: hidden; }
/* Course form: select2 text lines up with the other inputs (21px inner padding) */
.cf-form .select2-container--default .select2-selection--multiple { padding: 0 8px 0 0; min-height: 42px; }
.cf-form .select2-container--default .select2-selection--multiple .select2-selection__rendered { margin-left: 0 !important; padding-left: 12px !important; }
.cf-form .select2-container--default .select2-selection--multiple .select2-selection__choice { margin-top: 4px; }
.cf-form .select2-container--default .select2-search--inline .select2-search__field { padding-left: 0 !important; margin-top: 7px; }
.cl-thumb { width: 48px; height: 36px; flex: 0 0 48px; object-fit: cover; border-radius: 8px; border: 1px solid #e3e8f0; background: #f3f5f9; }
.cf-form .select2-container--default .select2-selection--multiple .select2-selection__choice { max-width: calc(100% - 12px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Course form: picture card sits below the details, not in a side column */
.cf-grid.cf-grid-stack { grid-template-columns: minmax(0, 1fr); }
.cf-grid-stack .cf-side .cf-drop { max-width: 320px; }

/* Grade popup: plain body (no card inside the card) and a small picture box with preview */
.sf-modal .sf-group.gr-flat { border: 0; padding: 0; margin: 0; background: none; }
.gr-drop { display: flex; align-items: center; justify-content: center; height: 140px; width: 100%; border: 2px dashed #d5dce7; border-radius: 12px; background: #fafbfd; cursor: pointer; overflow: hidden; margin: 0; transition: border-color .15s; }
.gr-drop:hover { border-color: #EA1D25; }
.gr-drop.is-invalid { border-color: #EA1D25; background: #fff5f5; }
.gr-drop img { width: 100%; height: 100%; object-fit: cover; }
.gr-drop-empty { display: flex; align-items: center; gap: 12px; color: #8a97ab; }
.gr-drop-empty i { font-size: 24px; color: #EA1D25; }
.gr-drop-empty span { display: flex; flex-direction: column; }
.gr-drop-empty strong { color: #0C2343; font-size: 14px; }
.gr-drop-empty small { font-size: 12px; }
.cl-thumb-empty { display: inline-flex; align-items: center; justify-content: center; color: #9aa6b8; font-size: 16px; }

/* Mission form: one card with steps, body and footer */
.mf-card { overflow: hidden; }
.mf-body { padding: 20px 24px 4px; }
.mf-body.sf-group { border: 0; border-radius: 0; margin: 0; background: none; }
.mf-footer { padding: 14px 24px; border-top: 1px solid #eef1f6; background: #fafbfd; }
@media (max-width: 767px) { .mf-body, .mf-footer { padding-left: 16px; padding-right: 16px; } }

/* Mission form: price summary */
.mf-final { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; margin: 4px 0 8px; padding: 14px 16px; border-radius: 12px; background: #f3f5f9; color: #3d4b60; font-size: 13.5px; }
.mf-final-price { color: #0C2343; font-size: 20px; font-weight: 700; }
.mf-final-save { color: #1f8a4c; font-weight: 600; }

/* Settings page */
.st-intro { color: #6b7590; font-size: 13px; margin: 0 0 6px; }
.st-group { margin: 22px 0 12px; padding-bottom: 6px; border-bottom: 1px solid #eef1f6; color: #0C2343; font-size: 14px; font-weight: 700; }
.st-suffix { position: relative; }
.st-suffix .form-control { padding-right: 56px; }
.st-suffix span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: #8a97ab; font-size: 13px; pointer-events: none; }
.st-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 575px) { .st-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* "i" help icon with its text on hover, focus or click */
.help-tip { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; margin-left: 4px; padding: 0; border: 0; border-radius: 50%; background: none; color: #8a97ab; font-size: 14px; vertical-align: -2px; cursor: pointer; }
.help-tip:hover, .help-tip:focus, .help-tip.is-open { color: #0C2343; outline: none; }
.help-tip::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); width: max-content; max-width: 260px; padding: 8px 10px; border-radius: 8px; background: #0C2343; color: #fff; font-size: 12px; font-weight: 400; line-height: 1.45; text-align: left; white-space: normal; box-shadow: 0 6px 18px rgba(12,35,67,.2); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .12s; z-index: 30; }
.help-tip:hover::after, .help-tip:focus::after, .help-tip.is-open::after { opacity: 1; visibility: visible; }

/* Boards list: cards */
.sl-title-row { display: flex; align-items: center; gap: 10px; }
.bd-flash { margin-bottom: 14px; }
.bd-filter-wrap { position: relative; }
.bd-filter-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid #e3e8f0; background: #fff; color: #3d4b60; font-size: 16px; cursor: pointer; transition: border-color .15s, color .15s; }
.bd-filter-btn:hover, .bd-filter-btn[aria-expanded="true"] { border-color: #0C2343; color: #0C2343; }
.bd-filter-btn.is-active { background: #0C2343; border-color: #0C2343; color: #fff; }
.bd-filter-count { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #EA1D25; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.bd-filter-panel { position: absolute; top: calc(100% + 8px); left: 0; z-index: 40; width: 300px; max-width: calc(100vw - 32px); padding: 14px 16px 16px; border-radius: 14px; background: #fff; border: 1px solid #eef1f6; box-shadow: 0 16px 40px rgba(12, 35, 67, .18); }
.bd-filter-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; color: #0C2343; font-size: 15px; }
.bd-filter-close { border: 0; background: none; color: #8a97ab; font-size: 16px; padding: 2px; }
.bd-filter-close:hover { color: #EA1D25; }
.bd-filter-panel label { font-size: 12.5px; font-weight: 600; color: #3d4b60; margin-bottom: 4px; }
.bd-filter-panel .form-control { height: 40px; border-radius: 10px; border-color: #e3e8f0; color: #0C2343; font-size: 14px; }
.bd-filter-panel .form-group { margin-bottom: 10px; }
.bd-filter-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.bd-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -4px 0 16px; color: #6b7590; font-size: 13px; }
.bd-chip { padding: 4px 10px; border-radius: 20px; background: #e8eef9; color: #0C2343; font-weight: 600; font-size: 12.5px; }
.bd-chip-clear { color: #EA1D25; font-weight: 600; }
.bd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.bd-card { display: flex; flex-direction: column; margin: 0; overflow: hidden; transition: transform .15s, box-shadow .15s; }
.bd-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(12, 35, 67, .12); }
.bd-cover { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; min-height: 120px; padding: 16px 16px 14px; background: #0C2343; color: #fff; overflow: hidden; }
.bd-cover::before { content: ""; position: absolute; right: -30px; top: -30px; width: 140px; height: 140px; border-radius: 50%; border: 22px solid rgba(255,255,255,.06); }
.bd-cover::after { content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 4px; background: #EA1D25; }
.bd-cover:hover { color: #fff; }
.bd-cover-label { position: relative; font-size: 12px; font-weight: 700; letter-spacing: .08em; color: #ff8f94; }
.bd-cover-title { position: relative; font-size: 18px; font-weight: 700; line-height: 1.25; color: #fff; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bd-status { position: absolute; top: 12px; right: 12px; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; background: rgba(255,255,255,.14); color: #dfe5ef; }
.bd-status-1 { background: #22a35a; color: #fff; }
.bd-status-2 { background: #fff; color: #0C2343; }
.bd-body { padding: 14px 16px 6px; flex: 1 1 auto; min-width: 0; }
.bd-course { color: #3d4b60; font-size: 13.5px; font-weight: 600; margin: 0 0 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bd-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.bd-tag { padding: 3px 9px; border-radius: 6px; background: #f3f5f9; color: #3d4b60; font-size: 12px; font-weight: 500; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bd-tag-warn { background: #fff4e5; color: #9a5b00; }
.bd-stats { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 8px; margin: 0; padding-top: 10px; border-top: 1px solid #eef1f6; }
.bd-stats dt { color: #8a97ab; font-size: 11.5px; font-weight: 500; margin: 0; }
.bd-stats dd { color: #0C2343; font-size: 15px; font-weight: 700; margin: 0; font-variant-numeric: tabular-nums; }
.bd-stats dd small { color: #8a97ab; font-size: 11.5px; font-weight: 500; margin-left: 2px; }
.bd-stats .bd-dates { font-size: 12.5px; line-height: 1.35; }
.bd-stats .bd-dates small { display: block; margin: 0; }
.bd-foot { display: flex; align-items: center; gap: 6px; padding: 10px 12px 12px 16px; border-top: 1px solid #eef1f6; }
.bd-live { position: relative; display: inline-flex; align-items: center; gap: 8px; margin: 0; cursor: pointer; font-size: 13px; font-weight: 600; color: #6b7590; }
.bd-live input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.bd-live input:focus-visible + .gr-switch .gr-switch-track { box-shadow: 0 0 0 3px rgba(12,35,67,.18); }
.bd-live input:disabled { cursor: wait; }
.bd-done { color: #0C2343; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.bd-act { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px; border: 0; font-size: 15px; cursor: pointer; transition: transform .12s, filter .12s; }
.bd-act:hover { transform: translateY(-1px); filter: brightness(.95); }
.bd-act { position: relative; }
.bd-act[data-tip]::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); padding: 6px 10px; border-radius: 8px; background: #0C2343; color: #fff; font-size: 12px; font-weight: 500; line-height: 1.3; white-space: nowrap; box-shadow: 0 6px 18px rgba(12,35,67,.2); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .12s; z-index: 30; }
.bd-act[data-tip]::before { content: ""; position: absolute; bottom: calc(100% + 3px); left: 50%; transform: translateX(-50%); border: 5px solid transparent; border-top-color: #0C2343; border-bottom: 0; opacity: 0; visibility: hidden; transition: opacity .12s; z-index: 30; }
.bd-act[data-tip]:hover::after, .bd-act[data-tip]:focus-visible::after, .bd-act[data-tip]:hover::before, .bd-act[data-tip]:focus-visible::before { opacity: 1; visibility: visible; }
.bd-act:last-child[data-tip]::after { left: auto; right: 0; transform: none; }
.bd-act-questions, .bd-act-questions:hover, .bd-act-questions:focus { background: #e8eef9; color: #0C2343 !important; }
.bd-act-results, .bd-act-results:hover, .bd-act-results:focus { background: #e3f5f1; color: #0f6e56 !important; }
.bd-act-edit, .bd-act-edit:hover, .bd-act-edit:focus { background: #fff1dc; color: #9a5b00 !important; }
.bd-act-delete, .bd-act-delete:hover, .bd-act-delete:focus { background: #fde8e9; color: #c4161c !important; }
.bd-act i { color: inherit !important; }
.bd-empty { padding: 48px 16px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; color: #6b7590; }
.bd-empty i { font-size: 32px; color: #EA1D25; }
.bd-pages { margin-top: 18px; }

/* Question setup (Field and Measures lists) */
.qs-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.qs-tab { padding: 8px 16px; border-radius: 10px; color: #5b6b82 !important; font-weight: 600; background: transparent; }
.qs-tab span { margin-left: 6px; padding: 1px 8px; border-radius: 10px; background: #e8eef9; color: #0C2343; font-size: 12px; }
.qs-tab.is-active { background: #0C2343; color: #fff !important; }
.qs-tab.is-active span { background: rgba(255,255,255,.18); color: #fff; }
.qs-intro { margin: 0; padding: 16px 22px 4px; color: #5b6b82; }
.qs-switch { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 0; color: #3d4b60; cursor: pointer; }
.sl-table .bd-act + form, .sl-table form + .bd-act { margin-left: 6px; }

/* Dropdowns: less inner padding so the chosen value is not cut off in narrow columns */
body.vertical-layout .app-content select.form-control { padding-left: 12px; padding-right: 26px; text-overflow: ellipsis; }
/* A dropdown with an icon on the left keeps room for the icon. */
body.vertical-layout .app-content .has-icon-left select.form-control { padding-left: calc(2px + 2.75rem); }

/* Question media library (image and video pickers) */
.qm-modal .modal-content { border-radius: 14px; overflow: hidden; }
.qm-modal .modal-header { padding: 16px 22px; border-bottom: 0; }
.qm-modal .modal-title { color: #0C2343; font-weight: 600; }
.qm-modal .modal-body { padding: 16px 22px; max-height: 64vh; overflow-y: auto; }
.qm-modal .modal-footer { padding: 12px 22px; background: #fafbfd; border-top: 1px solid #eef1f6; }
.qm-tabs { display: flex; gap: 4px; padding: 0 22px; border-bottom: 1px solid #eef1f6; }
.qm-tab { border: 0; background: none; padding: 10px 14px; color: #5b6b82; font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; }
.qm-tab.is-active { color: #0C2343; border-bottom-color: #EA1D25; }
.qm-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.qm-toolbar .form-control { max-width: 320px; }
.qm-count { color: #8a97ab; font-size: 13px; }
.qm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.qm-grid-video { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.qm-item { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 6px; border: 2px solid transparent; border-radius: 10px; background: #f5f7fb; text-align: left; cursor: pointer; min-width: 0; }
.qm-item:hover { border-color: #c9d3e3; }
.qm-item:focus-visible { outline: none; border-color: #0C2343; }
.qm-item.is-picked { border-color: #0C2343; background: #e8eef9; }
.qm-item.is-picked::after { content: "\2713"; position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; border-radius: 50%; background: #0C2343; color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.qm-item > img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 6px; background: #fff; }
.qm-thumb { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: #0C2343; }
.qm-thumb img, .qm-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.qm-placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.6); font-size: 34px; }
.qm-play { position: absolute; left: 8px; bottom: 8px; width: 26px; height: 26px; border-radius: 50%; background: rgba(12,35,67,.75); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 11px; }
.qm-item-title { color: #0C2343; font-weight: 600; font-size: 13px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.qm-item-name { color: #8a97ab; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qm-empty { grid-column: 1 / -1; padding: 40px 0; text-align: center; color: #8a97ab; }
.qm-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 260px; margin: 0; border: 2px dashed #c9d3e3; border-radius: 12px; background: #fafbfd; color: #5b6b82; cursor: pointer; text-align: center; padding: 20px; }
.qm-drop i { font-size: 40px; color: #0C2343; }
.qm-drop strong { color: #0C2343; font-size: 16px; }
.qm-drop.is-over { border-color: #0C2343; background: #e8eef9; }
.qm-upload-status { margin-top: 10px; color: #5b6b82; }
.qm-upload-status.is-error { color: #c4161c; }
.qm-picked { margin-right: auto; color: #5b6b82; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 50%; }
.qs-tabs { align-items: center; }
/* Tips in table headers open downward so the card edge does not cut them, in normal case. */
.sl-table th .help-tip::after { bottom: auto; top: calc(100% + 8px); text-transform: none; letter-spacing: 0; font-weight: 400; }
.sl-table th .help-tip { vertical-align: -3px; }
.sl-page-head .help-tip::after, .qs-tabs .help-tip::after { bottom: auto; top: calc(100% + 8px); }

/* Assign courses to a teacher: one card per course, a switch per mission */
.at-card .card-body, .at-card > .card-body { padding: 22px !important; }
.at-label { display: block; margin-bottom: 6px; color: #0C2343; font-weight: 600; }
.at-hint { margin: 14px 0 12px; color: #6b7590; font-size: 13px; }
.at-course { border: 1px solid #e3e7ef; border-radius: 12px; margin-bottom: 14px; overflow: hidden; }
.at-course-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 16px; background: #f3f5f9; }
.at-course-head h5 { margin: 0; color: #0C2343; font-size: 15px; font-weight: 700; }
.at-course-head span { color: #6b7590; font-size: 12px; white-space: nowrap; }
.at-mission { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0; padding: 12px 16px; border-top: 1px solid #eef1f6; cursor: pointer; }
.at-mission:hover { background: #fafbfd; }
.at-mission-name { min-width: 0; color: #0C2343; font-weight: 600; }
.at-mission-name small { display: block; color: #8a97ab; font-weight: 500; }
.at-check { position: absolute; opacity: 0; pointer-events: none; }
.at-check:checked + .gr-switch .gr-switch-track { background: #0c2343; }
.at-check:checked + .gr-switch .gr-switch-dot { left: 1.15rem; }
.at-check:focus-visible + .gr-switch .gr-switch-track { box-shadow: 0 0 0 3px rgba(12,35,67,.18); }
.at-mission.is-locked { cursor: not-allowed; opacity: .6; }
.at-empty { margin: 0; padding: 12px 16px; color: #6b7590; }
.at-actions { display: flex; justify-content: flex-end; padding-top: 4px; }
