:root {
    /* Online Learning UI Style Guide */
    --navy: #1e2e63;
    --blue: #2f73ff;
    --teal: #20c7b1;
    --mint: #d7f5ec;
    --bg-page: #f4f8ff;
    --panel: #ffffff;
    --border-soft: #dde6f2;
    --orange: #f5a623;
    --aqua: #eaf9f5;
    --gray-soft: #eef2f7;

    --font-sans: "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;

    /* aliases (existing class compatibility) */
    --blue2: #1e2e63;
    --ink: #1e2e63;
    --muted: #6b7a99;
    --line: #dde6f2;
    --bg: #f4f8ff;
    --bg2: #f4f8ff;
    --ok: #20c7b1;
    --fail: #e23a2e;
    --red: #e23a2e;
    --orange-legacy: #f5a623;
    --primary: var(--blue);
    --accent: var(--blue);
    --radius-pill: 999px;
    --radius-lg: 20px;

    --decor-wave: url("../images/decor/wave-overlay.svg");
    --decor-corner: url("../images/decor/corner-gradient.svg");
    --decor-mint: url("../images/decor/mint-panel-accent.svg");
    --decor-blue: url("../images/decor/blue-panel-accent.svg");
}

* { box-sizing: border-box; }

html {
    font-size: 110%;
    height: 100%;
}

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

body {
    margin: 0;
    min-height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--ink);
    background-color: var(--bg-page);
    background-image:
        radial-gradient(ellipse 50% 35% at 0% 0%, rgba(47, 115, 255, .06), transparent 60%),
        radial-gradient(ellipse 40% 30% at 100% 0%, rgba(32, 199, 177, .05), transparent 55%);
    background-attachment: fixed;
    line-height: 1.55;
}

/* 콘텐츠가 짧을 때 footer를 화면 하단에 고정 (sgsolution 방식) */
body.hse-theme {
    display: flex;
    flex-direction: column;
}

body.hse-theme > .site-header {
    flex-shrink: 0;
}

body.hse-theme > main {
    flex: 1 0 auto;
}

body.hse-theme > .site-footer {
    flex-shrink: 0;
    margin-top: auto;
}

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

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-header {
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-soft);
}

.site-header .container.header-row,
.header-row {
    max-width: 1400px;
}

.site-header .brand,
.brand-logo-inline {
    color: var(--navy);
    font-weight: 800;
    letter-spacing: -.02em;
}

.nav a {
    color: var(--navy);
    font-size: 1.05rem;
    font-weight: 600;
}

.nav a:hover {
    color: var(--blue);
    text-decoration: none;
}

body.hse-guest .site-header,
body.hse-guest .site-footer {
    display: none;
}

body.hse-guest main.container {
    max-width: none;
    width: 100%;
    padding: 0;
    margin: 0;
}

main.container.container-dashboard {
    max-width: 1400px;
    padding-top: 28px;
    padding-bottom: 20px;
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 72px;
}

.site-header .brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--ink);
    text-decoration: none;
}

.nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.nav a { color: var(--ink); font-size: 1.05rem; }
.nav-user { color: var(--muted); font-size: 1rem; }

main.container { padding-top: 28px; padding-bottom: 48px; }

.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 28px 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}

h1 { font-size: 1.55rem; margin: 0 0 6px; }
h2 { font-size: 1.15rem; margin: 28px 0 12px; }

.tag {
    font-size: .75rem;
    background: var(--orange);
    color: #fff;
    padding: 2px 8px;
    border-radius: 999px;
    vertical-align: middle;
}

.muted { color: var(--muted); }
.muted.next { margin-top: 24px; }
.center { text-align: center; }

.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.check-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .92rem;
}

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

.check-table th { color: var(--muted); font-weight: 600; }
.check-table td.detail { color: var(--muted); word-break: break-all; }
.check-table td.actions { white-space: nowrap; }

.badge {
    display: inline-block;
    font-size: .8rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 999px;
    background: rgba(107, 114, 128, .12);
    color: var(--muted);
}

.badge.ok { background: rgba(26, 158, 87, .12); color: var(--ok); }
.badge.fail { background: rgba(209, 59, 50, .12); color: var(--fail); }

.btn {
    display: inline-block;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    padding: 8px 14px;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: .9rem;
    cursor: pointer;
    text-decoration: none;
}

.btn:hover { text-decoration: none; background: #f9fafb; }
.btn-sm { padding: 5px 10px; font-size: .82rem; }

.btn.btn-logout-pill {
    border: 1.5px solid rgba(31, 36, 48, .18);
    background: #fff;
    color: var(--ink);
    border-radius: var(--radius-pill);
    padding: 8px 18px;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
}

.btn.btn-logout-pill:hover {
    border-color: var(--blue);
    color: var(--blue);
    background: #fff;
}

.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: #1f5eef; border-color: #1f5eef; color: #fff; }
.btn-teal { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn-teal:hover { background: #1aad9d; text-decoration: none; }
.btn-blue { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-blue:hover { background: #1f5ff0; text-decoration: none; }
.btn-pill {
    border-radius: var(--radius-pill);
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    text-align: center;
}
.btn-ghost { background: transparent; }
.btn-block { width: 100%; }

.inline-form { display: inline; margin: 0; }

.form { display: grid; gap: 14px; margin: 18px 0; }
.form label { display: grid; gap: 6px; font-size: .9rem; }
.form input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 1rem;
}

.auth-wrap {
    max-width: 440px;
    margin: 12px auto;
}

.auth-shell {
    min-height: 100vh;
    width: 100%;
    display: grid;
    grid-template-columns: minmax(280px, 1.05fr) minmax(360px, .95fr);
    background-color: var(--bg-page);
    background-image:
        radial-gradient(ellipse 50% 40% at 10% 10%, rgba(47, 115, 255, .08), transparent 55%),
        radial-gradient(ellipse 40% 35% at 90% 80%, rgba(32, 199, 177, .07), transparent 50%);
}

.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 32px;
}

.auth-panel-brand {
    background:
        radial-gradient(circle 240px at 100% 100%, rgba(255, 255, 255, .16), transparent 70%),
        linear-gradient(145deg, rgba(30, 46, 99, .96) 0%, rgba(47, 115, 255, .88) 52%, rgba(32, 194, 177, .78) 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}

/* 하단 우측 장식 타원 */
.auth-panel-brand::before {
    content: "";
    position: absolute;
    right: -80px;
    bottom: -110px;
    width: 560px;
    height: 340px;
    pointer-events: none;
    opacity: .9;
    background:
        radial-gradient(
            ellipse 224px 182px at 340px 260px,
            rgba(244, 248, 255, .7) 0%,
            rgba(244, 248, 255, .7) 99%,
            transparent 100%
        ),
        radial-gradient(
            ellipse 196px 168px at 200px 290px,
            rgba(47, 115, 255, .22) 0%,
            rgba(47, 115, 255, .22) 99%,
            transparent 100%
        );
}

/* 상단 좌측 장식 타원 */
.auth-panel-brand::after {
    content: "";
    position: absolute;
    left: -80px;
    top: -110px;
    width: 560px;
    height: 340px;
    pointer-events: none;
    opacity: .9;
    background:
        radial-gradient(
            ellipse 224px 182px at 220px 80px,
            rgba(244, 248, 255, .7) 0%,
            rgba(244, 248, 255, .7) 99%,
            transparent 100%
        ),
        radial-gradient(
            ellipse 196px 168px at 360px 50px,
            rgba(47, 115, 255, .22) 0%,
            rgba(47, 115, 255, .22) 99%,
            transparent 100%
        );
}

.auth-brand-copy {
    position: relative;
    z-index: 1;
    max-width: 420px;
}

.auth-brand-logo {
    display: block;
    font-size: clamp(2.2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -.03em;
    color: #fff;
    margin-bottom: 22px;
}

.auth-brand-tagline {
    margin: 0;
    font-size: clamp(1.85rem, 3.6vw, 2.55rem);
    font-weight: 600;
    line-height: 1.4;
    color: rgba(255, 255, 255, .92);
}

.auth-panel-form {
    background: transparent;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    border: 1px solid rgba(227, 234, 242, .95);
    box-shadow: 0 18px 48px rgba(15, 39, 71, .08);
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(10px);
    padding: 36px 32px 28px;
    border-radius: 22px;
}

.auth-card.auth-card-wide {
    max-width: 560px;
}

.auth-eyebrow {
    margin: 0 0 8px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .14em;
    color: #64748b;
}

.auth-card h1 {
    text-align: left;
    font-size: 1.7rem;
    margin: 0 0 8px;
    color: var(--navy);
    font-weight: 800;
}

.auth-lead {
    margin: 0 0 6px;
    text-align: left;
}

.auth-card .muted.center,
.auth-footer-link {
    margin-top: 18px;
}

.login-test-hint {
    font-size: .85rem;
    margin: 0 0 4px;
    text-align: left;
}

.login-tabs {
    display: flex;
    gap: 8px;
    margin: 16px 0 18px;
}

.login-tab {
    flex: 1;
    padding: 10px 12px;
    border: 1.5px solid #e3eaf2;
    background: #fff;
    color: #475569;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
    border-radius: var(--radius-pill);
}

.login-tab:hover {
    border-color: var(--teal);
    color: var(--navy);
}

.login-tab.is-active {
    color: #fff;
    border-color: var(--teal);
    background: var(--teal);
    font-weight: 700;
}

.auth-card .form input {
    padding: 12px 14px;
    border-radius: 12px;
    border-color: var(--border-soft);
    background: var(--gray-soft);
}

.auth-card .form input:focus {
    outline: none;
    border-color: var(--blue);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(47, 115, 255, .14);
}

.auth-submit {
    margin-top: 6px;
    min-height: 46px;
    font-weight: 700;
    box-shadow: 0 10px 22px rgba(47, 115, 255, .22);
}

@media (max-width: 900px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }
    .auth-panel-brand {
        min-height: 180px;
        padding: 28px 24px;
    }
    .auth-panel-form {
        padding: 24px 16px 40px;
    }
    .auth-card {
        max-width: 480px;
        margin: 0 auto;
    }
    .auth-card.auth-card-wide {
        max-width: 560px;
    }
}

.alert {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: .95rem;
    font-weight: 600;
    line-height: 1.45;
}

.alert-ok {
    background: #fff;
    color: #000;
    border: 1px solid #c5cedd;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .08);
}

.alert-fail { background: rgba(209, 59, 50, .12); color: var(--fail); }

/* 로그인/회원가입: 알림이 화면 상단에 묻히지 않도록 카드 위에 표시 */
body.hse-guest main.container {
    position: relative;
}

body.hse-guest main.container > .alert {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
    width: min(560px, calc(100% - 32px));
    margin: 0;
}

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

.stat-box {
    display: block;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: inherit;
    text-decoration: none;
}

.stat-box:hover { border-color: var(--orange); text-decoration: none; }
.stat-box strong { display: block; font-size: 1.5rem; margin-bottom: 4px; }
.stat-box span { color: var(--muted); font-size: .9rem; }

.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.section-title { font-size: 1.1rem; margin: 0 0 12px; }
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    margin: 16px 0;
}
.filter-bar label { display: grid; gap: 4px; font-size: .85rem; color: var(--muted); }
.filter-bar label.grow { flex: 1; min-width: 200px; }
.filter-bar select,
.filter-bar input[type="search"],
.filter-bar input[type="text"] {
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    min-width: 160px;
}
.chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}
.chart-panel {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}
.chart-panel h3 { margin: 0 0 8px; font-size: .95rem; }
.chart-panel-wide { grid-column: 1 / -1; }
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-top: 12px;
}
.detail-grid span { display: block; font-size: .8rem; margin-bottom: 4px; }
.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 16px;
}
.pager a {
    min-width: 32px;
    text-align: center;
    padding: 4px 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: inherit;
    text-decoration: none;
}
.pager a.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.filter-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 12px 0 18px;
}

.filter-tabs a {
    padding: 6px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--ink);
    font-size: .85rem;
}

.filter-tabs a.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.tab-count {
    display: inline-block;
    min-width: 18px;
    padding: 0 6px;
    margin-left: 2px;
    border-radius: 999px;
    background: #F5A623;
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

.badge.wait { background: rgba(245, 166, 35, .16); color: #b06d00; }

/* 주의 인물 (관리자 전용) */
.caution-badge {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 700;
    vertical-align: middle;
    cursor: help;
}
.caution-badge.caution-caution { background: #FFF4DC; color: #9a6400; border: 1px solid #F5D28A; }
.caution-badge.caution-watch { background: #FFE9D6; color: #B4500B; border: 1px solid #F3B585; }
.caution-badge.caution-blacklist { background: #FDE2E4; color: #A61B2B; border: 1px solid #F1A4AC; }
tr.has-caution > td:first-child { box-shadow: inset 3px 0 0 #F5A623; }
.caution-note {
    margin-top: 4px;
    color: #9a6400;
    font-size: .8rem;
    white-space: pre-line;
}
.caution-panel.is-flagged { border-left: 4px solid #F5A623; }
.caution-panel.caution-blacklist { border-left-color: #D13B32; }
.caution-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}
.caution-form label { display: grid; gap: 4px; font-size: .85rem; color: var(--muted); }
.caution-form label.grow { flex: 1; min-width: 240px; }
.caution-form select,
.caution-form textarea {
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font: inherit;
}

.site-footer {
    padding: 24px 0;
    color: var(--muted);
    text-align: center;
    border-top: 1px solid var(--border-soft);
    background: rgba(255, 255, 255, .72);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 8px;
}

/* --- TotalHSE Theme --- */
.brand-logo {
    display: inline-block;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -.02em;
}

.hse-landing {
    text-align: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 8px 20px 24px;
}

.hse-landing h1 {
    font-size: 1.45rem;
    font-weight: 800;
    margin: 20px 0 8px;
}

.hse-landing .lead {
    color: var(--muted);
    font-size: .95rem;
    margin: 0 0 28px;
    line-height: 1.5;
}

.hse-auth-actions {
    display: grid;
    gap: 28px;
    margin-top: 8px;
}

.hse-auth-block {
    display: grid;
    gap: 10px;
}

.hse-auth-block p {
    margin: 0;
    color: var(--muted);
    font-size: .92rem;
}

.hse-dashboard {
    max-width: 1400px;
    margin: 0 auto;
    padding-bottom: 12px;
    display: grid;
    gap: 22px;
}

.hse-welcome-hero {
    display: grid;
    grid-template-columns: 1fr minmax(240px, 300px);
    gap: 20px;
    align-items: center;
    padding: 30px 28px 30px 34px;
    border-radius: 24px;
    background: var(--panel);
    box-shadow: 0 12px 32px rgba(30, 46, 99, .05);
    border: 1px solid var(--border-soft);
    position: relative;
    overflow: hidden;
    min-height: 148px;
}

.hse-welcome-hero::before {
    content: "";
    position: absolute;
    left: -24px;
    bottom: -48px;
    width: 280px;
    height: 170px;
    background: var(--decor-mint) no-repeat left bottom / contain;
    pointer-events: none;
    opacity: .45;
}

.hse-welcome-hero::after {
    content: "";
    position: absolute;
    right: -36px;
    top: -56px;
    width: 260px;
    height: 260px;
    background: var(--decor-corner) no-repeat right top / contain;
    pointer-events: none;
    opacity: .5;
}

.hse-welcome-copy {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.hse-welcome-label {
    margin: 0 0 8px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .14em;
    color: var(--muted);
}

.hse-welcome-title {
    margin: 0;
    font-size: clamp(1.7rem, 3.4vw, 2.15rem);
    font-weight: 800;
    line-height: 1.25;
    color: #1e2e63;
    letter-spacing: -.03em;
    position: relative;
    z-index: 2;
}

.hse-user-card {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(12px);
    color: var(--ink);
    border-radius: 18px;
    padding: 16px 18px;
    border: 1px solid var(--border-soft);
    box-shadow: 0 10px 24px rgba(30, 46, 99, .06);
}

.hse-user-card-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--blue);
    color: #fff;
    border: none;
    font-size: 1.2rem;
    font-weight: 700;
    box-shadow: 0 6px 14px rgba(47, 115, 255, .28);
}

.hse-user-card-meta {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.hse-user-card-name {
    font-size: .98rem;
    font-weight: 700;
    color: var(--navy);
}

.hse-user-card-sub {
    font-size: .78rem;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hse-user-card-link {
    margin-top: 6px;
    font-size: .78rem;
    font-weight: 700;
    color: var(--blue);
    text-decoration: none;
}

.hse-user-card-link:hover {
    text-decoration: underline;
}

/* 마이페이지 */
.container-mypage {
    max-width: 1100px;
    padding-top: 28px;
    padding-bottom: 48px;
}

.mypage-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.mypage-eyebrow {
    margin: 0 0 6px;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .12em;
    color: var(--teal);
}

.mypage-title {
    margin: 0 0 8px;
    font-size: clamp(1.5rem, 2.2vw, 1.9rem);
    font-weight: 800;
    color: var(--navy);
}

.mypage-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.mypage-panel-wide {
    grid-column: 1 / -1;
}

.mypage-panel-title {
    margin: 0 0 16px;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--navy);
}

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

.mypage-panel-head .mypage-panel-title {
    margin: 0;
}

.mypage-dl {
    margin: 0;
    display: grid;
    gap: 12px;
}

.mypage-dl > div {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 10px;
    align-items: baseline;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-soft);
}

.mypage-dl dt {
    margin: 0;
    font-size: .82rem;
    color: var(--muted);
    font-weight: 600;
}

.mypage-dl dd {
    margin: 0;
    font-size: .95rem;
    color: var(--navy);
    font-weight: 600;
    word-break: break-all;
}

.mypage-note {
    margin: 14px 0 0;
    font-size: .8rem;
}

.mypage-form {
    margin: 0;
    max-width: 420px;
}

.mypage-form-password {
    max-width: 520px;
    grid-template-columns: 1fr 1fr;
}

.mypage-form-password label:first-child,
.mypage-form-password button {
    grid-column: 1 / -1;
}

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

    .mypage-form-password {
        grid-template-columns: 1fr;
    }

    .mypage-hero {
        flex-direction: column;
    }

    .mypage-dl > div {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

/* 수료증 페이지 */
.container-certificates {
    max-width: 1100px;
    padding-top: 28px;
    padding-bottom: 48px;
}

.certificates-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cert-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

.cert-card-label {
    margin: 0 0 4px;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .06em;
    color: var(--teal);
    text-transform: uppercase;
}

.cert-card-number {
    margin: 0 0 16px;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--navy);
    word-break: break-all;
}

.cert-card-dl > div {
    grid-template-columns: 72px 1fr;
}

.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 16px;
}

.pager a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid var(--border-soft);
    color: var(--navy);
    text-decoration: none;
    font-size: .88rem;
    font-weight: 600;
}

.pager a.active,
.pager a:hover {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

.cert-upload-details {
    margin-top: 8px;
    max-width: 260px;
}

.cert-upload-details > summary {
    cursor: pointer;
    font-size: .8rem;
    font-weight: 700;
    color: var(--blue);
    list-style: none;
}

.cert-upload-details > summary::-webkit-details-marker { display: none; }

.cert-upload-form {
    display: grid;
    gap: 8px;
    margin-top: 8px;
    padding: 10px;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    background: #f8fafc;
}

.cert-upload-form label {
    display: grid;
    gap: 4px;
    font-size: .78rem;
    color: var(--muted);
}

.cert-upload-form input[type="text"],
.cert-upload-form input[type="file"] {
    font-size: .8rem;
}

.hse-panel,
.hse-course-section {
    background: var(--panel);
    border: 1px solid var(--border-soft);
    border-radius: 22px;
    padding: 22px 22px 20px;
    box-shadow: 0 10px 28px rgba(30, 46, 99, .04);
    position: relative;
    overflow: hidden;
}

.hse-panel::after {
    content: "";
    position: absolute;
    right: -20px;
    bottom: -36px;
    width: 220px;
    height: 140px;
    background: var(--decor-blue) no-repeat right bottom / contain;
    pointer-events: none;
    opacity: .35;
}

.hse-panel > * {
    position: relative;
    z-index: 1;
}

.hse-section-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.hse-section-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(47, 115, 255, .12);
    position: relative;
    flex-shrink: 0;
}

.hse-section-icon::before {
    content: "";
    position: absolute;
    inset: 7px;
    border-radius: 2px;
    background: var(--blue);
}

.hse-section-icon-book::before {
    clip-path: polygon(20% 10%, 80% 10%, 80% 90%, 50% 75%, 20% 90%);
}

.hse-section-icon-clock::before {
    inset: 5px;
    border-radius: 0;
    clip-path: none;
    background-color: var(--blue);
    background-image: none;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' fill='%23000' d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 5h-2v5.25l4.5 2.7.75-1.23L13 12.25V7z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' fill='%23000' d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 5h-2v5.25l4.5 2.7.75-1.23L13 12.25V7z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.hse-section-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--navy);
}

.hse-section-count {
    margin-left: auto;
    font-size: .82rem;
    font-weight: 600;
    color: var(--muted);
    background: var(--gray-soft);
    border-radius: var(--radius-pill);
    padding: 4px 12px;
    border: 1px solid var(--border-soft);
}

.hse-accordion {
    display: grid;
    gap: 12px;
}

.hse-accordion-item {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
}

.hse-accordion-head {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border: none;
    background: #fff;
    font: inherit;
    color: var(--ink);
    cursor: pointer;
    text-align: left;
}

.hse-accordion-head-text {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.hse-accordion-title {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.2;
}

.hse-accordion-sub {
    font-size: .82rem;
    font-weight: 500;
    color: var(--muted);
}

.hse-accordion-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--teal);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    line-height: 1;
    flex-shrink: 0;
    transition: transform .2s ease;
}

.hse-accordion-item.is-open .hse-accordion-icon {
    transform: rotate(45deg);
}

.hse-accordion-body {
    display: none;
    padding: 0 14px 14px;
}

.hse-accordion-item.is-open .hse-accordion-body {
    display: block;
}

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

.hse-course-grid-past {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hse-course-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 148px;
    padding: 22px 20px;
    border-radius: 20px;
    color: #0f172a;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .8);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
    transition: transform .2s ease, box-shadow .2s ease;
}

.hse-course-card.is-sm {
    min-height: 128px;
    padding: 18px 16px;
    font-size: .92rem;
}

.hse-course-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(145deg, rgba(255, 255, 255, .55) 0%, rgba(255, 255, 255, 0) 48%);
}

.hse-course-card > * {
    position: relative;
    z-index: 1;
}

.hse-course-card:hover {
    text-decoration: none;
    transform: translateY(-3px);
    box-shadow: 0 16px 30px rgba(15, 23, 42, .1);
}

.hse-course-card:hover .hse-course-arrow {
    transform: translateX(2px);
}

.hse-course-card.card-blue {
    background: #d9e7fe;
}

.hse-course-card.card-blue::after {
    display: none;
}

.hse-course-card.card-teal {
    background: #dcf8f4;
}

.hse-course-card.card-teal::after {
    display: none;
}

.hse-course-card.card-orange {
    background: #ffe9cc;
}

.hse-course-card.card-orange::after {
    display: none;
}

.hse-course-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.hse-course-title {
    flex: 1;
    min-width: 0;
    word-break: break-word;
    color: #0f172a;
    text-shadow: none;
}

.hse-course-card.card-orange .hse-course-title {
    text-shadow: none;
}

.hse-course-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .85);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .08);
}

.hse-course-icon-glyph {
    width: 22px;
    height: 22px;
    display: block;
    background-color: var(--blue);
    -webkit-mask: var(--icon-url) center / contain no-repeat;
    mask: var(--icon-url) center / contain no-repeat;
}

.hse-course-card.card-blue .hse-course-icon-glyph { background-color: var(--blue); }
.hse-course-card.card-teal .hse-course-icon-glyph { background-color: var(--teal); }
.hse-course-card.card-orange .hse-course-icon-glyph { background-color: var(--orange); }

.hse-course-card-foot {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
}

.hse-course-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}

.hse-course-arrow {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: rgba(15, 23, 42, .55);
    font-size: 1.05rem;
    line-height: 1;
    transition: transform .2s ease, color .2s ease, background-color .2s ease;
}

.hse-course-arrow .xi-arrow-right {
    display: block;
    font-size: inherit;
    line-height: 1;
}

.hse-course-card:hover .hse-course-arrow { color: rgba(15, 23, 42, .85); }

.hse-course-card.card-blue .hse-course-arrow {
    background: rgba(255, 255, 255, .55);
    color: #2d75fd;
}

.hse-course-card.card-blue:hover .hse-course-arrow {
    background: rgba(255, 255, 255, .75);
    color: #2d75fd;
}

.hse-course-card.card-teal .hse-course-arrow {
    background: rgba(255, 255, 255, .55);
    color: #0f9a88;
}

.hse-course-card.card-teal:hover .hse-course-arrow {
    background: rgba(255, 255, 255, .75);
    color: #0f9a88;
}

.hse-course-card.card-orange .hse-course-arrow {
    background: rgba(255, 255, 255, .55);
    color: #c47a00;
}

.hse-course-card.card-orange:hover .hse-course-arrow {
    background: rgba(255, 255, 255, .75);
    color: #c47a00;
}

.hse-course-badge {
    font-size: .72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, .65);
    color: #334155;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .4);
}

.hse-course-card.card-blue .hse-course-badge {
    background: #b9d1fe;
    color: #2d75fd;
    box-shadow: none;
}

.hse-course-card.card-teal .hse-course-badge {
    background: #b0ede4;
    color: #0f9a88;
    box-shadow: none;
}

.hse-course-card.card-orange .hse-course-badge {
    background: #ffd4a0;
    color: #c47a00;
    box-shadow: none;
}

.hse-empty {
    color: var(--muted);
    font-size: .9rem;
    padding: 8px 4px 4px;
    margin: 0;
}

.hse-dashboard-actions {
    margin-top: 8px;
    text-align: center;
}

.hse-enroll-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 260px;
    padding: 14px 40px;
    font-size: 1.1rem;
    font-weight: 700;
    background: var(--blue);
    color: #fff;
    border: none;
    box-shadow: 0 12px 24px rgba(47, 115, 255, .28);
    position: relative;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.hse-enroll-btn::after { display: none; }

.hse-enroll-btn > * {
    position: relative;
    z-index: 1;
}

.hse-enroll-btn:hover {
    background: #1f5ff0;
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 16px 28px rgba(47, 115, 255, .34);
    filter: none;
}

.learn-hero-overlay {
    position: relative;
}

.learn-hero-overlay .learn-banner { height: 188px; }

.learn-hero-title-wrap {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    background: linear-gradient(180deg, rgba(30, 46, 99, .25), rgba(30, 46, 99, .62));
    color: #fff;
}

.learn-hero-title-wrap h1 {
    color: #fff;
    font-size: 1.35rem;
    margin: 0 0 14px;
    text-shadow: 0 2px 8px rgba(0,0,0,.35);
}

.btn-start-course {
    background: rgba(255, 255, 255, .88);
    color: var(--ink);
    border: none;
    border-radius: var(--radius-pill);
    padding: 10px 22px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    font-size: .82rem;
}

.btn-start-course:hover {
    background: #fff;
    text-decoration: none;
}

.hse-progress-strip {
    background: var(--teal);
    color: #fff;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .01em;
}

.hse-progress-strip .progress-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, .35);
    margin: 0 10px;
    border-radius: 999px;
    overflow: hidden;
}

.hse-progress-strip .progress-bar-fill {
    background: #fff;
}

.hse-module-accordion { margin-top: 4px; }

.hse-module-item {
    background: #fff;
    border-radius: 16px;
    margin-bottom: 10px;
    overflow: hidden;
    border: 1px solid #cfd9ea;
    box-shadow: 0 8px 22px rgba(30, 46, 99, .06);
}

.hse-module-head {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 16px;
    border: none;
    background: #fff;
    color: #1e2e63;
    font: inherit;
    font-size: 1.12rem;
    font-weight: 800;
    cursor: pointer;
    text-align: left;
}

.hse-module-head .module-title {
    min-width: 0;
}

.hse-module-head .module-check {
    color: var(--blue);
    font-weight: 700;
    flex-shrink: 0;
}

.hse-module-body {
    display: none;
    padding: 4px 14px 16px;
    color: #1e2e63;
}

.hse-module-item.is-open .hse-module-body { display: block; }

.hse-module-body .hse-empty,
.hse-module-body .muted {
    color: #4a5d7a;
    font-size: 1rem;
    font-weight: 600;
}

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

.hse-lesson-chip {
    display: block;
    padding: 14px 12px;
    border-radius: 12px;
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.35;
    text-shadow: 0 1px 1px rgba(15, 23, 42, .18);
}

.hse-lesson-chip.chip-blue { background: var(--blue); }
.hse-lesson-chip.chip-teal { background: var(--teal); }

.hse-lesson-chip:hover { text-decoration: none; filter: brightness(1.05); }

.hse-curriculum { display: grid; gap: 12px; }

.hse-curriculum-section {
    background: transparent;
    border-radius: 0;
    border: none;
    overflow: visible;
    box-shadow: none;
}

.hse-curriculum-section-head {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #14967d;
    color: #fff;
    font-weight: 700;
    font-size: .8rem;
    letter-spacing: .01em;
    padding: 12px 14px;
    user-select: none;
    border-radius: 10px;
}

.hse-curriculum-section-head::-webkit-details-marker { display: none; }

.hse-curriculum-section-title {
    min-width: 0;
    line-height: 1.35;
}

.hse-curriculum-chevron {
    width: 8px;
    height: 8px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg);
    flex-shrink: 0;
    opacity: .9;
    transition: transform .18s ease;
}

.hse-curriculum-section[open] .hse-curriculum-chevron {
    transform: rotate(-135deg);
    margin-top: 4px;
}

.hse-curriculum-list {
    list-style: none;
    margin: 0;
    padding: 10px 0 2px;
    display: grid;
    gap: 8px;
}

.hse-curriculum-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 12px;
    background: #fff;
    border-radius: 10px;
    color: #1e293b;
    text-decoration: none;
    font-size: .82rem;
    font-weight: 600;
    border: 1.5px solid transparent;
    transition: background .15s ease, border-color .15s ease;
}

.hse-curriculum-item.is-active {
    background: #e8faf4;
    border-color: var(--teal);
    box-shadow: none;
}

.hse-curriculum-item:hover { text-decoration: none; filter: brightness(.98); }

.hse-lesson-title { min-width: 0; line-height: 1.35; }

.hse-lesson-status {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--orange);
    flex-shrink: 0;
    position: relative;
}

.hse-lesson-status.is-done {
    background: var(--orange);
}

.hse-lesson-status.is-done::after {
    content: "✓";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: .72rem;
    font-weight: 800;
}

.hse-lesson-status.is-progress {
    border-color: var(--orange);
    background: conic-gradient(var(--orange) 50%, transparent 50%);
}

.learn-sidebar-hse {
    background: #243447;
    color: #e2e8f0;
    padding: 16px 14px;
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .18);
    border: 1px solid rgba(255, 255, 255, .06);
}

.learn-sidebar-head {
    margin: 0 0 14px 4px;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .12em;
    color: rgba(226, 232, 240, .7);
}

.learn-sidebar-hse .sidebar-label {
    color: rgba(226, 232, 240, .7);
    margin: 0 0 10px;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.brand-link { text-decoration: none; }
.brand-link:hover { text-decoration: none; }

.brand-logo-inline {
    font-size: 1.25rem;
}

.learn-hero-body {
    padding: 16px;
}

.hse-exam-list {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
}

.hse-exam-line {
    margin: 0;
    padding: 14px 16px;
    background: #f4f8ff;
    border: 1px solid #d5deee;
    border-radius: 12px;
}

.hse-exam-line-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.hse-exam-line-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #1e2e63;
    line-height: 1.35;
}

.hse-exam-line-badge {
    flex-shrink: 0;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
    background: #eef2f7;
    color: #64748b;
}

.hse-exam-line-badge.is-pass {
    background: rgba(32, 199, 177, .16);
    color: #0f9a88;
}

.hse-exam-line-meta {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hse-exam-line-meta li {
    padding: 5px 10px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: .88rem;
    font-weight: 600;
}

.hse-attendance-summary {
    margin: 0 0 14px;
    padding: 14px 16px;
    background: #f4f8ff;
    border: 1px solid #d5deee;
    border-radius: 12px;
}

.hse-attendance-summary-title {
    margin: 0 0 10px;
    font-size: 1.05rem;
    font-weight: 800;
    color: #1e2e63;
    line-height: 1.3;
}

.hse-attendance-summary-meta {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hse-attendance-summary-meta li {
    display: grid;
    gap: 2px;
    min-width: 96px;
    padding: 8px 12px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
}

.hse-attendance-summary-label {
    font-size: .75rem;
    font-weight: 700;
    color: #64748b;
    letter-spacing: .02em;
}

.hse-attendance-summary-meta strong {
    font-size: 1.05rem;
    font-weight: 800;
    color: #1e2e63;
    line-height: 1.2;
}

.hse-attendance-summary-exam.is-pass {
    color: #0f9a88;
}

.hse-attendance-summary-exam.is-fail {
    color: #c0392b;
}

.hse-attendance-table { min-width: 0 !important; }
.hse-attendance-table th,
.hse-attendance-table td { font-size: .92rem; padding: 8px 10px; }

/* --- Admin CMS (corporate LMS) --- */
.admin-body {
    --admin-navy: var(--navy);
    --admin-blue: var(--blue);
    --admin-teal: var(--teal);
    --admin-mint: var(--mint);
    --admin-bg: var(--bg-page);
    --admin-border: var(--border-soft);
    background-color: var(--admin-bg);
    background-image:
        radial-gradient(ellipse 50% 35% at 0% 0%, rgba(47, 115, 255, .05), transparent 55%),
        radial-gradient(ellipse 40% 30% at 100% 0%, rgba(32, 199, 177, .05), transparent 50%);
    background-attachment: fixed;
    margin: 0;
    min-height: 100vh;
}

.admin-top {
    position: sticky;
    top: 0;
    z-index: 40;
    height: 68px;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--admin-border);
    box-shadow: 0 1px 0 rgba(15, 39, 71, .02);
}

.admin-top-inner {
    width: 100%;
    max-width: 1680px;
    margin: 0 auto;
    height: 100%;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.admin-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--admin-navy);
}

.admin-brand:hover { text-decoration: none; color: var(--admin-navy); }

.admin-brand-mark {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -.02em;
}

.admin-brand-badge {
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .08em;
    color: #fff;
    background: var(--admin-navy);
    border-radius: 999px;
    padding: 4px 9px;
}

.admin-top-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--admin-blue);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    font-weight: 700;
}

.admin-user-name {
    font-size: .9rem;
    font-weight: 600;
    color: var(--admin-navy);
}

.admin-user-role {
    padding: 1px 8px;
    border-radius: 999px;
    background: #D7F5EC;
    color: #0F7F70;
    font-size: .74rem;
    font-weight: 700;
}

/* 운영자 관리 / 강사 대시보드 */
.badge.role-admin { background: rgba(30, 46, 99, .12); color: #1E2E63; }
.badge.role-manager { background: rgba(47, 115, 255, .12); color: #2F73FF; }
.badge.role-instructor { background: rgba(32, 199, 177, .14); color: #0F7F70; }
.staff-course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 8px 16px;
}
.staff-course-grid .checkbox-label {
    display: flex;
    gap: 8px;
    align-items: center;
}
.instructor-course {
    margin-top: 20px;
    padding: 18px 20px;
    border: 1px solid #DDE6F2;
    border-radius: 12px;
    background: #fff;
}
.instructor-course-head {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}
.instructor-course-head h2 {
    margin: 0 0 4px;
    font-size: 1.1rem;
    color: #1E2E63;
}

.admin-user-mypage {
    font-size: .78rem;
    font-weight: 700;
    color: var(--blue);
    text-decoration: none;
    white-space: nowrap;
}

.admin-user-mypage:hover {
    text-decoration: underline;
}

.admin-shell {
    width: 100%;
    max-width: 1680px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 28px;
    padding: 24px 28px 48px;
}

.admin-sidebar {
    background: var(--navy);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 18px;
    padding: 18px 12px 16px;
    height: fit-content;
    position: sticky;
    top: 88px;
    box-shadow: 0 14px 36px rgba(30, 46, 99, .16);
}

.admin-sidebar .sidebar-label {
    margin: 0 10px 12px;
    font-size: .68rem;
    color: rgba(226, 232, 240, .55);
    text-transform: uppercase;
    letter-spacing: .12em;
    font-weight: 700;
}

.admin-nav {
    display: grid;
    gap: 4px;
}

.admin-sidebar a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    color: rgba(226, 232, 240, .88);
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 0;
}

.admin-sidebar a:hover {
    background: rgba(255, 255, 255, .06);
    color: #fff;
    text-decoration: none;
}

.admin-sidebar a.active {
    background: rgba(15, 159, 143, .22);
    color: #fff;
    font-weight: 800;
    box-shadow: inset 3px 0 0 var(--admin-teal);
}

.admin-nav-site {
    margin-top: 14px !important;
    border-top: 1px solid rgba(255, 255, 255, .08);
    padding-top: 14px !important;
    color: rgba(148, 163, 184, .95) !important;
    font-size: .82rem !important;
}

.admin-main {
    min-width: 0;
}

.admin-main .card {
    border: 1px solid var(--admin-border);
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(15, 39, 71, .05);
    background: #fff;
}

.admin-main .card + .card { margin-top: 18px; }

.admin-eyebrow {
    margin: 0 0 6px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .12em;
    color: #64748b;
}

.admin-dash-card .page-head h1 {
    color: var(--admin-navy);
    font-weight: 800;
}

.admin-body .stat-box {
    border: 1px solid var(--admin-border);
    border-radius: 14px;
    background: #fbfdff;
    box-shadow: none;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.admin-body .stat-box:hover {
    border-color: rgba(37, 99, 235, .35);
    box-shadow: 0 10px 22px rgba(15, 39, 71, .06);
    transform: translateY(-2px);
    text-decoration: none;
}

.admin-body .stat-box strong {
    color: var(--admin-navy);
    font-size: 1.55rem;
}

.admin-body .chart-panel {
    border: 1px solid var(--admin-border);
    border-radius: 14px;
    padding: 16px;
    background: #fbfdff;
}

.admin-body .filter-bar {
    background: #f8fafc;
    border: 1px solid var(--admin-border);
    border-radius: 14px;
    padding: 14px;
}

.admin-body .check-table th {
    background: #f8fafc;
}

.admin-body .site-header { display: none; }

.form textarea,
.form select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.checkbox-label {
    display: flex !important;
    flex-direction: column;
    gap: 8px;
}

.checkbox-label input[type="checkbox"] { width: auto; }

.content-cms {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 16px;
    align-items: start;
}

.content-sidebar {
    background: #1f2430;
    color: #e5e7eb;
    border-radius: 12px;
    padding: 14px;
    min-height: 420px;
    position: sticky;
    top: 16px;
}

.content-sidebar-head {
    display: grid;
    gap: 4px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,.12);
}

.content-sidebar-head a { color: #9ca3af; font-size: .82rem; }
.content-sidebar-head strong { font-size: .95rem; }

.sidebar-tree { list-style: none; margin: 0 0 12px; padding: 0; }
.sidebar-section { margin-bottom: 10px; }
.sidebar-section-title {
    font-weight: 700;
    font-size: .88rem;
    margin-bottom: 4px;
    color: #fff;
}
.sidebar-section ul { list-style: none; margin: 0; padding: 0 0 0 8px; }
.sidebar-lesson {
    font-size: .82rem;
    color: #cbd5e1;
    padding: 4px 0;
    display: flex;
    gap: 6px;
    align-items: center;
}
.check-icon { color: var(--orange); }

.content-sidebar .pad { padding: 8px; }
.content-sidebar .tiny { font-size: .75rem; color: #9ca3af; }
.content-sidebar .btn { margin-top: 4px; }

.content-tree { padding-left: 18px; }
.content-tree > li { margin-bottom: 10px; }

.inline-add .inline-fields {
    display: flex;
    gap: 8px;
}
.inline-add .inline-fields input { flex: 1; }

.lesson-edit-form {
    display: grid;
    gap: 6px;
}
.lesson-edit-form input,
.lesson-edit-form select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: .85rem;
}
.lesson-edit-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.lesson-edit-meta select,
.lesson-edit-meta input[type="number"] {
    width: auto;
    min-width: 110px;
    flex: 0 1 auto;
}

/* 차시 행: 제목 폼과 순서/삭제 칸 높이·정렬 맞춤 */
.content-cms .check-table .lesson-row > td {
    vertical-align: top;
}
.content-cms .check-table th.col-order,
.content-cms .check-table td.col-order {
    width: 52px;
    text-align: center;
    padding-left: 6px;
    padding-right: 6px;
}
.content-cms .check-table th.col-delete,
.content-cms .check-table td.col-delete {
    width: 72px;
    text-align: center;
    white-space: nowrap;
}
.content-cms .check-table td.col-type,
.content-cms .check-table td.col-duration {
    vertical-align: top;
    padding-top: 14px;
    color: var(--muted);
    font-size: .85rem;
    white-space: nowrap;
}
.content-cms .lesson-order-stack {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    width: 36px;
    margin: 0 auto;
}
.content-cms .lesson-order-stack .inline-form {
    display: block;
    margin: 0;
    line-height: 0;
}
.content-cms .lesson-order-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    margin: 0;
    line-height: 1;
    border-radius: 8px;
    box-sizing: border-box;
}
.content-cms .lesson-order-placeholder {
    display: block;
    width: 36px;
    height: 32px;
}
.content-cms .lesson-delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    min-height: 32px;
    padding: 0 10px;
    box-sizing: border-box;
}

.lesson-add-form { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.lesson-add-form h3 { margin: 0 0 10px; font-size: 1rem; }

.danger-zone { margin-top: 16px; text-align: right; }
.status-form { display: flex; align-items: end; gap: 8px; margin-top: 12px; }

/* --- Learn (dashboard 틀·색감 정렬: 1400px) --- */
.learn-body.lms-learn,
.lms-learn {
    --lms-navy: var(--navy);
    --lms-blue: var(--blue);
    --lms-teal: var(--teal);
    --lms-mint: var(--mint);
    --lms-bg: var(--bg-page);
    --lms-border: var(--border-soft);
    --lms-muted: var(--muted);
    background-color: var(--bg-page);
    background-image:
        radial-gradient(ellipse 50% 35% at 0% 0%, rgba(47, 115, 255, .06), transparent 60%),
        radial-gradient(ellipse 40% 30% at 100% 0%, rgba(32, 199, 177, .05), transparent 55%);
    background-attachment: fixed;
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
}

.lms-header {
    position: sticky;
    top: 0;
    z-index: 40;
    height: 72px;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-soft);
    box-shadow: none;
}

.lms-header-inner {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.lms-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1;
}

.lms-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    color: var(--lms-navy);
    font-weight: 600;
    font-size: .92rem;
    text-decoration: none;
}

.lms-back:hover { color: var(--lms-blue); text-decoration: none; }

.lms-back-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gray-soft);
    color: var(--navy);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
}

.lms-header-divider {
    width: 1px;
    height: 22px;
    background: var(--lms-border);
    flex-shrink: 0;
}

.lms-course-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--lms-navy);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lms-header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.lms-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 180px;
}

.lms-progress-track {
    width: 120px;
    height: 4px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.lms-progress-fill {
    height: 100%;
    background: var(--lms-teal);
    border-radius: 999px;
    transition: width .3s ease;
}

.lms-progress-text {
    font-size: .78rem;
    font-weight: 600;
    color: var(--lms-muted);
    white-space: nowrap;
}

.lms-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lms-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    font-weight: 700;
}

.lms-user-name {
    font-size: .9rem;
    font-weight: 600;
    color: var(--lms-navy);
}

.lms-shell {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 28px 20px 56px;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.lms-shell--hub {
    grid-template-columns: minmax(0, 1fr);
    max-width: 1400px;
}

.lms-learn.is-hub .lms-main {
    max-width: none;
    width: 100%;
}

.hse-lesson-chip.chip-orange {
    background: var(--orange);
}

.learn-book-exam-label {
    margin: 18px 0 10px;
    font-size: 1.08rem;
    font-weight: 800;
    color: #1e2e63;
    letter-spacing: -.01em;
    line-height: 1.3;
}

.learn-attend-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.inline-attend-form {
    display: inline-flex;
}

.learn-extra-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--border-soft);
}

.learn-extra-links a {
    font-weight: 600;
    color: var(--blue);
    text-decoration: none;
}

.learn-extra-links a:hover {
    text-decoration: underline;
}

.learn-survey-wrap {
    width: 100%;
    max-width: none;
    margin: 0;
    text-align: left;
}

.learn-survey-title {
    margin: 0 0 8px;
    font-size: 1.12rem;
    font-weight: 800;
    color: var(--navy);
    text-align: left;
    line-height: 1.35;
}

.learn-survey-desc {
    margin: 0 0 16px;
    text-align: left;
    line-height: 1.5;
}

.learn-survey-form {
    display: grid;
    gap: 14px;
    margin: 0;
    width: 100%;
}

.learn-survey-q {
    margin: 0;
    padding: 16px;
    border-radius: 12px;
    background: #F4F8FF;
    border: 1px solid var(--border-soft);
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.learn-survey-q::after {
    content: "";
    display: table;
    clear: both;
}

.learn-survey-q legend {
    float: left;
    width: 100%;
    max-width: 100%;
    margin: 0 0 12px;
    padding: 0;
    box-sizing: border-box;
}

.learn-survey-q-text {
    display: block;
    font-size: 1.02rem;
    font-weight: 800;
    color: var(--navy);
    line-height: 1.45;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.learn-survey-q-text em {
    color: #c0392b;
    font-style: normal;
    margin-left: 2px;
}

.learn-survey-q-meta {
    display: inline-block;
    margin-top: 6px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #e8eef8;
    color: #5b6b86;
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.2;
}

.learn-survey-control {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font: inherit;
    font-size: 1rem;
    line-height: 1.45;
    background: #fff;
}

.learn-survey-select {
    width: auto;
    min-width: 120px;
    max-width: 100%;
}

.learn-survey-choices {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    clear: both;
}

.learn-survey-choice {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    width: 100% !important;
    max-width: 100%;
    margin: 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    font-weight: 500;
    cursor: pointer;
    box-sizing: border-box;
}

.learn-survey-choice input[type="radio"],
.learn-survey-choice input[type="checkbox"] {
    width: 18px !important;
    height: 18px;
    min-width: 18px;
    margin: 2px 0 0;
    padding: 0;
    flex: 0 0 auto;
    accent-color: var(--teal);
    border: none;
    border-radius: 0;
}

.learn-survey-choice span {
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.45;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.learn-survey-actions {
    text-align: left;
    margin-top: 4px;
}

.learn-survey-review {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.learn-survey-review li {
    display: grid;
    gap: 6px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #F4F8FF;
    border: 1px solid var(--border-soft);
}

.learn-ask-form {
    display: grid;
    gap: 14px;
    width: 100%;
    max-width: none;
    margin: 0;
}

.learn-ask-form label {
    display: grid;
    gap: 8px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--navy);
}

.learn-ask-form input[type="text"],
.learn-ask-form textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font: inherit;
    font-size: 1rem;
    line-height: 1.45;
    background: #fff;
}

.learn-ask-form textarea {
    min-height: 120px;
    resize: vertical;
}

.learn-ask-form .btn {
    justify-self: start;
    min-height: 44px;
    padding: 10px 18px;
}

.learn-ask-list {
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
    display: grid;
    gap: 12px;
    width: 100%;
}

.learn-ask-item {
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--border-soft);
    background: #fff;
}

.learn-ask-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.learn-ask-head strong {
    font-size: 1.02rem;
    color: var(--navy);
    line-height: 1.4;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.learn-ask-answer {
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #F0FBF8;
    border: 1px solid #BFEDE4;
}

.admin-survey-q {
    margin-bottom: 8px;
}

.admin-inquiry-card {
    padding: 14px 0;
    border-bottom: 1px solid var(--border-soft);
}

.admin-inquiry-card:last-child {
    border-bottom: 0;
}

.check-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 8px 0;
}

.learn-module-page .page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.learn-module-page.hse-panel,
.card.learn-module-page {
    border: 1px solid var(--border-soft);
    border-radius: 22px;
    box-shadow: 0 10px 28px rgba(30, 46, 99, .04);
}

.learn-module-page h1 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--navy);
}

.learn-attend-check {
    margin-bottom: 18px;
    padding: 16px;
    border-radius: 12px;
    background: #F4F8FF;
    border: 1px solid var(--border-soft);
}

.learn-safety-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.learn-safety-list a {
    display: block;
    padding: 12px 14px;
    border-radius: 10px;
    background: #F4F8FF;
    border: 1px solid var(--border-soft);
    font-weight: 600;
    color: var(--navy);
}

.learn-cert-meta {
    display: grid;
    gap: 12px;
    margin: 0 0 18px;
}

.learn-cert-meta dt {
    font-size: .78rem;
    color: var(--muted);
    font-weight: 600;
}

.learn-cert-meta dd {
    margin: 2px 0 0;
    font-weight: 700;
    color: var(--navy);
}

.lms-sidebar {
    position: sticky;
    top: 88px;
    max-height: calc(100vh - 104px);
    overflow: auto;
}

.lms-sidebar-panel {
    background: linear-gradient(165deg, #24356f 0%, var(--navy) 55%, #16244f 100%);
    border-radius: 20px;
    padding: 18px 14px 16px;
    border: 1px solid rgba(255, 255, 255, .06);
    box-shadow: 0 12px 28px rgba(30, 46, 99, .14);
}

.lms-sidebar-label {
    margin: 0 6px 14px;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .12em;
    color: rgba(255, 255, 255, .88);
}

.lms-main {
    min-width: 0;
}

.lms-preview-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #FFF6E5;
    border: 1px solid #F5A623;
    border-radius: 10px;
    color: #1E2E63;
    font-size: 0.9rem;
}

.lms-preview-banner strong {
    padding: 2px 10px;
    background: #F5A623;
    border-radius: 999px;
    color: #fff;
    font-size: 0.8rem;
}

.lms-preview-banner span {
    flex: 1 1 320px;
}

.lms-curriculum-toggle {
    margin-bottom: 14px;
    background: #fff;
    border: 1px solid var(--lms-border);
    border-radius: 14px;
    padding: 12px 14px;
}

.lms-curriculum-toggle > summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--lms-navy);
}

.lms-curriculum-toggle > summary::-webkit-details-marker { display: none; }

.lms-curriculum-toggle[open] > summary { margin-bottom: 12px; }

.lms-curriculum-toggle .lms-sidebar-panel { margin-top: 4px; }

/* Curriculum tree — 대분류+하위메뉴를 하나의 배경으로 */
.lms-learn .hse-curriculum { display: grid; gap: 12px; }

.lms-learn .hse-curriculum-section {
    background: linear-gradient(160deg, #1aad9d 0%, var(--teal) 55%, #2bc4b0 100%);
    border: none;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 18px rgba(32, 199, 177, .22);
    padding: 0 0 8px;
}

.lms-learn .hse-curriculum-section-head {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: transparent;
    color: #fff;
    font-weight: 800;
    font-size: .9rem;
    padding: 14px 14px 10px;
    border-radius: 0;
    user-select: none;
}

.lms-learn .hse-curriculum-section-head::-webkit-details-marker { display: none; }

.lms-learn .hse-curriculum-chevron {
    width: 8px;
    height: 8px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg);
    flex-shrink: 0;
    transition: transform .18s ease;
}

.lms-learn .hse-curriculum-section[open] .hse-curriculum-chevron {
    transform: rotate(-135deg);
    margin-top: 4px;
}

.lms-learn .hse-curriculum-list {
    list-style: none;
    margin: 0;
    padding: 2px 8px 6px;
    display: grid;
    gap: 6px;
}

.lms-learn .hse-curriculum-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 12px;
    background: rgba(255, 255, 255, .38);
    border-radius: 10px;
    color: rgba(15, 23, 42, .55);
    text-decoration: none;
    font-size: .9rem;
    font-weight: 500;
    line-height: 1.4;
    border: 1px solid transparent;
    box-shadow: none;
    opacity: .78;
    transition: background .15s ease, color .15s ease, opacity .15s ease;
}

.lms-learn .hse-curriculum-item .hse-lesson-title {
    color: inherit;
    font-weight: inherit;
}

.lms-learn .hse-curriculum-item.is-active {
    background: rgba(255, 255, 255, .96);
    border-color: transparent;
    color: #0f172a;
    font-weight: 700;
    opacity: 1;
    box-shadow: none;
}

.lms-learn .hse-curriculum-item:hover {
    text-decoration: none;
    background: rgba(255, 255, 255, .55);
    color: rgba(15, 23, 42, .78);
    opacity: .9;
}

.lms-learn .hse-curriculum-item.is-active:hover {
    background: #fff;
    color: #0f172a;
    opacity: 1;
}

.lms-learn .hse-lesson-status {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--orange);
    flex-shrink: 0;
    position: relative;
    box-sizing: border-box;
}

.lms-learn .hse-lesson-status.is-done {
    background: var(--orange);
    border-color: var(--orange);
}

.lms-learn .hse-lesson-status.is-done::after {
    content: "✓";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: .65rem;
    font-weight: 800;
}

/* 원형 스크롤 프로그레스 (좌측 활성 레슨) */
.lms-learn .hse-lesson-status.is-progress {
    --lesson-progress: 0;
    border: none;
    background:
        radial-gradient(circle closest-side, var(--mint) 58%, transparent 60%),
        conic-gradient(var(--lms-teal) calc(var(--lesson-progress) * 1%), rgba(148, 163, 184, .35) 0);
    transition: background .12s linear;
}

.lms-learn .hse-curriculum-item:not(.is-active) .hse-lesson-status.is-progress {
    background:
        radial-gradient(circle closest-side, #f8fafc 58%, transparent 60%),
        conic-gradient(var(--lms-teal) calc(var(--lesson-progress) * 1%), rgba(148, 163, 184, .35) 0);
}

/* Lesson content panel */
.lms-lesson {
    background: var(--panel);
    border: 1px solid var(--border-soft);
    border-radius: 22px;
    box-shadow: 0 10px 28px rgba(30, 46, 99, .04);
    padding: 32px 36px 28px;
    min-width: 0;
    position: relative;
    overflow: hidden;
}

.lms-lesson::after {
    content: "";
    position: absolute;
    right: -10px;
    bottom: -30px;
    width: 260px;
    height: 150px;
    background: var(--decor-blue) no-repeat right bottom / contain;
    pointer-events: none;
    opacity: .28;
}

.lms-lesson > * {
    position: relative;
    z-index: 1;
}

.lms-lesson-header {
    margin: 8px 0 24px;
}

.lms-lesson-title {
    margin: 0 0 8px;
    font-size: clamp(1.55rem, 2.4vw, 2rem);
    font-weight: 800;
    color: var(--lms-navy);
    letter-spacing: -.02em;
    line-height: 1.25;
}

.lms-lesson-meta {
    margin: 0;
    font-size: .88rem;
    color: var(--lms-muted);
}

.lms-lesson-body {
    min-width: 0;
}

.lms-lesson-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.lms-lesson-nav-top {
    margin-bottom: 8px;
}

.lms-lesson-nav-bottom {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid var(--lms-border);
}

.lms-lesson-nav-bottom > :first-child { justify-self: start; }
.lms-lesson-nav-bottom > :nth-child(2) { justify-self: center; }
.lms-lesson-nav-bottom > :last-child { justify-self: end; }

.lms-nav-spacer { display: block; min-width: 1px; min-height: 1px; }

.lms-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 12px;
    font-size: .92rem;
    font-weight: 700;
    text-decoration: none;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.lms-btn-outline {
    background: #fff;
    color: #475569;
    border-color: var(--lms-border);
}

.lms-btn-outline:hover {
    background: #f8fafc;
    color: var(--lms-navy);
    text-decoration: none;
}

.lms-btn-outline-accent {
    border-color: rgba(37, 99, 235, .35);
    color: var(--lms-blue);
}

.lms-btn-outline-accent:hover {
    background: rgba(37, 99, 235, .06);
    color: var(--lms-blue);
    text-decoration: none;
}

.lms-btn-primary {
    background: var(--blue);
    color: #fff;
    box-shadow: 0 8px 18px rgba(47, 115, 255, .25);
}

.lms-btn-primary:hover {
    background: #1f5ff0;
    color: #fff;
    text-decoration: none;
}

.lms-btn-done {
    background: var(--teal);
    color: #fff;
    box-shadow: 0 8px 18px rgba(32, 199, 177, .25);
}

.lms-btn-done:hover {
    background: #1aad9d;
    color: #fff;
}

.lms-btn-done.is-done {
    background: #e2e8f0;
    color: #64748b;
    box-shadow: none;
    cursor: default;
}

.lms-btn-done.is-waiting {
    background: #e2e8f0;
    color: #64748b;
    box-shadow: none;
    cursor: default;
}

.lms-btn.is-disabled,
.lms-btn[aria-disabled="true"] {
    opacity: .45;
    pointer-events: none;
    cursor: not-allowed;
    box-shadow: none;
    filter: grayscale(.2);
}

/* 텍스트 레슨: 하단 내용 가림 → 스크롤 시 공개 */
.lms-lesson-body.lesson-reading-body {
    position: relative;
    --reading-reveal: 38;
}

.lms-lesson.is-reading-gate .js-reading-content {
    -webkit-mask-image: linear-gradient(
        to bottom,
        #000 0%,
        #000 max(0%, calc((var(--reading-reveal) - 8) * 1%)),
        rgba(0, 0, 0, .35) calc(var(--reading-reveal) * 1%),
        transparent min(100%, calc((var(--reading-reveal) + 18) * 1%))
    );
    mask-image: linear-gradient(
        to bottom,
        #000 0%,
        #000 max(0%, calc((var(--reading-reveal) - 8) * 1%)),
        rgba(0, 0, 0, .35) calc(var(--reading-reveal) * 1%),
        transparent min(100%, calc((var(--reading-reveal) + 18) * 1%))
    );
}

.lms-lesson.is-reading-gate.is-reading-done .js-reading-content {
    -webkit-mask-image: none;
    mask-image: none;
}

.lesson-reading-veil {
    position: sticky;
    bottom: 12px;
    height: 88px;
    margin-top: -88px;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, .92) 55%, #fff);
    opacity: calc(1 - (var(--reading-reveal) / 100));
    transition: opacity .15s ease;
    z-index: 2;
}

.lms-lesson.is-reading-done .lesson-reading-veil,
.lms-lesson.is-reading-done .lesson-reading-hint {
    display: none;
}

.lesson-reading-hint {
    text-align: center;
    font-size: .82rem;
    margin: 8px 0 0;
}

/* Legacy learn hooks kept for start.php etc. */
.progress-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    background: var(--teal);
    border-radius: 999px;
    transition: width .3s ease;
}
.learn-top { display: none; }
.lms-learn .learn-top { display: none; }
.learn-shell { max-width: none; }
.learn-main .card { margin-bottom: 0; }
.learn-hero {
    overflow: hidden;
    padding: 0;
    border: 1px solid var(--border-soft);
    border-radius: 22px;
    background: var(--panel);
    box-shadow: 0 10px 28px rgba(30, 46, 99, .04);
}
.learn-banner-fallback {
    background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 52%, var(--teal) 100%);
}
.learn-hero-body {
    padding: 18px 20px 20px;
    background: #eef3fb;
}

.lesson-nav {
    display: flex;
    justify-content: space-between;
    margin-bottom: 14px;
}

.video-wrap video {
    width: 100%;
    max-height: 560px;
    background: #000;
    border-radius: 12px;
}
.pdf-wrap iframe {
    width: 100%;
    height: 75vh;
    border: 1px solid var(--lms-border);
    border-radius: 12px;
}

.pdf-viewer-pages {
    display: grid;
    gap: 12px;
}

.pdf-viewer-page {
    width: 100%;
    background: #fff;
    border: 1px solid var(--lms-border);
    border-radius: 8px;
    overflow: hidden;
}

.pdf-viewer-page canvas {
    display: block;
    width: 100%;
    height: auto;
}

.pdf-viewer-open {
    margin: 10px 0 0;
    font-size: 0.85rem;
    text-align: right;
}

.lesson-html .pdf-pages {
    display: grid;
    gap: 12px;
}

.lesson-html .pdf-page {
    margin: 0;
    background: #fff;
    border: 1px solid var(--lms-border);
    border-radius: 8px;
    overflow: hidden;
}

.lesson-html .pdf-page img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0;
}
.important-box {
    background: rgba(226, 58, 46, .08);
    border-left: 4px solid var(--red);
    padding: 12px 14px;
    margin: 14px 0;
    font-weight: 600;
}

.enroll-list {
    display: grid;
    gap: 12px;
}
.enroll-card {
    display: grid;
    gap: 6px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: inherit;
    text-decoration: none;
    background: #fff;
}
.enroll-card:hover { border-color: var(--orange); text-decoration: none; }
.muted-card { opacity: .85; }

/* --- Exam --- */
.exam-body { background: #f3f4f6; margin: 0; }
.exam-top {
    position: sticky;
    top: 0;
    z-index: 30;
    background: #1f2430;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
}
.exam-top .muted { color: #9ca3af; margin-left: 10px; }
.exam-timer strong { color: var(--orange); font-size: 1.2rem; }
.exam-form { padding: 20px; max-width: 800px; }
.exam-question { margin-bottom: 14px; }
.exam-options { display: grid; gap: 8px; margin-top: 12px; }
.exam-option {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: pointer;
}
.exam-option:has(input:checked) {
    border-color: var(--orange);
    background: rgba(242, 128, 29, .08);
}
.exam-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin: 20px 0 40px;
}
.exam-result-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}
.option-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    margin: 0 0 12px;
}
.option-row input[type="text"] { flex: 1; }

.form .option-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start;
    gap: 12px;
}

.option-correct {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 6px;
    margin: 8px 0 0;
    white-space: nowrap;
    font-size: .85rem;
    color: var(--muted);
}

.option-correct input[type="radio"] {
    width: auto !important;
    margin: 0;
}

.option-text-input,
.form .option-text-input,
.form textarea.option-text-input {
    flex: 1 1 auto;
    width: 100% !important;
    min-width: 0;
    min-height: 64px;
    resize: vertical;
    pointer-events: auto;
}

.question-options h2 {
    margin: 8px 0 6px;
    font-size: 1.05rem;
}

/* 오프라인 수료 등록 */
.page-head-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.offline-register-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.offline-panel {
    border: 1px solid #DDE6F2;
    border-radius: 10px;
    background: #F4F8FF;
    padding: 0 16px;
}
.offline-panel > summary {
    cursor: pointer;
    padding: 12px 0;
    font-weight: 700;
    color: #1E2E63;
}
.offline-panel[open] { padding-bottom: 16px; }
.offline-panel .form { margin: 0; }
.offline-badge { background: #1E2E63; color: #fff; }
@media (max-width: 960px) {
    .offline-register-grid { grid-template-columns: 1fr; }
}

/* 환경설정 — 메일/문자 연동 상태 */
.channel-status { display: grid; gap: 8px; margin: 12px 0 18px; padding: 14px 16px; border: 1px solid #DDE6F2; border-radius: 10px; background: #F4F8FF; }
.channel-status-item { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.channel-status-item strong { min-width: 40px; color: #1E2E63; }

/* 대시보드 — 처리 필요 건 강조 */
.stat-box.stat-box-alert { border-color: #F5A623; background: #FFF6E6; }
.stat-box.stat-box-alert strong { color: #c77d00; }

/* 링크 시험 */
.link-exam-wrap { max-width: 760px; margin: 32px auto; }
.link-exam-desc { color: #33415c; line-height: 1.7; }
.link-exam-info {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 18px 0;
    padding: 16px;
    border: 1px solid #DDE6F2;
    border-radius: 10px;
    background: #F4F8FF;
}
.link-exam-info dt { font-size: 0.82rem; color: #6b7a99; }
.link-exam-info dd { margin: 2px 0 0; font-weight: 700; color: #1E2E63; }
.link-exam-rules { margin: 0 0 18px; padding-left: 18px; line-height: 1.8; color: #33415c; }
.link-exam-start { max-width: 420px; }
.link-exam-result.is-pass { border-top: 4px solid #20C7B1; }
.link-exam-result.is-fail { border-top: 4px solid #F5A623; }
.link-exam-result.is-pass .link-exam-verdict { color: #20C7B1; }
.link-exam-result.is-fail .link-exam-verdict { color: #F5A623; }
.link-exam-message {
    margin: 18px 0;
    padding: 14px 16px;
    border-radius: 10px;
    background: #D7F5EC;
    color: #1E2E63;
    line-height: 1.7;
}
.link-exam-result.is-fail .link-exam-message { background: #FFF6E6; }
.link-roster-form { margin-bottom: 16px; }
.link-roster-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 12px; align-items: start; margin-bottom: 16px; }
.link-roster-grid .link-roster-form { margin-bottom: 0; padding: 12px 14px; border: 1px solid #DDE6F2; border-radius: 10px; background: #F4F8FF; }
.link-placeholder { font-weight: 700; color: #1E2E63; }
.link-invitee-table { min-width: 1180px; }
.link-dispatch-form { display: grid; gap: 12px; max-width: 860px; }
.link-dispatch-target { border: 1px solid #DDE6F2; border-radius: 10px; padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.link-dispatch-target legend { font-weight: 700; color: #1E2E63; padding: 0 6px; }
.form .link-dispatch-target label { display: inline-flex; align-items: center; gap: 6px; }
.form .link-dispatch-target input { width: auto; margin: 0; }
.link-dispatch-history { min-width: 720px; }
.link-dispatch-history th { white-space: nowrap; }
.link-attempt-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.link-stats-chart { position: relative; width: 100%; }
.link-stats-table { min-width: 900px; }
.link-choice-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; min-width: 320px; }
.link-choice-bars li { display: grid; grid-template-columns: minmax(120px, 1fr) 120px 90px; gap: 8px; align-items: center; font-size: 0.85rem; }
.link-choice-bar { display: block; height: 8px; border-radius: 4px; background: #DDE6F2; overflow: hidden; }
.link-choice-bar i { display: block; height: 100%; background: #9aa6bf; }
.link-choice-bars li.is-answer .link-choice-bar i { background: #20C7B1; }
.link-choice-bars li.is-answer .link-choice-label { color: #1E2E63; font-weight: 700; }
.link-choice-count { color: #6B7A99; white-space: nowrap; }
.link-stats-table .text-danger { color: #E23A2E; }
@media (max-width: 900px) {
    .link-roster-grid { grid-template-columns: 1fr; }
}
.link-invitee-table th { white-space: nowrap; }
.link-copy { display: flex; gap: 6px; min-width: 260px; }
.link-copy input { flex: 1 1 auto; min-width: 0; font-size: 0.78rem; padding: 4px 8px; }
.link-invitee-table tr.is-muted td { color: #9aa6bf; }
.cert-template-defaults { margin: 10px 0 14px; padding: 10px 16px 10px 32px; background: #F4F8FF; border: 1px solid #DDE6F2; border-radius: 10px; display: grid; gap: 4px; }
.cert-template-table { min-width: 1100px; }
.cert-template-table th { white-space: nowrap; }
.cert-template-table tr.is-muted td { color: #9aa6bf; }
.cert-template-actions { display: flex; flex-wrap: wrap; gap: 4px; min-width: 300px; }
.cert-template-body { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.cert-template-body textarea { font-family: inherit; line-height: 1.7; }
.cert-template-placeholders { border: 1px solid #DDE6F2; border-radius: 10px; background: #F4F8FF; padding: 4px 14px; font-size: 0.85rem; }
.cert-template-placeholders table { margin: 0; }
.cert-template-placeholders td { padding: 3px 8px 3px 0; border: 0; background: transparent; }
.cert-template-tip { margin: -6px 0 0; font-size: 0.85rem; }
.cert-template-images { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.cert-template-image { border: 1px solid #DDE6F2; border-radius: 10px; padding: 4px 16px 8px; }
.cert-template-image p { margin: 8px 0; }
.cert-template-thumb { display: block; max-width: 100%; border: 1px solid #DDE6F2; border-radius: 6px; background: #fff; margin-bottom: 6px; }
.cert-template-thumb-background { max-height: 180px; }
.cert-template-thumb-seal { max-height: 90px; }
.form .cert-template-remove { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.form .cert-template-remove input { width: auto; margin: 0; }
@media (max-width: 900px) {
    .cert-template-body, .cert-template-images { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .link-exam-info { grid-template-columns: 1fr; }
}

/* 문제 첨부 (관리자 폼) */
.option-main { flex: 1 1 auto; min-width: 0; display: grid; gap: 6px; }
.q-file-block {
    display: grid;
    gap: 8px;
    padding: 12px 14px;
    margin: 0 0 14px;
    border: 1px dashed #DDE6F2;
    border-radius: 8px;
    background: #F4F8FF;
}
.q-file-block.is-option { padding: 8px 10px; margin: 0; }
.q-file-label { font-size: .85rem; color: #1E2E63; font-weight: 600; }
.q-file-list { display: flex; flex-wrap: wrap; gap: 10px; }
.q-file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border: 1px solid #DDE6F2;
    border-radius: 6px;
    background: #fff;
    font-size: .82rem;
}
.q-file-item img { width: 56px; height: 56px; object-fit: cover; border-radius: 4px; display: block; }
.q-file-pdf {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 4px;
    background: #1E2E63;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}
.q-file-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-file-delete { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 4px; margin: 0; color: #c0392b; }
.q-file-delete input { width: auto !important; margin: 0; }
.q-att-badge { margin-left: 6px; background: #D7F5EC; color: #1E2E63; }

/* 문제 첨부 (응시·결과) */
.q-attachments { display: grid; gap: 10px; margin: 10px 0; }
.q-attachment { margin: 0; }
.q-attachment-image img {
    display: block;
    max-width: 100%;
    max-height: 420px;
    border: 1px solid #DDE6F2;
    border-radius: 8px;
    background: #fff;
}
.q-attachment-pdf { display: grid; gap: 6px; justify-items: start; }
.q-attachment-pdf object {
    width: 100%;
    height: 480px;
    border: 1px solid #DDE6F2;
    border-radius: 8px;
}
.q-attachments.is-compact { margin: 6px 0 0; }
.q-attachments.is-compact .q-attachment-image img { max-height: 180px; }
.q-attachments.is-compact .q-attachment-pdf object { height: 260px; }
.exam-option-body { display: grid; gap: 4px; flex: 1 1 auto; min-width: 0; }
.exam-result-options { margin: 8px 0 0; padding-left: 0; list-style: none; display: grid; gap: 8px; }
.exam-result-options li { padding: 8px 10px; border: 1px solid #DDE6F2; border-radius: 8px; }
.exam-result-options li.is-answer { border-color: #20C7B1; background: #D7F5EC; }
.exam-result-options li.is-selected:not(.is-answer) { border-color: #F5A623; }

.question-category-fields {
    display: grid;
    grid-template-columns: minmax(180px, 240px) 1fr;
    gap: 14px;
}

.admin-select-lg,
.admin-body .admin-select-lg,
.admin-body select.admin-select-lg,
.admin-body .filter-bar select.admin-select-lg,
.admin-body .form select.admin-select-lg,
.admin-body input.admin-select-lg[type="date"] {
    min-height: 46px;
    padding: 10px 14px;
    font-size: 1rem;
    border-radius: 10px;
    width: 100%;
}

.admin-filter-bar {
    align-items: end;
    margin-bottom: 18px;
}

.admin-filter-bar label.grow {
    flex: 1 1 420px;
    min-width: 280px;
}

.student-picker {
    display: grid;
    gap: 8px;
    margin-bottom: 4px;
}

.student-picker-label {
    font-size: .9rem;
}

.student-picker-display {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f8fafc;
}

.student-picker-dialog {
    border: none;
    border-radius: 16px;
    padding: 0;
    width: min(560px, calc(100vw - 24px));
    box-shadow: 0 20px 50px rgba(15, 23, 42, .25);
}

.student-picker-dialog::backdrop {
    background: rgba(15, 23, 42, .45);
}

.student-picker-panel {
    margin: 0;
    padding: 18px 18px 16px;
    display: grid;
    gap: 12px;
}

.student-picker-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.student-picker-panel-head h2 {
    margin: 0;
    font-size: 1.1rem;
}

.student-picker-search {
    display: grid;
    gap: 6px;
    font-size: .85rem;
}

.student-picker-search input {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 1rem;
}

.student-picker-results {
    min-height: 180px;
    max-height: 360px;
    overflow: auto;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 8px;
    background: #fff;
}

.student-picker-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 4px;
}

.student-picker-item {
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    border-radius: 10px;
    padding: 10px 12px;
    cursor: pointer;
    display: grid;
    gap: 2px;
}

.student-picker-item:hover,
.student-picker-item:focus {
    background: #eef4ff;
}

.student-picker-item strong {
    color: var(--navy);
}

.student-picker-item span {
    font-size: .82rem;
    color: var(--muted);
}

.student-picker-item span {
    font-size: .82rem;
    color: var(--muted);
}

/* 환경설정 */
.settings-cron-hint {
    margin: 0 0 18px;
}

.settings-form {
    margin: 0;
}

.settings-groups {
    display: grid;
    gap: 16px;
}

.settings-group-card {
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    background: #f8fafc;
    overflow: hidden;
}

.settings-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: #fff;
    border-bottom: 1px solid var(--border-soft);
}

.settings-group-head h2 {
    margin: 0;
    font-size: 1.05rem;
    color: var(--navy);
}

.settings-group-code {
    font-size: .72rem;
    color: var(--muted);
    letter-spacing: .04em;
}

.settings-group-body {
    display: grid;
    gap: 0;
    padding: 4px 0;
}

.settings-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 14px 16px;
    border-top: 1px solid rgba(221, 230, 242, .8);
}

.settings-field:first-child {
    border-top: none;
}

.settings-field-label {
    display: block;
    margin: 0 0 4px;
    font-size: .95rem;
    font-weight: 700;
    color: var(--navy);
}

.settings-field-help {
    margin: 0 0 6px;
    font-size: .82rem;
    line-height: 1.45;
    color: var(--muted);
}

.settings-field-key {
    font-size: .7rem;
    color: #94a3b8;
    background: transparent;
}

.settings-field-control.settings-input-sm {
    width: 140px;
}

.settings-field-control.settings-input-md {
    width: 220px;
}

.settings-field-control input,
.settings-field-control select {
    width: 100%;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: .95rem;
    background: #fff;
}

.settings-input-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.settings-suffix {
    flex: 0 0 auto;
    font-size: .85rem;
    color: var(--muted);
    font-weight: 600;
}

.settings-actions {
    margin-top: 18px;
}

.ai-import-card h2 {
    margin: 0 0 8px;
    font-size: 1.1rem;
    color: var(--navy);
}

.ai-import-form {
    max-width: 560px;
    margin-top: 12px;
}

.ai-key-help {
    margin: 10px 0 0;
    padding-left: 1.2em;
    line-height: 1.55;
}

.ai-provider-select-wrap {
    display: grid;
    gap: 6px;
    margin-bottom: 12px;
}

.ai-provider-select-wrap select {
    width: 100%;
    max-width: 360px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    font: inherit;
}

.ai-quota-panel {
    margin: 0 0 14px;
}

.ai-quota-block {
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 12px 14px;
    background: #f8fafc;
}

.ai-quota-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 12px;
    margin-bottom: 10px;
}

.ai-quota-model {
    font-size: .85rem;
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

.ai-quota-grid dt {
    margin: 0;
    font-size: .75rem;
    color: var(--muted);
    font-weight: 600;
}

.ai-quota-grid dd {
    margin: 2px 0 0;
    font-size: .92rem;
    color: var(--navy);
    font-weight: 600;
}

.ai-quota-note {
    margin: 10px 0 0;
    font-size: .82rem;
    line-height: 1.45;
}

.ai-quota-link {
    margin: 8px 0 0;
    font-size: .85rem;
}

.alert-warn {
    background: rgba(245, 166, 35, .14);
    color: #8a5a00;
    border-radius: 10px;
    padding: 10px 12px;
}

@media (max-width: 640px) {
    .ai-quota-grid {
        grid-template-columns: 1fr;
    }
}

.ai-draft-section {
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    padding: 16px;
    margin: 0 0 16px;
    background: #f8fafc;
}

.ai-draft-section-title {
    display: grid;
    gap: 6px;
    margin-bottom: 14px;
    font-weight: 700;
}

.ai-draft-lesson {
    display: grid;
    gap: 10px;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid var(--border-soft);
}

.ai-draft-form textarea {
    width: 100%;
    min-height: 120px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-family: inherit;
    font-size: .92rem;
    line-height: 1.5;
}

.ai-draft-img-preview {
    display: grid;
    gap: 8px;
}
.ai-draft-img-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.ai-draft-img-row a {
    display: block;
    width: 96px;
    height: 72px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    overflow: hidden;
    background: #f4f8ff;
}
.ai-draft-img-row img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 800px) {
    .settings-field {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .settings-field-control.settings-input-sm,
    .settings-field-control.settings-input-md {
        width: 100%;
        max-width: 220px;
    }
}

/* CKEditor + lesson rich content (wide) */
.ck-editor__editable {
    min-height: 360px;
}
.lms-learn .lesson-html.ck-content {
    line-height: 1.75;
    overflow-wrap: anywhere;
    font-size: 1.05rem;
    color: #1e293b;
    max-width: none;
}
.lms-learn .lesson-html.ck-content img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}
.lms-learn .lesson-html.ck-content .important-box,
.lms-learn .lesson-html .efr-callout,
.lms-learn .text-lesson .important-box {
    background: var(--lms-mint);
    border-left: 4px solid var(--lms-teal);
    border-radius: 14px;
    padding: 18px 20px;
}
.lms-learn .efr-media {
    margin-top: 20px;
    padding-top: 8px;
    border-top: none;
}
.lms-learn .efr-media > p {
    margin: 0 0 12px;
    color: var(--lms-muted);
    font-size: .9rem;
}
.lms-learn .efr-figure {
    margin: 0;
}
.lms-learn .efr-figure img {
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
    border-radius: 14px;
    border: 1px solid var(--lms-border);
    background: #fff;
}
.lms-learn .efr-lesson-rich {
    max-width: none;
    width: 100%;
}
.lms-learn .efr-lead {
    font-size: 1.08rem;
    line-height: 1.7;
    margin: 0 0 18px;
}
.lms-learn .efr-slide-block {
    margin: 0 0 22px;
    padding: 28px 28px 22px;
    background: #fbfdff;
    border: 1px solid var(--lms-border);
    border-radius: 16px;
    box-shadow: none;
}
.lms-learn .efr-slide-block h3 {
    margin: 0 0 16px;
    font-size: 1.12rem;
    color: var(--lms-blue);
    border-bottom: 1px solid var(--lms-border);
    padding-bottom: 10px;
    font-weight: 800;
}
.lms-learn .efr-slide-block p {
    margin: 0 0 12px;
    line-height: 1.75;
}
.lms-learn .efr-slide-block:has(> .efr-media),
.lms-learn .efr-slide-block:has(> .efr-figure) {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr);
    gap: 24px 28px;
    align-items: start;
}
.lms-learn .efr-slide-block:has(> .efr-media) > h3,
.lms-learn .efr-slide-block:has(> .efr-figure) > h3 {
    grid-column: 1 / -1;
}
.lms-learn .efr-media {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}
.lms-learn .efr-media > p {
    grid-column: 1 / -1;
}
.lms-learn .efr-review {
    background: var(--lms-mint);
    border-color: rgba(15, 159, 143, .28);
}
.lms-learn .efr-review ul {
    margin: 0 0 12px;
    padding-left: 1.2em;
    line-height: 1.75;
}
.lms-learn .lesson-html.ck-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
}
.lms-learn .lesson-html.ck-content th,
.lms-learn .lesson-html.ck-content td {
    border: 1px solid var(--lms-border);
    padding: 10px 12px;
}

/* fallback non-lms learn content */
.lesson-html.ck-content {
    line-height: 1.7;
    overflow-wrap: anywhere;
}
.lesson-html.ck-content img {
    max-width: 100%;
    height: auto;
}
.efr-media {
    margin-top: 20px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}
.efr-media > p {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: .9rem;
}
.efr-figure {
    margin: 0 0 14px;
}
.efr-figure img {
    display: block;
    width: 100%;
    max-width: 720px;
    height: auto;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #fff;
}
.efr-lesson-rich {
    max-width: none;
}
.efr-lead {
    font-size: 1.05rem;
    line-height: 1.6;
    margin: 0 0 8px;
}
.efr-slide-block {
    margin: 22px 0;
    padding: 16px 16px 8px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}
.efr-slide-block h3 {
    margin: 0 0 12px;
    font-size: 1.05rem;
    color: var(--blue2, #0e4f9f);
    border-bottom: 1px solid var(--line);
    padding-bottom: 8px;
}
.efr-slide-block p {
    margin: 0 0 10px;
    line-height: 1.65;
}
.efr-review {
    background: rgba(26, 188, 156, .06);
    border-color: rgba(26, 188, 156, .25);
}
.efr-review ul {
    margin: 0 0 12px;
    padding-left: 1.2em;
    line-height: 1.7;
}
.lesson-html.ck-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
}
.lesson-html.ck-content th,
.lesson-html.ck-content td {
    border: 1px solid var(--line);
    padding: 8px 10px;
}

@media (max-width: 1100px) {
    .lms-shell {
        grid-template-columns: 240px minmax(0, 1fr);
        gap: 18px;
        padding: 24px 20px 40px;
    }
    .lms-header-inner { padding: 0 20px; }
    .lms-lesson { padding: 28px 24px 24px; }
}

@media (max-width: 900px) {
    .admin-shell,
    .content-cms,
    .learn-shell,
    .lms-shell { grid-template-columns: 1fr; }
    .admin-sidebar,
    .content-sidebar,
    .learn-sidebar,
    .lms-sidebar { position: static; max-height: none; }
    .lms-header { height: auto; min-height: 72px; }
    .lms-header-inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 16px;
        gap: 10px;
    }
    .lms-header-right { width: 100%; justify-content: space-between; }
    .lms-lesson-nav-bottom {
        grid-template-columns: 1fr;
        justify-items: stretch;
    }
    .lms-lesson-nav-bottom > :first-child,
    .lms-lesson-nav-bottom > :nth-child(2),
    .lms-lesson-nav-bottom > :last-child { justify-self: stretch; }
    .lms-lesson-nav-bottom .lms-btn { width: 100%; }
    .lms-learn .efr-slide-block:has(> .efr-media),
    .lms-learn .efr-slide-block:has(> .efr-figure) {
        grid-template-columns: 1fr;
    }
    .hse-welcome-hero { grid-template-columns: 1fr; padding: 22px; }
    .hse-course-grid-past { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lesson-nav-bottom {
        grid-template-columns: 1fr;
        justify-items: stretch;
    }
    .lesson-nav-bottom > :first-child,
    .lesson-nav-bottom > :nth-child(2),
    .lesson-nav-bottom > :last-child { justify-self: stretch; }
    .lesson-nav-bottom .btn,
    .lesson-nav-bottom .btn-lesson-done { width: 100%; text-align: center; }
    .chart-panel-wide { grid-column: auto; }
    .exam-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .exam-actions { justify-content: stretch; flex-wrap: wrap; }
    .exam-actions .btn { flex: 1; text-align: center; }
}

@media (max-width: 640px) {
    .container { padding: 0 14px; }
    main.container { padding-top: 18px; padding-bottom: 36px; }
    .card { padding: 16px; border-radius: 10px; }
    h1 { font-size: 1.3rem; }
    h2 { font-size: 1.05rem; margin-top: 22px; }
    .header-row {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 0;
        gap: 10px;
    }
    .nav { width: 100%; gap: 10px; }
    .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .stat-box { padding: 14px; }
    .stat-box strong { font-size: 1.25rem; }
    .filter-bar select,
    .filter-bar input[type="search"],
    .filter-bar input[type="text"] {
        min-width: 0;
        width: 100%;
    }
    .filter-bar label.grow { min-width: 0; width: 100%; }
    .page-head { gap: 10px; }
    .page-actions { width: 100%; }
    .page-actions .btn { flex: 1; text-align: center; }
    .form-row { grid-template-columns: 1fr; }
    .inline-add .inline-fields { flex-direction: column; }
    .lesson-nav { flex-wrap: wrap; gap: 8px; }
    .hse-course-grid,
    .hse-course-grid-past { grid-template-columns: 1fr; }
    .learn-banner { height: 120px; }
    .learn-hero-body { padding: 16px; }
    .pdf-wrap iframe { height: 55vh; }
    .exam-form { padding: 14px; }
    .exam-option { align-items: flex-start; }
    .option-row { flex-wrap: wrap; }
    .check-table { font-size: .82rem; }
    .check-table th,
    .check-table td { padding: 8px 10px; }
    .check-table td.actions { white-space: normal; }
    .check-table td.actions .btn,
    .check-table td.actions .inline-form { display: inline-block; margin: 2px 0; }
    .admin-shell { padding: 14px 14px 36px; gap: 12px; }
    .admin-top { height: auto; }
    .admin-top-inner { padding: 10px 14px; }
    .admin-sidebar {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        padding: 12px 10px;
        position: static;
    }
    .admin-sidebar .sidebar-label { width: 100%; margin: 0 4px 6px; }
    .admin-nav { display: contents; }
    .admin-sidebar a {
        margin: 0;
        padding: 8px 10px;
        font-size: .82rem;
    }
    .admin-nav-site {
        width: 100% !important;
        margin-top: 8px !important;
        border-top: 1px solid rgba(255, 255, 255, .08);
    }
    .card {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .check-table { min-width: 560px; }
}

/* 가로 스크롤 테이블 (모바일 깨짐 방지) */
.table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 0 8px;
}
.table-scroll .check-table { min-width: 640px; }
.table-scroll.table-scroll-sm .check-table { min-width: 480px; }

/* 모바일 커리큘럼 접기 */
.mobile-only { display: none; }
.desktop-only { display: block; }
@media (max-width: 900px) {
    .mobile-only { display: block; }
    .desktop-only.learn-sidebar-desktop { display: none; }
    .lms-curriculum-toggle,
    .learn-curriculum-toggle {
        background: #fff;
        color: var(--ink);
        border: 1px solid var(--lms-border, var(--line));
        border-radius: 14px;
        padding: 12px 14px;
        margin-bottom: 12px;
        box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
    }
    .lms-curriculum-toggle > summary,
    .learn-curriculum-toggle > summary {
        cursor: pointer;
        font-weight: 700;
        list-style: none;
    }
    .lms-curriculum-toggle > summary::-webkit-details-marker,
    .learn-curriculum-toggle > summary::-webkit-details-marker { display: none; }
    .lms-curriculum-toggle[open] > summary,
    .learn-curriculum-toggle[open] > summary { margin-bottom: 10px; }
    .learn-curriculum-toggle .learn-sidebar {
        background: transparent;
        padding: 0;
        max-height: none;
        position: static;
    }
}

@media (max-width: 400px) {
    .stat-row { grid-template-columns: 1fr; }
    .btn, .btn-sm { min-height: 40px; }
}

/* 공지 · 마감 알림 */
.hse-alert-list,
.hse-notice-list {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
    display: grid;
    gap: 8px;
}

.hse-alert-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    padding: 12px 14px;
    border: 1px solid var(--line, #DDE6F2);
    border-radius: 12px;
    background: #FFF8EC;
}

.hse-alert-item a {
    margin-left: auto;
    color: var(--blue, #2F73FF);
    font-weight: 600;
}

.hse-notice-item a {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    padding: 10px 4px;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid var(--line, #DDE6F2);
}

.hse-notice-item.is-unread a strong,
.hse-notice-item.is-unread a {
    font-weight: 700;
    color: var(--navy, #1E2E63);
}

.hse-notice-body {
    margin-top: 12px;
    line-height: 1.7;
    color: var(--ink, #1a2438);
}

/* 잠긴 차시 */
.hse-curriculum-item.is-locked,
.hse-lesson-chip.is-locked {
    opacity: .55;
    cursor: not-allowed;
}

.hse-curriculum-item.is-locked {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
}

.hse-lesson-lock {
    margin-left: auto;
    font-size: .85rem;
}

.hse-lesson-status.is-locked {
    background: #c5d0e0;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.stat-card {
    border: 1px solid var(--line, #DDE6F2);
    border-radius: 12px;
    padding: 14px;
    background: #fff;
    display: grid;
    gap: 4px;
}

.stat-card strong {
    font-size: 1.35rem;
    color: var(--navy, #1E2E63);
}

.stat-card span {
    color: var(--muted, #6b7a90);
    font-size: .85rem;
}

.checkbox-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
}

/* 현장 출석 QR */
.field-qr-panel {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    align-items: start;
}

.field-qr-box {
    width: 240px;
    min-height: 240px;
    border: 1px solid var(--line, #DDE6F2);
    border-radius: 12px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.field-qr-code {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: .18em;
    color: var(--navy, #1E2E63);
    margin: 4px 0 12px;
}

.break-all { word-break: break-all; }
.text-warn { color: #c47a00; font-weight: 600; }

.qr-mode-tabs { margin: 0 0 16px; }
.field-qr-mode {
    display: inline-block;
    margin: 0 0 6px;
    padding: 2px 12px;
    border-radius: 999px;
    background: #D7F5EC;
    color: #0F7F70;
    font-size: .85rem;
    font-weight: 800;
}
.field-qr-panel.is-checkout .field-qr-mode { background: rgba(47, 115, 255, .12); color: #2F73FF; }
.field-qr-panel.is-checkout .field-qr-code { color: #2F73FF; }
.form-subtitle {
    margin: 20px 0 4px;
    font-size: 1rem;
    color: #1E2E63;
}

@media (max-width: 720px) {
    .field-qr-panel { grid-template-columns: 1fr; }
}

/* =========================================================
   Admin + Catalog — HSE learner-aligned polish (2026-09-18)
   ========================================================= */

.admin-body {
    font-family: var(--font-sans);
}

.admin-top {
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(8px);
}

.admin-sidebar {
    background: linear-gradient(180deg, #1a274f 0%, #1e2e63 55%, #243a78 100%);
    color: #fff;
    border-radius: 0 18px 18px 0;
    box-shadow: 8px 0 28px rgba(30, 46, 99, .12);
}

.admin-sidebar .sidebar-label {
    color: rgba(215, 245, 236, .7);
}

.admin-sidebar a {
    color: rgba(255, 255, 255, .82);
    border-radius: 12px;
}

.admin-sidebar a:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.admin-sidebar a.active {
    background: rgba(32, 199, 177, .18);
    color: #fff;
    box-shadow: inset 3px 0 0 var(--teal);
}

.admin-nav-site {
    color: rgba(215, 245, 236, .9) !important;
}

.admin-main .page-head h1,
.admin-main .page-head h2 {
    color: var(--navy);
    font-weight: 800;
    letter-spacing: -.02em;
    margin: 0;
}

.admin-main .page-head .muted {
    margin: 6px 0 0;
}

.admin-main .actions,
.admin-main .page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.admin-body .filter-tabs a {
    background: #fff;
    border-color: var(--border-soft);
    color: var(--navy);
    font-weight: 600;
}

.admin-body .filter-tabs a.active {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
    box-shadow: 0 8px 18px rgba(47, 115, 255, .22);
}

.admin-body .check-table {
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}

.admin-body .check-table thead th {
    background: linear-gradient(180deg, #f7faff 0%, #f0f5fc 100%);
    color: #5b6b8c;
    font-size: .82rem;
    letter-spacing: .02em;
    border-bottom: 1px solid var(--border-soft);
}

.admin-body .check-table tbody tr:hover td {
    background: rgba(47, 115, 255, .03);
}

.admin-body .check-table td a {
    color: var(--navy);
    font-weight: 700;
}

.admin-body .badge.ok {
    background: rgba(32, 199, 177, .14);
    color: #0f8f80;
}

.admin-body .form {
    gap: 16px;
}

.admin-body .form > label > span,
.admin-body .form-section-title {
    color: var(--navy);
    font-weight: 700;
}

.admin-body .form input,
.admin-body .form textarea,
.admin-body .form select {
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    background: #fbfdff;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.admin-body .form input:focus,
.admin-body .form textarea:focus,
.admin-body .form select:focus {
    outline: none;
    border-color: rgba(47, 115, 255, .55);
    box-shadow: 0 0 0 3px rgba(47, 115, 255, .12);
    background: #fff;
}

.admin-body .form-section {
    margin-top: 8px;
    padding: 16px 16px 8px;
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    background: linear-gradient(180deg, #f8fbff 0%, #fff 48%);
}

.admin-body .form-section > h2,
.admin-body .form > h2 {
    margin: 0 0 12px;
    font-size: 1rem;
    color: var(--navy);
    font-weight: 800;
}

.admin-body .form-section > .muted {
    margin: -4px 0 12px;
}

.admin-body .form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
    padding-top: 8px;
}

.admin-body .checkbox-inline,
.admin-body .checkbox-label {
    padding: 10px 12px;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    background: #fff;
}

.admin-body .status-form {
    margin-top: 14px;
    padding: 12px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid var(--border-soft);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: end;
}

.admin-body .content-tree {
    margin: 0;
    padding-left: 18px;
}

.admin-body .content-tree > li {
    margin: 10px 0;
}

.admin-body .table-scroll {
    overflow-x: auto;
    border-radius: 14px;
}

/* Catalog (learner) */
.catalog-page {
    max-width: 1400px;
    margin: 0 auto;
}

.catalog-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.catalog-hero h1 {
    margin: 0;
    color: var(--navy);
    font-weight: 800;
    font-size: 1.75rem;
}

.catalog-hero .muted {
    margin: 6px 0 0;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.catalog-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
    border-radius: 18px;
    border: 1px solid var(--border-soft);
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 39, 71, .05);
    overflow: hidden;
    min-height: 220px;
}

.catalog-card::before {
    content: "";
    position: absolute;
    inset: auto -20% -40% auto;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(47, 115, 255, .12), transparent 70%);
    pointer-events: none;
}

.catalog-card.is-teal::before {
    background: radial-gradient(circle, rgba(32, 199, 177, .16), transparent 70%);
}

.catalog-card.is-orange::before {
    background: radial-gradient(circle, rgba(245, 166, 35, .16), transparent 70%);
}

.catalog-card-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.catalog-card-heading {
    min-width: 0;
    flex: 1 1 auto;
}

.catalog-card-title {
    margin: 0;
    color: var(--navy);
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.35;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.catalog-card-session {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: .9rem;
    line-height: 1.4;
}

.catalog-status {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    font-size: .78rem;
    font-weight: 700;
    line-height: 1;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(107, 114, 128, .12);
    color: var(--muted);
}

.catalog-status-ok {
    background: rgba(32, 199, 177, .14);
    color: #0f8f80;
}

.catalog-status-wait {
    background: rgba(245, 166, 35, .16);
    color: #b06d00;
}

.catalog-status-rejected {
    background: rgba(220, 53, 69, .12);
    color: #b42335;
}

.catalog-card-note {
    margin: 0;
    padding: 8px 10px;
    border-radius: 8px;
    background: #FFF7E8;
    color: #8a5a00;
    font-size: .85rem;
    line-height: 1.45;
}

.hse-waiting-note {
    margin-bottom: 14px;
}

.catalog-card-note.is-rejected {
    background: #FDEEEF;
    color: #9c1f2e;
}

.catalog-card-meta {
    display: grid;
    gap: 6px;
    color: #5b6b8c;
    font-size: .88rem;
    line-height: 1.45;
}

.catalog-card-foot {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
}

.catalog-card-foot .inline-form {
    display: inline-flex;
    margin: 0;
}

.catalog-card.is-enrolled {
    border-color: rgba(32, 199, 177, .35);
}

.catalog-empty {
    padding: 28px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed var(--border-soft);
    border-radius: 16px;
    background: #fff;
}

/* 시험 출제 방식 · 문제 구성 */
.exam-pick-mode {
    display: grid;
    gap: 10px;
    margin: 4px 0 0;
    padding: 14px;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    background: #f4f8ff;
}

.exam-pick-mode legend {
    padding: 0 6px;
    font-weight: 700;
    color: var(--navy);
}

.exam-pick-option {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}

.exam-pick-option input[type="radio"] {
    width: auto;
    margin-top: 4px;
}

.exam-pick-option span {
    display: grid;
    gap: 2px;
}

.exam-pick-option:has(input:checked) {
    border-color: var(--blue);
    box-shadow: 0 0 0 1px var(--blue) inset;
}

.exam-pick-count {
    max-width: 260px;
}

.exam-pick-count[hidden] {
    display: none !important;
}

.exam-bank-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 12px 0;
}

.exam-bank-actions .inline-fields {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: .85rem;
}

.check-table .col-check {
    width: 36px;
    text-align: center;
}

.check-table .col-check input[type="checkbox"] {
    width: auto;
}

.exam-bank-table label {
    cursor: pointer;
}

@media (max-width: 900px) {
    .admin-shell {
        grid-template-columns: 1fr;
    }
    .admin-sidebar {
        border-radius: 0 0 18px 18px;
    }
}


/* PDF 원본 등록 (관리자) */
.pdf-file-pick input[type="file"] {
    max-width: 480px;
}

.pdf-toc-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.pdf-toc-ai {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.pdf-toc-ai select {
    width: auto;
}

.pdf-toc-status {
    margin: 10px 0;
    color: var(--navy);
}

.pdf-toc-status.is-ok { color: #138a72; }
.pdf-toc-status.is-fail { color: #c0392b; }

.pdf-toc-section {
    margin: 14px 0;
    padding: 12px;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    background: #F4F8FF;
}

.pdf-toc-section-head {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.pdf-toc-section-head input {
    flex: 1;
    font-weight: 700;
}

.pdf-toc-table {
    background: #fff;
}

.pdf-toc-table .pdf-toc-thumb {
    width: 84px;
}

.pdf-toc-table canvas {
    display: block;
    width: 72px;
    height: auto;
    border: 1px solid var(--border-soft);
    border-radius: 4px;
    background: #fff;
}

.pdf-toc-table .pdf-toc-start {
    width: 90px;
}

.pdf-toc-table .pdf-toc-range {
    white-space: nowrap;
    font-size: 0.85rem;
    color: var(--navy);
}

.pdf-toc-table tr.is-invalid .pdf-toc-range {
    color: #c0392b;
    font-weight: 700;
}

.pdf-toc-table tr.is-invalid .pdf-toc-start {
    border-color: #c0392b;
}

.pdf-progress {
    margin-top: 14px;
}

.pdf-progress-track {
    height: 10px;
    border-radius: 999px;
    background: #DDE6F2;
    overflow: hidden;
}

.pdf-progress-track span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #2F73FF, #20C7B1);
    transition: width 0.2s ease;
}

#pdf-progress-text.is-fail {
    color: #c0392b;
}

.pdf-import .btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    filter: grayscale(0.4);
}

#pdf-image-width[hidden] {
    display: none !important;
}
