@page {
    size: A4 landscape;
    margin: 0;
}

:root {
    --bg: #f4f7fb;
    --panel: #ffffff;
    --panel-soft: #f9fbfd;
    --ink: #142033;
    --muted: #6a7688;
    --line: #dde5ee;
    --blue: #174ea6;
    --blue-2: #2b6fd6;
    --burgundy: #8f2639;
    --green: #16825d;
    --amber: #a66a00;
    --red: #c83232;
    --shadow: 0 18px 50px rgba(25, 40, 68, 0.10);
    --radius: 14px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 10% 0%, rgba(23, 78, 166, 0.11), transparent 32rem),
        linear-gradient(135deg, #f6f9fd 0%, #eef3f8 100%);
    color: var(--ink);
    font-family: "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

button, input, select {
    font: inherit;
}

button {
    cursor: pointer;
}

.app-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 28px 22px;
    background: rgba(255, 255, 255, 0.82);
    border-right: 1px solid rgba(221, 229, 238, 0.9);
    backdrop-filter: blur(18px);
}

.brand {
    display: flex;
    gap: 13px;
    align-items: center;
    margin-bottom: 28px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--blue), var(--burgundy));
    color: #fff;
    font-weight: 800;
    box-shadow: 0 14px 30px rgba(23, 78, 166, 0.24);
}

.brand-eyebrow,
.page-kicker,
.section-label,
.sidebar-label {
    margin: 0;
    color: var(--blue);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.brand h1 {
    margin: 2px 0 0;
    font-size: 18px;
    line-height: 1.25;
}

.role-switch {
    display: grid;
    gap: 8px;
    padding: 6px;
    background: #edf2f8;
    border: 1px solid var(--line);
    border-radius: 16px;
    margin-bottom: 28px;
}

.role-btn {
    border: 0;
    border-radius: 11px;
    padding: 11px 12px;
    background: transparent;
    color: var(--muted);
    font-weight: 800;
    text-align: left;
}

.role-btn.active {
    background: #fff;
    color: var(--blue);
    box-shadow: 0 8px 20px rgba(25, 40, 68, 0.10);
}

.sidebar-section,
.security-note {
    margin-top: 20px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(249, 251, 253, 0.86);
}

.scope-list {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.scope-list span {
    padding: 9px 10px;
    border-radius: 10px;
    background: #fff;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.security-note strong {
    display: block;
    margin-bottom: 6px;
    color: var(--burgundy);
}

.security-note p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}

.main {
    min-width: 0;
    padding: 26px 32px 42px;
}

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

.topbar h2 {
    margin: 4px 0 0;
    font-size: 28px;
    letter-spacing: -0.02em;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.select-control,
.search-input {
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0 13px;
    background: #fff;
    color: var(--ink);
    outline: none;
}

.search-input {
    min-width: 240px;
}

.select-control:focus,
.search-input:focus {
    border-color: var(--blue-2);
    box-shadow: 0 0 0 4px rgba(43, 111, 214, 0.12);
}

.view {
    display: none;
}

.view.active {
    display: block;
}

.student-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px;
    background: linear-gradient(135deg, #102b58 0%, #174ea6 58%, #7c2437 100%);
    color: #fff;
    border-radius: 22px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.student-hero h3 {
    margin: 10px 0 4px;
    font-size: 29px;
}

.student-hero p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
}

.decision-card {
    min-width: 310px;
    padding: 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.decision-card strong {
    display: block;
    font-size: 30px;
    margin-top: 4px;
}

.layout-grid {
    display: grid;
    gap: 20px;
}

.student-grid {
    grid-template-columns: 380px minmax(0, 1fr);
    align-items: start;
}

.admin-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
    align-items: start;
    margin-bottom: 20px;
}

.panel {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(221, 229, 238, 0.96);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 20px;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 16px;
}

.panel-head h3 {
    margin: 3px 0 0;
    font-size: 19px;
}

.panel-subhead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.panel-subhead h3 {
    margin: 3px 0 0;
    font-size: 16px;
}

.panel-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.small-muted {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.exam-list,
.session-list,
.audit-list {
    display: grid;
    gap: 10px;
}

.exam-card,
.session-card {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px;
    background: var(--panel-soft);
    transition: 0.2s ease;
}

.exam-card {
    cursor: pointer;
}

.exam-card:hover,
.exam-card.active {
    border-color: rgba(23, 78, 166, 0.45);
    background: #fff;
    transform: translateY(-1px);
}

.exam-card.active {
    box-shadow: 0 10px 26px rgba(23, 78, 166, 0.14);
}

.exam-card h4,
.session-card h4 {
    margin: 8px 0 4px;
    font-size: 15px;
}

.student-requirements-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
}

.student-requirements-grid .panel {
    height: 100%;
}

.pass-criteria-table-wrap {
    width: 100%;
    overflow-x: hidden;
}

.pass-criteria-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    border: 1px solid var(--line);
}

.pass-criteria-table th,
.pass-criteria-table td {
    text-align: center;
    border-right: 1px solid var(--line);
    padding: 10px 6px;
    font-size: 12px;
    white-space: nowrap;
}

.pass-criteria-table th:nth-child(1),
.pass-criteria-table td:nth-child(1) {
    width: 20%;
}

.pass-criteria-table th:nth-child(2),
.pass-criteria-table td:nth-child(2),
.pass-criteria-table th:nth-child(3),
.pass-criteria-table td:nth-child(3),
.pass-criteria-table th:nth-child(4),
.pass-criteria-table td:nth-child(4),
.pass-criteria-table th:nth-child(5),
.pass-criteria-table td:nth-child(5) {
    width: 15%;
}

.pass-criteria-table th:nth-child(6),
.pass-criteria-table td:nth-child(6) {
    width: 20%;
}

.pass-criteria-table th:last-child,
.pass-criteria-table td:last-child {
    border-right: 0;
}

.pass-criteria-table tbody th {
    background: #fff;
    color: var(--ink);
    font-size: 13px;
    font-weight: 900;
}

.pass-criteria-table tr:hover th,
.pass-criteria-table tr:hover td {
    background: #fbfdff;
}

#student-exam-list {
    display: grid;
    gap: 10px;
}

.history-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-radius: 8px;
}

.history-card h4 {
    margin: 0 0 4px;
    font-size: 15px;
}

.history-copy {
    min-width: 0;
}

.history-copy p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
}

.history-view-btn {
    min-width: 58px;
    flex: 0 0 auto;
}

.admin-session-actions {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.card-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.status-pill,
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    border-radius: 999px;
    padding: 3px 9px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.success { color: var(--green); background: rgba(22, 130, 93, 0.12); }
.warning { color: var(--amber); background: rgba(166, 106, 0, 0.12); }
.danger { color: var(--red); background: rgba(200, 50, 50, 0.12); }
.info { color: var(--blue); background: rgba(23, 78, 166, 0.12); }
.neutral { color: var(--muted); background: #eef2f6; }

.segmented-control {
    display: flex;
    padding: 4px;
    border-radius: 12px;
    background: #edf2f8;
    border: 1px solid var(--line);
}

.segmented-control button {
    border: 0;
    border-radius: 9px;
    padding: 8px 11px;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.segmented-control button.active {
    background: #fff;
    color: var(--blue);
    box-shadow: 0 6px 18px rgba(25, 40, 68, 0.10);
}

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

.summary-tile,
.metric-card,
.decision-item {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel-soft);
}

.summary-tile span,
.metric-card span,
.decision-item span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.summary-tile strong,
.metric-card strong,
.decision-item strong {
    display: block;
    margin-top: 5px;
    font-size: 23px;
    letter-spacing: -0.02em;
}

.subject-grid,
.decision-grid,
.metric-grid {
    display: grid;
    gap: 12px;
}

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

.decision-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.subject-card {
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
}

.subject-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: #f5f8fc;
    border-bottom: 1px solid var(--line);
}

.subject-head h4 {
    margin: 0;
}

.score-lines {
    padding: 12px 14px;
    display: grid;
    gap: 8px;
}

.score-line {
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 13px;
}

.score-line strong {
    color: var(--ink);
}

.compare-table,
.table-wrap {
    width: 100%;
    overflow-x: auto;
}

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

th {
    background: #f5f8fc;
    color: var(--muted);
    font-size: 12px;
    text-align: left;
    padding: 11px 12px;
    border-bottom: 1px solid var(--line);
}

td {
    padding: 12px;
    border-bottom: 1px solid #edf2f6;
    font-size: 13px;
    vertical-align: middle;
}

tr:hover td {
    background: #fbfdff;
}

.primary-btn,
.ghost-btn,
.icon-btn {
    min-height: 40px;
    border-radius: 12px;
    border: 1px solid transparent;
    padding: 0 14px;
    font-weight: 800;
}

.primary-btn {
    background: linear-gradient(135deg, var(--blue), var(--blue-2));
    color: #fff;
    box-shadow: 0 10px 22px rgba(23, 78, 166, 0.2);
}

.ghost-btn {
    background: #fff;
    border-color: var(--line);
    color: var(--ink);
}

.icon-btn {
    width: 38px;
    padding: 0;
    background: #f0f4f8;
    color: var(--muted);
    font-size: 22px;
}

.full {
    width: 100%;
}

.upload-box {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 16px;
    border: 1px dashed rgba(23, 78, 166, 0.35);
    border-radius: 16px;
    background: #f7fbff;
    margin-bottom: 12px;
}

.upload-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 14px;
    background: rgba(22, 130, 93, 0.12);
    color: var(--green);
    font-weight: 800;
    text-transform: uppercase;
}

.upload-box p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.upload-controls {
    display: grid;
    grid-template-columns: minmax(150px, 0.75fr) minmax(0, 1.25fr);
    gap: 10px;
    margin-bottom: 10px;
}

.file-picker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--blue);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.file-picker input {
    display: none;
}

.upload-help {
    margin: 0 0 12px;
    line-height: 1.55;
}

.student-report-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.student-report-filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(140px, 1fr)) minmax(160px, auto);
    gap: 10px;
    align-items: end;
    margin-bottom: 14px;
}

.student-report-filters label {
    display: grid;
    gap: 6px;
}

.student-report-filters label span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.student-filter-summary {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-align: right;
}

.parser-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fbfcfe;
}

.parser-status-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 24px;
    padding: 3px 8px;
    border: 1px solid #e5ebf3;
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}

.parser-status-item b {
    color: #405fb4;
    font-weight: 900;
}

.admin-aux-tabs {
    display: inline-flex;
    gap: 4px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.admin-aux-tab {
    min-height: 34px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    padding: 0 14px;
    font-size: 12px;
    font-weight: 900;
}

.admin-aux-tab.active {
    background: #fff;
    color: #405fb4;
    box-shadow: 0 1px 4px rgba(20, 32, 51, 0.08);
}

.admin-aux-pane {
    display: none;
}

.admin-aux-pane.active {
    display: block;
}

.student-report-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.student-report-actions .search-input {
    min-width: min(360px, 40vw);
}

.student-report-filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(130px, 1fr)) auto;
    align-items: end;
    gap: 10px;
    margin-bottom: 14px;
}

.student-report-filters label {
    display: grid;
    gap: 5px;
}

.student-report-filters label span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
}

.student-filter-summary {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.stats-panel {
    display: grid;
    gap: 16px;
}

.bar-row {
    display: grid;
    grid-template-columns: 80px 1fr 58px;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.bar-track {
    height: 10px;
    border-radius: 99px;
    background: #e8eef5;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--blue), var(--burgundy));
}

.audit-item {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel-soft);
}

.audit-item strong {
    display: block;
    font-size: 13px;
}

.audit-item span {
    color: var(--muted);
    font-size: 12px;
}

.empty-state {
    padding: 18px;
    border: 1px dashed rgba(106, 118, 136, 0.35);
    border-radius: 14px;
    background: #f8fafc;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
}

.table-action {
    min-height: 30px;
    border-radius: 9px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--blue);
    padding: 0 10px;
    font-size: 12px;
    font-weight: 800;
}

.table-action:disabled {
    cursor: not-allowed;
    color: #a6b0bf;
    background: #f3f6f9;
}

.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 14px;
}

.pagination-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-actions button {
    min-height: 34px;
    min-width: 34px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    font-weight: 800;
}

.pagination-actions button.active {
    border-color: var(--blue);
    background: rgba(23, 78, 166, 0.10);
    color: var(--blue);
}

.pagination-actions button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(12, 22, 36, 0.45);
    backdrop-filter: blur(10px);
    z-index: 9999;
}

.modal.active {
    display: flex;
}

.modal-window {
    width: min(1380px, calc(100vw - 44px));
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.22);
    overflow: hidden;
}

.modal-head,
.modal-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
}

.modal-actions {
    justify-content: flex-end;
    border-top: 1px solid var(--line);
    border-bottom: 0;
}

.modal-head h3 {
    margin: 3px 0 0;
}

.print-preview {
    padding: 24px;
    overflow-y: auto;
}

.report-sheet {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 22px;
}

.report-title {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 2px solid var(--ink);
}

.report-title h2 {
    margin: 0;
}

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

.report-score-block h3 {
    margin: 0 0 10px;
    padding: 10px;
    border-radius: 10px;
    background: #eef4fb;
    text-align: center;
    font-size: 15px;
}

.report-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 10px;
    font-size: 11px;
}

.report-meta-grid span {
    padding: 7px 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
}

.report-table {
    min-width: 0;
    table-layout: fixed;
    border: 1px solid var(--ink);
}

.report-table th,
.report-table td {
    border: 1px solid #425066;
    padding: 7px 6px;
    text-align: center;
    font-size: 11px;
}

.report-table th {
    color: var(--ink);
    background: #f2f5f8;
}

.muted-cell {
    background: #e5e7eb;
    color: var(--muted);
}

.official-report-sheet {
    color: #111827;
    background: #fff;
    border-color: #d9dee7;
    border-radius: 0;
    font-family: "Noto Sans KR", Arial, sans-serif;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
    pointer-events: none; /* Disable all interactive hover highlights on the preview sheet */
}

.inline-score-report-preview {
    width: 100%;
    overflow-x: auto;
    padding: 8px 0 2px;
}

.official-report-stack {
    display: grid;
    gap: 28px;
}

.official-report-page {
    width: 1120px;
    min-height: 760px;
    margin: 0 auto;
    padding: 8px 24px 24px;
    border: 1px solid #d9dee7;
    background: #fff;
    box-shadow: 0 10px 28px rgba(20, 32, 51, 0.08);
    page-break-after: always;
    break-after: page;
    box-sizing: border-box;
}

.official-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #111;
    padding-bottom: 6px;
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 500;
    color: #111;
}

.official-page-header strong {
    color: #4b5563;
}

.official-report-page:last-child {
    page-break-after: auto;
    break-after: auto;
}

.official-report-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    align-items: start;
}

.official-col-left,
.official-col-right {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.official-score-card {
    min-width: 0;
}

.official-title {
    margin: 0 0 8px 0 !important;
    padding: 8px 4px;
    border: 2px solid #111;
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
    font-weight: 800;
}

.official-title.raw {
    background: #e2efda; /* Soft elegant green matching photo 2 */
}

.official-title.adjusted {
    background: #deebf7; /* Soft elegant blue matching photo 2 */
}

.official-score-table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed;
    border-collapse: collapse;
    border-spacing: 0;
}

.official-info-table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed;
    border-collapse: collapse;
    border-spacing: 0;
}

.official-cutoff-table {
    width: 290px !important;
    min-width: 0 !important;
    table-layout: fixed;
    border-collapse: collapse;
    border-spacing: 0;
}

.official-decision-table {
    width: 110px !important;
    min-width: 0 !important;
    table-layout: fixed;
    border-collapse: collapse;
    border-spacing: 0;
}

.official-info-table {
    margin-bottom: 0;
    border: 2px solid #111;
    border-bottom: 0;
}

.official-info-table th,
.official-info-table td,
.official-score-table th,
.official-score-table td,
.official-cutoff-table th,
.official-cutoff-table td,
.official-decision-table th,
.official-decision-table td {
    border: 1px solid #111;
    padding: 4px 2px;
    text-align: center;
    vertical-align: middle;
    font-size: 10px;
    line-height: 1.25;
}

.official-info-table th,
.official-score-table th,
.official-cutoff-table th,
.official-decision-table th {
    background: #fff;
    color: #111;
    font-weight: 800;
}

.official-score-table {
    border: 2px solid #111;
}

.official-score-table th,
.official-score-table td {
    height: 22px;
}

.official-subject {
    font-size: 10.5px;
    font-weight: 800;
}

.official-score-table .official-total-cell {
    background: #f8cbad; /* Warm soft pink/orange matching photo 2 */
    font-weight: 800;
}

.official-disabled-cell {
    background: #a6a6a6; /* Dark gray for disabled cell matching photo 2 */
    color: transparent;
}

.official-rank-cell {
    color: #111;
}

.official-total-rank-cell {
    color: #16703f;
    font-weight: 900;
    background: #fff;
}

.official-summary-container {
    display: flex;
    gap: 16px;
    align-items: start;
    margin-top: 18px;
}

.official-bottom-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px 110px;
    gap: 16px;
    align-items: start;
    margin-top: 18px;
}

.official-rule-note {
    min-height: 0;
    padding: 10px 12px;
    border: 2px solid #111;
    font-size: 10px;
    line-height: 1.5;
    text-align: left;
    margin-top: 0;
}

.official-rule-title {
    text-align: center;
    font-weight: 800;
    margin-bottom: 6px !important;
}

.official-cutoff-table {
    border: 2px solid #111;
}

.official-cutoff-table th,
.official-cutoff-table td,
.official-decision-table th,
.official-decision-table td {
    height: 24px;
    font-size: 10px;
}

.official-total-row th,
.official-total-row td {
    background: #ffc000; /* Warm solid golden-yellow matching photo 2 */
    font-weight: 800;
}

.official-decision-table {
    border: 2px solid #111;
}

.official-pass {
    background: #e2efda;
    color: #375623;
    font-weight: 900;
}

.official-fail {
    background: #f8cbad;
    color: #c00000;
    font-weight: 900;
}

.official-issued {
    margin: 12px 0 0;
    color: #4b5563;
    font-size: 10px;
    text-align: right;
}

.toast {
    position: fixed;
    right: 22px;
    bottom: 22px;
    display: none;
    max-width: 360px;
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--ink);
    color: #fff;
    box-shadow: var(--shadow);
    z-index: 30;
}

.toast.show {
    display: block;
}

/* Old @page rule removed, handled at top-level */

@media print {
    /* Hide background elements from DOM flow completely */
    .app-shell,
    #toast {
        display: none !important;
    }

    html, body {
        width: 100% !important;
        height: 100% !important;
        min-height: 0 !important;
        background: #fff !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }

    #report-modal {
        display: block !important;
        position: static !important;
        width: 100% !important;
        height: 100% !important;
        min-height: 0 !important;
        background: #fff !important;
        padding: 0 !important;
        margin: 0 !important;
        backdrop-filter: none !important;
        box-shadow: none !important;
        overflow: hidden !important;
    }

    .modal-window {
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        min-height: 0 !important;
        background: #fff !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        overflow: hidden !important;
    }

    #print-preview {
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        background: #fff !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
    }

    .print-preview {
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        padding: 0 !important;
        overflow: hidden !important;
    }

    .report-sheet {
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        border: 0 !important;
        border-radius: 0 !important;
        padding: 0 !important;
        background: #fff !important;
    }

    .official-page-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        border-bottom: 1.5px solid #111 !important;
        padding-bottom: 4px !important;
        margin-bottom: 4px !important;
        font-size: 8px !important;
        font-weight: 500 !important;
        color: #111 !important;
        width: 100% !important;
    }

    .official-page-header strong {
        color: #4b5563 !important;
    }

    .official-report-page {
        width: 100% !important;
        max-width: 297mm !important;
        height: auto !important;
        max-height: 210mm !important;
        aspect-ratio: 297 / 210 !important;
        margin: 0 auto !important; /* Standard static horizontal centering */
        padding: 4mm 8mm 8mm 8mm !important;
        box-sizing: border-box !important;
        border: 0 !important;
        box-shadow: none !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        page-break-after: avoid !important;
        break-after: avoid !important;
    }

    .official-report-sheet,
    .official-report-sheet * {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .official-title {
        padding: 5px 4px !important;
        font-size: 13px !important;
    }

    .official-info-table th,
    .official-info-table td,
    .official-score-table th,
    .official-score-table td,
    .official-cutoff-table th,
    .official-cutoff-table td,
    .official-decision-table th,
    .official-decision-table td {
        padding: 2px 2px !important;
        font-size: 8.2px !important;
        line-height: 1.14 !important;
    }

    .official-score-table th,
    .official-score-table td {
        height: 18px !important;
    }

    .official-summary-container {
        display: flex !important;
        gap: 4mm !important;
        margin-top: 4mm !important;
        align-items: start !important;
    }

    .official-bottom-grid {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 76mm 30mm !important;
        gap: 4mm !important;
        align-items: start !important;
        margin-top: 4mm !important;
    }

    .official-rule-note {
        min-height: 0 !important;
        padding: 5px 6px !important;
        font-size: 7.8px !important;
        line-height: 1.45 !important;
    }

    .official-cutoff-table th,
    .official-cutoff-table td,
    .official-decision-table th,
    .official-decision-table td {
        height: 16px !important;
    }

    .official-issued {
        margin-top: 3mm !important;
        font-size: 7px !important;
    }

    .modal-head,
    .modal-actions {
        display: none !important;
    }
}

@media print and (orientation: portrait) {
    .official-report-page {
        margin-top: 36mm !important; /* Center landscape A4 page vertically on a portrait sheet */
    }
}


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

    .sidebar {
        position: static;
        height: auto;
    }

    .student-grid,
    .admin-grid,
    .decision-grid,
    .metric-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .main {
        padding: 18px;
    }

    .topbar,
    .student-hero,
    .panel-head,
    .panel-subhead {
        align-items: stretch;
        flex-direction: column;
    }

    .top-actions,
    .score-summary,
    .subject-grid,
    .student-requirements-grid,
    .student-report-filters,
    .parser-summary,
    .report-columns,
    .upload-controls {
        grid-template-columns: 1fr;
        display: grid;
    }

    .student-report-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-aux-tabs {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .student-report-actions .search-input {
        min-width: 0;
    }

    .history-card {
        align-items: stretch;
        flex-direction: column;
    }

    .history-view-btn {
        width: 100%;
    }

    .decision-card,
    .search-input {
        min-width: 0;
        width: 100%;
    }
}

/* ==========================================
   GLOBAL LAW SCHOOL THEME (로스쿨 전체 UI 테마)
   ========================================== */
body.theme-lawschool-global {
    --bg: #faf7f2;
    --panel: #ffffff;
    --panel-soft: #fdfdfb;
    --ink: #2a1f18;
    --muted: #786d5f;
    --line: #e2dcc8;
    --blue: #7a1d2e;
    --blue-2: #a32a3f;
    --burgundy: #6b1424;
    --green: #2d6a4f;
    --amber: #c5a880;
    --red: #9e2a2b;
    --shadow: 0 18px 50px rgba(92, 78, 59, 0.05);
    --radius: 8px;
    background:
        radial-gradient(circle at 10% 0%, rgba(122, 29, 70, 0.06), transparent 32rem),
        linear-gradient(135deg, #faf7f2 0%, #f4eee2 100%) !important;
    color: var(--ink);
}

/* Classic Academic Serif Typography for Headings */
body.theme-lawschool-global h1,
body.theme-lawschool-global h2,
body.theme-lawschool-global h3,
body.theme-lawschool-global h4,
body.theme-lawschool-global .brand-eyebrow,
body.theme-lawschool-global .page-kicker,
body.theme-lawschool-global .sidebar-label,
body.theme-lawschool-global .section-label {
    font-family: "Georgia", "Times New Roman", "KoPub Batang", serif !important;
    letter-spacing: -0.01em;
}

/* Sidebar Styling Overrides */
body.theme-lawschool-global .sidebar {
    background: rgba(253, 251, 247, 0.85) !important;
    border-right: 1px solid rgba(226, 220, 200, 0.9) !important;
    backdrop-filter: blur(18px);
}

body.theme-lawschool-global .brand-mark {
    background: linear-gradient(135deg, #7a1d2e, #c5a880) !important;
    box-shadow: 0 14px 30px rgba(122, 29, 46, 0.24) !important;
    border-radius: 6px !important;
}

body.theme-lawschool-global .scope-list span {
    background: #ffffff !important;
    border: 1px solid #e2dcc8 !important;
    border-radius: 4px !important;
}

/* Main Header border */
body.theme-lawschool-global .topbar {
    border-bottom: 3px double #e2dcc8 !important;
    padding-bottom: 12px !important;
}

/* Segmented Controls & Role Buttons */
body.theme-lawschool-global .role-switch,
body.theme-lawschool-global .segmented-control {
    background: #f1ebd9 !important;
    border-color: #e2dcc8 !important;
    border-radius: 6px !important;
}

body.theme-lawschool-global .role-btn,
body.theme-lawschool-global .segmented-control button {
    border-radius: 4px !important;
}

body.theme-lawschool-global .role-btn.active,
body.theme-lawschool-global .segmented-control button.active {
    background: #ffffff !important;
    color: #7a1d2e !important;
    box-shadow: 0 6px 18px rgba(92, 78, 59, 0.10) !important;
}

/* Datagrid & Tables Styling */
body.theme-lawschool-global th {
    background: #f4edd8 !important;
    color: #3b2e1b !important;
    font-weight: 800 !important;
    border-bottom: 2px solid #e2dcc8 !important;
    font-family: "Georgia", "Times New Roman", serif !important;
}

body.theme-lawschool-global td {
    border-bottom: 1px solid #ebdcb9 !important;
}

body.theme-lawschool-global tr:hover td {
    background: #faf6eb !important;
}

/* Student Hero Section Styling */
body.theme-lawschool-global .student-hero {
    background: linear-gradient(135deg, #4a1521 0%, #7a1d2e 58%, #b8860b 100%) !important;
    box-shadow: 0 18px 50px rgba(122, 29, 46, 0.15) !important;
    border-radius: 12px !important;
}

body.theme-lawschool-global .decision-card {
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 8px !important;
}

/* Metric summaries & Summary Tiles */
body.theme-lawschool-global .summary-tile,
body.theme-lawschool-global .metric-card,
body.theme-lawschool-global .decision-item {
    border-color: #e2dcc8 !important;
    border-radius: 8px !important;
    background: #fdfdfb !important;
}

/* Classic Button Styling */
body.theme-lawschool-global .primary-btn {
    background: linear-gradient(135deg, #7a1d2e, #a32a3f) !important;
    box-shadow: 0 10px 22px rgba(122, 29, 46, 0.2) !important;
    border-radius: 6px !important;
}

body.theme-lawschool-global .ghost-btn {
    background: #ffffff !important;
    border-color: #e2dcc8 !important;
    border-radius: 6px !important;
}

body.theme-lawschool-global .ghost-btn:hover {
    border-color: #7a1d2e !important;
    color: #7a1d2e !important;
}

/* Badges & Status Pills */
body.theme-lawschool-global .badge,
body.theme-lawschool-global .status-pill {
    border-radius: 4px !important;
}

body.theme-lawschool-global .subject-card {
    border-color: #e2dcc8 !important;
    border-radius: 8px !important;
}

body.theme-lawschool-global .subject-head {
    background: #faf6eb !important;
    border-bottom-color: #e2dcc8 !important;
}

body.theme-lawschool-global .select-control,
body.theme-lawschool-global .search-input {
    border-color: #e2dcc8 !important;
    border-radius: 6px !important;
}

body.theme-lawschool-global .select-control:focus,
body.theme-lawschool-global .search-input:focus {
    border-color: #7a1d2e !important;
    box-shadow: 0 0 0 4px rgba(122, 29, 46, 0.12) !important;
}

/* Audit list and validation items */
body.theme-lawschool-global .audit-item,
body.theme-lawschool-global .audit-list,
body.theme-lawschool-global .validation-item {
    border-color: #e2dcc8 !important;
}

/* ==========================================================================
   UI STYLE: DUAL UI CONFIGURATIONS (기본 UI / 학적정보 UI)
   ========================================================================== */

/* 1. UI 모드별 Visibility 제어 */
body:not(.ui-style-grade-manage) .grade-manage-ui-only {
    display: none !important;
}

body.ui-style-grade-manage .default-ui-only {
    display: none !important;
}

/* 2. 학적정보 UI (Grade Management UI) 활성화 시 공식 포털 스타일링 (사이드바 레이아웃 유지) */
body.ui-style-grade-manage {
    --bg: #f1f5f9;
    --panel: #ffffff;
    --line: #cbd5e1;
    --ink: #0f172a;
    --muted: #475569;
    --shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.04), 0 8px 12px -6px rgba(0, 0, 0, 0.04);
    background: #f1f5f9 !important;
}

/* 2.1 사이드바를 CNU 공식 브랜드 색상(Deep Blue & Gold)으로 세련되게 스타일링 */
body.ui-style-grade-manage .sidebar {
    background: linear-gradient(185deg, #002d5a 0%, #001f3f 100%) !important;
    border-right: 0 !important;
    box-shadow: 0 10px 40px rgba(0, 45, 90, 0.25) !important;
    padding: 24px 20px !important;
}

body.ui-style-grade-manage .sidebar-label {
    color: rgba(255, 255, 255, 0.45) !important;
    font-weight: 700 !important;
    letter-spacing: 0.05em !important;
}

body.ui-style-grade-manage .role-switch {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 8px !important;
    margin-top: 18px !important;
    padding: 3px !important;
}

body.ui-style-grade-manage .role-btn {
    color: rgba(255, 255, 255, 0.75) !important;
    font-size: 11.5px !important;
    border-radius: 6px !important;
    padding: 6px 0 !important;
}

body.ui-style-grade-manage .role-btn.active {
    background: #ffffff !important;
    color: #004ea2 !important;
    font-weight: 800 !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12) !important;
}

/* 2.2 사이드바 탭 메뉴 버튼 스타일 */
.grade-menu-btn {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
    padding: 11px 16px !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 8px !important;
    color: rgba(255, 255, 255, 0.75) !important;
    font-weight: 700 !important;
    font-size: 13.5px !important;
    text-align: left !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.grade-menu-btn:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    transform: translateX(4px) !important;
}

.grade-menu-btn.active {
    background: rgba(255, 255, 255, 0.14) !important;
    color: #ffffff !important;
    border-left: 4px solid #c5a880 !important; /* Gold border highlight */
    box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.1) !important;
}

.grade-menu-btn .icon {
    font-size: 15px !important;
}

/* 2.3 풋터 영역 미니 세그먼트 박스 스타일 */
body.ui-style-grade-manage .sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
}

body.ui-style-grade-manage .sidebar-footer .segmented-control {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 6px !important;
    padding: 2px !important;
}

body.ui-style-grade-manage .sidebar-footer .segmented-control button {
    background: transparent !important;
    color: rgba(255, 255, 255, 0.6) !important;
    border-radius: 4px !important;
    padding: 5px 0 !important;
    font-size: 10px !important;
}

body.ui-style-grade-manage .sidebar-footer .segmented-control button.active {
    background: rgba(255, 255, 255, 0.18) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
}

/* 2.4 포털 가로형 구성 요소 제거 (사이드바 모드 전용) */
body.ui-style-grade-manage .cnu-portal-header,
body.ui-style-grade-manage .cnu-portal-footer {
    display: none !important;
}

/* 3. 폼 필드 & 테이블 세련된 오버라이드 (B2B SaaS Vibe) */
body.ui-style-grade-manage .panel {
    border-radius: 12px !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: var(--shadow) !important;
    background: #ffffff !important;
}

body.ui-style-grade-manage .search-input,
body.ui-style-grade-manage .select-control {
    border-radius: 8px !important;
    border: 1px solid #d1d5db !important;
    padding: 9px 12px !important;
    font-size: 13px !important;
    transition: all 0.2s ease !important;
}

body.ui-style-grade-manage .search-input:focus,
body.ui-style-grade-manage .select-control:focus {
    border-color: #004ea2 !important;
    box-shadow: 0 0 0 3px rgba(0, 78, 162, 0.15) !important;
}

/* 4. All Users 전용 배지 및 액션 버튼군 */
.grade-badge {
    display: inline-block !important;
    padding: 3px 8px !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    border-radius: 5px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.01em !important;
    text-align: center !important;
}

.grade-badge.admin {
    background: #fee2e2 !important;
    color: #ef4444 !important;
    border: 1px solid rgba(239, 68, 68, 0.15) !important;
}

.grade-badge.student {
    background: #dbeafe !important;
    color: #3b82f6 !important;
    border: 1px solid rgba(59, 130, 246, 0.15) !important;
}

.grade-badge.teacher {
    background: #d1fae5 !important;
    color: #10b981 !important;
    border: 1px solid rgba(16, 185, 129, 0.15) !important;
}

/* Actions 액션 열 버튼즈 */
.btn-action-edit,
.btn-action-pwd,
.btn-action-del {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 4px 9px !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    border-radius: 6px !important;
    margin-right: 6px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    background: #ffffff !important;
    text-decoration: none !important;
}

.btn-action-edit {
    border: 1px solid #3b82f6 !important;
    color: #3b82f6 !important;
}

.btn-action-edit:hover {
    background: #f0f9ff !important;
    transform: translateY(-1px) !important;
}

.btn-action-pwd {
    border: 1px solid #eab308 !important;
    color: #eab308 !important;
}

.btn-action-pwd:hover {
    background: #fefce8 !important;
    transform: translateY(-1px) !important;
}

.btn-action-del {
    border: 1px solid #ef4444 !important;
    color: #ef4444 !important;
}

.btn-action-del:hover {
    background: #fef2f2 !important;
    transform: translateY(-1px) !important;
}

/* 5. 탭 서브 컨텐트 제어 */
.grade-sub-content {
    display: none;
}

.grade-sub-content.active {
    display: block;
}

/* 6. 메인 헤더 (Topbar) 밀착 및 Saas 카드 디자인 */
body.ui-style-grade-manage .topbar {
    background: #ffffff !important;
    border-bottom: 1px solid #e5e7eb !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03) !important;
    padding: 14px 24px !important;
    margin: -24px -24px 24px -24px !important;
    box-sizing: border-box !important;
}

/* ==========================================
   CNU REQUIREMENTS-FIRST UI
   ========================================== */
.hidden {
    display: none !important;
}

body {
    background: #f3f5f9;
    color: #1f2937;
}

.login-view {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(243, 246, 251, 0.96)),
        #f3f5f9;
}

.login-card {
    width: min(420px, 100%);
    padding: 30px;
    border: 1px solid #dfe6f1;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(17, 39, 78, 0.14);
}

.login-logo {
    width: 100%;
    max-width: 330px;
    height: auto;
    display: block;
    margin: 0 auto 24px;
}

.login-copy {
    padding-top: 18px;
    border-top: 2px solid #183b7a;
    margin-bottom: 20px;
}

.login-copy h1 {
    margin: 4px 0 8px;
    font-size: 22px;
    letter-spacing: 0;
}

.login-copy p:last-child {
    margin: 0;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.6;
}

.login-field {
    display: grid;
    gap: 7px;
    margin-bottom: 12px;
    color: #374151;
    font-size: 13px;
    font-weight: 800;
}

.login-field input {
    min-height: 46px;
    border: 1px solid #cfd8e6;
    border-radius: 6px;
    padding: 0 13px;
    background: #fff;
    outline: none;
}

.login-field input:focus {
    border-color: #184a9a;
    box-shadow: 0 0 0 3px rgba(24, 74, 154, 0.12);
}

.login-error {
    min-height: 20px;
    margin: 4px 0 10px;
    color: #c83232;
    font-size: 12px;
    font-weight: 800;
}

.login-hint {
    margin: 14px 0 0;
    color: #6b7280;
    font-size: 12px;
    text-align: center;
}

.password-reset-request-btn,
.password-change-logout-btn {
    margin-top: 10px;
}

.app-shell {
    display: block;
    min-height: 100vh;
}

.cnu-main {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 22px 42px;
}

.cnu-site-header {
    margin: 0 -22px 26px;
    background: #fff;
    border-bottom: 1px solid #d7dfec;
    box-shadow: 0 8px 22px rgba(17, 39, 78, 0.05);
}

.cnu-utility {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    min-height: 34px;
    padding: 0 28px;
    border-bottom: 1px solid #edf1f6;
    color: #526173;
    font-size: 12px;
    font-weight: 700;
}

.plain-link {
    border: 0;
    background: transparent;
    color: #183b7a;
    font-weight: 900;
    padding: 0;
}

.cnu-logo-row {
    display: flex;
    justify-content: center;
    padding: 20px 24px 18px;
}

.cnu-logo-row img {
    height: 54px;
    width: auto;
    object-fit: contain;
}

.cnu-nav {
    display: flex;
    justify-content: center;
    min-height: 50px;
    border-top: 1px solid #eef2f7;
    border-bottom: 4px solid #405fb4;
}

.cnu-nav .role-btn {
    width: 160px;
    border-radius: 0;
    text-align: center;
    color: #26364d;
    border-left: 1px solid #edf1f6;
}

.cnu-nav .role-btn:last-child {
    border-right: 1px solid #edf1f6;
}

.cnu-nav .role-btn.active {
    background: #405fb4;
    color: #fff;
    box-shadow: none;
}

.cnu-service-bar {
    margin-bottom: 16px;
    padding: 22px 24px;
    border: 1px solid #dce4ef;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(17, 39, 78, 0.07);
}

.cnu-service-bar h2 {
    margin: 4px 0 0;
    color: #14213d;
    font-size: 24px;
    letter-spacing: 0;
}

.exam-kind-panel {
    display: grid;
    gap: 24px;
    padding: 24px;
    border: 1px solid #dce4ef;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(17, 39, 78, 0.07);
}

.exam-kind-heading h3 {
    margin: 4px 0 8px;
    color: #14213d;
    font-size: 22px;
    letter-spacing: 0;
}

.exam-kind-heading p:last-child {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
}

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

.exam-kind-card {
    min-height: 180px;
    display: grid;
    align-content: start;
    gap: 10px;
    padding: 22px;
    border: 1px solid #dce4ef;
    border-radius: 8px;
    background: #f8fafc;
    color: #1f2937;
    text-align: left;
    cursor: pointer;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.exam-kind-card:hover,
.exam-kind-card:focus-visible {
    border-color: #405fb4;
    box-shadow: 0 12px 24px rgba(64, 95, 180, 0.14);
    transform: translateY(-1px);
    outline: none;
}

.exam-kind-card span,
.selected-exam-kind span {
    color: #405fb4;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.exam-kind-card strong {
    color: #14213d;
    font-size: 24px;
    letter-spacing: 0;
}

.exam-kind-card p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.55;
}

.selected-exam-kind {
    min-width: 180px;
    display: grid;
    gap: 6px;
    padding: 12px 14px;
    border: 1px solid #dce4ef;
    border-radius: 8px;
    background: #f8fafc;
}

.selected-exam-kind strong {
    color: #14213d;
    font-size: 15px;
}

.selected-exam-kind .ghost-btn {
    min-height: 34px;
    padding: 0 10px;
    font-size: 12px;
}

.quick-report-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
    padding: 20px 24px;
    border: 1px solid #dce4ef;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(17, 39, 78, 0.07);
}

.quick-report-panel h3 {
    margin: 3px 0 0;
    font-size: 20px;
    letter-spacing: 0;
}

.quick-report-form {
    display: grid;
    grid-template-columns: minmax(220px, 300px) auto;
    gap: 10px;
    align-items: center;
}

.student-minimal-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 24px;
    border: 1px solid #dce4ef;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(17, 39, 78, 0.07);
}

.student-minimal-result h3 {
    margin: 10px 0 5px;
    font-size: 22px;
}

.student-minimal-result p {
    margin: 0;
    color: #6b7280;
}

.student-minimal-result .decision-card {
    min-width: 240px;
    background: #f8fafc;
    border: 1px solid #dce4ef;
    color: #1f2937;
    border-radius: 8px;
}

.student-minimal-result .decision-card p {
    color: #6b7280;
}

.student-hidden-detail {
    display: none;
}

.panel,
.summary-tile,
.metric-card,
.decision-item,
.exam-card,
.session-card,
.audit-item {
    border-radius: 8px;
}

.primary-btn {
    background: #405fb4;
    box-shadow: 0 10px 20px rgba(64, 95, 180, 0.18);
}

.ghost-btn,
.select-control,
.search-input,
.file-picker {
    border-radius: 6px;
}

.section-label,
.page-kicker,
.brand-eyebrow,
.sidebar-label {
    color: #405fb4;
    letter-spacing: 0.04em;
}

@media (max-width: 760px) {
    .cnu-main {
        padding: 0 14px 32px;
    }

    .cnu-site-header {
        margin-left: -14px;
        margin-right: -14px;
    }

    .cnu-utility {
        justify-content: center;
        flex-wrap: wrap;
        padding: 8px 14px;
    }

    .cnu-logo-row img {
        height: 42px;
    }

    .exam-kind-grid {
        grid-template-columns: 1fr;
    }

    .exam-kind-card {
        min-height: 150px;
    }

    .quick-report-panel,
    .student-minimal-result {
        align-items: stretch;
        flex-direction: column;
    }

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

    .student-report-actions,
    .student-report-filters {
        grid-template-columns: 1fr;
    }

    .student-report-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .student-filter-summary {
        text-align: left;
    }
}

/* Refined official homepage tone */
.cnu-service-bar,
.exam-kind-panel,
.quick-report-panel,
.student-minimal-result,
.panel {
    border: 1px solid #d8e0ec;
    border-radius: 6px;
    box-shadow: none;
}

.cnu-service-bar {
    border-top: 4px solid #405fb4;
}

.quick-report-panel,
.student-minimal-result {
    background: #ffffff;
}

.quick-report-panel .search-input,
.top-actions .select-control,
.top-actions .ghost-btn {
    min-height: 44px;
}

.student-minimal-result .status-pill {
    background: #eef4f2;
    color: #526173;
}

.student-minimal-result .decision-card strong {
    color: #14213d;
}

.session-card {
    border-color: #d8e0ec;
    background: #fff;
    box-shadow: none;
}

.session-card.active {
    border-left: 4px solid #405fb4;
    border-color: #405fb4;
    background: #f7f9ff;
    box-shadow: inset 0 0 0 1px rgba(64, 95, 180, 0.18);
}

.session-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.table-action.publish-action.success {
    border-color: #2c7a58;
    background: #edf7f2;
    color: #176448;
}

.table-action.publish-action.danger {
    border-color: #b91c1c;
    background: #fff1f2;
    color: #b91c1c;
}

.metric-card,
.summary-tile,
.decision-item,
.audit-item {
    background: #fbfcfe;
    box-shadow: none;
}

.panel-head {
    border-bottom-color: #d8e0ec;
}

.upload-box {
    border-radius: 6px;
    background: #f8fafc;
}

.score-report-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.score-print-btn {
    display: inline-grid;
    place-items: center;
    border-color: #d8e0ec;
    background: #fff;
    color: #405fb4;
}

.score-print-btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.danger-btn,
.table-action.delete-action,
.table-action.password-reset-action.danger {
    border-color: #d8a7ad;
    background: #fff7f8;
    color: #b91c1c;
}

.table-action.preview-action {
    border-color: #b9c6ea;
    background: #f7f9ff;
    color: #405fb4;
}

.table-action.select-action.active {
    border-color: #405fb4;
    background: #405fb4;
    color: #fff;
}

.pagination-bar.compact {
    padding-top: 12px;
}

.account-form {
    padding: 18px 20px;
    border-bottom: 1px solid #d8e0ec;
    background: #fbfcfe;
}

.account-form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.account-form-grid label,
.account-checkbox {
    display: grid;
    gap: 7px;
    color: #526173;
    font-size: 12px;
    font-weight: 800;
}

.account-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
}

.account-form-actions .login-error {
    flex: 1;
    margin: 0;
}

.account-checkbox {
    display: flex;
    align-items: center;
    margin-right: auto;
}

.account-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.account-protected-label,
.account-current-label {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 6px;
    border-radius: 999px;
    background: #eef2ff;
    color: #405fb4;
    font-size: 10px;
    font-weight: 800;
}

.account-current-label {
    background: #edf7f2;
    color: #176448;
}

.cnu-footer {
    margin-top: 54px;
    background: #405fb4;
    color: rgba(255, 255, 255, 0.82);
}

.cnu-footer-inner {
    display: flex;
    align-items: center;
    gap: 34px;
    max-width: 1120px;
    margin: 0 auto;
    padding: 30px 24px;
}

.cnu-footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 260px;
    min-height: 66px;
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
}

.cnu-footer-brand img {
    display: block;
    width: 230px;
    max-width: 100%;
    height: auto;
    mix-blend-mode: multiply;
}

.cnu-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 10px;
    color: #fff;
    font-weight: 900;
}

.cnu-footer p {
    margin: 0 0 5px;
    font-size: 13px;
    line-height: 1.45;
}

@media (max-width: 760px) {
    .account-form-grid {
        grid-template-columns: 1fr;
    }

    .account-form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .account-checkbox {
        margin-right: 0;
    }

    .cnu-footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .cnu-footer-brand {
        flex-basis: auto;
        width: 100%;
    }
}

/* ==========================================
   ADMIN SIDEBAR SHELL
   ========================================== */
body.admin-shell .app-shell {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    align-items: stretch;
}

body.admin-shell .cnu-logo-row {
    display: none;
}

body.admin-shell .cnu-site-header {
    margin-bottom: 22px;
}

body.admin-shell .cnu-service-bar {
    padding-top: 18px;
    padding-bottom: 18px;
}

.admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 22px 14px 18px;
    background: #fff;
    border-right: 1px solid #dde5ee;
}

.admin-sidebar-brand {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 2px 8px 16px;
    border-bottom: 1px solid #edf1f6;
}

.admin-sidebar-brand img {
    width: 100%;
    max-width: 180px;
    height: auto;
    object-fit: contain;
}

.admin-sidebar-brand span {
    display: block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #7c8aa0;
}

.admin-sidebar-brand strong {
    display: block;
    font-size: 14px;
    color: #14315e;
    letter-spacing: -0.01em;
}

.admin-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-menu-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 11px 12px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #41506b;
    font-size: 14px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.admin-menu-btn svg {
    width: 18px;
    height: 18px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.admin-menu-btn:hover {
    background: #eef3fa;
    color: #14315e;
}

.admin-menu-btn.active {
    background: #174ea6;
    color: #fff;
    box-shadow: 0 8px 18px rgba(23, 78, 166, 0.22);
}

.menu-badge {
    margin-left: auto;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: #d3455b;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.admin-menu-btn.active .menu-badge {
    background: rgba(255, 255, 255, 0.28);
}

.admin-sidebar-footer {
    margin-top: auto;
    padding: 12px 8px 0;
    border-top: 1px solid #edf1f6;
    font-size: 12px;
    font-weight: 700;
    color: #7c8aa0;
}

button.metric-card {
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

button.metric-card:hover {
    border-color: #2b6fd6;
    box-shadow: 0 10px 22px rgba(23, 78, 166, 0.12);
}

.dashboard-shortcuts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.dashboard-shortcut {
    display: block;
    text-align: left;
    padding: 20px;
    border: 1px solid rgba(221, 229, 238, 0.96);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
    cursor: pointer;
    font: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.dashboard-shortcut:hover {
    border-color: #2b6fd6;
    box-shadow: 0 12px 26px rgba(23, 78, 166, 0.14);
    transform: translateY(-2px);
}

.dashboard-shortcut strong {
    display: block;
    font-size: 16px;
    color: #14315e;
    margin-bottom: 6px;
}

.dashboard-shortcut p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #61708a;
}

@media (max-width: 960px) {
    body.admin-shell .app-shell {
        display: block;
    }

    .admin-sidebar {
        position: sticky;
        top: 0;
        z-index: 30;
        height: auto;
        flex-direction: row;
        align-items: center;
        gap: 10px;
        padding: 10px 14px;
        border-right: 0;
        border-bottom: 1px solid #dde5ee;
        overflow-x: auto;
    }

    .admin-sidebar-brand,
    .admin-sidebar-footer {
        display: none;
    }

    .admin-menu {
        flex-direction: row;
        gap: 6px;
    }

    .admin-menu-btn {
        width: auto;
        white-space: nowrap;
        padding: 9px 12px;
    }
}
