* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f6f8;
    color: #252525;
}

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

.topbar {
    background: #ffffff;
    border-bottom: 1px solid #dddddd;
    margin-bottom: 32px;
}

.topbar-content {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    font-size: 22px;
    font-weight: bold;
    color: #222222;
    text-decoration: none;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-menu form {
    margin: 0;
}

.link-button {
    border: 0;
    background: none;
    cursor: pointer;
    text-decoration: underline;
    font-size: 14px;
}

h1 {
    margin-top: 0;
}

h2 {
    margin-top: 28px;
}

.welcome {
    margin-bottom: 30px;
}

.card {
    background: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 8px;
    padding: 24px;
}

.section-card {
    margin: 20px 0;
}

.module-card {
    margin: 28px 0;
    padding: 22px;
    background: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 10px;
}

.module-card h2 {
    margin-top: 0;
}

.group-grid,
.points-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin: 24px 0;
}

.group-card,
.points-menu-card {
    display: block;
    padding: 20px;
    color: inherit;
    text-decoration: none;
    background: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 8px;
}

.group-card:hover {
    border-color: #777777;
    background: #fafafa;
}

.group-card h2,
.points-menu-card h2 {
    margin-top: 0;
    margin-bottom: 8px;
}

.group-card p,
.points-menu-card p {
    margin-bottom: 0;
    color: #666666;
}

.points-menu-card.is-pending {
    background: #f8f8f8;
    color: #555555;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin: 24px 0;
}

.stat-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-card strong {
    font-size: 32px;
}

.stat-card span {
    color: #666666;
}

.button {
    display: inline-block;
    border: 0;
    border-radius: 5px;
    padding: 11px 18px;
    cursor: pointer;
    text-decoration: none;
    font-size: 15px;
}

.primary {
    background: #222222;
    color: #ffffff;
}

.secondary {
    border: 1px solid #777777;
    background: #ffffff;
    color: #222222;
}

.section-toolbar,
.section-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.section-toolbar {
    margin: 24px 0;
}

.section-heading-row h2,
.section-heading-row h3 {
    margin-top: 0;
}

.status-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    background: #eeeeee;
    color: #444444;
    font-size: 13px;
    white-space: nowrap;
}

.status-active {
    background: #e5f4e9;
    color: #27633a;
}

.table-scroll {
    overflow-x: auto;
}

.compact-list {
    margin: 10px 0 0;
    padding-left: 20px;
}

.form-card,
.activation-note {
    margin: 22px 0;
}

.form-card h2,
.activation-note h2 {
    margin-top: 0;
}

.form-grid {
    display: grid;
    gap: 18px;
}

.form-grid.two-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-field {
    margin: 16px 0;
}

.form-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
}

.form-field input[type="text"],
.form-field input[type="number"],
.form-field select {
    width: 100%;
    min-height: 42px;
    padding: 9px 10px;
    border: 1px solid #bbbbbb;
    border-radius: 5px;
    background: #ffffff;
    font-size: 15px;
}

.form-field small {
    display: block;
    margin-top: 6px;
    color: #666666;
}

.category-form-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 18px;
}

.category-form-row {
    display: grid;
    grid-template-columns:
        minmax(180px, 2fr)
        minmax(130px, 1fr)
        minmax(150px, 1fr)
        80px
        minmax(120px, auto);
    gap: 14px;
    align-items: end;
    padding: 14px;
    border: 1px solid #dddddd;
    border-radius: 8px;
    background: #fafafa;
}

.category-form-row .form-field {
    margin: 0;
}

.color-field input[type="color"] {
    width: 58px;
    height: 42px;
    padding: 3px;
    border: 1px solid #bbbbbb;
    border-radius: 5px;
    background: #ffffff;
}

.delete-field {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.grade-boundary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    gap: 14px;
    align-items: end;
}

.section-detail-heading h1,
.event-create-card h2,
.score-table-card h2,
.student-points-card h2 {
    margin-top: 0;
}

.status-draft {
    background: #eeeeee;
    color: #555555;
}

.status-published {
    background: #e8f0ff;
    color: #244f98;
}

.status-closed,
.status-archived {
    background: #f2eaf7;
    color: #654477;
}

.status-correction {
    background: #fff0d6;
    color: #80580d;
}

.event-create-card {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(520px, 2fr);
    gap: 28px;
    align-items: center;
    margin: 24px 0;
}

.container.points-section-container {
    max-width: 100%;
}

.event-create-form {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) minmax(180px, 1.4fr) minmax(150px, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.event-create-form .form-field {
    margin: 0;
}

.event-create-form input,
.event-create-form select {
    width: 100%;
    min-height: 42px;
    padding: 8px 9px;
    border: 1px solid #bbbbbb;
    border-radius: 5px;
    background: #ffffff;
}

.score-table-card {
    padding-left: 0;
    padding-right: 0;
    margin-top: 24px;
}

.score-table-card > .section-heading-row,
.score-table-card > .empty-state,
.score-table-card > .keyboard-hint {
    margin-left: 20px;
    margin-right: 20px;
}

.score-table-scroll {
    max-width: 100%;
    overflow: auto;
    border-top: 1px solid #dddddd;
    border-bottom: 1px solid #dddddd;
}

.score-table {
    --score-header-first-row-height: 53px;
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}

.score-table th,
.score-table td {
    padding: 8px;
    border-right: 1px solid #dddddd;
    border-bottom: 1px solid #dddddd;
    vertical-align: middle;
    background: #ffffff;
}

.score-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #f7f7f7;
    text-align: center;
}

.score-table thead tr:nth-child(2) th {
    top: var(--score-header-first-row-height);
}

.score-table-floating-header {
    display: none;
    position: fixed;
    top: 0;
    z-index: 100;
    overflow: hidden;
    pointer-events: none;
    border-bottom: 1px solid #bbbbbb;
    background: #ffffff;
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.2);
}

.score-table-floating-header.is-visible {
    display: block;
}

.score-table-floating {
    margin: 0;
}

.score-table-floating thead th {
    position: static;
}

.score-table [hidden] {
    display: none !important;
}

.score-table-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.published-columns-toggle {
    min-height: 32px;
    white-space: nowrap;
}

.score-table .sticky-student-column {
    position: sticky;
    left: 0;
    z-index: 4;
    width: 190px;
    min-width: 190px;
    max-width: 190px;
    background: #ffffff;
    box-shadow: 2px 0 3px rgba(0, 0, 0, 0.08);
}

.score-table thead .sticky-student-column {
    z-index: 6;
    background: #f7f7f7;
}

.category-heading {
    height: 53px;
    border-top: 4px solid var(--category-color);
}

.category-heading small,
.event-heading small {
    display: block;
    margin-top: 4px;
    color: #666666;
    font-weight: normal;
}

.event-heading {
    position: relative;
    width: 108px;
    min-width: 108px;
    border-top: 3px solid var(--category-color);
}

.event-heading .status-badge {
    margin: 6px 0;
    font-size: 11px;
}

.event-heading form {
    margin-top: 4px;
}

.compact-button {
    padding: 5px 8px;
    border: 1px solid #777777;
    border-radius: 4px;
    background: #ffffff;
    color: #222222;
    cursor: pointer;
    font-size: 11px;
}

.event-actions-trigger {
    margin-top: 4px;
}

.event-actions-dialog {
    box-sizing: border-box;
    width: min(460px, calc(100% - 32px));
    max-width: 100%;
    max-height: calc(100% - 32px);
    overflow-y: auto;
    padding: 20px;
    border: 1px solid #bbbbbb;
    border-radius: 10px;
    background: #ffffff;
    color: #222222;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.event-actions-dialog::backdrop {
    background: rgba(0, 0, 0, 0.42);
}

.event-actions-dialog-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.event-actions-dialog-heading h3,
.event-actions-dialog-heading p {
    margin: 0;
}

.event-actions-dialog-heading p {
    margin-top: 4px;
}

.event-actions-dialog-close {
    min-width: 36px;
    min-height: 36px;
    border: 0;
    background: transparent;
    color: #333333;
    cursor: pointer;
    font-size: 24px;
}

.event-actions-rename-form label {
    display: block;
    margin-bottom: 4px;
    color: #333333;
    font-size: 11px;
    font-weight: bold;
}

.event-actions-rename-form input {
    box-sizing: border-box;
    width: 100%;
    min-height: 31px;
    margin-bottom: 6px;
    padding: 4px 6px;
    border: 1px solid #aaaaaa;
    border-radius: 4px;
    background: #ffffff;
}

.event-actions-rename-form .compact-button {
    width: 100%;
}

.event-actions-dialog-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #dddddd;
}

.event-actions-dialog-row form {
    margin: 0;
}

.danger-button {
    border-color: #b42318;
    color: #b42318;
}

.danger-button:hover,
.danger-button:focus {
    background: #fff0ee;
}

.score-cell {
    position: relative;
    width: 108px;
    min-width: 108px;
    border-top: 2px solid var(--category-color);
}

.score-cell.is-draft,
.event-heading.is-draft {
    background: #f4f4f4;
}

.score-status-control {
    width: 100%;
    min-height: 32px;
    padding: 4px;
    border: 1px solid #bbbbbb;
    border-radius: 4px;
    background: #ffffff;
    font-size: 12px;
}

.score-points-row {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    white-space: nowrap;
}

.score-points-row input {
    width: 72px;
    min-height: 31px;
    padding: 4px 5px;
    border: 1px solid #bbbbbb;
    border-radius: 4px;
}

.score-points-row input:disabled,
.score-status-control:disabled {
    background: #eeeeee;
    color: #666666;
}

.compact-score-editor {
    display: grid;
    grid-template-columns: minmax(42px, 1fr) auto auto;
    align-items: center;
    gap: 3px;
}

.compact-score-editor > input {
    width: 100%;
    min-width: 0;
    min-height: 31px;
    box-sizing: border-box;
    padding: 4px;
    border: 1px solid #bbbbbb;
    border-radius: 4px;
}

.compact-score-editor > input:disabled {
    background: #eeeeee;
    color: #666666;
}

.score-maximum {
    color: #666666;
    font-size: 10px;
    white-space: nowrap;
}

.score-status-menu {
    position: relative;
}

.score-status-menu summary {
    display: grid;
    width: 24px;
    height: 28px;
    place-items: center;
    border: 1px solid #aaaaaa;
    border-radius: 4px;
    background: #ffffff;
    cursor: pointer;
    font-weight: bold;
    list-style: none;
}

.score-status-menu summary::-webkit-details-marker {
    display: none;
}

.score-status-options {
    position: absolute;
    right: 0;
    z-index: 20;
    display: grid;
    width: 170px;
    padding: 5px;
    border: 1px solid #bbbbbb;
    border-radius: 6px;
    background: #ffffff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.score-status-options button {
    padding: 8px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.score-status-options button:hover,
.score-status-options button:focus {
    background: #edf3fb;
}

.score-status-chip {
    display: block;
    overflow: hidden;
    padding: 3px 5px;
    margin-top: 4px;
    border-radius: 4px;
    background: #eeeeee;
    font-size: 10px;
    font-weight: bold;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.score-status-chip[hidden] {
    display: none;
}

.score-status-chip.status-not_submitted {
    background: #f8dddd;
    color: #8d2727;
}

.score-status-chip.status-absent,
.score-status-chip.status-makeup_pending {
    background: #fff0c7;
    color: #76520d;
}

.score-status-chip.status-not_applicable {
    background: #e8e8e8;
    color: #555555;
}

.score-cell.has-exception-status {
    background-image: linear-gradient(
        rgba(255, 255, 255, 0.72),
        rgba(255, 255, 255, 0.72)
    );
}

.cell-save-state {
    display: block;
    min-height: 15px;
    margin-top: 4px;
    color: #666666;
    font-size: 10px;
}

.autosave-global {
    padding: 6px 10px;
    border-radius: 999px;
    background: #eeeeee;
    color: #555555;
    font-size: 13px;
    white-space: nowrap;
}

.is-saving {
    color: #80580d;
}

.autosave-global.is-saving {
    background: #fff0d6;
}

.is-saved {
    color: #27633a;
}

.autosave-global.is-saved {
    background: #e5f4e9;
}

.is-error {
    color: #9d2424;
}

.autosave-global.is-error {
    background: #fbe5e5;
}

.is-warning {
    color: #80580d;
}

.student-name-cell {
    text-align: left;
}

.student-name-cell .status-badge {
    display: block;
    width: fit-content;
    margin-top: 5px;
    font-size: 10px;
}

.summary-heading,
.summary-cell {
    width: 76px;
    min-width: 76px;
    max-width: 76px;
    padding-right: 4px;
    padding-left: 4px;
    text-align: center;
    white-space: normal;
}

.summary-heading.summary-bonus,
.summary-cell.summary-bonus {
    width: 58px;
    min-width: 58px;
    max-width: 58px;
}

.summary-heading.summary-percent,
.summary-cell.summary-percent {
    width: 68px;
    min-width: 68px;
    max-width: 68px;
}

.summary-cell {
    background: #f9fafc !important;
    font-weight: bold;
}

.empty-state {
    padding: 28px 20px;
    text-align: center;
}

.empty-state h3 {
    margin-top: 0;
}

.student-score-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 14px;
    margin: 24px 0;
}

.summary-tile {
    padding: 18px;
    border: 1px solid #dddddd;
    border-radius: 8px;
    background: #ffffff;
}

.summary-tile span {
    display: block;
    margin-bottom: 8px;
    color: #666666;
    font-size: 13px;
}

.summary-tile strong {
    font-size: 22px;
}

.summary-tile-primary {
    border-color: #222222;
    background: #222222;
    color: #ffffff;
}

.summary-tile-primary span {
    color: #dddddd;
}

.student-event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.student-event-card {
    padding: 16px;
    border: 1px solid #dddddd;
    border-top: 5px solid var(--category-color);
    border-radius: 7px;
    background: #ffffff;
}

.student-event-card h3 {
    margin: 14px 0 10px;
}

.student-event-heading {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: #666666;
    font-size: 12px;
}

.student-event-score {
    font-size: 18px;
}

.section-subnav {
    display: flex;
    gap: 8px;
    margin: 18px 0 24px;
    border-bottom: 1px solid #d7d7d7;
}

.section-subnav a {
    display: inline-block;
    padding: 10px 16px;
    color: #4f4f4f;
    text-decoration: none;
    border-bottom: 3px solid transparent;
}

.section-subnav a:hover,
.section-subnav a.is-active {
    color: #214d88;
    border-bottom-color: #5b8def;
}

.test-results-card {
    overflow: hidden;
}

.test-results-scroll {
    overflow-x: auto;
    margin-top: 18px;
}

.test-results-table {
    width: 100%;
    min-width: 1120px;
    border-collapse: collapse;
}

.test-results-table th,
.test-results-table td {
    padding: 10px;
    vertical-align: top;
    text-align: left;
    border-bottom: 1px solid #dddddd;
}

.test-results-table thead th {
    background: #f2f5f9;
    white-space: nowrap;
}

.test-results-table tbody tr:hover {
    background: #fafcff;
}

.test-results-table select,
.test-results-table input {
    width: 100%;
    min-width: 110px;
    box-sizing: border-box;
    padding: 8px;
    border: 1px solid #c8c8c8;
    border-radius: 5px;
    background: #ffffff;
}

.test-results-table input[data-role="override-reason"] {
    min-width: 220px;
}

.test-student-name {
    min-width: 180px;
}

.test-percent-field {
    display: flex;
    align-items: center;
    gap: 6px;
}

.test-percent-field input {
    min-width: 90px;
}

.test-grade-cell {
    text-align: center !important;
    font-size: 20px;
    font-weight: bold;
}

.test-publish-cell {
    min-width: 110px;
}

.test-save-state {
    display: block;
    min-height: 17px;
    margin-top: 5px;
    font-size: 12px;
}

.test-autosave-global,
.test-save-state {
    color: #666666;
}

.test-autosave-global.is-saving,
.test-save-state.is-saving {
    color: #214d88;
}

.test-autosave-global.is-saved,
.test-save-state.is-saved {
    color: #397847;
}

.test-autosave-global.is-warning,
.test-save-state.is-warning {
    color: #9a6815;
}

.test-autosave-global.is-error,
.test-save-state.is-error {
    color: #b23333;
}

.student-test-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(150px, 1fr));
    gap: 14px;
    margin: 22px 0;
}

.student-test-status {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 360px;
    padding: 22px;
    margin-top: 20px;
    border: 1px solid #d7d7d7;
    border-radius: 8px;
    background: #f7f9fc;
}

.student-test-status strong {
    font-size: 22px;
}

.publish-all-results-form {
    display: flex;
    justify-content: flex-end;
    margin: 16px 0 4px;
}

.closure-table-scroll {
    overflow-x: auto;
    margin-top: 18px;
}

.closure-table {
    width: 100%;
    min-width: 1040px;
    border-collapse: collapse;
}

.closure-table th,
.closure-table td {
    padding: 11px;
    vertical-align: top;
    text-align: left;
    border-bottom: 1px solid #dddddd;
}

.closure-table thead th {
    background: #f2f5f9;
    white-space: nowrap;
}

.closure-table tr.has-blocker {
    background: #fff8f4;
}

.closure-table select,
.closure-table input {
    width: 100%;
    min-width: 72px;
    box-sizing: border-box;
    padding: 8px;
    border: 1px solid #c7c7c7;
    border-radius: 5px;
    background: #ffffff;
}

.closure-table input {
    min-width: 220px;
}

.suggested-grade-display,
.final-grade-display {
    white-space: nowrap;
}

.suggested-grade-display span,
.final-grade-display span {
    display: inline-grid;
    width: 32px;
    height: 32px;
    place-items: center;
    margin-right: 4px;
    border-radius: 50%;
    background: #e4eefb;
    color: #214d88;
    font-weight: bold;
}

.closure-issues {
    min-width: 220px;
    padding-left: 18px;
    margin: 0;
    color: #9a3c2d;
    font-size: 12px;
}

.closure-ok {
    color: #397847;
    font-weight: bold;
}

.closure-submit-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 20px;
}

.correction-card {
    margin-top: 20px;
}

.correction-form {
    display: grid;
    gap: 10px;
    max-width: 720px;
}

.correction-form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid #bbbbbb;
    border-radius: 5px;
}

.summary-tile-final {
    border-color: #5b8def;
    background: #eef4fd;
}

.container.points-statistics-container {
    max-width: 100%;
}

.statistics-card {
    margin: 24px 0;
}

.statistics-card > h2:first-child,
.statistics-chart-grid h3 {
    margin-top: 0;
}

.statistics-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.points-chart {
    width: 100%;
    min-height: 220px;
    margin: 18px 0;
    overflow-x: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #ffffff;
}

.points-chart-svg {
    display: block;
    width: 100%;
    min-width: 620px;
    height: auto;
}

.chart-grid-line {
    stroke: #e3e6ea;
    stroke-width: 1;
}

.chart-axis-label {
    fill: #5f6368;
    font-size: 11px;
}

.chart-axis-title {
    fill: #333333;
    font-size: 12px;
    font-weight: bold;
}

.chart-series-line,
.chart-point,
.chart-bar {
    transition: opacity 0.15s ease;
}

.chart-series-line:hover,
.chart-point:hover,
.chart-bar:hover {
    opacity: 0.72;
}

.points-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    padding: 0 16px 14px;
    margin: 0;
    list-style: none;
}

.points-chart-legend li {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
}

.points-chart-legend span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.chart-empty {
    padding: 50px 20px;
    text-align: center;
}

.statistics-table th,
.statistics-table td {
    white-space: nowrap;
}

.grade-distribution-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.grade-distribution-cell span {
    padding: 3px 6px;
    border-radius: 4px;
    background: #edf1f7;
    font-size: 11px;
}

.student-statistics-selector {
    display: flex;
    align-items: end;
    gap: 9px;
}

.student-statistics-selector label {
    align-self: center;
    font-weight: bold;
}

.student-statistics-selector select {
    min-width: 220px;
    min-height: 40px;
    padding: 7px 9px;
    border: 1px solid #bbbbbb;
    border-radius: 5px;
    background: #ffffff;
}

.heatmap-scroll {
    max-width: 100%;
    overflow: auto;
}

.heatmap-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
}

.heatmap-table th,
.heatmap-table td {
    min-width: 105px;
    padding: 10px;
    border: 1px solid #d8d8d8;
    text-align: center;
}

.heatmap-table tbody th {
    position: sticky;
    left: 0;
    z-index: 2;
    min-width: 190px;
    background: #ffffff;
    text-align: left;
}

.heatmap-cell {
    font-weight: bold;
}

.heatmap-none {
    background: #f1f1f1;
    color: #777777;
}

.heatmap-one {
    background: #f8d7da;
    color: #842029;
}

.heatmap-two {
    background: #ffe5c2;
    color: #794b00;
}

.heatmap-three {
    background: #fff3bf;
    color: #664d03;
}

.heatmap-four {
    background: #d9ead3;
    color: #245225;
}

.heatmap-five {
    background: #bfe3c5;
    color: #14532d;
}

.heatmap-over {
    background: #cfe2ff;
    color: #084298;
}

.insight-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.insight-card {
    padding: 16px;
    border: 1px solid #e3c774;
    border-left: 5px solid #c28a00;
    border-radius: 7px;
    background: #fffaf0;
}

.insight-card h3,
.insight-card h4 {
    margin-top: 0;
    margin-bottom: 8px;
}

.insight-card p {
    margin: 7px 0;
}

.insight-card small {
    color: #6d561e;
}

@media (max-width: 900px) {
    .event-create-card,
    .event-create-form {
        grid-template-columns: 1fr;
    }

    .student-score-summary {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }

    .student-test-summary {
        grid-template-columns: 1fr;
    }

    .statistics-chart-grid,
    .insight-list {
        grid-template-columns: 1fr;
    }

    .student-statistics-selector {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }
}

@media (max-width: 600px) {
    .section-detail-heading,
    .score-table-card > .section-heading-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .student-score-summary {
        grid-template-columns: 1fr;
    }

    .section-subnav {
        overflow-x: auto;
    }

    .closure-submit-row {
        align-items: stretch;
        flex-direction: column;
    }
}

.fixed-boundary {
    min-height: 83px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border: 1px solid #dddddd;
    border-radius: 5px;
    background: #f7f7f7;
}

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

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #dddddd;
}

.login-wrapper {
    max-width: 440px;
    margin: 80px auto;
}

.login-card h1 {
    margin-bottom: 8px;
}

.form-group {
    margin: 20px 0;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #bbbbbb;
    border-radius: 5px;
    font-size: 16px;
}

.muted {
    color: #777777;
}

.error-box {
    padding: 12px;
    margin: 18px 0;
    border: 1px solid #cc0000;
    background: #fff3f3;
}

@media (max-width: 800px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .group-grid,
    .points-menu-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .data-table {
        font-size: 14px;
    }

    .form-grid.two-columns,
    .grade-boundary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .category-form-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 500px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 14px;
    }

    .group-grid,
    .points-menu-grid {
        grid-template-columns: 1fr;
    }

    .section-toolbar,
    .section-heading-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .form-grid.two-columns,
    .grade-boundary-grid,
    .category-form-row {
        grid-template-columns: 1fr;
    }
}

.message {
    padding: 14px 18px;
    margin-bottom: 20px;
    border: 1px solid #cccccc;
    border-radius: 6px;
    background: #ffffff;
}

.message.success {
    border-color: #4f8f5f;
}

.message.error {
    border-color: #b94a48;
}

pre {
    overflow-x: auto;
    padding: 16px;
    background: #f1f1f1;
    border-radius: 6px;
}
