:root {
    --navy: #17233f;
    --blue: #315efb;
    --blue-soft: #eef3ff;
    --ink: #172033;
    --muted: #68728a;
    --line: #e4e8f0;
    --bg: #f5f7fb;
    --white: #fff;
    --green: #14996c;
    --amber: #e79a16;
    --red: #dc4c64;
    --shadow: 0 10px 30px rgba(30, 45, 80, 0.08);
}

/* hidden 속성이 적용된 창은 완전히 숨김 */
[hidden] {
    display: none !important;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Pretendard", "Noto Sans KR", "Malgun Gothic", sans-serif;
    color: var(--ink);
    background: var(--bg);
}

button,
input,
select {
    font: inherit;
}

/* 상단 메뉴 */
.topbar {
    position: sticky;
    top: 0;
    z-index: 10;

    display: flex;
    align-items: center;
    gap: 30px;

    height: 72px;
    padding: 0 28px;

    background: var(--white);
    border-bottom: 1px solid var(--line);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 250px;
}

.brand-mark {
    display: grid;
    place-items: center;

    width: 38px;
    height: 38px;

    color: #fff;
    font-weight: 800;

    background: linear-gradient(135deg, var(--blue), #7190ff);
    border-radius: 12px;
}

.brand strong {
    display: block;
    font-size: 17px;
}

.brand span {
    font-size: 11px;
    color: var(--muted);
}

.file-actions {
    display: flex;
    flex: 1;
    gap: 4px;
}

.ghost {
    padding: 10px 13px;

    color: #4a5367;

    background: transparent;
    border: 0;
    border-radius: 9px;

    cursor: pointer;
}

.ghost:hover {
    background: #f0f3f8;
}

/* Agent 연결 상태 */
.agent-badge {
    display: flex;
    align-items: center;
    gap: 8px;

    padding: 8px 12px;

    color: var(--green);
    font-size: 13px;
    font-weight: 700;

    background: #eef9f5;
    border-radius: 20px;
}

.agent-badge i {
    width: 8px;
    height: 8px;

    background: currentColor;
    border-radius: 50%;
}

.agent-badge.offline {
    color: var(--red);
    background: #fff1f3;
}

/* 전체 화면 구조 */
.shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    min-height: calc(100vh - 72px);
}

/* 왼쪽 사이드바 */
.sidebar {
    display: flex;
    flex-direction: column;

    padding: 32px 24px;

    background: var(--white);
    border-right: 1px solid var(--line);
}

.eyebrow {
    margin: 0 0 12px;

    color: #8790a3;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.steps {
    margin: 0;
    padding: 0;
    list-style: none;
}

.steps li {
    display: flex;
    align-items: center;
    gap: 13px;

    padding: 13px 10px;

    color: #8b93a5;

    border-radius: 12px;
}

.steps li + li {
    margin-top: 3px;
}

.steps li b {
    display: grid;
    place-items: center;

    width: 30px;
    height: 30px;

    font-size: 13px;

    background: #edf0f5;
    border-radius: 50%;
}

.steps li span {
    font-size: 14px;
    font-weight: 700;
}

.steps li small {
    display: block;
    margin-top: 3px;

    font-size: 11px;
    font-weight: 400;
}

.steps li.active {
    color: var(--blue);
    background: var(--blue-soft);
}

.steps li.active b {
    color: #fff;
    background: var(--blue);
}

/* 개인정보 안내 */
.privacy-note {
    display: flex;
    gap: 10px;

    margin-top: auto;
    padding: 14px;

    background: #f4f7fd;
    border: 1px solid #e2e9f6;
    border-radius: 14px;
}

.privacy-note p {
    margin: 0;

    color: #69748b;
    font-size: 11px;
    line-height: 1.55;
}

.privacy-note strong {
    display: block;
    margin-bottom: 3px;
    color: #3d4963;
}

/* 메인 콘텐츠 */
.content {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 38px 42px 70px;
}

/* 초기 빈 화면 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-height: 65vh;

    text-align: center;
}

.empty-icon {
    display: grid;
    place-items: center;

    width: 74px;
    height: 74px;

    color: var(--blue);
    font-size: 38px;

    background: var(--blue-soft);
    border-radius: 24px;
}

.empty-state h1 {
    margin: 22px 0 8px;
    font-size: 27px;
}

.empty-state p {
    margin: 0 0 24px;
    color: var(--muted);
}

/* 기본 버튼 */
.primary {
    padding: 11px 18px;

    color: #fff;
    font-weight: 700;

    background: var(--blue);
    border: 0;
    border-radius: 10px;
    box-shadow: 0 6px 14px rgba(49, 94, 251, 0.2);

    cursor: pointer;
}

.primary:hover {
    background: #244edc;
}

.primary:disabled {
    background: #aab5d9;
    box-shadow: none;
    cursor: not-allowed;
}

/* 작업 제목 */
.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 20px;
}

.page-heading h1 {
    margin: 0;
    font-size: 28px;
}

.save-state {
    color: var(--green);
    font-size: 12px;
}

/* 공통 패널 */
.panel {
    margin-bottom: 18px;
    padding: 24px;

    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 13px;

    margin-bottom: 20px;
    padding-bottom: 18px;

    border-bottom: 1px solid var(--line);
}

.panel-title > span {
    display: grid;
    place-items: center;

    width: 34px;
    height: 34px;

    color: var(--blue);
    font-weight: 800;

    background: var(--blue-soft);
    border-radius: 10px;
}

.panel-title h2 {
    margin: 0 0 4px;
    font-size: 18px;
}

.panel-title p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

/* 작업 설정 입력 영역 */
.form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.form-grid label {
    color: #4e586e;
    font-size: 12px;
    font-weight: 700;
}

.form-grid input,
.form-grid select {
    width: 100%;
    margin-top: 7px;
    padding: 11px;

    color: var(--ink);

    background: #fff;
    border: 1px solid #dce1eb;
    border-radius: 9px;
}

.panel-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-top: 20px;
}

.inline-status {
    color: var(--muted);
    font-size: 12px;
}

.inline-status.ok {
    color: var(--green);
    font-weight: 700;
}

/* 파일 업로드 */
.upload-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.upload-card {
    position: relative;

    min-height: 130px;
    padding: 17px;

    border: 1px dashed #cdd4e2;
    border-radius: 13px;

    cursor: pointer;
    transition: 0.2s;
}

.upload-card:hover {
    background: #fafbff;
    border-color: var(--blue);
}

.upload-card.required::after {
    position: absolute;
    top: 12px;
    right: 12px;

    padding: 3px 7px;

    color: var(--blue);
    font-size: 10px;

    content: "필수";
    background: var(--blue-soft);
    border-radius: 10px;
}

.upload-card strong {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
}

.upload-card small {
    display: block;
    min-height: 30px;

    color: var(--muted);
    font-size: 11px;
}

.upload-card input {
    display: none;
}

.upload-card em {
    display: inline-block;
    margin-top: 12px;

    color: var(--blue);
    font-size: 11px;
    font-style: normal;
    font-weight: 700;
}

.upload-card span {
    display: block;

    margin-top: 7px;

    overflow: hidden;

    color: var(--green);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-card.uploaded {
    background: #f5fcf9;
    border-color: #9dd9c3;
    border-style: solid;
}

/* 분석 실행 */
.analyze-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 28px 30px;
}

.analyze-panel h2 {
    margin: 0 0 7px;
    font-size: 20px;
}

.analyze-panel p:not(.eyebrow) {
    margin: 0;

    color: var(--muted);
    font-size: 12px;
}

.large {
    padding: 14px 25px;
}

/* 결과 요약 */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;

    margin: 24px 0 16px;
}

.summary-grid article {
    padding: 18px;

    background: #fff;
    border: 1px solid var(--line);
    border-top: 3px solid var(--blue);
    border-radius: 13px;
    box-shadow: var(--shadow);
}

.summary-grid article.warning {
    border-top-color: var(--amber);
}

.summary-grid article.danger {
    border-top-color: var(--red);
}

.summary-grid article.success {
    border-top-color: var(--green);
}

.summary-grid small {
    color: var(--muted);
    font-size: 11px;
}

.summary-grid strong {
    display: block;
    margin-top: 7px;
    font-size: 28px;
}

/* 결과 표 */
.result-panel {
    padding: 0;
    overflow: hidden;
}

.result-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    padding: 17px 20px;

    border-bottom: 1px solid var(--line);
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tabs button {
    padding: 8px 11px;

    color: #626c80;
    font-size: 11px;
    font-weight: 700;

    background: #f1f3f7;
    border: 0;
    border-radius: 8px;

    cursor: pointer;
}

.tabs button.active {
    color: #fff;
    background: var(--blue);
}

.result-toolbar input {
    width: 210px;
    padding: 9px 12px;

    border: 1px solid var(--line);
    border-radius: 9px;
}

.table-wrap {
    max-height: 520px;
    overflow: auto;
}

table {
    width: 100%;

    font-size: 11px;
    white-space: nowrap;

    border-collapse: collapse;
}

th,
td {
    max-width: 330px;
    padding: 10px 12px;

    overflow: hidden;

    text-align: left;
    text-overflow: ellipsis;

    border-bottom: 1px solid #edf0f4;
}

th {
    position: sticky;
    top: 0;
    z-index: 1;

    color: #5b6578;

    background: #f8f9fc;
}

tbody tr:hover {
    background: #f7f9ff;
}

.result-count {
    padding: 0 20px 15px;

    color: var(--muted);
    font-size: 11px;
}

/* 모달 */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 30;

    display: grid;
    place-items: center;

    padding: 20px;

    background: rgba(19, 28, 50, 0.45);
}

.modal {
    position: relative;

    width: min(520px, 100%);
    padding: 26px;

    background: #fff;
    border-radius: 16px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.25);
}

.modal h2 {
    margin: 0 0 18px;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 15px;

    color: #7c8494;
    font-size: 26px;

    background: transparent;
    border: 0;

    cursor: pointer;
}

.modal input,
.modal select {
    width: 100%;
    margin: 5px 0 12px;
    padding: 11px;

    border: 1px solid var(--line);
    border-radius: 9px;
}

.modal-list {
    display: grid;
    gap: 7px;

    max-height: 330px;
    overflow: auto;
}

.modal-list button {
    padding: 12px;

    text-align: left;

    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;

    cursor: pointer;
}

.modal-list button:hover {
    background: var(--blue-soft);
    border-color: var(--blue);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;

    margin-top: 12px;
}

/* 알림 메시지 */
.toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 40;

    padding: 13px 17px;

    color: #fff;
    font-size: 13px;

    background: #17233f;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.toast.error {
    background: #b93851;
}

/* 태블릿 화면 */
@media (max-width: 1000px) {
    .shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }

    .content {
        padding: 24px;
    }

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

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

/* 모바일 화면 */
@media (max-width: 650px) {
    .topbar {
        padding: 0 14px;
    }

    .brand {
        min-width: 0;
    }

    .brand span,
    .file-actions {
        display: none;
    }

    .agent-badge {
        margin-left: auto;
    }

    .form-grid,
    .upload-grid,
    .summary-grid {
        grid-template-columns: 1fr;
    }

    .content {
        padding: 18px;
    }

    .analyze-panel {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
}

/* 관리자 페이지 */
.admin-app {
    min-height: 100vh;
    background: var(--bg);
}

.admin-login-view {
    display: grid;
    place-items: center;

    min-height: 100vh;
    padding: 24px;

    background:
        radial-gradient(
            circle at top left,
            rgba(49, 94, 251, 0.12),
            transparent 32%
        ),
        var(--bg);
}

.admin-login-card {
    width: min(430px, 100%);
    padding: 38px;

    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: 0 24px 70px rgba(30, 45, 80, 0.16);
}

.admin-brand-mark {
    margin-bottom: 24px;
}

.admin-login-card h1 {
    margin: 0 0 10px;
    font-size: 28px;
}

.admin-login-description {
    margin: 0 0 28px;
    color: var(--muted);
    font-size: 14px;
}

.admin-login-card form {
    display: grid;
    gap: 16px;
}

.admin-login-card label {
    color: #4e586e;
    font-size: 13px;
    font-weight: 700;
}

.admin-login-card input {
    width: 100%;
    margin-top: 7px;
    padding: 12px 13px;

    color: var(--ink);

    background: #fff;
    border: 1px solid #dce1eb;
    border-radius: 10px;
    outline: none;
}

.admin-login-card input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(49, 94, 251, 0.12);
}

.admin-login-button {
    width: 100%;
    margin-top: 4px;
    padding: 13px;
}

.admin-login-error {
    margin: 0;
    padding: 10px 12px;

    color: var(--red);
    font-size: 12px;

    background: #fff1f3;
    border-radius: 9px;
}

.admin-back-link {
    display: block;
    margin-top: 22px;

    color: var(--muted);
    font-size: 12px;
    text-align: center;
    text-decoration: none;
}

.admin-back-link:hover {
    color: var(--blue);
}

.admin-dashboard {
    min-height: 100vh;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    height: 72px;
    padding: 0 28px;

    background: #fff;
    border-bottom: 1px solid var(--line);
}

.admin-header .brand span {
    display: block;
    margin-top: 2px;

    color: var(--muted);
    font-size: 11px;
}

.admin-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.admin-home-link {
    color: var(--blue);
    text-decoration: none;
}

.admin-content {
    width: min(1200px, 100%);
    margin: 0 auto;
    padding: 38px 42px 70px;
}

@media (max-width: 650px) {
    .admin-login-card {
        padding: 28px 22px;
    }

    .admin-header {
        padding: 0 16px;
    }

    .admin-header .brand {
        min-width: 0;
    }

    .admin-home-link {
        display: none;
    }

    .admin-content {
        padding: 24px 18px;
    }
}

/* 관리자 교육과정 관리 */
.admin-management-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
    align-items: start;
    gap: 18px;
}

.admin-curriculum-form {
    display: grid;
    gap: 20px;
}

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

.admin-form-grid label {
    color: #4e586e;
    font-size: 13px;
    font-weight: 700;
}

.admin-form-grid input {
    width: 100%;
    margin-top: 7px;
    padding: 11px 12px;

    color: var(--ink);

    background: #fff;
    border: 1px solid #dce1eb;
    border-radius: 9px;
    outline: none;
}

.admin-form-grid input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(49, 94, 251, 0.12);
}

.admin-form-grid label small {
    display: block;
    margin-top: 5px;

    color: var(--muted);
    font-size: 11px;
    font-weight: 400;
}

.admin-file-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-height: 170px;
    padding: 25px;

    text-align: center;

    background: #fafbff;
    border: 1px dashed #bcc7dc;
    border-radius: 14px;

    cursor: pointer;
}

.admin-file-upload:hover {
    background: var(--blue-soft);
    border-color: var(--blue);
}

.admin-file-upload input {
    display: none;
}

.admin-file-icon {
    display: grid;
    place-items: center;

    width: 42px;
    height: 42px;
    margin-bottom: 12px;

    color: var(--blue);
    font-size: 22px;
    font-weight: 800;

    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(49, 94, 251, 0.12);
}

.admin-file-upload strong {
    font-size: 14px;
}

.admin-file-upload small {
    display: block;
    max-width: 100%;
    margin-top: 6px;

    overflow: hidden;

    color: var(--muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-upload-button {
    width: 100%;
    padding: 13px;
}

.admin-upload-result {
    padding: 14px 16px;

    color: #186b51;
    font-size: 12px;

    background: #eef9f5;
    border: 1px solid #cdeadd;
    border-radius: 11px;
}

.admin-upload-result strong {
    display: block;
    margin-bottom: 8px;
}

.admin-upload-result ul {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px 18px;

    margin: 0;
    padding-left: 18px;
}

.admin-curriculum-list {
    display: grid;
    gap: 10px;
}

.admin-school-card {
    padding: 16px;

    background: #fafbfe;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.admin-school-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.admin-school-heading strong {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
}

.admin-school-heading small {
    color: var(--muted);
    font-size: 11px;
}

.admin-school-count {
    padding: 4px 8px;

    color: var(--blue);
    font-size: 11px;
    font-weight: 700;

    background: var(--blue-soft);
    border-radius: 10px;
}

.admin-year-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;

    margin-top: 13px;
}

.admin-year-tag {
    padding: 6px 9px;

    color: #48536a;
    font-size: 11px;
    font-weight: 700;

    background: #fff;
    border: 1px solid #dfe4ed;
    border-radius: 8px;
}

.admin-year-tag.empty {
    color: var(--muted);
    font-weight: 400;
}

.admin-empty-box {
    padding: 35px 18px;

    text-align: center;

    background: #fafbfe;
    border: 1px dashed #cdd4e2;
    border-radius: 13px;
}

.admin-empty-box strong {
    font-size: 14px;
}

.admin-empty-box p,
.admin-list-empty,
.admin-list-error {
    color: var(--muted);
    font-size: 12px;
}

.admin-list-error {
    color: var(--red);
}

@media (max-width: 900px) {
    .admin-management-grid {
        grid-template-columns: 1fr;
    }
}

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

    .admin-upload-result ul {
        grid-template-columns: 1fr;
    }
}

/* 관리자 교육과정 상세·수정·삭제 */
.admin-year-list {
    display: grid;
    gap: 8px;
}

.admin-year-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    padding: 9px 10px;

    background: #fff;
    border: 1px solid #e1e5ee;
    border-radius: 9px;
}

.admin-year-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.admin-year-actions button {
    padding: 5px 8px;

    color: #596378;
    font-size: 11px;
    font-weight: 700;

    background: transparent;
    border: 0;
    border-radius: 6px;

    cursor: pointer;
}

.admin-year-actions button:hover {
    color: var(--blue);
    background: var(--blue-soft);
}

.admin-year-actions .admin-delete-button {
    color: var(--red);
}

.admin-year-actions .admin-delete-button:hover {
    color: #fff;
    background: var(--red);
}

.modal.admin-detail-modal {
    width: min(1050px, 96vw);
}

.admin-detail-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;

    margin-bottom: 18px;
}

.admin-detail-summary article {
    padding: 13px;

    background: #f7f9fd;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.admin-detail-summary small {
    display: block;

    color: var(--muted);
    font-size: 11px;
}

.admin-detail-summary strong {
    display: block;
    margin-top: 6px;
    font-size: 17px;
}

.admin-detail-table-wrap {
    max-height: 520px;
    overflow: auto;

    border: 1px solid var(--line);
    border-radius: 11px;
}

.admin-detail-table {
    width: 100%;
    font-size: 12px;
    white-space: nowrap;
    border-collapse: collapse;
}

.admin-detail-table th,
.admin-detail-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #edf0f4;
}

@media (max-width: 650px) {
    .admin-year-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-detail-summary {
        grid-template-columns: repeat(2, 1fr);
    }
}

.admin-auto-detect-notice {
    padding: 14px 16px;

    background: var(--blue-soft);
    border: 1px solid #d7e1ff;
    border-radius: 11px;
}

.admin-auto-detect-notice strong {
    display: block;

    color: var(--blue);
    font-size: 13px;
}

.admin-auto-detect-notice p {
    margin: 5px 0 0;

    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

/* 분석 엔진 관리 */
.admin-engine-panel {
    margin-top: 18px;
}

.admin-engine-grid {
    display: grid;
    grid-template-columns:
        minmax(320px, 0.8fr)
        minmax(420px, 1.2fr);
    align-items: start;
    gap: 24px;
}

.admin-engine-form {
    display: grid;
    gap: 16px;
}

.admin-engine-form label {
    color: #4e586e;
    font-size: 13px;
    font-weight: 700;
}

.admin-engine-form input,
.admin-engine-form textarea {
    width: 100%;
    margin-top: 7px;
    padding: 11px 12px;

    color: var(--ink);
    font: inherit;

    background: #fff;
    border: 1px solid #dce1eb;
    border-radius: 9px;
    outline: none;
}

.admin-engine-form textarea {
    resize: vertical;
}

.admin-engine-form input:focus,
.admin-engine-form textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(49, 94, 251, 0.12);
}

.admin-engine-form label > small {
    display: block;
    margin-top: 5px;

    color: var(--muted);
    font-size: 11px;
    font-weight: 400;
}

.admin-engine-file {
    display: flex;
    flex-direction: column;
    align-items: center;

    padding: 22px;

    text-align: center;

    background: #fafbff;
    border: 1px dashed #bcc7dc;
    border-radius: 12px;

    cursor: pointer;
}

.admin-engine-file:hover {
    background: var(--blue-soft);
    border-color: var(--blue);
}

.admin-engine-file input {
    display: none;
}

.admin-engine-file > span {
    color: var(--blue);
    font-size: 25px;
}

.admin-engine-file > strong {
    margin-top: 7px;
    font-size: 13px;
}

.admin-engine-file > small {
    max-width: 100%;
    margin-top: 5px;

    overflow: hidden;

    color: var(--muted);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-current-engine {
    padding: 18px;

    color: #fff;

    background: linear-gradient(
        135deg,
        #315efb,
        #5b7cff
    );
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(49, 94, 251, 0.22);
}

.admin-current-engine small {
    color: rgba(255, 255, 255, 0.75);
    font-size: 11px;
}

.admin-current-engine strong {
    display: block;
    margin-top: 6px;
    font-size: 25px;
}

.admin-current-engine p {
    margin: 8px 0 0;

    color: rgba(255, 255, 255, 0.86);
    font-size: 12px;
}

.admin-version-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin: 20px 0 10px;
}

.admin-version-list {
    display: grid;
    gap: 9px;

    max-height: 430px;
    overflow: auto;
}

.admin-version-card {
    padding: 14px;

    background: #fafbfe;
    border: 1px solid var(--line);
    border-radius: 11px;
}

.admin-version-card.active {
    background: #f2f6ff;
    border-color: #b8c9ff;
}

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

.admin-version-card-heading > div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-version-card-heading strong {
    font-size: 14px;
}

.admin-active-version {
    padding: 3px 7px;

    color: var(--blue);
    font-size: 10px;
    font-weight: 700;

    background: #fff;
    border-radius: 8px;
}

.admin-version-card p {
    margin: 8px 0;

    color: #596378;
    font-size: 12px;
}

.admin-version-card small {
    color: var(--muted);
    font-size: 10px;
}

.admin-activate-version {
    padding: 6px 9px;

    color: var(--blue);
    font-size: 11px;
    font-weight: 700;

    background: var(--blue-soft);
    border: 0;
    border-radius: 7px;

    cursor: pointer;
}

.admin-activate-version:hover {
    color: #fff;
    background: var(--blue);
}

.admin-upload-result code {
    display: block;
    margin-top: 5px;

    overflow-wrap: anywhere;

    font-size: 10px;
}

@media (max-width: 900px) {
    .admin-engine-grid {
        grid-template-columns: 1fr;
    }
}

.analyzer-status {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 18px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.analyzer-status::before {
    content: "";
    width: 7px;
    height: 7px;
    margin-right: 8px;
    border-radius: 50%;
    background: currentColor;
}

.analyzer-status.checking {
    color: #64748b;
    background: #f1f5f9;
}

.analyzer-status.latest {
    color: #16794b;
    background: #eaf8f0;
}

.analyzer-status.updated {
    color: #2457d6;
    background: #edf3ff;
}

.analyzer-status.warning {
    color: #b76a00;
    background: #fff6df;
}

.analyzer-status.disconnected {
    color: #c33f55;
    background: #fff0f2;
}

.admin-account-panel {
    margin-top: 24px;
}

.admin-account-grid {
    display: grid;
    grid-template-columns: minmax(280px, 0.8fr) minmax(400px, 1.2fr);
    gap: 28px;
    margin-top: 22px;
}

.admin-account-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.admin-account-form label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #26344e;
    font-size: 13px;
    font-weight: 700;
}

.admin-account-form input,
.admin-account-form select {
    height: 46px;
    padding: 0 14px;
    border: 1px solid #d8e0ec;
    border-radius: 10px;
    background: #ffffff;
    color: #17233b;
    font: inherit;
    outline: none;
}

.admin-account-form input:focus,
.admin-account-form select:focus {
    border-color: #315efb;
    box-shadow: 0 0 0 3px rgba(49, 94, 251, 0.12);
}

.admin-account-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}

.admin-account-item {
    display: grid;
    grid-template-columns: minmax(130px, 1fr) auto auto;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid #e0e6ef;
    border-radius: 12px;
    background: #ffffff;
}

.admin-account-item > div:first-child {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-account-item small {
    color: #7b879b;
}

.account-state {
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.account-state.active {
    color: #16794b;
    background: #eaf8f0;
}

.account-state.inactive {
    color: #a44855;
    background: #fff0f2;
}

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

.admin-account-actions button {
    padding: 7px 10px;
    font-size: 12px;
}

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

    .admin-account-item {
        grid-template-columns: 1fr;
    }

    .admin-account-actions {
        flex-wrap: wrap;
    }
}

.user-login-view {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: #f3f6fb;
}

.user-login-card {
    width: min(100%, 420px);
    padding: 38px;
    border: 1px solid #dfe6f0;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(32, 50, 85, 0.12);
}

.user-login-logo {
    margin-bottom: 22px;
}

.user-login-card h1 {
    margin: 6px 0 10px;
    color: #12213c;
}

.user-login-description {
    margin-bottom: 26px;
    color: #748097;
}

.user-login-card form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.user-login-card label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #27364f;
    font-size: 13px;
    font-weight: 700;
}

.user-login-card input {
    height: 48px;
    padding: 0 14px;
    border: 1px solid #d8e0ec;
    border-radius: 10px;
    font: inherit;
    outline: none;
}

.user-login-card input:focus {
    border-color: #315efb;
    box-shadow: 0 0 0 3px rgba(49, 94, 251, 0.12);
}

.user-login-card button {
    min-height: 48px;
    margin-top: 4px;
}

.user-session {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #526078;
    font-size: 13px;
    font-weight: 700;
}

.user-session button {
    padding: 8px 11px;
}

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

.result-download-button {
    min-height: 40px;
    padding: 0 16px;
    white-space: nowrap;
}

@media (max-width: 800px) {
    .result-actions {
        width: 100%;
    }

    .result-actions input {
        flex: 1;
        min-width: 0;
    }
}

.pdf-export-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 18px;
}

.pdf-export-form label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #27364f;
    font-size: 13px;
    font-weight: 700;
}

.pdf-export-form select {
    width: 100%;
    height: 46px;
    padding: 0 13px;
    border: 1px solid #d8e0ec;
    border-radius: 10px;
    background: #ffffff;
    color: #17233b;
    font: inherit;
    outline: none;
}

.pdf-export-form select:focus {
    border-color: #315efb;
    box-shadow: 0 0 0 3px rgba(49, 94, 251, 0.12);
}

.student-result-row {
    cursor: pointer;
}

.student-result-row:hover td {
    background: #f2f6ff;
}

.student-detail-modal {
    width: min(1180px, calc(100vw - 40px));
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.student-detail {
    display: flex;
    flex-direction: column;
    gap: 22px;
    margin-top: 16px;
}

.student-detail-heading {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid #e3e8f0;
}

.student-detail-heading h2 {
    margin: 4px 0;
    color: #17233b;
}

.student-detail-heading h2 small {
    margin-left: 8px;
    color: #778399;
    font-size: 14px;
    font-weight: 600;
}

.student-detail-heading p {
    margin: 0;
    color: #68758b;
    font-size: 13px;
}

.student-status {
    align-self: flex-start;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.student-status.normal {
    color: #16794b;
    background: #e9f8f0;
}

.student-status.attention {
    color: #b64c5c;
    background: #fff0f2;
}

.student-detail-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.student-detail-summary article {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    border: 1px solid #e2e7ef;
    border-radius: 12px;
    background: #f8faff;
}

.student-detail-summary small {
    color: #758197;
}

.student-detail-summary strong {
    color: #17233b;
    font-size: 16px;
}

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

.student-detail-section {
    padding: 17px;
    border: 1px solid #e1e7f0;
    border-radius: 13px;
    background: #ffffff;
}

.student-detail-section h3 {
    margin: 0 0 12px;
    color: #263653;
    font-size: 14px;
}

.student-detail-section p {
    margin: 0;
    color: #536078;
    line-height: 1.65;
}

.student-course-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.student-course-chip {
    padding: 6px 9px;
    border-radius: 7px;
    color: #3c4a62;
    background: #eef2f7;
    font-size: 12px;
    font-weight: 700;
}

.student-course-chip.applied {
    color: #2457d6;
    background: #edf3ff;
}

.student-course-chip.fixed {
    color: #16794b;
    background: #eaf8f0;
}

.student-course-chip.missing {
    color: #b64c5c;
    background: #fff0f2;
}

.student-detail-empty {
    color: #8994a6;
    font-size: 12px;
}

.student-detail-warning {
    padding: 15px 17px;
    border: 1px solid #ffd1d7;
    border-radius: 12px;
    color: #9f3d4c;
    background: #fff4f5;
}

.student-detail-warning p {
    margin: 6px 0 0;
    line-height: 1.6;
}

.student-detail-table-wrap {
    overflow-x: auto;
}

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

.student-detail-table th,
.student-detail-table td {
    padding: 10px;
    border-bottom: 1px solid #e5e9f0;
    text-align: left;
    font-size: 12px;
}

.student-detail-table th {
    color: #57647a;
    background: #f5f7fb;
}

@media (max-width: 850px) {
    .student-detail-summary,
    .student-course-grid {
        grid-template-columns: 1fr;
    }
}

.student-credit-dashboard,
.student-course-matrix-section {
    padding: 20px;
    border: 1px solid #dfe6f0;
    border-radius: 14px;
    background: #f8faff;
}

.student-detail-section-heading {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.student-detail-section-heading h3 {
    margin: 0 0 5px;
    color: #1d2b45;
    font-size: 15px;
}

.student-detail-section-heading p {
    margin: 0;
    color: #78859a;
    font-size: 12px;
}

.credit-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}

.credit-summary-grid article {
    padding: 15px;
    border: 1px solid #e0e6ef;
    border-radius: 11px;
    background: #ffffff;
}

.credit-summary-grid article > small {
    display: block;
    margin-bottom: 8px;
    color: #68758b;
}

.credit-summary-grid strong {
    color: #17233b;
    font-size: 18px;
}

.credit-summary-grid strong span {
    color: #758197;
    font-size: 12px;
}

.credit-progress {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #dfe5ec;
}

.credit-progress.large {
    margin-top: 12px;
}

.credit-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.credit-progress .complete {
    background: #19a45b;
}

.credit-progress .shortage {
    background: #f09a16;
}

.credit-progress .kme-normal {
    background: #315efb;
}

.subject-credit-panel {
    padding: 17px;
    border: 1px solid #e1e6ef;
    border-radius: 11px;
    background: #ffffff;
}

.subject-credit-panel h4 {
    margin: 0 0 16px;
    color: #27364f;
}

.subject-credit-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 13px 28px;
}

.subject-credit-row {
    display: grid;
    grid-template-columns: 55px 1fr 90px;
    align-items: center;
    gap: 10px;
}

.subject-credit-row strong,
.subject-credit-row small {
    font-size: 11px;
}

.subject-credit-row small {
    text-align: right;
    color: #57647a;
}

.subject-credit-row .shortage-text {
    color: #bd5b1a;
    font-weight: 700;
}

.student-course-matrix-section {
    background: #ffffff;
}

.course-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.course-legend span {
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
}

.course-legend .completed {
    color: #536078;
    background: #eef2f7;
}

.course-legend .fixed {
    color: #16794b;
    background: #dcf8e8;
}

.course-legend .applied {
    color: #2457d6;
    background: #e5edff;
}

.course-legend .dreamdure {
    color: #7c3bb7;
    background: #f2e8ff;
}

.student-matrix-scroll {
    overflow-x: auto;
}

.student-course-matrix {
    width: 100%;
    min-width: 1250px;
    border-collapse: collapse;
    table-layout: fixed;
}

.student-course-matrix th,
.student-course-matrix td {
    padding: 9px;
    border: 1px solid #dbe3ee;
    vertical-align: top;
}

.student-course-matrix thead th {
    color: #24344f;
    background: #eaf0f8;
    text-align: center;
    font-size: 11px;
}

.student-course-matrix thead th:first-child,
.student-course-matrix tbody th {
    width: 58px;
}

.student-course-matrix tbody th {
    color: #263653;
    background: #f4f7fb;
    text-align: center;
    vertical-align: middle;
    font-size: 11px;
}

.student-course-matrix td {
    min-height: 75px;
}

.matrix-course-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.matrix-course-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 8px;
    border-radius: 9px;
    color: #46536a;
    background: #eef2f7;
    font-size: 10px;
    font-weight: 700;
}

.matrix-course-chip small {
    font-size: 8px;
    opacity: 0.78;
}

.matrix-course-chip.fixed,
.matrix-course-chip.planned-fixed {
    color: #126f43;
    background: #dff8e9;
}

.matrix-course-chip.applied {
    color: #2457d6;
    background: #e7eeff;
}

.matrix-course-chip.dreamdure {
    color: #7837ad;
    background: #f1e5ff;
}

.matrix-empty {
    display: block;
    padding: 10px;
    color: #a0a9b8;
    text-align: center;
}

@media (max-width: 900px) {
    .credit-summary-grid,
    .subject-credit-grid {
        grid-template-columns: 1fr;
    }

    .student-detail-section-heading {
        flex-direction: column;
    }
}

.grade-selection-state {
    min-height: calc(100vh - 74px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.grade-selection-heading {
    max-width: 680px;
    margin-bottom: 34px;
}

.grade-selection-heading h1 {
    margin: 8px 0 12px;
    color: #10213f;
    font-size: 32px;
}

.grade-selection-heading p {
    margin: 0 0 18px;
    color: #71809a;
}

#gradeSelectionSchool {
    display: inline-flex;
    padding: 8px 16px;
    border-radius: 999px;
    background: #eef3ff;
    color: #315fdc;
}

.grade-choice-grid {
    width: min(760px, 100%);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.grade-choice-card {
    min-height: 170px;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 28px;
    border: 1px solid #dce4f2;
    border-radius: 20px;
    background: #ffffff;
    color: #10213f;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 12px 34px rgba(32, 55, 96, 0.08);
    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.grade-choice-card:hover:not(:disabled) {
    transform: translateY(-4px);
    border-color: #3562ff;
    box-shadow: 0 18px 42px rgba(53, 98, 255, 0.16);
}

.grade-choice-card:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    box-shadow: none;
}

.grade-choice-card.loading {
    opacity: 0.65;
    pointer-events: none;
}

.grade-choice-number {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    display: grid;
    place-items: center;
    border-radius: 17px;
    background: #3562ff;
    color: #ffffff;
    font-size: 25px;
    font-weight: 800;
}

.grade-choice-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.grade-choice-content strong {
    font-size: 21px;
}

.grade-choice-content small {
    color: #71809a;
    line-height: 1.5;
}

.grade-choice-arrow {
    color: #3562ff;
    font-size: 25px;
}

@media (max-width: 720px) {
    .grade-choice-grid {
        grid-template-columns: 1fr;
    }
}

.workspace-heading-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-wizard-panel {
    max-width: 960px;
    margin: 0 auto;
    overflow: hidden;
}

.file-wizard-panel.wizard-enter {
    animation: wizard-slide-in 0.28s ease;
}

@keyframes wizard-slide-in {
    from {
        opacity: 0;
        transform: translateX(28px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.wizard-upload-card {
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 22px;
    padding: 36px;
    border: 2px dashed #cbd7ec;
    border-radius: 18px;
    background: #f9fbff;
    cursor: pointer;
    transition: 0.18s ease;
}

.wizard-upload-card:hover {
    border-color: #3562ff;
    background: #f3f6ff;
}

.wizard-upload-card.uploaded {
    border-color: #22a06b;
    background: #f1fbf6;
}

.wizard-upload-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: #edf2ff;
    color: #3562ff;
    font-size: 27px;
}

.wizard-current-file {
    color: #22a06b;
    font-weight: 700;
}

.wizard-navigation {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
}

.wizard-review-list {
    display: grid;
    gap: 10px;
    margin-top: 22px;
}

.wizard-review-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 18px;
    border: 1px solid #dce4f2;
    border-radius: 14px;
}

.wizard-review-item div {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.wizard-review-item small {
    color: #71809a;
}

.wizard-review-item.complete span {
    color: #15965f;
}

.wizard-review-item.missing {
    border-color: #ffd1d8;
    background: #fff6f7;
}

.wizard-review-item.missing span {
    color: #d83d57;
}

.steps li.clickable {
    cursor: pointer;
}

.steps li.completed b {
    background: #19a46b;
    color: #fff;
}

.steps li.locked {
    cursor: not-allowed;
    opacity: 0.48;
}

.curriculum-check-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 22px;
}

.curriculum-check-grid article {
    min-height: 105px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 9px;
    padding: 18px;
    border: 1px solid #dce4f2;
    border-radius: 15px;
    background: #f8faff;
}

.curriculum-check-grid small {
    color: #71809a;
}

.curriculum-check-grid strong {
    color: #10213f;
    font-size: 17px;
}

.curriculum-check-status {
    margin-top: 18px;
    padding: 17px 19px;
    border-radius: 14px;
}

.curriculum-check-status strong {
    display: block;
    margin-bottom: 5px;
}

.curriculum-check-status p {
    margin: 0;
    font-size: 13px;
}

.curriculum-check-status.success {
    background: #ecf9f2;
    color: #138655;
}

.curriculum-check-status.warning {
    background: #fff8e7;
    color: #a36b00;
}

.curriculum-check-status.error {
    background: #fff0f2;
    color: #c7364f;
}

@media (max-width: 1000px) {
    .curriculum-check-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .curriculum-check-grid {
        grid-template-columns: 1fr;
    }
}

.wizard-navigation-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.curriculum-preview-button {
    color: #315fdc;
    border-color: #b9c9f5;
    background: #f4f7ff;
}

.curriculum-preview-modal {
    width: min(1380px, calc(100vw - 48px));
    max-width: none;
    height: min(880px, calc(100vh - 48px));
    display: flex;
    flex-direction: column;
}

.curriculum-preview-modal #modalBody {
    min-height: 0;
    flex: 1;
}

.curriculum-preview-frame-wrap {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border: 1px solid #dce4f2;
    border-radius: 12px;
    background: #ffffff;
}

.curriculum-preview-frame {
    width: 100%;
    height: 100%;
    border: 0;
    background: #ffffff;
}

@media (max-width: 720px) {
    .wizard-navigation {
        align-items: stretch;
        flex-direction: column;
    }

    .wizard-navigation-group {
        align-items: stretch;
        flex-direction: column;
    }
}

.wizard-rule-section {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid #dce4f2;
    border-radius: 16px;
    background: #f9fbff;
}

.wizard-rule-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.wizard-rule-heading h3 {
    margin: 0 0 5px;
    color: #10213f;
}

.wizard-rule-heading p {
    margin: 0;
    color: #71809a;
    font-size: 13px;
}

.graduation-credit-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.graduation-credit-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #dce4f2;
    border-radius: 12px;
    background: #fff;
}

.graduation-credit-item input {
    width: 68px;
    text-align: right;
}

.hierarchy-add-form {
    display: grid;
    grid-template-columns: 1fr 36px 1fr auto;
    align-items: end;
    gap: 10px;
}

.hierarchy-arrow {
    padding-bottom: 14px;
    color: #71809a;
    font-weight: 800;
    text-align: center;
}

.hierarchy-rule-list {
    display: grid;
    gap: 7px;
    margin-top: 18px;
}

.hierarchy-list-header,
.hierarchy-list-row {
    display: grid;
    grid-template-columns: 1fr 38px 1fr 150px;
    align-items: center;
    gap: 10px;
}

.hierarchy-list-header {
    padding: 10px 14px;
    border-radius: 9px;
    background: #e8eef8;
    font-size: 12px;
    font-weight: 800;
}

.hierarchy-list-row {
    padding: 10px 14px;
    border: 1px solid #dce4f2;
    border-radius: 9px;
    background: #fff;
}

.hierarchy-list-row > span {
    text-align: center;
}

.hierarchy-list-row > div {
    display: flex;
    gap: 6px;
}

.hierarchy-empty {
    padding: 22px;
    border: 1px dashed #d3ddec;
    border-radius: 11px;
    color: #8a6b20;
    text-align: center;
}

button.danger {
    color: #d83d57;
}

@media (max-width: 800px) {
    .graduation-credit-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hierarchy-add-form {
        grid-template-columns: 1fr;
    }

    .hierarchy-arrow {
        display: none;
    }

    .hierarchy-list-header,
    .hierarchy-list-row {
        grid-template-columns: 1fr;
    }
}

.recommendation-status-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.recommendation-status-grid article {
    min-height: 82px;
    padding: 18px;
    border: 1px solid #dbe3f1;
    border-radius: 14px;
    background: #f8faff;
}

.recommendation-status-grid small {
    display: block;
    margin-bottom: 9px;
    color: #71809d;
}

.recommendation-status-grid strong {
    color: #102044;
    font-size: 17px;
}

.recommendation-description {
    margin-top: 18px;
    padding: 18px 20px;
    border-radius: 14px;
    background: #eef4ff;
    color: #244679;
}

.recommendation-description p {
    margin: 7px 0 0;
    line-height: 1.6;
}

.recommendation-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

@media (max-width: 900px) {
    .recommendation-status-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .recommendation-actions {
        flex-direction: column;
    }
}

.student-inspection-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.student-inspection-grid article {
    padding: 16px;
    border: 1px solid #dbe3f1;
    border-radius: 13px;
    background: #f8faff;
}

.student-inspection-grid small {
    display: block;
    margin-bottom: 8px;
    color: #71809d;
}

.student-inspection-grid strong {
    color: #102044;
    font-size: 17px;
}

.student-inspection-issues {
    display: grid;
    gap: 8px;
    max-height: 230px;
    margin-top: 14px;
    overflow-y: auto;
}

.student-inspection-issue {
    padding: 11px 13px;
    border-radius: 10px;
    font-size: 13px;
}

.student-inspection-issue.error {
    border: 1px solid #fecaca;
    background: #fff1f2;
    color: #be123c;
}

.student-inspection-issue.warning {
    border: 1px solid #fde68a;
    background: #fffbeb;
    color: #a16207;
}

.student-preview-heading {
    display: flex;
    justify-content: space-between;
    margin-top: 22px;
    margin-bottom: 10px;
}

.student-preview-heading small {
    display: block;
    margin-top: 4px;
    color: #71809d;
}

.student-preview-table-wrap {
    max-height: 360px;
    overflow: auto;
    border: 1px solid #dbe3f1;
    border-radius: 12px;
}

.student-preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.student-preview-table th,
.student-preview-table td {
    padding: 11px 12px;
    border-bottom: 1px solid #e5eaf3;
    text-align: left;
    white-space: nowrap;
}

.student-preview-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #eaf0fa;
    color: #243758;
}

@media (max-width: 1100px) {
    .student-inspection-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.completed-course-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    min-width: 320px;
    white-space: normal;
}

.completed-course-chip {
    padding: 4px 8px;
    border-radius: 999px;
    background: #e9f8ef;
    color: #16834b;
    font-size: 12px;
}

.inspection-student-link {
    margin: 5px 4px 0 0;
    padding: 5px 9px;
    border: 1px solid currentColor;
    border-radius: 999px;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.inspection-student-link:hover {
    background: rgba(255, 255, 255, 0.7);
}

.completed-edit-button {
    padding: 6px 10px;
    border: 1px solid #cdd8eb;
    border-radius: 8px;
    background: white;
    color: #315efb;
    cursor: pointer;
}

.completed-editor-form {
    display: grid;
    gap: 14px;
}

.completed-editor-form label {
    display: grid;
    gap: 7px;
    font-weight: 700;
}

.completed-editor-form input,
.completed-editor-form textarea {
    width: 100%;
    box-sizing: border-box;
}

.completed-editor-help {
    padding: 11px 13px;
    border-radius: 10px;
    background: #eef4ff;
    color: #43618e;
    font-size: 13px;
    line-height: 1.6;
}

.modal-actions.split {
    justify-content: space-between;
}

.modal-danger-actions {
    display: flex;
    gap: 8px;
}

.applied-selection-normal {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    background: #dcfce7;
    color: #15803d;
    font-size: 12px;
    font-weight: 700;
}

.applied-selection-error {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    background: #fee2e2;
    color: #b91c1c;
    font-size: 12px;
    font-weight: 700;
}

.applied-course-editor {
    display: grid;
    gap: 16px;
}

.applied-course-group {
    padding: 15px;
    border: 1px solid #dbe3f1;
    border-radius: 12px;
}

.applied-course-group-heading {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.applied-course-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.applied-course-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 11px;
    border: 1px solid #e1e7f1;
    border-radius: 9px;
    cursor: pointer;
}

.applied-course-option:has(input:checked) {
    border-color: #315efb;
    background: #eef4ff;
    color: #244ed8;
}

/* 긴 팝업 내부 스크롤 */
.modal {
    max-height: calc(100dvh - 40px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.modal-backdrop {
    overflow-y: auto;
}

.result-filter-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin: 22px 0 18px;
}

.result-filter-card {
    min-height: 100px;
    padding: 18px;
    text-align: left;
    background: #fff;
    border: 1px solid #dfe5ef;
    border-top: 4px solid #dfe5ef;
    border-radius: 15px;
    cursor: pointer;
    transition: 0.18s ease;
}

.result-filter-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(30, 48, 80, 0.1);
}

.result-filter-card small {
    display: block;
    color: #6e7890;
    font-weight: 700;
}

.result-filter-card strong {
    display: block;
    margin-top: 9px;
    color: #14213d;
    font-size: 28px;
}

.result-filter-card.overall {
    border-top-color: #315efb;
}

.result-filter-card.attention {
    border-top-color: #f59e0b;
}

.result-filter-card.error {
    border-top-color: #ef526f;
}

.result-filter-card.active {
    border-color: #315efb;
    background: #f3f6ff;
    box-shadow: 0 0 0 2px rgba(49, 94, 251, 0.12);
}

.result-toolbar > div:first-child {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.result-toolbar small {
    color: #7b8498;
    font-size: 11px;
}

.result-folder-list {
    padding: 16px;
}

.result-class-folder {
    overflow: hidden;
    margin-bottom: 10px;
    border: 1px solid #dfe5ef;
    border-radius: 13px;
    background: #fff;
}

.result-class-heading {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 10px;
    padding: 17px 18px;
    border: 0;
    background: #f8faff;
    color: #19243b;
    cursor: pointer;
    text-align: left;
}

.result-class-heading:hover {
    background: #f0f4ff;
}

.result-folder-icon {
    width: 22px;
    color: #315efb;
    font-size: 18px;
}

.result-class-count {
    color: #657089;
    font-size: 12px;
}

.result-class-error,
.result-class-normal {
    margin-left: auto;
    padding: 5px 9px;
    border-radius: 14px;
    font-size: 11px;
    font-weight: 700;
}

.result-class-error {
    background: #fff0f2;
    color: #d93654;
}

.result-class-normal {
    background: #eaf9f2;
    color: #16885b;
}

.result-student-list {
    border-top: 1px solid #e6eaf1;
}

.result-student-row {
    display: grid;
    grid-template-columns:
        100px 120px 90px minmax(200px, 1fr) 20px;
    width: 100%;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border: 0;
    border-bottom: 1px solid #edf0f5;
    background: #fff;
    color: #202b42;
    cursor: pointer;
    text-align: left;
}

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

.result-student-row:hover {
    background: #f6f8ff;
}

.result-student-row.has-error {
    background: #fffafb;
    border-left: 4px solid #ef526f;
}

.result-student-row.has-error:hover {
    background: #fff2f4;
}

.result-student-number {
    color: #66718a;
    font-size: 12px;
}

.result-student-status {
    width: fit-content;
    padding: 5px 9px;
    border-radius: 13px;
    background: #eaf9f2;
    color: #16885b;
    font-size: 11px;
    font-weight: 700;
}

.result-student-row.has-error
.result-student-status {
    background: #fff0f2;
    color: #d93654;
}

.result-error-types {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    color: #8992a5;
    font-size: 11px;
}

.result-error-types em {
    padding: 5px 8px;
    border-radius: 12px;
    background: #fff0f2;
    color: #d93654;
    font-style: normal;
    font-weight: 700;
}

.result-row-arrow {
    color: #9baa4;
    font-size: 22px;
}

.result-empty {
    padding: 60px 20px;
    color: #7c8598;
    text-align: center;
}

@media (max-width: 800px) {
    .result-student-row {
        grid-template-columns: 80px 1fr 80px;
    }

    .result-error-types {
        grid-column: 1 / -1;
    }
}

/* 학점 누적 그래프 */
.credit-progress.stacked {
    display: flex;
    width: 100%;
    height: 12px;
    overflow: hidden;
    padding: 0;
    background: #dfe5ec;
    border-radius: 999px;
}

.credit-progress.stacked.large {
    height: 28px;
    margin-top: 12px;
}

.credit-progress.stacked
.credit-segment {
    position: static !important;
    display: block !important;
    height: 100% !important;
    flex: 0 0 auto;
    transition: width 0.35s ease;
}

.completed-credit {
    background: #19a463 !important;
}

.planned-credit {
    background: #f5c451 !important;
}

.credit-legend {
    display: flex;
    align-items: center;
    gap: 8px;
}

.credit-legend span,
.course-legend .planned-fixed {
    padding: 6px 10px;
    border-radius: 14px;
    font-size: 11px;
    font-weight: 700;
}

.credit-legend .completed {
    color: #148452;
    background: #dff7ea;
}

.credit-legend .planned,
.course-legend .planned-fixed {
    color: #9a6a00;
    background: #fff2bf;
}

.credit-breakdown {
    margin: 8px 0 0;
    color: #778197;
    font-size: 11px;
}

.credit-current-text {
    color: #158b57;
    font-weight: 700;
}

.credit-planned-text {
    color: #b47a00;
    font-weight: 700;
}

/* 이수 예정 학교 지정과목 */
.matrix-course-chip.planned-fixed {
    color: #8a6200 !important;
    background: #fff2bf !important;
    border-color: #efd478 !important;
}

.matrix-course-chip.planned-fixed small {
    color: #9d7000 !important;
}

.analysis-basis-display {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
    padding: 12px 15px;
    border: 1px solid #dfe5ef;
    border-radius: 12px;
    background: #f8faff;
}

.analysis-basis-display span {
    padding-right: 12px;
    color: #778198;
    font-size: 11px;
}

.analysis-basis-display strong {
    margin-left: 4px;
    color: #34415b;
}

.result-list-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.result-list-tools #resultSearch {
    width: 210px;
}

.result-list-tools button {
    flex: 0 0 auto;
    white-space: nowrap;
}

@media (max-width: 720px) {
    .result-list-tools {
        width: 100%;
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .result-list-tools #resultSearch {
        width: 100%;
        order: -1;
    }
}

.ai-status-connected {
    color: var(--green);
}

.ai-status-disconnected {
    color: var(--red);
}

#aiSettingsForm button + button {
    margin-top: 8px;
}

.recommendation-match-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--white);
}

.recommendation-match-selector p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.recommendation-match-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(190px, 1fr));
    gap: 10px;
}

.recommendation-match-options label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    cursor: pointer;
}

.recommendation-match-options label:has(input:checked) {
    border-color: var(--blue);
    background: var(--blue-soft);
}

.recommendation-match-options label.disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.recommendation-match-options input {
    margin-top: 3px;
}

.recommendation-match-options span {
    display: grid;
    gap: 5px;
}

.recommendation-match-options small {
    color: var(--muted);
    line-height: 1.45;
}

@media (max-width: 850px) {
    .recommendation-match-selector {
        align-items: stretch;
        flex-direction: column;
    }

    .recommendation-match-options {
        grid-template-columns: 1fr;
    }
}

.analysis-progress-panel {
    width: 100%;
    padding: 18px 20px;
    margin: 18px 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--white);
}

.analysis-progress-heading,
.analysis-progress-description {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.analysis-progress-heading {
    margin-bottom: 12px;
}

.analysis-progress-heading span {
    color: var(--blue);
    font-weight: 700;
}

.analysis-progress-track {
    width: 100%;
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e7ef;
}

.analysis-progress-bar {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(
        90deg,
        var(--blue),
        #6f8cff
    );
    transition: width 0.35s ease;
}

.analysis-progress-description {
    margin-top: 10px;
    color: var(--muted);
    font-size: 13px;
}

.analysis-mode-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 18px;
    margin-bottom: 20px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--blue-soft);
}

.analysis-mode-selector > div:first-child {
    display: grid;
    gap: 5px;
}

.analysis-mode-selector small {
    color: var(--muted);
}

.analysis-mode-options {
    display: flex;
    gap: 10px;
}

.analysis-mode-options label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-width: 190px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--white);
    cursor: pointer;
}

.analysis-mode-options label:has(input:checked) {
    color: var(--blue);
    border-color: var(--blue);
    box-shadow:
        0 0 0 2px
        rgba(49, 94, 251, 0.1);
}

.analysis-mode-options span {
    display: grid;
    gap: 4px;
}

@media (max-width: 800px) {
    .analysis-mode-selector {
        align-items: stretch;
        flex-direction: column;
    }

    .analysis-mode-options {
        display: grid;
        grid-template-columns: 1fr;
    }

    .analysis-mode-options label {
        min-width: 0;
    }
}

.admin-upload-guide {
    padding: 16px 18px;
    border: 1px solid #d9e4f5;
    border-radius: 14px;
    background: #f6f9ff;
}

.admin-upload-guide strong {
    display: block;
    color: #2455d6;
    font-size: 14px;
}

.admin-upload-guide p {
    margin: 7px 0 0;
    color: #71809a;
    font-size: 12px;
    line-height: 1.6;
}

.dreamdure-version-history {
    margin-top: 16px;
    border-top: 1px solid #e4eaf3;
}

.dreamdure-version-history summary {
    padding: 14px 0 4px;
    color: #52627c;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.dreamdure-history-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #edf1f7;
}

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

.dreamdure-history-row > div:first-child {
    min-width: 0;
}

.dreamdure-history-row strong {
    display: inline-block;
    margin-right: 7px;
    font-size: 13px;
}

.dreamdure-history-row small {
    display: block;
    margin-top: 5px;
    color: #7a879d;
    line-height: 1.5;
}

.dreamdure-history-actions {
    display: flex;
    flex-shrink: 0;
    gap: 7px;
}

@media (max-width: 720px) {
    .dreamdure-history-row {
        align-items: flex-start;
        flex-direction: column;
    }
}

.dreamdure-choice-card {
    min-height: 130px;
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 26px 28px;
    border: 1px solid #cde9df;
    border-radius: 20px;
    background:
        linear-gradient(
            135deg,
            #f1fbf7,
            #ffffff
        );
    color: #10213f;
    text-align: left;
    cursor: pointer;
    box-shadow:
        0 12px 34px
        rgba(23, 148, 105, 0.09);
    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.dreamdure-choice-card:hover {
    transform: translateY(-4px);
    border-color: #1ca371;
    box-shadow:
        0 18px 42px
        rgba(23, 148, 105, 0.16);
}

.dreamdure-choice-icon {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    display: grid;
    place-items: center;
    border-radius: 17px;
    background: #169c6c;
    color: #ffffff;
    font-size: 24px;
    font-weight: 800;
}

.dreamdure-manager {
    width: 100%;
    padding-bottom: 40px;
}

.dreamdure-page-heading {
    align-items: flex-start;
}

#dreamdureSchoolName {
    display: inline-flex;
    margin-top: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    background: #eaf8f2;
    color: #13825b;
    font-size: 13px;
}

.dreamdure-upload-panel,
.dreamdure-list-panel {
    margin-top: 20px;
}

.dreamdure-upload-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1.4fr)
        minmax(280px, 0.6fr);
    gap: 18px;
    margin-top: 20px;
}

.dreamdure-file-box {
    min-height: 190px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 25px;
    border: 1px dashed #afc8e9;
    border-radius: 17px;
    background: #f8faff;
    text-align: center;
    cursor: pointer;
}

.dreamdure-file-box:hover {
    border-color: #3562ff;
    background: #f3f6ff;
}

.dreamdure-upload-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: #eaf0ff;
    color: #3562ff;
    font-size: 25px;
}

.dreamdure-file-box small {
    color: #71809a;
}

.dreamdure-password-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 24px;
    border: 1px solid #dce4f2;
    border-radius: 17px;
    background: #ffffff;
}

.dreamdure-password-box label {
    margin-bottom: 9px;
    font-weight: 700;
}

.dreamdure-password-box input {
    width: 100%;
    padding: 14px;
    border: 1px solid #d5deed;
    border-radius: 11px;
}

.dreamdure-password-box small {
    margin-top: 9px;
    color: #71809a;
    line-height: 1.5;
}

.dreamdure-upload-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
}

.dreamdure-list-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.dreamdure-list-heading h2 {
    margin: 4px 0 5px;
}

.dreamdure-list-heading p {
    margin: 0;
    color: #71809a;
}

.dreamdure-record-list {
    margin-top: 22px;
}

.dreamdure-period-card {
    margin-bottom: 15px;
    overflow: hidden;
    border: 1px solid #dce4f2;
    border-radius: 17px;
    background: #ffffff;
}

.dreamdure-period-card.has-warning {
    border-color: #f3c6a0;
}

.dreamdure-period-card > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px;
    background: #f7f9fd;
    cursor: pointer;
    list-style: none;
}

.dreamdure-period-card > summary::-webkit-details-marker {
    display: none;
}

.dreamdure-period-card > summary strong {
    display: block;
    color: #10213f;
    font-size: 17px;
}

.dreamdure-period-card > summary small {
    display: block;
    margin-top: 5px;
    color: #71809a;
}

.dreamdure-period-counts {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.dreamdure-period-counts span {
    padding: 6px 10px;
    border-radius: 999px;
    background: #edf2f8;
    color: #53627a;
    font-size: 12px;
    font-weight: 700;
}

.dreamdure-period-counts .normal {
    background: #e4f8ef;
    color: #16825c;
}

.dreamdure-period-counts .warning {
    background: #fff0e3;
    color: #c65c16;
}

.dreamdure-period-information {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    padding: 14px 20px;
    border-top: 1px solid #e6ebf3;
    color: #71809a;
    font-size: 12px;
}

.dreamdure-table-wrap {
    overflow-x: auto;
    border-top: 1px solid #e6ebf3;
}

.dreamdure-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
}

.dreamdure-table th,
.dreamdure-table td {
    padding: 13px 15px;
    border-bottom: 1px solid #edf1f6;
    text-align: left;
    white-space: nowrap;
}

.dreamdure-table th {
    background: #f6f8fc;
    color: #52627a;
    font-size: 12px;
}

.dreamdure-table td {
    color: #263650;
    font-size: 13px;
}

.dreamdure-status-badge {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.dreamdure-status-badge.normal {
    background: #e3f8ee;
    color: #14835b;
}

.dreamdure-status-badge.warning {
    background: #fff0dc;
    color: #bd5a13;
}

.dreamdure-status-badge.error {
    background: #ffeaed;
    color: #d93851;
}

@media (max-width: 800px) {
    .dreamdure-upload-grid {
        grid-template-columns: 1fr;
    }

    .dreamdure-page-heading,
    .dreamdure-list-heading,
    .dreamdure-period-card > summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .dreamdure-period-counts {
        justify-content: flex-start;
    }
}

.dreamdure-completion-select {
    min-width: 92px;
    padding: 8px 10px;
    border: 1px solid #d6deeb;
    border-radius: 9px;
    background: #ffffff;
    color: #253650;
    font-weight: 700;
    cursor: pointer;
}

button.dreamdure-status-badge {
    border: 0;
    cursor: default;
}

button.dreamdure-status-badge.error,
button.dreamdure-status-badge.exception {
    cursor: pointer;
}

.dreamdure-status-badge.exception {
    background: #fff3c9;
    color: #a96700;
}

.dreamdure-delete-registration {
    padding: 7px 11px;
    color: #d73b54;
    font-size: 12px;
}

.dreamdure-error-popup {
    padding: 6px;
}

.dreamdure-error-popup h3 {
    margin: 15px 0 10px;
    color: #17253e;
    font-size: 20px;
}

.dreamdure-error-popup p {
    color: #52627a;
    line-height: 1.7;
}

.dreamdure-popup-error,
.dreamdure-popup-exception {
    display: inline-flex;
    padding: 6px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.dreamdure-popup-error {
    background: #ffeaed;
    color: #d93851;
}

.dreamdure-popup-exception {
    background: #fff3c9;
    color: #a96700;
}

.dreamdure-popup-description {
    padding: 13px 15px;
    border-radius: 11px;
    background: #f5f7fb;
}

.dreamdure-popup-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    margin-top: 22px;
}

.warning-button {
    padding: 10px 16px;
    border: 1px solid #e7ab36;
    border-radius: 10px;
    background: #fff4d5;
    color: #9c6200;
    font-weight: 700;
    cursor: pointer;
}

.matrix-course-chip.dreamdure-planned {
    border-color: #e9bd4a;
    background: #fff4bf;
    color: #8b6200;
}

.course-legend .dreamdure-planned {
    background: #fff1ae;
    color: #8c6300;
}

.result-filter-card.reanalyze {
    border-top-color: #f59e0b;
}

.result-filter-card.reanalyze.active {
    border-color: #f59e0b;
    background: #fffbeb;
    box-shadow:
        0 8px 24px
        rgba(245, 158, 11, 0.14);
}

.result-filter-card.reanalyze strong {
    color: #b45309;
}

.matrix-course-chip.dreamdure-editable,
.matrix-course-chip.applied-editable {
    cursor: context-menu;
}

.matrix-course-chip.dreamdure-editable:hover,
.matrix-course-chip.applied-editable:hover {
    filter: brightness(0.97);
    box-shadow:
        0 0 0 2px
        rgba(49, 94, 251, 0.13);
}

.course-context-menu {
    position: fixed;
    z-index: 10000;
    display: flex;
    width: 190px;
    padding: 8px;
    flex-direction: column;
    gap: 4px;
    border: 1px solid #dbe3f1;
    border-radius: 12px;
    background: #fff;
    box-shadow:
        0 18px 45px
        rgba(15, 23, 42, 0.2);
}

.course-context-menu strong {
    padding: 8px 10px;
    color: #64748b;
    font-size: 12px;
    border-bottom: 1px solid #edf1f7;
}

.course-context-menu button {
    padding: 9px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #1e293b;
    text-align: left;
    cursor: pointer;
}

.course-context-menu button:hover:not(:disabled) {
    background: #f1f5ff;
    color: #315efb;
}

.course-context-menu button:disabled {
    color: #94a3b8;
    cursor: default;
}

.course-context-menu button.danger {
    color: #dc2626;
}

.course-context-menu button.danger:hover {
    background: #fff1f2;
}

/* =========================================================
   학생정보 열 확인 모달
   ========================================================= */

.modal.student-header-modal {
    width: min(760px, 100%);
    max-height: calc(100vh - 40px);
    padding: 30px;
    overflow-y: auto;
}

.student-header-modal > h2 {
    margin: 0 0 22px;
    padding-right: 36px;

    color: var(--ink);
    font-size: 22px;
    line-height: 1.35;
}

.student-header-confirmation {
    display: grid;
    gap: 18px;
}

.student-header-confirmation > p {
    margin: 0;

    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

/* 자동 인식 결과 안내 */
.student-header-summary {
    position: relative;

    padding: 17px 18px 17px 52px;

    background: var(--blue-soft);
    border: 1px solid #d7e1ff;
    border-radius: 14px;
}

.student-header-summary::before {
    position: absolute;
    top: 18px;
    left: 18px;

    display: grid;
    place-items: center;

    width: 23px;
    height: 23px;

    color: #fff;
    font-size: 13px;
    font-weight: 800;

    content: "✓";
    background: var(--blue);
    border-radius: 50%;
}

.student-header-summary strong {
    display: block;

    margin-bottom: 6px;

    color: #2548b8;
    font-size: 15px;
}

.student-header-summary p {
    margin: 0;

    color: #60719c;
    font-size: 13px;
    line-height: 1.6;
}

/* 미리보기 테이블 */
.student-header-modal .student-detail-table-wrap {
    overflow: hidden;

    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fff;
}

.student-header-modal .student-detail-table {
    table-layout: fixed;
}

.student-header-modal .student-detail-table th {
    padding: 12px 15px;

    color: #526078;
    font-size: 12px;
    font-weight: 700;

    background: #f3f6fb;
}

.student-header-modal .student-detail-table td {
    padding: 12px 15px;

    color: var(--ink);
    font-size: 13px;
}

.student-header-modal .student-detail-table tbody tr:last-child td {
    border-bottom: 0;
}

/* 직접 선택 폼 */
.student-header-modal .completed-editor-form {
    gap: 18px;
}

.student-header-modal .completed-editor-form > label {
    color: #34415a;
    font-size: 13px;
}

.student-header-modal select {
    min-height: 46px;
    margin: 0;
    padding: 0 13px;

    color: var(--ink);

    background: #fff;
    border: 1px solid #d7dfed;
    border-radius: 10px;

    cursor: pointer;
}

.student-header-modal select:hover {
    border-color: #9eb3ef;
}

.student-header-modal select:focus {
    border-color: var(--blue);
    outline: 3px solid rgba(49, 94, 251, 0.12);
}

/* 학번 구성 방식 */
.student-id-mode-fieldset {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;

    margin: 0;
    padding: 0;

    border: 0;
}

.student-id-mode-fieldset legend {
    grid-column: 1 / -1;

    margin-bottom: 3px;

    color: #34415a;
    font-size: 13px;
    font-weight: 700;
}

.student-id-mode-fieldset label {
    display: flex;
    align-items: center;
    gap: 10px;

    min-height: 48px;
    padding: 12px 14px;

    color: #536079;
    font-size: 13px;
    font-weight: 700;

    background: #f8faff;
    border: 1px solid #dce4f1;
    border-radius: 11px;

    cursor: pointer;
}

.student-id-mode-fieldset label:has(input:checked) {
    color: var(--blue);

    background: var(--blue-soft);
    border-color: var(--blue);
    box-shadow: 0 0 0 2px rgba(49, 94, 251, 0.08);
}

.student-id-mode-fieldset input {
    flex: 0 0 auto;

    width: 16px;
    height: 16px;
    margin: 0;

    accent-color: var(--blue);
}

/* 학년·반·번호 선택 */
#componentStudentIdMapping {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

#componentStudentIdMapping label,
#singleStudentIdMapping label {
    display: grid;
    gap: 7px;

    color: #34415a;
    font-size: 13px;
    font-weight: 700;
}

/* 하단 버튼 */
.student-header-modal .modal-actions {
    margin-top: 22px;
    padding-top: 18px;

    border-top: 1px solid var(--line);
}

.student-header-modal .modal-actions button {
    min-height: 43px;
    padding: 0 17px;
}

/* 작은 화면 */
@media (max-width: 700px) {
    .modal.student-header-modal {
        width: 100%;
        padding: 22px 18px;
    }

    .student-id-mode-fieldset {
        grid-template-columns: 1fr;
    }

    #componentStudentIdMapping {
        grid-template-columns: 1fr;
    }

    .student-header-modal .modal-actions {
        flex-wrap: wrap;
    }

    .student-header-modal .modal-actions button {
        flex: 1;
    }
}

.grade-report-panel {
    margin-top: 20px;
    padding: 22px;
    border: 1px solid #dfe5f2;
    border-radius: 16px;
    background: #fff;
}

.grade-report-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid #e7ebf3;
}

.grade-report-heading h3 {
    margin: 0 0 7px;
    font-size: 18px;
}

.grade-report-heading p:not(.eyebrow) {
    margin: 0;
    color: #68728a;
    font-size: 12px;
    line-height: 1.6;
}

.grade-report-local-badge {
    flex: none;
    padding: 7px 11px;
    border-radius: 20px;
    background: #eaf8f2;
    color: #16835e;
    font-size: 11px;
    font-weight: 800;
}

.grade-report-upload-row {
    display: flex;
    align-items: stretch;
    gap: 12px;
    margin-top: 18px;
}

.grade-report-file-box {
    flex: 1;
    min-height: 82px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border: 1px dashed #bfcce7;
    border-radius: 13px;
    background: #f8faff;
    cursor: pointer;
}

.grade-report-file-box:hover {
    border-color: #315efb;
    background: #f3f6ff;
}

.grade-report-upload-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: none;
    border-radius: 12px;
    background: #e9efff;
    color: #315efb;
    font-size: 23px;
}

.grade-report-file-box strong {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
}

.grade-report-file-box small {
    display: block;
    color: #7b8498;
    font-size: 11px;
}

.grade-report-upload-row > button {
    align-self: center;
    min-width: 120px;
    height: 46px;
}

.grade-report-status {
    margin: 14px 0 0;
    padding: 12px 14px;
    border-radius: 10px;
    background: #eef3ff;
    color: #315efb;
    font-size: 12px;
}

.grade-report-status.error {
    background: #fff0f2;
    color: #d6425d;
}

.grade-report-preview {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #e7ebf3;
}

.grade-report-period {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.grade-report-period span {
    display: block;
    margin-bottom: 4px;
    color: #7a8499;
    font-size: 11px;
}

.grade-report-period strong {
    font-size: 15px;
}

.grade-report-period p {
    margin: 0;
    color: #d98900;
    font-size: 11px;
}

.grade-report-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.grade-report-summary article {
    padding: 14px;
    border: 1px solid #e0e5ef;
    border-top: 3px solid #315efb;
    border-radius: 12px;
}

.grade-report-summary article.success {
    border-top-color: #18a575;
}

.grade-report-summary article.warning {
    border-top-color: #e79a16;
}

.grade-report-summary article.danger {
    border-top-color: #df5067;
}

.grade-report-summary span {
    color: #747e92;
    font-size: 11px;
}

.grade-report-summary strong {
    display: block;
    margin-top: 7px;
    font-size: 20px;
}

.grade-report-preview-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}

.grade-report-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(17, 27, 49, 0.48);
}

.grade-report-modal {
    position: relative;
    width: min(780px, 100%);
    max-height: min(760px, calc(100vh - 40px));
    overflow: hidden;
    padding: 26px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 25, 50, 0.25);
}

.grade-report-modal-close {
    position: absolute;
    top: 13px;
    right: 15px;
    border: 0;
    background: transparent;
    color: #7b8495;
    font-size: 26px;
    cursor: pointer;
}

.grade-report-modal-heading h2 {
    margin: 0 0 7px;
    font-size: 21px;
}

.grade-report-modal-heading p:not(.eyebrow) {
    margin: 0;
    color: #68728a;
    font-size: 12px;
}

.grade-report-ambiguity-list {
    display: grid;
    gap: 12px;
    max-height: 470px;
    margin-top: 20px;
    padding-right: 5px;
    overflow-y: auto;
}

.grade-report-match-card {
    padding: 16px;
    border: 1px solid #dfe5ef;
    border-radius: 13px;
    background: #fafbfe;
}

.grade-report-match-card h3 {
    margin: 0 0 12px;
    font-size: 15px;
}

.grade-report-source-row {
    padding: 12px;
    border: 1px solid #e3e8f1;
    border-radius: 10px;
    background: #fff;
}

.grade-report-source-row + .grade-report-source-row {
    margin-top: 9px;
}

.grade-report-source-row p {
    margin: 0 0 8px;
    color: #626d82;
    font-size: 12px;
}

.grade-report-source-courses {
    margin-bottom: 10px;
    color: #315efb;
    font-size: 11px;
    line-height: 1.6;
}

.grade-report-source-row select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccd4e2;
    border-radius: 9px;
    background: #fff;
}

.grade-report-modal-error {
    margin: 12px 0 0;
    color: #d6425d;
    font-size: 12px;
}

.grade-report-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 18px;
}

@media (max-width: 700px) {
    .grade-report-upload-row {
        flex-direction: column;
    }

    .grade-report-upload-row > button {
        width: 100%;
    }

    .grade-report-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .grade-report-period {
        align-items: flex-start;
        flex-direction: column;
    }
}

.grade-report-saved-section {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid #e7ebf3;
}

.grade-report-saved-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.grade-report-saved-heading h3 {
    margin: 0 0 5px;
    font-size: 15px;
}

.grade-report-saved-heading p {
    margin: 0;
    color: #788297;
    font-size: 11px;
}

.completed-grade-report-list {
    display: grid;
    gap: 9px;
    margin-top: 14px;
}

.grade-report-saved-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
px;
    padding: 14px 16px;
    border: 1px solid #e0e5ef;
    border-radius: 11px;
    background: #fafbfe;
}

.grade-report-saved-item strong {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
}

.grade-report-saved-item small {
    color: #707b90;
    font-size: 11px;
}

.grade-report-delete-btn {
    flex: none;
    border: 0;
    background: transparent;
    color: #df5067;
    font-size: 12px;
    cursor: pointer;
}

.grade-report-delete-btn:hover {
    text-decoration: underline;
}

.grade-report-list-empty {
    margin: 0;
    padding: 22px;
    border: 1px dashed #d7deea;
    border-radius: 11px;
    color: #818b9e;
    text-align: center;
    font-size: 12px;
}

/* 꿈두레 과목 직접 연결 모달 */
#dreamdureCourseMatchModal[hidden] {
    display: none;
}

#dreamdureCourseMatchModal {
    position: fixed;
    inset: 0;
    z-index: 3000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;

    background: rgba(15, 23, 42, 0.52);
    backdrop-filter: blur(3px);
}

.dreamdure-course-match-modal {
    width: min(680px, 100%);
    max-height: min(760px, calc(100vh - 48px));

    display: flex;
    flex-direction: column;

    padding: 28px;

    overflow: hidden;

    background: #ffffff;
    border: 1px solid #dce5f3;
    border-radius: 20px;

    box-shadow:
        0 24px 60px rgba(15, 23, 42, 0.22);
}

.dreamdure-course-match-modal .modal-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;

    margin-bottom: 20px;
}

.dreamdure-course-match-modal .modal-heading h2 {
    margin: 0 0 7px;

    color: #12213d;
    font-size: 22px;
    line-height: 1.3;
}

.dreamdure-course-match-modal .modal-heading p {
    margin: 0;

    color: #71809b;
    font-size: 14px;
    line-height: 1.6;
}

.dreamdure-course-match-modal .modal-close {
    width: 36px;
    height: 36px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;

    padding: 0;

    color: #75829a;
    font-size: 26px;
    line-height: 1;

    background: transparent;
    border: 0;
    border-radius: 10px;

    cursor: pointer;
}

.dreamdure-course-match-modal .modal-close:hover {
    color: #17223b;
    background: #f1f5fb;
}

.dreamdure-course-match-current {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    margin-bottom: 18px;
    padding: 15px 17px;

    background: #fff5f6;
    border: 1px solid #ffd9df;
    border-radius: 12px;
}

.dreamdure-course-match-current span {
    color: #8c5970;
    font-size: 13px;
}

.dreamdure-course-match-current strong {
    color: #e43f5f;
    font-size: 15px;
    text-align: right;
}

.dreamdure-course-match-field {
    display: flex;
    flex-direction: column;
    gap: 8px;

    margin-bottom: 14px;

    color: #263550;
    font-size: 14px;
    font-weight: 700;
}

.dreamdure-course-match-field input {
    width: 100%;
    min-height: 44px;

    padding: 0 14px;

    color: #17223b;
    font: inherit;
    font-weight: 400;

    background: #ffffff;
    border: 1px solid #d5deed;
    border-radius: 10px;

    outline: none;
}

.dreamdure-course-match-field input:focus {
    border-color: #3563ff;
    box-shadow: 0 0 0 3px rgba(53, 99, 255, 0.12);
}

.dreamdure-course-match-list {
    min-height: 160px;
    max-height: 360px;

    display: flex;
    flex-direction: column;
    gap: 8px;

    padding: 4px;
    overflow-y: auto;
}

.dreamdure-course-match-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;

    padding: 14px 15px;

    background: #ffffff;
    border: 1px solid #dce4f0;
    border-radius: 12px;

    cursor: pointer;
    transition:
        border-color 0.15s ease,
        background 0.15s ease,
        box-shadow 0.15s ease;
}

.dreamdure-course-match-option:hover {
    background: #f8faff;
    border-color: #aebfff;
}

.dreamdure-course-match-option.selected {
    background: #f1f5ff;
    border-color: #3563ff;
    box-shadow: 0 0 0 2px rgba(53, 99, 255, 0.1);
}

.dreamdure-course-match-option input {
    width: 17px;
    height: 17px;

    flex: 0 0 auto;
    margin: 2px 0 0;

    accent-color: #3563ff;
}

.dreamdure-course-match-option > span {
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 5px;
}

.dreamdure-course-match-option strong {
    color: #17223b;
    font-size: 14px;
    line-height: 1.4;
}

.dreamdure-course-match-option small {
    color: #73809a;
    font-size: 12px;
    line-height: 1.5;
}

.dreamdure-course-match-modal .admin-login-error {
    margin: 12px 0 0;
}

.dreamdure-course-match-modal .modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;

    margin-top: 20px;
    padding-top: 18px;

    border-top: 1px solid #e5ebf4;
}

.dreamdure-course-match-modal .modal-actions button {
    min-height: 44px;
    padding: 0 18px;
    border-radius: 10px;
}

.dreamdure-course-match-modal .modal-actions .primary:disabled {
    color: #ffffff;
    background: #aebbea;
    box-shadow: none;
    cursor: not-allowed;
}

.dreamdure-course-match-btn {
    cursor: pointer;
}

.dreamdure-course-match-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(228, 63, 95, 0.16);
}

@media (max-width: 640px) {
    #dreamdureCourseMatchModal {
        padding: 12px;
    }

    .dreamdure-course-match-modal {
        max-height: calc(100vh - 24px);
        padding: 20px;
        border-radius: 16px;
    }

    .dreamdure-course-match-current {
        align-items: flex-start;
        flex-direction: column;
    }

    .dreamdure-course-match-current strong {
        text-align: left;
    }
}

/* 꿈두레 동명이인 확인 */
.grade-report-match-description {
    margin-bottom: 18px;
    padding: 13px 15px;

    color: #596881;
    font-size: 14px;
    line-height: 1.6;

    background: #f6f8fc;
    border: 1px solid #e1e7f1;
    border-radius: 11px;
}

.grade-report-ambiguity-list {
    max-height: min(490px, 58vh);

    display: flex;
    flex-direction: column;
    gap: 14px;

    padding: 2px 6px 2px 2px;
    overflow-y: auto;
}

.grade-report-ambiguity-list::-webkit-scrollbar {
    width: 7px;
}

.grade-report-ambiguity-list::-webkit-scrollbar-track {
    background: #f1f4f9;
    border-radius: 999px;
}

.grade-report-ambiguity-list::-webkit-scrollbar-thumb {
    background: #bdc7d7;
    border-radius: 999px;
}

.grade-report-ambiguity-item {
    padding: 16px;

    background: #ffffff;
    border: 1px solid #dce4f0;
    border-radius: 14px;
}

.grade-report-ambiguity-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;

    margin-bottom: 13px;
    padding-bottom: 13px;

    border-bottom: 1px solid #edf1f7;
}

.grade-report-ambiguity-heading > div {
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 4px;
}

.grade-report-ambiguity-heading strong {
    color: #15223b;
    font-size: 16px;
    line-height: 1.4;
}

.grade-report-ambiguity-heading small {
    color: #7a879d;
    font-size: 12px;
    line-height: 1.5;
}

.grade-report-ambiguity-heading > span {
    flex: 0 0 auto;

    padding: 6px 10px;

    color: #315de8;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;

    background: #edf2ff;
    border-radius: 999px;
}

.grade-report-candidate-list {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.grade-report-candidate {
    min-width: 0;

    display: flex;
    align-items: center;
    gap: 11px;

    padding: 12px 13px;

    background: #ffffff;
    border: 1px solid #dce4f0;
    border-radius: 11px;

    cursor: pointer;
    transition:
        border-color 0.15s ease,
        background 0.15s ease,
        box-shadow 0.15s ease;
}

.grade-report-candidate:hover {
    background: #f7f9ff;
    border-color: #9eb2ff;
}

.grade-report-candidate:has(input:checked) {
    background: #eef3ff;
    border-color: #3563ff;
    box-shadow:
        0 0 0 2px rgba(53, 99, 255, 0.1);
}

.grade-report-candidate input[type="radio"] {
    width: 17px;
    height: 17px;

    flex: 0 0 auto;
    margin: 0;

    accent-color: #3563ff;
    cursor: pointer;
}

.grade-report-candidate > span {
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 3px;
}

.grade-report-candidate strong {
    overflow: hidden;

    color: #17233d;
    font-size: 14px;
    line-height: 1.4;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.grade-report-candidate small {
    color: #77849a;
    font-size: 12px;
    line-height: 1.4;
}

/* 동명이인 모달 하단 버튼 고정 */
.grade-report-ambiguity-list
    + .admin-login-error {
    margin-top: 12px;
}

.grade-report-match-description
    ~ .modal-actions {
    position: sticky;
    bottom: 0;

    margin-top: 18px;
    padding-top: 17px;

    background: #ffffff;
    border-top: 1px solid #e5eaf2;
}

/* 작은 화면 */
@media (max-width: 640px) {
    .grade-report-candidate-list {
        grid-template-columns: 1fr;
    }

    .grade-report-ambiguity-heading {
        flex-direction: column;
        gap: 9px;
    }

    .grade-report-ambiguity-heading > span {
        white-space: normal;
    }
}

.grade-report-candidate.selected {
    background: #eef3ff;
    border-color: #3563ff;
    box-shadow:
        0 0 0 2px rgba(53, 99, 255, 0.1);
}


.dreamdure-sort-button {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.dreamdure-sort-button small {
    min-width: 10px;
    color: #315efb;
    font-size: 9px;
}

.dreamdure-sort-button:hover,
.dreamdure-sort-button.active {
    color: #315efb;
}

.ignore-student-confirm {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px 18px;
    text-align: center;
}

.ignore-student-warning-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 18px;
    border-radius: 50%;
    background: #fff0f1;
    color: #e5485d;
    font-size: 26px;
    font-weight: 800;
}

.ignore-student-confirm > strong {
    color: #172033;
    font-size: 18px;
}

.ignore-student-confirm > p {
    margin: 12px 0 8px;
    color: #e5485d;
    font-size: 15px;
    font-weight: 700;
}

.ignore-student-confirm > small {
    max-width: 430px;
    color: #778197;
    line-height: 1.6;
}

.wizard-navigation {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wizard-navigation
.ghost.danger {
    margin-left: auto;
}

.wizard-navigation
.ghost.danger
+ .primary {
    margin-left: 0;
}

.wizard-upload-card,
.admin-upload-card,
.dreamdure-upload-card {
    transition:
        border-color 0.18s ease,
        background-color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}

.file-drop-active {
    border-color: #315efb !important;
    background: #f2f6ff !important;
    box-shadow:
        0 0 0 4px
        rgba(49, 94, 251, 0.12);
    transform: translateY(-2px);
}

.file-drop-active::after {
    content: "여기에 놓아 업로드";
    display: block;
    margin-top: 10px;
    color: #315efb;
    font-size: 13px;
    font-weight: 700;
}

.selected-upload-file-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 14px;
    max-height: 190px;
    overflow-y: auto;
}

.selected-upload-file-list[hidden] {
    display: none;
}

.selected-upload-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid #dce4f2;
    border-radius: 10px;
    background: #fff;
}

.selected-upload-file > div {
    min-width: 0;
}

.selected-upload-file strong {
    display: block;
    overflow: hidden;
    color: #25314a;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.selected-upload-file small {
    color: #8a94a8;
    font-size: 11px;
}

.selected-upload-file-remove {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #fff0f1;
    color: #e5485d;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.selected-upload-file-remove:hover {
    background: #ffdfe3;
}

.agent-setup-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;

    background:
        rgba(15, 23, 42, 0.56);

    backdrop-filter:
        blur(5px);
}

.agent-setup-overlay[hidden] {
    display: none;
}

.agent-setup-dialog {
    position: relative;

    width: min(100%, 480px);

    padding: 34px;

    border: 1px solid #dbe4f0;
    border-radius: 22px;

    background: #ffffff;

    box-shadow:
        0 24px 70px
        rgba(15, 23, 42, 0.24);
}

.agent-setup-dialog h2 {
    margin:
        6px 0 12px;

    color: #14213d;
    font-size: 25px;
}

.agent-setup-dialog > p:not(.eyebrow) {
    margin: 0;

    color: #64748b;
    line-height: 1.7;
}

.agent-setup-close {
    position: absolute;
    top: 18px;
    right: 18px;

    width: 36px;
    height: 36px;

    border: 0;
    border-radius: 50%;

    color: #64748b;
    background: transparent;

    font-size: 26px;
    line-height: 1;

    cursor: pointer;
}

.agent-setup-close:hover {
    color: #1e293b;
    background: #f1f5f9;
}

.agent-setup-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;

    margin-top: 28px;
}

.agent-setup-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    text-decoration: none;
}

@media (max-width: 520px) {
    .agent-setup-dialog {
        padding:
            30px 22px 24px;
    }

    .agent-setup-actions {
        flex-direction: column-reverse;
    }

    .agent-setup-actions > * {
        width: 100%;
    }
}