:root {
    --bg: #f6f4ef;
    --surface: #ffffff;
    --panel: #fbfaf7;
    --ink: #1f2528;
    --muted: #6c7377;
    --line: #d9d5cb;
    --accent: #0f766e;
    --accent-dark: #115e59;
    --warn: #b45309;
    --danger: #b42318;
    --good: #18794e;
    --shadow: 0 12px 28px rgba(30, 35, 38, 0.08);
}

* {
    box-sizing: border-box;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.45;
}

a {
    color: var(--accent-dark);
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

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

.sidebar {
    background: #27221f;
    color: #fffaf1;
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-height: 100vh;
}

.sidebar-head {
    flex: 0 0 auto;
}

.sidebar-body {
    min-height: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.mobile-menu-toggle,
.mobile-menu-close,
.drawer-head,
.nav-backdrop {
    display: none;
}

.brand {
    display: flex;
    gap: 12px;
    align-items: center;
    color: inherit;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: #f2c14e;
    color: #27221f;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 22px;
}

.brand strong,
.brand small {
    display: block;
}

.brand small,
.user-box small {
    color: #d6cfc4;
}

.nav {
    display: grid;
    gap: 6px;
}

.nav-link {
    color: #fffaf1;
    padding: 10px 12px;
    border-radius: 8px;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.1);
}

.user-box {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    padding-top: 16px;
    display: grid;
    gap: 4px;
}

.user-box a {
    color: #f2c14e;
    margin-top: 8px;
}

.main {
    padding: 28px;
    min-width: 0;
}

.topbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 22px;
}

.topbar h1 {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
    letter-spacing: 0;
}

.eyebrow {
    margin: 0 0 5px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 12px;
    font-weight: 700;
}

.auth-layout {
    min-height: calc(100vh - 56px);
    display: grid;
    grid-template-columns: minmax(320px, 440px) minmax(260px, 1fr);
    gap: 24px;
    align-items: stretch;
}

.auth-layout.wide {
    grid-template-columns: minmax(420px, 720px) minmax(260px, 1fr);
}

.auth-panel,
.auth-note,
.panel,
.metric,
.empty-state {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.auth-panel {
    padding: 30px;
    align-self: center;
}

.auth-panel h2,
.panel h2,
.section-head h2,
.empty-state h2 {
    margin: 0 0 16px;
    font-size: 22px;
    letter-spacing: 0;
}

.auth-note {
    padding: 38px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 340px;
    background: #203a35;
    color: #fffaf1;
}

.auth-note .number {
    width: 92px;
    height: 92px;
    border-radius: 8px;
    background: #f2c14e;
    color: #203a35;
    display: grid;
    place-items: center;
    font-size: 34px;
    font-weight: 800;
    margin-bottom: 20px;
}

.auth-note p {
    color: #e2ddd2;
    max-width: 420px;
}

.auth-page {
    min-height: 100vh;
    overflow-x: hidden;
    background: #071817;
    position: relative;
}

.auth-page::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(5, 18, 19, 0.88) 0%, rgba(5, 18, 19, 0.72) 44%, rgba(5, 18, 19, 0.34) 100%),
        linear-gradient(180deg, rgba(6, 13, 18, 0.14) 0%, rgba(6, 13, 18, 0.78) 100%),
        url("/assets/login-background.svg");
    background-size: cover;
    background-position: center;
    transform: scale(1.04);
    animation: auth-bg-drift 18s ease-in-out infinite alternate;
    z-index: -2;
}

.auth-page::after {
    content: "";
    position: fixed;
    inset: 0;
    background: linear-gradient(115deg, transparent 0 38%, rgba(255, 255, 255, 0.12) 46%, transparent 55% 100%);
    mix-blend-mode: screen;
    opacity: 0.45;
    transform: translateX(-22%);
    animation: auth-light-sweep 8s ease-in-out infinite;
    z-index: -1;
    pointer-events: none;
}

.auth-shell {
    display: block;
    min-height: 100svh;
}

.auth-main {
    min-height: 100svh;
    padding: clamp(16px, 4vw, 42px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 16px;
    position: relative;
}

.auth-main > .notice {
    width: min(100%, 720px);
    margin: 0;
    animation: auth-rise 0.45s ease both;
}

.auth-stage {
    width: min(1120px, 100%);
    min-height: min(720px, calc(100svh - 84px));
    display: grid;
    grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 430px) minmax(260px, 0.8fr);
    gap: clamp(16px, 3vw, 30px);
    align-items: center;
}

.login-stage {
    width: min(980px, 100%);
    grid-template-columns: minmax(280px, 1fr) minmax(320px, 430px);
    gap: clamp(24px, 6vw, 72px);
}

.register-stage {
    grid-template-columns: minmax(250px, 0.85fr) minmax(380px, 580px) minmax(230px, 0.65fr);
}

.auth-copy,
.auth-page .auth-panel,
.auth-visual {
    animation: auth-rise 0.6s ease both;
}

.auth-copy {
    display: grid;
    gap: clamp(20px, 4vw, 34px);
    align-content: center;
}

.auth-copy .eyebrow {
    color: rgba(255, 250, 241, 0.72);
}

.auth-panel .eyebrow {
    color: #657074;
}

.auth-brand-inline {
    color: #fffaf1;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: fit-content;
}

.auth-brand-inline .brand-mark {
    box-shadow: 0 14px 26px rgba(242, 193, 78, 0.34);
    animation: mark-pop 0.7s ease both;
}

.auth-brand-inline strong,
.auth-brand-inline small {
    display: block;
}

.auth-brand-inline strong {
    font-size: 15px;
}

.auth-brand-inline small {
    color: rgba(255, 250, 241, 0.76);
    margin-top: 2px;
}

.auth-message h1 {
    margin: 0;
    max-width: 520px;
    font-size: clamp(36px, 5vw, 62px);
    line-height: 0.98;
    letter-spacing: 0;
    color: #fffaf1;
    text-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
}

.auth-message p:not(.eyebrow) {
    margin: 18px 0 0;
    max-width: 480px;
    color: rgba(255, 250, 241, 0.82);
    font-size: clamp(16px, 2vw, 19px);
}

.auth-highlights,
.approval-flow {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.auth-highlights span,
.approval-flow span {
    border: 1px solid rgba(15, 118, 110, 0.22);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
    padding: 8px 10px;
    color: #334044;
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(31, 37, 40, 0.05);
}

.approval-flow span {
    position: relative;
}

.auth-page .auth-panel {
    width: 100%;
    align-self: center;
    padding: clamp(22px, 4vw, 34px);
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(255, 255, 255, 0.52);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(22px) saturate(1.08);
    animation-delay: 0.08s;
}

.login-panel {
    position: relative;
    overflow: hidden;
}

.login-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(120deg, transparent 0 28%, rgba(255, 255, 255, 0.42) 42%, transparent 58% 100%);
    transform: translateX(-130%);
    animation: panel-shine 6.5s ease-in-out infinite;
    pointer-events: none;
}

.auth-page .auth-panel::before {
    content: "";
    display: block;
    width: 54px;
    height: 4px;
    margin-bottom: 22px;
    border-radius: 999px;
    background: var(--accent);
}

.auth-page .auth-panel h2 {
    font-size: clamp(28px, 5vw, 40px);
    margin-bottom: 20px;
}

.auth-page .form {
    gap: 16px;
}

.auth-page .form label {
    color: #3f4a4e;
}

.auth-page .form input {
    min-height: 52px;
    border-color: #cfc9bd;
    background: rgba(255, 255, 255, 0.88);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.auth-page .form input:focus {
    transform: translateY(-1px);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.15), 0 10px 20px rgba(15, 118, 110, 0.08);
}

.auth-page .btn.primary {
    min-height: 52px;
    margin-top: 2px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.auth-page .btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(15, 118, 110, 0.2);
}

.auth-page .muted {
    margin: 18px 0 0;
    font-size: 15px;
    color: #687276;
}

.auth-page .muted a {
    color: var(--accent-dark);
    font-weight: 800;
}

.auth-visual {
    position: relative;
    min-height: 440px;
    border-radius: 8px;
    overflow: hidden;
    color: #fffaf1;
    background:
        linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        #203a35;
    background-size: 34px 34px, 34px 34px, 100% 100%;
    box-shadow: 0 26px 70px rgba(32, 58, 53, 0.28);
    animation-delay: 0.16s;
}

.auth-visual::before {
    content: "";
    position: absolute;
    inset: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
}

.auth-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        -18deg,
        transparent 0 34px,
        rgba(242, 193, 78, 0.13) 34px 36px
    );
    animation: sheet-scan 7s linear infinite;
}

.sheet-line {
    position: absolute;
    height: 1px;
    left: 9%;
    right: 9%;
    background: rgba(242, 193, 78, 0.42);
    transform-origin: left center;
    z-index: 1;
}

.sheet-line.one {
    top: 30%;
    animation: line-grow 2.8s ease-in-out infinite;
}

.sheet-line.two {
    bottom: 26%;
    animation: line-grow 3.4s ease-in-out infinite;
    animation-delay: 0.35s;
}

.score-board,
.approval-card {
    position: absolute;
    inset: auto 28px 32px 28px;
    z-index: 2;
    display: grid;
    gap: 14px;
}

.score-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.score-top span,
.score-row span,
.score-result span {
    color: #ddd8cd;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.score-top strong {
    width: 76px;
    height: 76px;
    border-radius: 8px;
    background: #f2c14e;
    color: #203a35;
    display: grid;
    place-items: center;
    font-size: 32px;
    box-shadow: 0 16px 36px rgba(242, 193, 78, 0.22);
    animation: mark-pulse 2.8s ease-in-out infinite;
}

.score-row {
    display: grid;
    grid-template-columns: 1fr 44px;
    gap: 8px 12px;
    align-items: center;
}

.score-row b {
    text-align: right;
    font-size: 20px;
}

.score-row i {
    grid-column: 1 / -1;
    height: 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
}

.score-row i::before {
    content: "";
    display: block;
    height: 100%;
    width: var(--w);
    border-radius: inherit;
    background: #f2c14e;
    transform-origin: left center;
    animation: bar-fill 1.2s ease both;
}

.score-result {
    margin-top: 6px;
    padding: 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.13);
}

.score-result strong {
    display: block;
    margin-top: 5px;
    color: #f2c14e;
    font-size: 20px;
}

.approval-card {
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    padding: 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
}

.approval-card h3 {
    margin: 0;
    font-size: 28px;
}

.approval-card p {
    margin: 0;
    color: #e2ddd2;
}

.approval-dot {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: #f2c14e;
    box-shadow: 0 0 0 0 rgba(242, 193, 78, 0.46);
    animation: approval-ping 1.8s ease-out infinite;
}

.form {
    display: grid;
    gap: 14px;
}

.form label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.form input,
.form select,
.form textarea,
.filter select,
.mark-input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    background: #fff;
    color: var(--ink);
    outline: none;
}

.form input:focus,
.form select:focus,
.form textarea:focus,
.filter select:focus,
.mark-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

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

.span-two {
    grid-column: 1 / -1;
}

.stack {
    display: grid;
    gap: 16px;
}

.btn {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    min-height: 40px;
    padding: 9px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 750;
    white-space: nowrap;
}

.btn:hover {
    border-color: var(--accent);
}

.btn.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.btn.primary:hover {
    background: var(--accent-dark);
}

.btn.quiet {
    background: transparent;
}

.btn.small {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 13px;
}

.form-actions,
.quick-actions,
.row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.quick-actions {
    justify-content: flex-start;
    margin-bottom: 24px;
}

.dashboard-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.action-card {
    min-height: 84px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 8px 20px rgba(30, 35, 38, 0.05);
}

.action-card:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.action-card span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.action-card strong {
    margin-top: 8px;
    font-size: 17px;
    line-height: 1.15;
}

.action-card.primary-action {
    background: #123d39;
    border-color: #123d39;
    color: #fff;
}

.action-card.primary-action span {
    color: #c9dad6;
}

.muted,
.hint {
    color: var(--muted);
}

.hint {
    margin: 0;
    font-size: 13px;
}

.link {
    font-weight: 750;
}

.notice {
    border: 1px solid var(--line);
    border-left: 4px solid var(--accent);
    background: var(--surface);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 16px;
}

.notice.success {
    border-left-color: var(--good);
}

.notice.error {
    border-left-color: var(--danger);
}

.metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.compact-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric {
    padding: 18px;
}

.metric span {
    display: block;
    color: var(--muted);
    font-weight: 750;
    font-size: 13px;
}

.metric strong {
    display: block;
    margin-top: 8px;
    font-size: 34px;
    line-height: 1;
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin: 24px 0 12px;
}

.section-head.compact {
    margin-top: 0;
}

.section-head.lower {
    margin-top: 34px;
}

.section-head p {
    margin: -8px 0 0;
    color: var(--muted);
}

.split {
    display: grid;
    grid-template-columns: minmax(280px, 360px) 1fr;
    gap: 20px;
    align-items: start;
}

.split > *,
.report-layout > * {
    min-width: 0;
}

.panel {
    padding: 20px;
}

.table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px;
}

th,
td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

th {
    background: var(--panel);
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

td strong,
td small {
    display: block;
}

td small {
    margin-top: 3px;
    color: var(--muted);
}

tr:last-child td {
    border-bottom: 0;
}

.inline-form {
    margin: 0;
}

.filter {
    min-width: 210px;
}

.empty-state {
    max-width: 680px;
    padding: 42px;
}

.empty-state p {
    color: var(--muted);
    max-width: 560px;
}

.status-dot {
    width: 12px;
    height: 12px;
    display: inline-block;
    border-radius: 999px;
    background: var(--warn);
    margin-bottom: 18px;
}

.exam-strip {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    background: #203a35;
    color: #fffaf1;
    border-radius: 8px;
    padding: 16px 18px;
    margin-bottom: 16px;
}

.exam-strip span,
.exam-strip small {
    display: block;
    color: #dcd7cc;
}

.exam-strip > div:last-child {
    text-align: right;
}

.mark-form .table-wrap {
    margin-bottom: 16px;
}

.mark-input {
    max-width: 110px;
}

.badge {
    display: inline-flex;
    min-width: 104px;
    justify-content: center;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 800;
}

.badge.good {
    color: #0f5132;
    background: #dff4e8;
}

.badge.bad {
    color: #842029;
    background: #f8d7da;
}

.report-layout {
    display: grid;
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.report-controls {
    position: sticky;
    top: 22px;
}

.report-preview {
    min-width: 0;
    max-width: 820px;
}

.report-sheet {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: clamp(16px, 2.5vw, 24px);
}

.report-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 16px;
}

.report-title h2 {
    margin: 0;
    font-size: 24px;
}

.report-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.report-meta span {
    min-height: 56px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--ink);
    background: var(--panel);
}

.report-meta strong {
    display: block;
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}

.summary-table {
    max-width: 650px;
    border: 1px solid #9aa5a9;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.summary-row {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(100px, 0.7fr);
    min-height: 34px;
    border-bottom: 1px solid #aeb8bc;
}

.summary-row:last-child {
    border-bottom: 0;
}

.summary-row span,
.summary-row strong {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    font-size: clamp(14px, 1.45vw, 17px);
    line-height: 1.1;
}

.summary-row span {
    font-weight: 850;
}

.summary-row strong {
    justify-content: flex-end;
    border-left: 1px solid #aeb8bc;
}

.summary-row.tone-amber span {
    background: #f8ecd0;
    color: #8f4e3f;
}

.summary-row.tone-amber strong {
    background: #e6b347;
    color: #263238;
}

.summary-row.tone-green span {
    background: #dcefe4;
    color: #174c43;
}

.summary-row.tone-green strong {
    background: #c2dec9;
    color: #174c43;
}

.summary-row.tone-peach span {
    background: #f6dfd2;
    color: #4b4163;
}

.summary-row.tone-peach strong {
    background: #eec6b0;
    color: #4b4163;
}

.summary-row.tone-red span,
.summary-row.tone-red strong {
    background: #b9564c;
    color: #fff4d2;
}

.summary-row.tone-blue span {
    background: #dbeaf4;
    color: #27364a;
}

.summary-row.tone-blue strong {
    background: #c8deec;
    color: #27364a;
}

.summary-row.tone-mint span {
    background: #dcebe2;
    color: #263838;
}

.summary-row.tone-mint strong {
    background: #c8ded0;
    color: #263838;
}

.range-table {
    max-width: 520px;
    border: 1px solid #9aa5a9;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.range-row {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(80px, 0.65fr) minmax(80px, 0.65fr);
    min-height: 38px;
    border-bottom: 1px solid #aeb8bc;
}

.range-row:last-child {
    border-bottom: 0;
}

.range-row span,
.range-row strong {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    font-size: 15px;
    line-height: 1.15;
}

.range-row span {
    font-weight: 850;
}

.range-row strong {
    justify-content: flex-end;
    border-left: 1px solid #aeb8bc;
}

.range-row:not(.range-head):nth-child(odd) span,
.range-row:not(.range-head):nth-child(odd) strong {
    background: #f4f8f7;
}

.range-row:not(.range-head):nth-child(even) span,
.range-row:not(.range-head):nth-child(even) strong {
    background: #eaf2f0;
}

.range-head span,
.range-head strong {
    background: #143c39;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 12px;
}

.detail-report-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px solid #cfd8d5;
    border-radius: 8px;
    background: #eef6f3;
}

.detail-report-head span {
    display: flex;
    align-items: center;
    gap: 12px;
}

.detail-report-head strong {
    color: #536064;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.detail-report-head em {
    min-width: 42px;
    min-height: 34px;
    border-radius: 8px;
    background: #143c39;
    color: #fff;
    display: grid;
    place-items: center;
    font-style: normal;
    font-size: 20px;
    font-weight: 850;
}

.detail-report-head p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    text-align: right;
}

.report-detail-table {
    box-shadow: none;
}

.report-detail-table table {
    min-width: 720px;
}

.mark-warn {
    display: inline-flex;
    border-radius: 999px;
    padding: 5px 9px;
    background: #f8d7da;
    color: #842029;
    font-size: 12px;
    font-weight: 850;
}

.below40-school-group {
    border: 1px solid #cfd8d5;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 16px;
    background: #fff;
}

.school-group-head,
.class-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.school-group-head {
    padding: 12px 14px;
    background: #143c39;
    color: #fff;
}

.class-group {
    border-top: 1px solid #d9e3df;
}

.class-group-head {
    padding: 10px 14px;
    background: #edf6f3;
}

.school-group-head strong,
.class-group-head strong {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.78;
}

.school-group-head span,
.class-group-head span {
    display: block;
    margin-top: 2px;
    font-weight: 850;
}

.school-group-head em,
.class-group-head em {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 5px 9px;
    font-style: normal;
    font-size: 12px;
    font-weight: 850;
}

.school-group-head em {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.class-group-head em {
    background: #d9ebe5;
    color: #143c39;
}

.below40-school-group .table-wrap {
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
}

.report-controls select[multiple] {
    min-height: 128px;
    padding: 8px;
}

@keyframes auth-rise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes auth-bg-drift {
    from {
        transform: scale(1.04) translate3d(-12px, -8px, 0);
    }
    to {
        transform: scale(1.08) translate3d(12px, 8px, 0);
    }
}

@keyframes auth-light-sweep {
    0%,
    38% {
        transform: translateX(-28%);
        opacity: 0;
    }
    52% {
        opacity: 0.48;
    }
    72%,
    100% {
        transform: translateX(28%);
        opacity: 0;
    }
}

@keyframes panel-shine {
    0%,
    46% {
        transform: translateX(-130%);
        opacity: 0;
    }
    55% {
        opacity: 0.55;
    }
    72%,
    100% {
        transform: translateX(130%);
        opacity: 0;
    }
}

@keyframes mark-pop {
    from {
        opacity: 0;
        transform: scale(0.86) rotate(-4deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}

@keyframes mark-pulse {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

@keyframes sheet-scan {
    from {
        transform: translateX(-48px);
    }
    to {
        transform: translateX(48px);
    }
}

@keyframes line-grow {
    0%,
    100% {
        transform: scaleX(0.35);
        opacity: 0.28;
    }
    50% {
        transform: scaleX(1);
        opacity: 0.72;
    }
}

@keyframes bar-fill {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

@keyframes approval-ping {
    0% {
        box-shadow: 0 0 0 0 rgba(242, 193, 78, 0.44);
    }
    70% {
        box-shadow: 0 0 0 18px rgba(242, 193, 78, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(242, 193, 78, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

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

    .sidebar {
        min-height: 60px;
        height: 60px;
        position: sticky;
        top: 0;
        z-index: 50;
        display: block;
        padding: 10px 14px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 6px 18px rgba(31, 25, 21, 0.14);
    }

    .sidebar-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
    }

    .brand {
        gap: 10px;
    }

    .brand-mark {
        width: 36px;
        height: 36px;
        font-size: 19px;
    }

    .brand strong {
        font-size: 14px;
    }

    .brand small {
        font-size: 12px;
    }

    .mobile-menu-toggle {
        width: 42px;
        height: 40px;
        border: 1px solid rgba(255, 255, 255, 0.18);
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.07);
        display: grid;
        place-content: center;
        gap: 4px;
        cursor: pointer;
    }

    .mobile-menu-toggle span {
        width: 19px;
        height: 2px;
        border-radius: 2px;
        background: #fffaf1;
    }

    .sidebar-body {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 42;
        width: min(86vw, 320px);
        min-height: 100dvh;
        padding: 18px;
        background: #27221f;
        box-shadow: 18px 0 44px rgba(18, 15, 13, 0.28);
        transform: translateX(-102%);
        visibility: hidden;
        transition: transform 180ms ease, visibility 180ms ease;
        gap: 18px;
    }

    .nav-open .sidebar-body {
        transform: translateX(0);
        visibility: visible;
    }

    .drawer-head {
        min-height: 46px;
        padding-bottom: 14px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.16);
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
    }

    .drawer-head strong,
    .drawer-head small {
        display: block;
    }

    .drawer-head small {
        margin-top: 2px;
        color: #d6cfc4;
        font-size: 12px;
    }

    .mobile-menu-close {
        width: 42px;
        height: 42px;
        border: 0;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.08);
        color: #fffaf1;
        display: grid;
        place-items: center;
        font-size: 28px;
        line-height: 1;
        cursor: pointer;
    }

    .nav-backdrop {
        position: fixed;
        inset: 0;
        z-index: 40;
        border: 0;
        background: rgba(12, 15, 15, 0.54);
        opacity: 0;
        visibility: hidden;
        transition: opacity 180ms ease, visibility 180ms ease;
    }

    .nav-open .nav-backdrop {
        display: block;
        opacity: 1;
        visibility: visible;
    }

    .nav-open {
        overflow: hidden;
    }

    .nav {
        display: grid;
        gap: 5px;
        overflow-y: auto;
    }

    .nav-link {
        min-height: 46px;
        padding: 12px 13px;
        border-radius: 7px;
        display: flex;
        align-items: center;
        background: transparent;
        text-align: left;
        font-size: 15px;
    }

    .nav-link.active {
        background: #f2c14e;
        color: #27221f;
    }

    .user-box {
        display: grid;
        grid-template-columns: 1fr;
        gap: 3px;
        margin-top: auto;
        padding-top: 14px;
        font-size: 14px;
    }

    .user-box span,
    .user-box small {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .user-box a {
        grid-row: auto;
        margin-top: 10px;
        min-height: 44px;
        border-radius: 7px;
        background: rgba(242, 193, 78, 0.12);
        padding: 11px 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        font-weight: 800;
    }

    .main {
        padding: 22px;
    }

    .topbar {
        margin-bottom: 16px;
    }

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

    .auth-layout,
    .auth-layout.wide,
    .auth-stage,
    .register-stage,
    .report-layout,
    .split {
        grid-template-columns: 1fr;
    }

    .report-controls {
        position: static;
    }

    .report-meta {
        grid-template-columns: 1fr;
    }

    .auth-stage {
        width: min(620px, 100%);
        min-height: auto;
        gap: 18px;
    }

    .auth-copy {
        gap: 18px;
    }

    .auth-message h1 {
        max-width: 620px;
    }

    .auth-visual {
        min-height: 280px;
    }

    .score-board {
        inset: auto 24px 24px 24px;
    }

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

    .metric {
        padding: 15px;
    }

    .metric strong {
        font-size: 30px;
    }
}

@media (max-width: 640px) {
    .main {
        padding: 16px 14px 20px;
    }

    .auth-main {
        padding: 14px;
        justify-content: flex-start;
    }

    .auth-stage {
        width: 100%;
        gap: 14px;
    }

    .auth-brand-inline .brand-mark {
        width: 38px;
        height: 38px;
        font-size: 20px;
    }

    .auth-message h1 {
        font-size: 34px;
        line-height: 1.03;
    }

    .auth-message p:not(.eyebrow) {
        margin-top: 12px;
        font-size: 15px;
    }

    .auth-highlights,
    .approval-flow {
        gap: 8px;
    }

    .auth-highlights span,
    .approval-flow span {
        flex: 1 1 140px;
        text-align: center;
    }

    .auth-page .auth-panel {
        padding: 20px;
    }

    .auth-page .auth-panel h2 {
        font-size: 30px;
        margin-bottom: 16px;
    }

    .auth-page .form input,
    .auth-page .btn.primary {
        min-height: 50px;
    }

    .auth-visual {
        min-height: 200px;
    }

    .score-board,
    .approval-card {
        inset: 16px;
        gap: 9px;
    }

    .score-top {
        padding-bottom: 9px;
    }

    .score-top strong {
        width: 54px;
        height: 54px;
        font-size: 24px;
    }

    .score-row {
        grid-template-columns: 1fr 36px;
        gap: 5px 10px;
    }

    .score-row b {
        font-size: 18px;
    }

    .score-row i {
        height: 7px;
    }

    .score-result {
        display: none;
    }

    .approval-card {
        transform: none;
        padding: 18px;
        align-content: center;
    }

    .approval-card h3 {
        font-size: 24px;
    }

    .sidebar {
        padding: 10px 12px;
    }

    .brand-mark {
        width: 34px;
        height: 34px;
        font-size: 18px;
    }

    .brand small {
        display: none;
    }

    .grid.two,
    .compact-metrics {
        grid-template-columns: 1fr;
    }

    .metrics,
    .dashboard-metrics,
    .dashboard-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .metric {
        padding: 13px;
    }

    .metric span {
        font-size: 12px;
    }

    .metric strong {
        font-size: 27px;
    }

    .action-card {
        min-height: 76px;
        padding: 12px;
    }

    .action-card strong {
        font-size: 15px;
    }

    .auth-panel,
    .auth-note,
    .panel,
    .empty-state {
        padding: 16px;
    }

    .topbar h1 {
        font-size: 26px;
    }

    .topbar {
        align-items: flex-start;
        margin-bottom: 14px;
    }

    .topbar .eyebrow {
        display: none;
    }

    .form-actions,
    .quick-actions {
        justify-content: stretch;
    }

    .btn {
        width: 100%;
        min-height: 46px;
    }

    .form input,
    .form select,
    .form textarea,
    .filter select,
    .mark-input {
        min-height: 46px;
        font-size: 16px;
    }

    .panel {
        box-shadow: 0 5px 16px rgba(30, 35, 38, 0.06);
    }

    .report-controls select[multiple] {
        min-height: 96px;
    }

    .section-head,
    .exam-strip {
        align-items: stretch;
        flex-direction: column;
    }

    .exam-strip > div:last-child {
        text-align: left;
    }

    table {
        min-width: 620px;
    }

    .summary-row {
        grid-template-columns: minmax(0, 1fr) minmax(84px, 0.55fr);
        min-height: 34px;
    }

    .summary-row span,
    .summary-row strong {
        padding: 8px 10px;
        font-size: 14px;
    }

    .detail-report-head {
        align-items: stretch;
        flex-direction: column;
    }

    .detail-report-head span {
        justify-content: space-between;
    }

    .detail-report-head p {
        text-align: left;
    }

    .school-group-head,
    .class-group-head {
        align-items: flex-start;
        flex-direction: column;
    }
}
