:root {
    --color-base: #f2f2f2;
    --color-dark: #358600;
    --color-mid: #63c132;
    --color-light: #9ee37d;
    --color-very-light: #f6fff5;
    --color-text: #000;
    --color-panel: #eeeeee;
    --color-highlight: #dddddd;
    --color-darker: #296701;
    --app-header-offset: 64px;
}

body {
    margin: 0;
    background: var(--color-base);
    font-family: "Quicksand", sans-serif;
    /*font-family: "Noto Sans", sans-serif;*/
    font-optical-sizing: auto;
    font-weight: normal;
    font-style: normal;
    scrollbar-color: var(--color-base) transparent;

}

.btn-primary, .btn-primary:active, .btn-primary:visited,
.btn-success, .btn-success:active, .btn-success:visited {
    background-color: var(--color-dark) !important;
    border-color: var(--color-dark) !important;
}

.btn-primary:hover,
.btn-success:hover {
    background-color: var(--color-darker) !important;
    border-color: var(--color-darker) !important;
}

.bottombar {
    background: var(--color-dark);
    color: var(--color-base);;
    font-size: 90%;
    padding: 0 4px 0 4px;
    border: solid var(--color-dark);
    transition: 0.3s;
    font-weight: normal;
    min-height: 24px;
    line-height: 18px;
    height: 24px;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
}

#content {
    min-height: calc(100dvh - 90px);
    background-image: url('/static/subject_background_transparent_4k.jpg');
    background-size: cover; /* scales the image to cover the entire viewport */
    background-position: center; /* centers the image */
    background-repeat: no-repeat; /* prevents tiling */
}

a.bottomlink,
a.bottomlink:visited,
a.bottomlink:hover {
    color: var(--color-base);;
    font-size: small;
}

h1,
h2,
h3,
h4 {
    color: var(--color-dark);
    font-weight: 600;
}

table {
    border-spacing: 0;
    border-collapse: collapse;
    margin: 0;
    padding: 0;
    --bs-border-width: 2px;
    --bs-border-color: var(--color-base);
}

table caption {
    font-size: 1.5em;
}

table tr {
    padding: 0.01em !important;
    margin: 0;
}

table th,
table td {
    padding: 0.05em;
    text-align: left;
    margin: 0;
}

table th {
    font-size: .85em;
    letter-spacing: .03em;
    margin: 0;
}

tbody td {
    border-collapse: collapse;
    margin: 0;
    padding: 0;
}

table.datatable td::before {
    content: attr(data-label);
    float: left;
    font-weight: bold;
    text-transform: uppercase;
    margin: 0;
    padding: 0;
}

table.datatable tr {
    border-bottom: 3px solid var(--color-base);
    display: block;
    margin: 0;
    padding: 0;
}

table.datatable td {
    border-bottom: 1px solid var(--color-base);
    display: block;
    font-size: .8em;
    text-align: right;
    background-color: var(--color-very-light);
    margin: 0;
    padding: 0;
}

.navcontainer {
    background: #ffffff;
    width: calc(100% - 10px);
    margin: 5px;
    border-radius: 30px;
    border: 6px solid white;
    height: 54px;
    display: grid;
    grid-template-rows: 1fr;
    gap: 0 0;
    grid-auto-flow: row;
    grid-template-columns: 135px 50px auto fit-content(100%);
    box-shadow: 0 0 5px rgba(200, 200, 200, 0.7);
        outline: 1px solid rgba(35, 86, 0, .08);
}

.logoarea {
    grid-area: 1 / 1;
    background-color: var(--color-dark);
    border-radius: 22px;
    height: 44px;
    width: 130px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.subject {
    text-align: left;
    grid-area: 1 / 2;
}

.pagetitle {
    margin-left: 5px;
    text-align: left;
    grid-area: 1 / 3;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.pagetitle h3 {
    font-size: min(28px, calc(3vw));
    line-height: 44px;
    font-weight: 700;
    color: var(--color-dark);
}

.menuarea {
    text-align: right;
    grid-area: 1 / 4;
    padding: 0;
    z-index: 200;
}

/* This style has been replaced by .menu-container */

.mobile-menu-button {
    display: none;
    background-color: var(--color-base);
    border-radius: 22px;
    height: 44px;
    width: 44px;
    text-align: center;
    cursor: pointer;
    float: right;
    padding: 5px 0;
}

.mobile-menu-icon {
    font-size: 32px;
    font-weight: bold;
    line-height: 50px;
    color: var(--color-dark);
}

/* Unified menu container with style variants */
.menu-container {
    background-color: #f8fcf5;
    border-radius: 22px;
    float: right;
    min-width: 50px;
    z-index: 300;
    /* Default to horizontal style */
    height: 44px;
    outline: 1px solid rgba(35, 86, 0, .08);
}

.menu-container table {
    width: min-content;
    min-width: 0;
}

/* Horizontal style elements */
.menu-container .shortcutbutton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    margin: 0 7px;
    padding: 0;
    vertical-align: top;
}

.menu-container .shortcutbutton table {
    text-align: center;
    align-content: center;
    margin: 0 auto;
}

.menu-container .shortcutbutton td {
    text-align: center;
    padding: 0;
}

/* Vertical style when applied */
.menu-container.vertical {
    position: absolute;
    top: 54px;
    right: 5px;
    z-index: 10000;
    width: 70px;
    height: auto;
    display: none; /* Hidden by default */
    text-align: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.menu-container.vertical .shortcutbutton {
    display: block;
    width: 100%;
    margin: 0 0;
    text-align: center;
    height: auto;
}

.menu-container.vertical .shortcutbutton table {
    width: 100%;
    margin: 10px auto;
}

.menu-container.vertical .shortcutbutton tr {
    text-align: center;
}

/* Mobile responsive behavior */
@media screen and (max-width: 768px) {
    .menu-container {
        display: none; /* Hide horizontal menu on mobile */
    }

    .mobile-menu-button {
        display: block;
    }

    .menu-container.vertical.show {
        display: block; /* Show vertical menu when toggled */
    }
}

.shortcuticon {
    height: 24px;
}

.shortcutbutton {
    height: 50px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.help-home-trigger {
    outline: none;
}

.help-home-trigger:focus-visible {
    outline: 2px solid var(--color-dark);
    outline-offset: 2px;
}

.help-home-trigger .bi-question-circle {
    color: var(--color-dark);
}

.shortcutbutton table {
    text-align: center;
    align-content: center;
    padding: 0;
    min-width: 44px;
    width: min-content;
}

.menu-container .shortcutbutton.menu-active {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    background: rgb(53 134 0 / 0.09);
    border-radius: 22px;
    margin: 0;
    padding: 0 6px;
    min-width: 80px;
}

.menu-container .shortcutbutton.menu-active table {
    margin: 0 auto;
}

.menu-container.vertical .shortcutbutton.menu-active {
    border-radius: 14px;
    width: calc(100% - 4px);
    padding: 0;
}

.contentContainer {
    overflow: auto;
    max-height: calc(100vh - 95px);
    padding: 0px;
    border: 3px solid white;
    border-radius: 22px;
    background: linear-gradient(180deg, #f8fcf5, #ffffff);
    box-shadow: 0 0 5px rgba(200, 200, 200, 0.7);
    height: 100vh;
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
    outline: 1px solid rgba(35, 86, 0, .08);
}

@media print {
    @page {
        size: A4 portrait;
        margin: 8mm;
    }

    .no-print {
        display: none !important;
        visibility: hidden;
    }

    .navcontainer {
        grid-template-columns: max-content auto 0 130px fit-content(100%);
        border-radius: 0;
        box-shadow: none;
    }

    .logoarea {
        grid-area: 1 / 4;
    }

    .subject {
        grid-area: 1 / 1;
    }

    .pagetitle {
        grid-area: 1 / 2;
    }

    body {
        background: white;
    }

    #content {
        background: white;
        background-image: none;
        padding: 0;
        margin: 0;
    }

    .contentContainer {
        border: none;
        background: white;
        max-height: initial;
        overflow: visible;
        padding: 0;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .widemargin {
        padding: 0;
        margin: 0;
    }

    .inline-filter {
        display: none !important;
        visibility: hidden;
    }

    .btn-sort {
        display: none !important;
        visibility: hidden;
    }

    .btn-sort-mini {
        display: none !important;
        visibility: hidden;
    }
}

@media (max-width: 768px), (hover: none) {
    .contentContainer {
        max-height: initial;
    }

    .bottombar {
        position: relative;
    }
}

.widemargin {
    padding: 10px;
}

.header {
    --bs-table-bg: var(--color-very-light);
}


.rotated-header-data {
    writing-mode: sideways-lr; /* Vertical text */
    text-orientation: mixed; /* Maintain horizontal layout */
    white-space: wrap;
    text-align: left;
    /*width: 60px;
    min-width: 60px;*/
}

.skinny {
    width: 26px !important;
    max-width: 26px !important;
    padding-left: 2px !important;
    padding-right: 2px !important;
    line-height: 20px !important;
}

.rotated-title {
    white-space: normal; /* allow wrapping */
    word-break: break-word; /* break long words if needed */
    line-height: 0.9em;
}

.data {
    text-align: center;
    width: 60px;
    min-width: 60px;
}

.data-div {
    border: 0 solid transparent;
    border-radius: 5px;
    background-color: transparent;
    line-height: 26px;
    min-height: 28px;
}

.data-input {
    text-align: center;
    margin: 3px 3px;
    padding: 2px;
}

input {
    border: 2px solid #999999 !important;
    border-radius: 5px;
    /*width: calc( 100% - 4px ) !important;*/
}

input:focus {
    border: 2px solid black;
    background-color: white;
}

select {
    border: 2px solid #999999 !important;
    border-radius: 5px !important;
    /*min-width: calc( 100% - 4px ) !important;*/
}

select:focus {
    border: 2px solid black !important;
    background-color: white !important;
}

/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
input[type=number] {
    -moz-appearance: textfield;
}

.shortcut {
    line-height: 8px;
    font-size: 10px;
    font-weight: 600;
}

.subject-mini-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--color-base);
    text-align: center;
}

.subject-code-text {
    font-size: 22px;
    line-height: 44px;
    font-weight: bold;
    color: white;
}

.name a, .name a:hover {
    border: none;
    outline: none;
    text-decoration: none;
    color: inherit;
    -webkit-tap-highlight-color: white;
    width: 15%;
}

.grade {
    --bs-table-bg: #ffffee;
    text-align: center;
    vertical-align: middle;
    width: min-content;
}

.blank {
    --bs-table-bg: #f9f9f9;
}

.divider {
    --bs-table-bg: #bbb;
    min-width: 2px !important;
    max-width: 2px !important;
    padding: 0 !important;
    margin: 0;
}

th.grade {
    --bs-table-bg: #ffffdf !important;
}

.comparative-grid {
    background-color: #ffffff;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.comparative-grid .grade {
    --bs-table-bg: #fffff5;
}

.comparative-grid th.grade {
    --bs-table-bg: #ffffdf !important;
}

.comparative-grid .blank {
    --bs-table-bg: #f5f5f5;
}

.analysis_section {
    margin: auto;
    margin-top: 10px;
    border-radius: 10px;
    border: 1px solid #ccc;
    max-width: 800px;
    min-width: 800px;
    width: 800px;
    padding: 10px;
    background-color: #f9f9f9;
    break-inside: avoid;
}

.contentContainer > .analysis_section {
    margin: 10px auto 0;
    flex: 0 0 auto;
}

.adjust {
    font-size: 12px;
    line-height: 32px;
}

.grade-column {
    text-align: left;
    --bs-table-bg: #ffffee;
}

/* ==== analysis.html styles (extracted 2025-08-08T12:40:05.104640Z) ==== */


/* ==== assessment_results.html styles (extracted 2025-08-08T12:55:52.083985Z) ==== */


.table-responsive {
    max-height: calc(100vh - 220px);
    max-width: calc(100vw - 20px);
}

.name {
    font-weight: normal;
    font-size: 1em;
}

/* ==== assessments.html styles (extracted 2025-08-08T12:58:09.264707Z) ==== */


.analysisicon {
    height: 14px;
}

.assessment-title {
    max-height: 200px;
    text-wrap: auto;
    line-height: 0.95em;
    font-size: 0.9em;
}

/* ==== registration_report.html styles ==== */

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, .8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-card {
    width: 360px;
    padding: 24px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
    text-align: center;
}

.loading-title {
    font-weight: 600;
    margin-bottom: 16px;
}

.progress-bar {
    height: 10px;
    background: #eee;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4facfe, #00f2fe);
    transition: width .2s ease;
}

.loading-message {
    font-size: 14px;
    color: #555;
}

/* ==== course_settings.html styles ==== */
.accordion-body {
    background-color: var(--color-very-light);
}

h5 {
    margin-bottom: 0px;
}

.accordion-button {
    padding: 10px !important;
}

.settings_table_full_width {
    width: 100%;
}


.settings_table tbody td {
    padding: 1px 5px 1px 5px !important;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 1);
}

table input {
    width: calc(100% - 4px) !important;
}

table select {
    min-width: calc(100% - 4px) !important;
}

.settings_table th {
    font-size: 15px !important;
}

.settings_table tbody th {
    font-size: 15px !important;
    border-radius: 0;
}

.settings_table thead {
    background-color: var(--color-highlight);
}

.settings_table thead th {
    font-size: 15px !important;
    position: static !important;
    text-align: center;
    padding: 4px;

}

.button_column {
    text-align: center;
    width: 40px !important;
}

.value_column {
    text-align: center;
    width: 80px !important;
}

.settings_accordion {
    --bs-accordion-active-bg: var(--color-base) !important;
}

.grade_column {
    text-align: center;
    width: 70px !important;
}

/* ==== dashboard.html styles ==== */

@media (min-width: 576px) {
    .filter-grid {
        grid-template-columns: 1fr 1fr;
    }
}

html, body {
    height: 100%;
    overflow: hidden; /* prevent extra page scrollbar */
}


.contentContainer > .filter-bar {
    flex: 0 0 auto;
}

.contentContainer > .div-table-wrapper {
    flex: 1 1 auto;
    min-height: 0;
}

.contentContainer > form {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.contentContainer > form > .div-table-wrapper {
    flex: 1 1 auto;
    min-height: 0;
}

.filter-header input {
    flex: 1 1 auto;
    min-width: 0;
    width: 0;
    padding: 2px 4px;
    font-size: .85rem;
}

.filter-header .btn-sort {
    flex: 0 0 auto;
    padding: 2px 6px;
}

/* ---------------- Div "table" ---------------- */
.div-table-wrapper {
    width: 100%;
    overflow: auto;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 6px;
}

.div-table-head,
.div-table-row {
    display: grid;
    align-items: stretch;
    min-width: max-content; /* This ensures the row stays as wide as the columns need */
}

.div-table-head {
    position: sticky;
    background: #fff;
    z-index: 50;
}

.div-table-head.head-row1 {
    top: 0;
    z-index: 60;
    background: linear-gradient(180deg, #f8fcf5, #ffffff);
}

.div-table-head.head-row2 {
    top: var(--header-row-height, 40px);
    z-index: 55;
}

/* zebra striping (opaque so sticky cells cover content behind) */
.div-table-body .div-table-row {
    background: var(--color-very-light);
}

.div-table-body .div-table-row:nth-child(odd) {
    background: linear-gradient(180deg, #f8fcf5, #ffffff);
}



/* Different tints per class */
.div-table-row .div-cell.component {
    background: rgba(255, 238, 238, 0.55);
}

.div-table-row:nth-child(odd) .div-cell.component {
    background: linear-gradient(180deg, rgba(255, 238, 238, 0.55), #ffffff);
}

.div-table-row .div-cell.skill {
    background: rgba(238, 255, 238, 0.55);
}

.div-table-row:nth-child(odd) .div-cell.skill {
    background: linear-gradient(180deg, rgba(238, 255, 238, 0.55), #ffffff);
}

.div-table-row .div-cell.topic {
    background: rgba(238, 238, 255, 0.55);
}

.div-table-row:nth-child(odd) .div-cell.topic {
    background: linear-gradient(180deg, rgba(238, 238, 255, 0.55), #ffffff);
}

/* Headers: slightly stronger tint (still allows any header shading you have) */
.div-table-head .div-cell.component {
    background: linear-gradient(180deg, rgba(255, 238, 238, 1), rgba(255, 250, 250, 1));
}

.div-table-head .div-cell.skill {
    background: linear-gradient(180deg, rgba(238, 255, 238, 1), rgba(250, 255, 250, 1));
}

.div-table-head .div-cell.topic {
    background: linear-gradient(180deg, rgba(238, 238, 255, 1), rgba(250, 250, 255, 1));
}

/* cells */
.div-cell {
    display: flex;
    align-items: center;
    min-height: 24px;
    padding: 1px 3px;
    font-size: .9rem;
    border-right: 1px solid rgba(0, 0, 0, .06);
    border-bottom: 1px solid rgba(0, 0, 0, .06);
}

.div-cell table {
    min-width: 0;
}

.div-table-wrapper .div-cell {
    width: 100%;
}

/* header cells */
.div-cell.header {
    font-weight: 600;
    padding-bottom: 3px;
    border-bottom: 2px solid rgba(0, 0, 0, .15);
}

/* header name wrapping rules */
.div-cell.header.name {
    white-space: normal;
    text-wrap: nowrap;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: manual;
}

.div-cell.header.name a {
    display: block;
    min-width: 0;
    font-size: 0.9rem;
    line-height: 36px;
}

/* sticky first column */
.div-cell.sticky-left {
    position: sticky;
    min-width: 180px;
    left: 0;
    z-index: 40;
    background: inherit;
    flex: none;
    white-space: nowrap;
}

.div-table-head .div-cell.sticky-left {
    z-index: 80;
}

/* sticky second column */
.div-cell.sticky-left-2 {
    position: sticky;
    min-width: 180px;
    left: 180px;
    z-index: 40;
    border-right: 2px solid rgba(0, 0, 0, .15);
    background: inherit;
    flex: none;
    white-space: nowrap;
}

.div-table-head .div-cell.sticky-left-2 {
    z-index: 80;
}

.div-cell.grade-cell {
    justify-content: center;
    width: 100%;
}

.div-cell.report-cell {
    justify-content: center;
}

.div-cell.grade-cell {
    padding: 3px 3px;
}

.div-cell.grade-cell .data-div {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    padding: 0 2px;
    line-height: 1.1;
}

.div-cell.rotated-header-data {
    justify-content: left;
    white-space: nowrap;
}

.grade-cell.not-studied {
    background: #e0e0e0 !important;
    color: #e0e0e0;
}

.div-cell.grade {
    width: 100%;
}

.div-table-wrapper .data {
    width: 100% !important;
    min-width: 100% !important;
}

.div-table-wrapper .data-div {
    width: 100%;
}

.div-table-wrapper .data-input {
    width: 100%;
    height: 100%;
    text-align: center;
    font-size: 1rem;
    margin: 2px 2px !important;
}

/* skinny helper (for icon columns) */
.div-cell.skinny {
    justify-content: center;
}

/* ---------------- Photo tooltip (fixed, not clipped by scroll container) ---------------- */
.student-photo-trigger {
    cursor: pointer;
}

.photo-tooltip-fixed {
    position: fixed;
    z-index: 10000;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .15);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, .18);
    padding: 2px;
    pointer-events: none;
}

.photo-tooltip-fixed img {
    display: block;
    width: 70px;
    height: 90px;
    object-fit: cover;
    border-radius: 6px;
}


.data-column {
    max-height: 200px;
}

.component {
    --bs-table-bg: #ffeeee;
}

th.component {
    --bs-table-bg: #ffdddd !important;
}

.value {
    text-align: center;
    vertical-align: middle;
}

.skill {
    --bs-table-bg: #eeffee;
}

th.skill {
    --bs-table-bg: #ddffdd !important;
}

.topic {
    --bs-table-bg: #eeeeff;
}

th.topic {
    --bs-table-bg: #ddddff !important;
}

.mean {
    --bs-table-bg: #fefefe;
    --bs-table-bg-type: unset !important;
    position: relative;
}

/* Sort buttons styling */
.btn-sort {
    line-height: 1;
    padding: 4px 2px;
    font-size: .85rem;
    white-space: nowrap;
    border: 2px solid #999999 !important;
    background: #fff;
}


.clear-button {
    border: 2px solid #999999 !important;
    border-radius: 5px !important;
    width: 100% !important;
    padding: 1px 2px !important;
}

.btn-sort-mini {
    line-height: 1;
    padding: 1px 1px;
    font-size: .75rem;
    white-space: nowrap;
    border: 1px solid #666666 !important;
    color: #666666;
    background-color: transparent;
    border-radius: 4px;
    writing-mode: initial;
}

/* Inputs for first/last name inside averages row */
.inline-filter {
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
    min-width: 0;
    padding: 1px 0;
    line-height: 1.1;
}

.inline-filter input {
    flex: 1 1 auto;
    min-width: 0;
    width: 0;
    padding: 2px 4px;
    font-size: .85rem;
}

.inline-filter .btn-sort {
    flex: 0 0 auto;
    padding: 2px 6px;
}

/* ==== new_assessment.html styles ==== */
.hidden {
    display: none;
}

table tbody td {
    padding: 1px !important;
}

table th {
    font-size: 15px !important;
}

/* === Global sticky table layout fixes === */

.table {
    --bs-border-width: 0 !important;
    --bs-border-radius: 0 !important;
}

/* Global sticky header row */
.table thead {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #fff;
}

/* Optional second header row for filters */
thead tr.filters th {
    position: sticky;
    top: var(--header-row-height, 44px);
    z-index: 15;
    background: #fff;
}

/* First column sticky (row headers) */
thead th[scope="rowgroup"] {
    position: sticky;
    left: 0;
    z-index: 11; /* above body cells and header bg */
    background: var(--color-very-light);
}

tbody th[scope="row"] {
    position: sticky;
    left: 0;
    z-index: 10; /* below rowgroup but above cells */
    background: var(--color-very-light);
}

/* Sticky last column */
.table thead th.sticky-end,
tbody td.sticky-end {
    position: sticky;
    right: 0;
    z-index: 9;
    background: #fff;
    box-shadow: -1px 0 0 rgba(0, 0, 0, .06);
}

/* ==== student_report.html styles ==== */

#report .reporttable {
    width: 100%;
}

#report .reporttable tbody td {
    padding: 1px !important;
    text-align: center;
}

#report .reporttable th {
    font-size: 15px !important;
}

#report .reporttable thead th {
    font-size: 15px !important;
    text-align: center;
}

#report .report-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: stretch;
    margin: 0;
}

#report .audit-container {
    border-radius: 20px;
    background-color: #333;
    color: white;
    margin: 10px;
    padding: 10px;
}

#report .report-panel {
    min-height: 100px;
    min-width: 250px;
    display: block;
    flex-grow: 1;
    flex-shrink: 1;
    align-self: auto;
    order: 0;
    background-color: white !important;
    border: 1px solid #555 !important;
    border-radius: 20px !important;
    margin: 10px;
    padding: 15px;
    flex-basis: 45%;
}

.progress-chart {
    min-width: 250px;
    min-height: 200px;
    height: 300px;
    position: relative;
    width: 100%;
}

#report .subject {
    border: 1px solid #555 !important;
    border-radius: 20px !important;
    max-width: 1300px;
    break-inside: avoid;
    margin: auto;
    margin-bottom: 10px;
}

#report .subjecttitle {
    color: white;
    font-size: 30px;
    line-height: 36px;
}

/* ==== students.html styles ==== */
#students {
    --header-row-height: 44px;
}

/* sticky header rows (titles row + filters row) */
#students thead th {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 5; /* titles row */
}

#students thead tr.filters th {
    top: var(--header-row-height);
    z-index: 6; /* filters row sits above titles */
}

/* make thead act as one sticky block (avoid double-sticky conflicts) */
#students .table thead {
    position: sticky;
    top: 0;
    z-index: 8;
    background: #fff;
}

#students .table thead th,
#students .table thead tr.filters th {
    position: static; /* vertical stickiness handled by thead above */
    top: auto;
    z-index: auto;
}

/* sticky far-right cell for "Clear" */
#students .table thead th.sticky-end {
    position: sticky;
    right: 0;
    z-index: 9;
    background: #fff;
    box-shadow: -1px 0 0 rgba(0, 0, 0, .06);
    background-color: var(--bs-table-bg);
}

/* table scroller */


/* filters row layout */
.filters .d-flex {
    gap: 4px;
}

/* report icon column */
#students .report-cell {
    text-align: center;
    vertical-align: middle;
}

#students .report-cell a {
    color: grey;
    text-decoration: none;
    font-size: 1.4em;
}

#students .report-cell a:hover {
    color: black;
}

.icon {
    width: 20px;
    height: 20px;
    margin: 5px;
}

/* ==== subject.html styles (CSS-var version) ==== */
.group-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    align-content: flex-start;
}

.group-panel {
    width: 180px;
    height: 240px;
    display: block;
    flex-grow: 0;
    flex-shrink: 1;
    flex-basis: auto;
    align-self: auto;
    order: 0;
    background-color: var(--color-panel);
    border: 1px solid #ccc;
    border-radius: 20px;
    margin: 15px;
}

.subject-group-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: left;
    align-items: flex-start;
    align-content: flex-start;
}

.subject-group-panel {
    display: block;
    flex-grow: 0;
    flex-shrink: 1;
    flex-basis: auto;
    align-self: auto;
    order: 0;
    margin: 15px 20px 15px 0;
}

/* use --subject-color provided by the page */
.year-name {
    width: 100%;
    height: 35px;
    text-align: center;
    background-color: var(--subject-color);
    border: 1px solid var(--subject-color);
    border-bottom: 1px solid #ccc;
    border-radius: 20px 20px 0 0;
    line-height: 35px;
    color: #fff;
    font-weight: bold;
}

.year-name:hover {
    background-color: color-mix(in hsl, var(--subject-color), var(--color-highlight));
    font-weight: bolder;
}

.course-name {
    width: 100%;
    height: 35px;
    text-align: center;
    background-color: var(--subject-color);
    border: 1px solid var(--subject-color);
    border-bottom: 1px solid #ccc;
    line-height: 35px;
    color: #fff;
    white-space: nowrap; /* prevent wrapping */
    overflow: hidden; /* hide overflow */
    text-overflow: ellipsis; /* add "…" when cut off */
    padding: 0 5px;
}

.course-name:hover {
    background-color: color-mix(in hsl, var(--subject-color), var(--color-highlight));
    font-weight: bolder;
}

.group-name {
    width: 100%;
    text-align: center;
    border-top: 1px solid #ccc;
    height: 30px;
    white-space: nowrap; /* prevent wrapping */
    overflow: hidden; /* hide overflow */
    text-overflow: ellipsis; /* add "…" when cut off */
}

.group-last {
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}

.group-name:hover {
    background-color: color-mix(in hsl, var(--subject-color), var(--color-highlight));
    font-weight: bold;
}


/* ==== subjects.html styles ==== */
#subjects .subject-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    align-content: flex-start;
}

#subjects .subject-panel {
    width: 160px;
    height: 200px;
    display: block;
    flex-grow: 0;
    flex-shrink: 1;
    flex-basis: auto;
    align-self: auto;
    order: 0;
    background-color: var(--color-panel);
    border: 1px solid #ccc;
    border-radius: 20px;
    margin: 15px;
}

#subjects .subject-panel:hover {
    background-color: var(--color-highlight);
}

#subjects .registration {
    background-color: var(--color-dark);
    color: white;
}

#subjects .registration:hover {
    background-color: var(--color-darker);
}

.subject-icon {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: var(--color-base);
    margin: 20px;
    text-align: center;
}

.subject-img {
    width: 100px;
    height: 100px;
    margin: 10px;
}

.subject-medium-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background-color: var(--color-base);
    margin: 12px;
    text-align: center;
}

.subject-medium-img {
    width: 60px;
    height: 60px;
    margin: 6px;
}

#subjects .subject-name {
    position: relative;
    bottom: 15px;
    left: 0;
    width: 100%;
    height: 50px;
    display: flex;
    justify-content: center; /* horizontal */
    text-align: center;
    align-items: center; /* vertical */
}

#subjects .subject-code-text {
    line-height: 120px !important;
    font-size: 60px !important;
    text-align: center;
}

/* Expand first and last name columns before others on dashboard & students */
table {
    min-width: 150px;
    width: max-content;
}

.filter-bar {
    min-height: 44px;
    border-radius: 16px 16px 0 0;
    background: linear-gradient(180deg, #f8fcf5, #ffffff);
    border-bottom: 1px solid rgba(0, 0, 0, .08);
    padding: .7rem 1rem .55rem;
    margin-bottom: 5px;
    display: grid;
    grid-template-rows: 1fr;
    align-items: center;
    gap: 0 .5rem;
    grid-auto-flow: row;
    grid-template-columns: max-content auto max-content max-content max-content max-content max-content max-content;
}

.filter-course {
    grid-area: 1 / 1;
    min-height: 28px;
    width: max-content;
    display: flex;
    align-items: center;
}

.filter-course h4 {
    font-family: "Quicksand", sans-serif;
    font-weight: 700;
    margin: 0;
    color: var(--color-dark);
    font-size: 1.75rem;
    line-height: 1.2;
}

.filter-count {
    display: flex;
    align-items: center;
    grid-area: 1 / 3;
    min-height: 28px;
    width: max-content;
}

.filter-student {
    display: flex;
    align-items: center;
    grid-area: 1 / 5;
    min-height: 28px;
    width: max-content;
}


.filter-assessment {
    display: flex;
    align-items: center;
    grid-area: 1 / 4;
    min-height: 28px;
    width: max-content;
}

.filter-grade {
    display: flex;
    align-items: center;
    grid-area: 1 / 6;
    min-height: 28px;
    width: max-content;
}

.filter-grade select {
    line-height: 1 !important;
    padding: 4px 2px;
    font-size: .85rem;
    white-space: nowrap;
    border: 2px solid #999999 !important;
    background-color: #fff;
}

.filter-grade select.form-select {
    background-position: right 4px center;  /* ← move arrow right */
    padding-right: 1.4rem !important;       /* much smaller padding */
}

.export {
    display: flex;
    align-items: center;
    grid-area: 1 / 7;
    min-height: 28px;
    width: max-content;
}

.filter-help {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    grid-area: 1 / 8;
    min-height: 28px;
    width: max-content;
}

.import {
    display: flex;
    align-items: center;
    grid-area: 1 / 7;
    min-height: 28px;
    width: max-content;
}


.subject-mini-img {
    width: 36px;
    height: 36px;
    margin: 4px;
}

.icon-picker-overlay {
    position: absolute;
    z-index: 2000;
}

.icon-picker-panel {
    background: #fff;
    border: 2px solid #ccc;
    border-radius: 10px;
    padding: 8px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .15);
}

.icon-picker-grid {
    display: grid;
    grid-template-columns: repeat(6, 48px);
    gap: 8px;
    max-width: 320px;
}

.icon-picker-item img {
    width: 36px;
    height: 36px;
    margin: 4px;
    border: none;
}

.icon-picker-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 8px;
}

.icon-picker-item {
    padding: 0;
}

.inactivity-countdown {
    position: fixed;
    right: 12px;
    bottom: 0px;
    color: #fff;
    padding: 2px 10px;
    border-radius: 8px;
    background: var(--color-dark);
    font-size: 0.8rem;
    z-index: 1050;
    user-select: none;
    line-height: 18px;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
}

.modal-card {
    background: #fff;
    border-radius: .5rem;
    padding: 1.25rem 1.25rem 1rem;
    max-width: 520px;
    width: 92%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
}

.modal-body {
    margin-bottom: 1rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: .5rem;
}

.filter-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: .75rem;
}

.form-select.select-yes {
    background-color: #bfffdb;
    border-color: #67e38a;
}

.form-select.select-no {
    background-color: #f8baba;
    border-color: #d57b7b;
}

.form-select.select-yes:focus,
.form-select.select-no:focus {
    box-shadow: 0 0 0 .25rem rgba(25, 135, 84, .15);
}

.comment-icon {
    color: var(--color-dark);
}

.no-comment-icon {
    color: #999999;
}

.no-comment-icon:hover {
    color: var(--color-dark);
}

.filter-header {
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
    min-width: 0;
    padding: 1px 0;
    line-height: 1.1;
}

.filter-select {
    min-width: max-content !important;
    width: 100%;
    padding: 2px 0px !important;
}

.filter-input {
    min-width: 50px !important;
    padding: 1px 2px !important;
}

.highlighted {
    text-shadow: -0.5px 0 currentColor, 0.5px 0 currentColor, 0 -0.3px currentColor, 0 0.3px currentColor;
}

.disable-highlight {
    text-shadow: none !important;
}

.help-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    margin-left: .25rem;
    border: none;
    border-radius: 50%;
    background: rgba(53, 134, 0, .12);
    color: var(--color-dark);
    vertical-align: middle;
    font-size: .78rem;
    line-height: 1;
}

.help-trigger:hover {
    background: rgba(53, 134, 0, .2);
}

.page-shell {
    display: flex;
    align-items: stretch;
    flex-wrap: nowrap;
    width: 100%;
    min-width: 0;
}

#content {
    flex: 1 1 0;
    width: 0;
    min-width: 0;
}

.lj-help-root {
    position: relative;
    flex: 0 0 0;
    width: 0;
    min-width: 0;
    max-width: 100vw;
    overflow: hidden;
    transition: flex-basis .5s ease, width .5s ease;
    z-index: 1;
    border-radius: 22px;
    max-height: calc(100vh - 100px);
    margin-right: 5px;
    margin-left: 5px;
}

.lj-help-root[hidden] {
    display: none;
}

.lj-help-root.is-open {
    flex-basis: max(25vw, 320px);
    width: max(25vw, 320px);
}

.lj-help-backdrop {
    display: none;
    background: rgba(12, 18, 10, .35);
    opacity: 0;
    transition: opacity .5s ease;
}

.lj-help-panel {
    position: sticky;
    top: 5px;
    right: auto;
    bottom: auto;
    left: auto;
    width: 100%;
    min-width: 0;
    max-width: none;
    height: calc(100dvh - var(--app-header-offset) - 5px);
    background: #fff;
    border-radius: 22px 0 0 22px;
    box-shadow: -16px 0 40px rgba(0, 0, 0, .18);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    opacity: 0;
    transition: transform .5s ease, opacity .5s ease;
    border: 3px solid white;
    outline: 1px solid rgba(35, 86, 0, .08);
}

.lj-help-root.is-open .lj-help-backdrop {
    opacity: 1;
}

.lj-help-root.is-open .lj-help-panel {
    transform: translateX(0);
    opacity: 1;
}

.lj-help-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .7rem 1rem .55rem;
    border-bottom: 1px solid rgba(0, 0, 0, .08);
    background: linear-gradient(180deg, #f8fcf5, #ffffff);
    border-radius: 22px 22px 0 0;
}

.lj-help-header-title {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-width: 0;
    flex: 1 1 auto;
}

.lj-help-header h4 {
    font-family: "Quicksand", sans-serif;
    font-weight: 700;
    margin: 0;
    color: var(--color-dark);
    font-size: 1.75rem;
}

.lj-help-support-link {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-size: .95rem;
    line-height: 1.05;
    font-weight: 600;
    color: var(--color-dark);
    text-decoration: none;
    white-space: nowrap;
}

.lj-help-support-link:hover,
.lj-help-support-link:focus {
    text-decoration: underline;
}

.lj-help-status {
    padding: .85rem 1rem 0;
    color: #555;
    font-size: .95rem;
    flex: 0 0 auto;
}

.help-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 1rem;
    color: #222;
    font-family: "Noto Sans", sans-serif;
    line-height: 1.55;
}

.lj-help-footer {
    flex: 0 0 auto;
    margin-top: auto;
    min-height: 3.75rem;
    padding: .35rem 1rem;
    border-top: 1px solid rgba(0, 0, 0, .08);
    background: #fff;
}

.help-content > :first-child {
    margin-top: 0;
}

.help-content h1,
.help-content h2,
.help-content h3,
.help-content h4,
.help-content h5,
.help-content h6 {
    font-family: "Quicksand", sans-serif;
    font-weight: 500;
    line-height: 1.25;
    margin: 1.1rem 0 .55rem;
}

.help-content h1,
.help-content h2 {
    color: var(--color-dark);
    font-size: 1.4rem;
}

.help-content h3,
.help-content h4 {
    color: var(--color-dark);
    font-size: 1.2rem;
}

.help-content p,
.help-content ul,
.help-content ol,
.help-content table,
.help-content blockquote,
.help-content pre {
    margin: 0 0 .9rem;
}

.help-content ul,
.help-content ol {
    padding-left: 1.3rem;
}

.help-content a {
    color: var(--color-dark);
    text-decoration: underline;
    text-decoration-thickness: 1px;
}

.help-content code {
    background: #f1f4ee;
    border-radius: 4px;
    padding: .05rem .28rem;
    font-size: .92em;
}

.help-content pre {
    background: #f1f4ee;
    border-radius: 10px;
    padding: .9rem;
    overflow: auto;
}

.help-content pre code {
    background: transparent;
    padding: 0;
}

.help-content blockquote {
    margin-left: 0;
    padding-left: .9rem;
    border-left: 4px solid rgba(53, 134, 0, .25);
    color: #555;
}

.help-content table {
    width: 100%;
    border-collapse: collapse;
}

.help-content th,
.help-content td {
    padding: .45rem .55rem;
    border: 1px solid rgba(0, 0, 0, .08);
    vertical-align: top;
}

.help-content th {
    background: #f5f9f2;
}

.help-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: .9rem 0 1rem;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 10px;
    background: #fff;
}

.lj-help-topic-code {
    margin: 1.5rem 0 0;
    color: #7a7a7a;
    font-size: .82rem;
}

@media screen and (max-width: 768px) {
    .page-shell {
        display: block;
    }

    #content {
        width: auto;
    }

    .lj-help-root {
        position: fixed;
        inset: 0;
        width: auto;
        min-width: 0;
        max-width: none;
        overflow: visible;
        transition: none;
        z-index: 1200;
    }

    .lj-help-backdrop {
        display: block;
        position: fixed;
        inset: 0;
    }

    .lj-help-panel {
        position: fixed;
        top: 0;
        width: 100vw;
        min-width: 0;
        max-width: 100vw;
        right: 0;
        bottom: 0;
        height: 100vh;
        border-radius: 0;
    }
}

@media (max-width: 768px) {
    .div-cell.sticky-left,
    .div-cell.sticky-left-2 {
        position: static;
        left: auto;
        z-index: auto;
        border-right: 1px solid rgba(0, 0, 0, .06);
    }

    .div-table-head .div-cell.sticky-left,
    .div-table-head .div-cell.sticky-left-2 {
        z-index: auto;
    }

    .div-table-head {
        position: sticky;
    }

    .filter-bar {
        display: flex;
        flex-wrap: wrap;
        gap: .3rem .5rem;
        padding: .5rem .6rem;
    }

    .filter-bar > * {
        grid-area: auto;
        width: auto;
        min-width: 0;
    }

    .filter-course h4 {
        font-size: 1.2rem;
    }

    .filter-count {
        width: auto;
        white-space: nowrap;
    }

    .filter-student .btn,
    .filter-assessment .btn,
    .export .btn {
        font-size: .8rem;
        padding: .2rem .4rem;
        white-space: nowrap;
    }

    .filter-grade select {
        font-size: .8rem;
        max-width: 110px;
    }

    .contentContainer > div[style*="position: absolute"][style*="top:"] {
        position: static !important;
        top: auto !important;
        left: auto !important;
        flex-direction: row !important;
        flex-wrap: wrap;
        gap: .3rem;
        z-index: auto !important;
        padding: .3rem .6rem !important;
    }

    .div-table-head.head-row1 {
        top: 0;
        z-index: 60;
    }

    .div-table-head.head-row2 {
        top: var(--header-row-height, 40px);
    }

    .div-table-head .div-cell.rotated-header-data {
        max-width: 50px;
    }
    .div-table-head .div-cell.rotated-header-data table {
        width: 100%;
        table-layout: fixed;
    }
    .div-table-head .div-cell.rotated-header-data td {
        overflow-wrap: anywhere;
        word-break: break-all;
    }
    .div-table-head .div-cell.rotated-header-data div,
    .div-table-head .div-cell.rotated-header-data a {
        max-width: 100%;
        display: block;
        overflow-wrap: anywhere;
        word-break: break-all;
    }
}


