/**
 * ============================================================
 * Joyn LMS · 강사 워크스페이스 UI (모바일 재설계 v2)
 * 파일: joyn-lms/assets/css/joyn-lms-instructor-ui.css
 *
 * 강사가 보는 모든 화면(홈/수강생관리/강의관리/강의편집/수익)을
 * 모바일 앱 기준으로 재설계한 스타일 레이어입니다.
 *   · 하단 탭바(모바일) → 좌측 사이드바(데스크톱) 반응형 네비
 *   · 표 대신 상태 스파인 카드
 *   · 원장(ledger) 고정폭 숫자
 *   · 모달 → 바텀시트(모바일)
 * 모든 기존 클래스/데이터 속성/JS 훅은 그대로 두고 외형만 교체합니다.
 * ============================================================
 */

.joyn-account--instructor-ui {
    /* 브랜드 계승 */
    --jli-brand: #4541FF;
    --jli-brand-dark: #3530D8;
    --jli-brand-tint: #EEEEFF;
    --jli-brand-wash: #F5F5FF;
    --jli-ink: #141530;
    --jli-ink-2: #5A5D78;
    --jli-ink-3: #8A8DA6;
    --jli-canvas: #EEF0F7;
    --jli-card: #FFFFFF;
    --jli-line: #E7E9F3;
    --jli-line-2: #EFF1F8;
    --jli-ok: #12B76A;   --jli-ok-t: #E7F8F0;
    --jli-warn: #F79009; --jli-warn-t: #FEF3E2; --jli-warn-ink: #B36A00;
    --jli-danger: #F04438; --jli-danger-t: #FEECEB;
    --jli-grey: #98A0B4; --jli-grey-t: #EEF0F6;
    --jli-radius: 18px;
    --jli-radius-sm: 12px;
    --jli-shadow: 0 1px 2px rgba(20,21,48,.04), 0 8px 24px rgba(20,21,48,.06);
    --jli-shadow-lg: 0 12px 40px rgba(20,21,48,.16);
    --jli-mono: "SFMono-Regular", ui-monospace, "JetBrains Mono", "Roboto Mono", Menlo, monospace;
    --jli-tabbar-h: 0px;

    color: var(--jli-ink);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
.joyn-account--instructor-ui,
.joyn-account--instructor-ui * { box-sizing: border-box; }

/* 고정폭 숫자 유틸 (수익/명수/진도) */
.joyn-account--instructor-ui .jli-num,
.joyn-account--instructor-ui .joyn-account-stat__number,
.joyn-account--instructor-ui .joyn-student-manage-card__pct,
.joyn-account--instructor-ui .joyn-cohort-tabs__count {
    font-family: var(--jli-mono);
    font-variant-numeric: tabular-nums;
    letter-spacing: -.02em;
}

/* 캔버스: 강사 워크스페이스 전체 배경 */
body:has(.joyn-account--instructor-ui),
body.joyn-lms-instructor-active {
    background: var(--jli-canvas);
}

/* 강사 대시보드 모바일에서도 사이트 공통 HC JOYN 헤더를 항상 표시한다. */
@media (max-width: 767px) {
    body:has(.joyn-account--instructor-ui) .hcjoyn-site-hcjm-header,
    body.joyn-lms-instructor-active .hcjoyn-site-hcjm-header {
        display: block !important;
        visibility: visible !important;
        height: auto !important;
        min-height: 72px;
        position: sticky;
        top: 0;
        z-index: 1000;
        margin: 0 !important;
    }
    body:has(.joyn-account--instructor-ui) .hcjoyn-site-hcjm-header .hcjm-header-mobile,
    body.joyn-lms-instructor-active .hcjoyn-site-hcjm-header .hcjm-header-mobile {
        display: flex !important;
        visibility: visible !important;
    }
}

/* ============================================================
 * 레이아웃 컨테이너
 * ============================================================ */
.joyn-account--instructor-ui .joyn-account__layout,
.joyn-account--instructor-ui .joyn-account__course-edit-only {
    max-width: 1160px;
    margin-inline: auto;
    padding: 16px 18px calc(var(--jli-tabbar-h) + 24px);
}
.joyn-account--instructor-ui .joyn-account__main { min-width: 0; }

/* ============================================================
 * 역할 모드 스위처 (수강 / 강사)
 * ============================================================ */
.joyn-account--instructor-ui .joyn-account__modeswitch {
    display: flex; gap: 6px;
    background: #E4E7F1;
    padding: 5px; border-radius: 15px;
    margin-bottom: 12px;
}
.joyn-account--instructor-ui .joyn-account__mode {
    flex: 1; display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: 11px;
    text-decoration: none; color: var(--jli-ink-2);
    transition: .18s; min-width: 0;
}
.joyn-account--instructor-ui .joyn-account__mode.is-active {
    background: var(--jli-card); color: var(--jli-ink);
    box-shadow: 0 2px 8px rgba(20,21,48,.1);
}
.joyn-account--instructor-ui .joyn-account__mode.is-active .joyn-account__mode-chip { color: var(--jli-brand); }
.joyn-account--instructor-ui .joyn-account__mode-chip {
    width: 22px; height: 22px; flex: none; color: var(--jli-ink-3);
}
.joyn-account--instructor-ui .joyn-account__mode-chip svg { width: 100%; height: 100%; display: block; }
.joyn-account--instructor-ui .joyn-account__mode-txt { min-width: 0; line-height: 1.2; }
.joyn-account--instructor-ui .joyn-account__mode-txt b { font-size: 14px; font-weight: 700; display: block; letter-spacing: -.01em; }
.joyn-account--instructor-ui .joyn-account__mode-txt small { font-size: 11px; color: var(--jli-ink-3); display: block; }
.joyn-account--instructor-ui .joyn-account__mode-check { display: none; }

/* 컨텍스트 배너 */
.joyn-account--instructor-ui .joyn-account__context {
    display: flex; align-items: center; gap: 8px;
    font-size: 12.5px; color: var(--jli-ink-3);
    padding: 2px 6px 12px;
}
.joyn-account--instructor-ui .joyn-account__context i { color: var(--jli-brand); font-size: 15px; }

/* ============================================================
 * 네비게이션: 모바일·데스크톱 모두 콘텐츠 상단 탭
 * ============================================================ */
.joyn-account--instructor-ui .joyn-account__topnav--instructor {
    position: sticky;
    top: 72px;
    left: auto; right: auto; bottom: auto;
    z-index: 20;
    width: 100%;
    height: auto; min-height: 0; max-height: none;
    margin: 0 0 16px;
    padding: 6px 8px;
    background: #fff;
    -webkit-backdrop-filter: none; backdrop-filter: none;
    border: 1px solid var(--jli-line);
    border-radius: 14px;
    overflow: visible;
}
.joyn-account--instructor-ui .joyn-account__topnav--instructor .joyn-account__topnav-scroll,
.joyn-account--instructor-ui .joyn-account__topnav--instructor .joyn-account__topnav-icons {
    position: relative;
    z-index: 1;
}
body.admin-bar .joyn-account--instructor-ui .joyn-account__topnav--instructor { top: 118px; }
.joyn-account--instructor-ui .joyn-account__topnav--instructor .joyn-account__topnav-scroll {
    display: flex;
    max-width: none; margin: 0;
    padding: 0 2px 2px;
    overflow-x: auto; overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.joyn-account--instructor-ui .joyn-account__topnav--instructor .joyn-account__topnav-scroll::-webkit-scrollbar { display: none; }
.joyn-account--instructor-ui .joyn-account__topnav-item--instructor {
    flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-width: 70px; min-height: 54px;
    padding: 6px 8px; border-radius: 10px;
    text-decoration: none;
    color: var(--jli-ink-3); font-size: 10.5px; font-weight: 600;
    transition: color .15s;
}
.joyn-account--instructor-ui .joyn-account__topnav-item--instructor i { font-size: 23px; line-height: 1; }
.joyn-account--instructor-ui .joyn-account__topnav-item--instructor .joyn-account__topnav-label {
    white-space: nowrap;
}
.joyn-account--instructor-ui .joyn-account__topnav-item--instructor.joyn-account__topnav-item--active {
    color: var(--jli-brand);
    background: var(--jli-brand-wash);
}
/* 강사 워크스페이스일 땐 사이트 기본 하단바 숨김 (중복 방지) */
body:has(.joyn-account--instructor-ui) .joyn-bottom-nav,
body.joyn-lms-instructor-active .joyn-bottom-nav { display: none !important; }

/* ============================================================
 * 섹션 타이틀 / 힌트
 * ============================================================ */
.joyn-account--instructor-ui .joyn-account__section-title,
.joyn-account--instructor-ui .joyn-section-title,
.joyn-account--instructor-ui h2 {
    font-size: 22px; font-weight: 800; letter-spacing: -.03em; margin: 6px 2px 4px;
}
.joyn-account--instructor-ui .joyn-form-hint,
.joyn-account--instructor-ui .joyn-section-desc,
.joyn-account--instructor-ui .joyn-modal__desc {
    color: var(--jli-ink-3); font-size: 13px;
}
.joyn-account--instructor-ui .joyn-account__section-title + .joyn-form-hint,
.joyn-account--instructor-ui h2 + .joyn-form-hint { margin-top: 4px; }

/* ============================================================
 * 통계 스트립 (수익/명수/진도)
 * ============================================================ */
.joyn-account--instructor-ui .joyn-account-stats {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
}
.joyn-account--instructor-ui .joyn-account-stat {
    background: var(--jli-card); border: 1px solid var(--jli-line-2);
    border-radius: var(--jli-radius-sm); padding: 15px 14px;
    box-shadow: var(--jli-shadow); text-align: left;
}
.joyn-account--instructor-ui .joyn-account-stat__number {
    font-size: 24px; font-weight: 700; letter-spacing: -.03em; line-height: 1;
    display: block; color: var(--jli-ink);
}
.joyn-account--instructor-ui .joyn-account-stat__label {
    font-size: 12px; color: var(--jli-ink-3); margin-top: 7px; display: block; font-weight: 500;
}

/* ============================================================
 * 강의 목록 (강의관리) — 카드
 * ============================================================ */
.joyn-account--instructor-ui .joyn-instructor-courses-header {
    display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 6px 2px 16px;
}
.joyn-account--instructor-ui .joyn-instructor-courses-title { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.joyn-account--instructor-ui .joyn-instructor-courses-header__actions { display: flex; gap: 8px; margin-left: auto; }

.joyn-account--instructor-ui .joyn-instructor-courses-grid {
    display: grid; grid-template-columns: 1fr; gap: 14px;
}
.joyn-account--instructor-ui .joyn-instructor-course-card {
    background: var(--jli-card); border: 1px solid var(--jli-line-2);
    border-radius: var(--jli-radius); box-shadow: var(--jli-shadow);
    overflow: hidden; padding: 0; display: flex; flex-direction: column;
}
.joyn-account--instructor-ui .joyn-instructor-course-card__thumb {
    width: 100%; height: 132px; object-fit: cover; display: block;
}
.joyn-account--instructor-ui .joyn-instructor-course-card__thumb--placeholder {
    display: grid; place-items: center; font-size: 46px;
    background: linear-gradient(135deg, #4C48FF, #8A7DFF); color: #fff;
}
.joyn-account--instructor-ui .joyn-instructor-course-card__body { padding: 15px 16px 16px; }
.joyn-account--instructor-ui .joyn-instructor-course-card__title {
    font-size: 16.5px; font-weight: 800; letter-spacing: -.02em; margin: 0;
}
.joyn-account--instructor-ui .joyn-instructor-course-card__badge {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 8px;
    margin: 10px 0 14px;
}
.joyn-account--instructor-ui .joyn-instructor-course-card__badge--publish { background: var(--jli-ok-t); color: var(--jli-ok); }
.joyn-account--instructor-ui .joyn-instructor-course-card__badge--draft { background: var(--jli-grey-t); color: #5f677d; }
.joyn-account--instructor-ui .joyn-instructor-course-card__badge--pending { background: var(--jli-warn-t); color: var(--jli-warn-ink); }
.joyn-account--instructor-ui .joyn-instructor-course-card__actions { display: flex; gap: 8px; }
.joyn-account--instructor-ui .joyn-instructor-course-card__actions .joyn-btn { flex: 1; }

/* ============================================================
 * 수강생관리 (대시보드) — 신청 대기 표 → 카드
 * ============================================================ */
.joyn-account--instructor-ui .joyn-pending-students-table { border: 0; width: 100%; }
.joyn-account--instructor-ui .joyn-pending-students-table thead { display: none; }
.joyn-account--instructor-ui .joyn-pending-students-table,
.joyn-account--instructor-ui .joyn-pending-students-table tbody,
.joyn-account--instructor-ui .joyn-pending-students-table tr,
.joyn-account--instructor-ui .joyn-pending-students-table td { display: block; width: 100%; }
.joyn-account--instructor-ui .joyn-pending-students-table tr {
    position: relative;
    background: var(--jli-card);
    border: 1px solid var(--jli-line-2);
    border-left: 5px solid var(--jli-warn);
    border-radius: var(--jli-radius); box-shadow: var(--jli-shadow);
    padding: 15px 16px 14px; margin-bottom: 11px;
}
.joyn-account--instructor-ui .joyn-pending-students-table td {
    border: 0; padding: 3px 0; font-size: 13.5px; color: var(--jli-ink-2);
}
/* 첫 셀(이름) 강조 */
.joyn-account--instructor-ui .joyn-pending-students-table td:first-child {
    font-size: 16px; font-weight: 800; color: var(--jli-ink); padding-bottom: 6px;
    letter-spacing: -.01em;
}
/* data-label 로 라벨 표시 (마크업에서 주입) */
.joyn-account--instructor-ui .joyn-pending-students-table td[data-label]:not(:first-child)::before {
    content: attr(data-label) " · ";
    color: var(--jli-ink-3); font-weight: 600;
}
/* 작업 버튼 셀 */
.joyn-account--instructor-ui .joyn-pending-students-table td:last-child {
    display: flex; gap: 8px; margin-top: 12px; padding-top: 0;
}
.joyn-account--instructor-ui .joyn-pending-students-table td:last-child::before { content: none; }
.joyn-account--instructor-ui .joyn-pending-students-table td:last-child .joyn-btn { flex: 1; }

/* 소제목들 */
.joyn-account--instructor-ui .joyn-students-by-course__title { font-size: 15px; font-weight: 800; margin: 6px 2px 4px; }

/* ============================================================
 * 강의별 아코디언
 * ============================================================ */
.joyn-account--instructor-ui .joyn-course-accordion__item {
    background: var(--jli-card); border: 1px solid var(--jli-line-2);
    border-radius: var(--jli-radius); box-shadow: var(--jli-shadow);
    margin-bottom: 11px; overflow: hidden;
}
.joyn-account--instructor-ui .joyn-course-accordion__trigger {
    display: flex; align-items: center; gap: 12px;
    padding: 15px 16px; cursor: pointer; list-style: none;
}
.joyn-account--instructor-ui .joyn-course-accordion__trigger::-webkit-details-marker { display: none; }
.joyn-account--instructor-ui .joyn-course-accordion__title { font-size: 14.5px; font-weight: 800; letter-spacing: -.01em; flex: 1; min-width: 0; }
.joyn-account--instructor-ui .joyn-course-accordion__count {
    font-family: var(--jli-mono); font-variant-numeric: tabular-nums;
    font-size: 12px; font-weight: 700; color: var(--jli-ink-2);
    background: var(--jli-canvas); padding: 4px 10px; border-radius: 8px; flex: none;
}
.joyn-account--instructor-ui .joyn-course-accordion__chev {
    width: 20px; height: 20px; flex: none;
    background: no-repeat center/contain;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 15.4l-6-6L7.4 8l4.6 4.6L16.6 8 18 9.4z'/%3E%3C/svg%3E") no-repeat center/contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 15.4l-6-6L7.4 8l4.6 4.6L16.6 8 18 9.4z'/%3E%3C/svg%3E") no-repeat center/contain;
    background-color: var(--jli-ink-3); transition: transform .2s;
}
.joyn-account--instructor-ui .joyn-course-accordion__item[open] .joyn-course-accordion__chev { transform: rotate(180deg); }
.joyn-account--instructor-ui .joyn-course-accordion__panel { padding: 0 14px 12px; }
.joyn-account--instructor-ui .joyn-course-accordion__empty { color: var(--jli-ink-3); font-size: 13px; padding: 8px 2px 12px; }

/* ============================================================
 * 수강생 카드 (명단) — 상태 스파인
 * ============================================================ */
.joyn-account--instructor-ui .joyn-student-cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.joyn-account--instructor-ui .joyn-student-card {
    position: relative; overflow: hidden;
    display: flex; align-items: center; gap: 12px;
    background: var(--jli-card); border: 1px solid var(--jli-line-2);
    border-radius: var(--jli-radius); box-shadow: var(--jli-shadow);
    padding: 13px 15px 13px 18px;
}
.joyn-account--instructor-ui .joyn-student-card::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
    background: var(--jli-brand);
}
.joyn-account--instructor-ui .joyn-student-card--completed::before { background: var(--jli-ok); }
.joyn-account--instructor-ui .joyn-student-card--pending::before   { background: var(--jli-warn); }
.joyn-account--instructor-ui .joyn-student-card--cancelled::before { background: var(--jli-grey); }
.joyn-account--instructor-ui .joyn-student-card__avatar { width: 46px; height: 46px; border-radius: 14px; flex: none; object-fit: cover; }
.joyn-account--instructor-ui .joyn-student-card__head { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.joyn-account--instructor-ui .joyn-student-card__meta { min-width: 0; }
.joyn-account--instructor-ui .joyn-student-card__name { font-size: 15px; font-weight: 800; letter-spacing: -.01em; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.joyn-account--instructor-ui .joyn-student-card__email { font-size: 12.5px; color: var(--jli-ink-3); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.joyn-account--instructor-ui .joyn-student-card__progress { font-size: 12.5px; color: var(--jli-ink-2); font-weight: 600; margin-top: 2px; display: block; }
.joyn-account--instructor-ui .joyn-student-card__actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.joyn-account--instructor-ui .joyn-student-card {
    flex-wrap: wrap;
}
.joyn-account--instructor-ui .joyn-student-card__actions { width: 100%; }

/* ============================================================
 * course-edit-students.php — 관리 카드 리스트
 * ============================================================ */
.joyn-account--instructor-ui .joyn-cohort-tabs {
    display: flex; gap: 7px; overflow-x: auto; margin: 4px 0 16px; padding-bottom: 2px;
    scrollbar-width: none;
}
.joyn-account--instructor-ui .joyn-cohort-tabs::-webkit-scrollbar { display: none; }
.joyn-account--instructor-ui .joyn-cohort-tabs__item {
    flex: none; display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 14px; border-radius: 11px; text-decoration: none;
    border: 1px solid var(--jli-line); background: var(--jli-card);
    color: var(--jli-ink-2); font-size: 13px; font-weight: 700; white-space: nowrap;
}
.joyn-account--instructor-ui .joyn-cohort-tabs__item--active { background: var(--jli-ink); color: #fff; border-color: var(--jli-ink); }
.joyn-account--instructor-ui .joyn-cohort-tabs__count {
    font-size: 12px; font-weight: 700; opacity: .8;
    background: rgba(255,255,255,.15); padding: 1px 7px; border-radius: 6px;
}
.joyn-account--instructor-ui .joyn-cohort-tabs__item:not(.joyn-cohort-tabs__item--active) .joyn-cohort-tabs__count { background: var(--jli-canvas); color: var(--jli-ink-2); }

.joyn-account--instructor-ui .joyn-students-manage__toolbar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px;
}
.joyn-account--instructor-ui .joyn-students-manage__summary { font-size: 13px; color: var(--jli-ink-2); margin: 0; }
.joyn-account--instructor-ui .joyn-students-manage__summary-accent { color: var(--jli-brand); font-weight: 800; }
.joyn-account--instructor-ui .joyn-students-manage__sort {
    margin-left: auto; min-height: 40px; border-radius: 11px !important; padding: 8px 12px !important;
    font-size: 13px !important;
}
.joyn-account--instructor-ui .joyn-students-manage__chat-btn {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--jli-brand-wash); color: var(--jli-brand);
    border: 1px solid var(--jli-brand-tint);
    padding: 10px 15px; border-radius: 12px; font-weight: 700; font-size: 13.5px; text-decoration: none;
    margin-bottom: 14px;
}
.joyn-account--instructor-ui .joyn-students-manage__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }

.joyn-account--instructor-ui .joyn-student-manage-item { margin: 0; }
.joyn-account--instructor-ui .joyn-student-manage-card {
    position: relative; overflow: hidden;
    background: var(--jli-card); border: 1px solid var(--jli-line-2);
    border-radius: var(--jli-radius); box-shadow: var(--jli-shadow);
    padding: 15px 16px 15px 18px;
    display: flex; align-items: flex-start; gap: 12px;
}
.joyn-account--instructor-ui .joyn-student-manage-card::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--jli-brand);
}
.joyn-account--instructor-ui .joyn-student-manage-item--pending .joyn-student-manage-card::before { background: var(--jli-warn); }
.joyn-account--instructor-ui .joyn-student-manage-item--not-started .joyn-student-manage-card::before { background: var(--jli-grey); }
.joyn-account--instructor-ui .joyn-student-manage-card__main { flex: 1; min-width: 0; }
.joyn-account--instructor-ui .joyn-student-manage-card__who { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.joyn-account--instructor-ui .joyn-student-manage-card__name { font-size: 15.5px; font-weight: 800; letter-spacing: -.01em; }
.joyn-account--instructor-ui .joyn-student-manage-card__status {
    font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 7px;
    background: var(--jli-brand-tint); color: var(--jli-brand);
}
.joyn-account--instructor-ui .joyn-student-manage-item--pending .joyn-student-manage-card__status { background: var(--jli-warn-t); color: var(--jli-warn-ink); }
.joyn-account--instructor-ui .joyn-student-manage-card__email,
.joyn-account--instructor-ui .joyn-student-manage-card__form-meta { font-size: 12.5px; color: var(--jli-ink-3); display: block; margin-top: 3px; }
.joyn-account--instructor-ui .joyn-student-manage-card__date { font-size: 12px; color: var(--jli-ink-3); margin-top: 4px; }
.joyn-account--instructor-ui .joyn-student-manage-card__progress { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.joyn-account--instructor-ui .joyn-student-manage-card__pct { font-size: 13px; font-weight: 700; color: var(--jli-ink-2); flex: none; }
.joyn-account--instructor-ui .joyn-student-manage-card__bar { flex: 1; height: 8px; border-radius: 5px; background: var(--jli-line); overflow: hidden; }
.joyn-account--instructor-ui .joyn-student-manage-card__bar-fill { display: block; height: 100%; border-radius: 5px; background: var(--jli-brand); }
.joyn-account--instructor-ui .joyn-student-manage-card__bar-fill--complete { background: var(--jli-ok); }
.joyn-account--instructor-ui .joyn-student-manage-card__bar-fill--empty { background: var(--jli-grey); }
.joyn-account--instructor-ui .joyn-student-manage-card__toggle {
    align-self: center; flex: none; width: 38px; height: 38px; border-radius: 11px;
    background: var(--jli-canvas); border: 0; color: var(--jli-ink-2);
    display: grid; place-items: center; cursor: pointer;
}
.joyn-account--instructor-ui .joyn-student-manage-card__toggle[aria-expanded="true"] .joyn-student-manage-card__chev-svg { transform: rotate(180deg); }
.joyn-account--instructor-ui .joyn-student-manage-card__chev-svg { transition: transform .2s; }
.joyn-account--instructor-ui .joyn-student-manage-detail {
    background: var(--jli-brand-wash); border: 1px solid var(--jli-brand-tint);
    border-radius: 14px; padding: 14px; margin-top: 9px;
}

/* ============================================================
 * course-edit 허브 헤더 & 세그먼트 네비
 * ============================================================ */
.joyn-account--instructor-ui .joyn-course-edit__header {
    position: sticky; top: 0; z-index: 30;
    background: rgba(238,240,247,.92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    margin: -16px -18px 0; padding: 12px 18px 6px;
}
.joyn-account--instructor-ui .joyn-course-edit__back {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 13px; color: var(--jli-ink-2); font-weight: 600; text-decoration: none;
    padding: 6px 0;
}
.joyn-account--instructor-ui .joyn-course-edit__title { font-size: 20px; font-weight: 800; letter-spacing: -.02em; margin: 2px 0 0; }

.joyn-account--instructor-ui .joyn-course-edit__topnav {
    position: sticky; top: 74px; z-index: 29;
    background: rgba(238,240,247,.92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    margin: 0 -18px 14px; padding: 8px 18px;
}
.joyn-account--instructor-ui .joyn-course-edit__topnav-scroll {
    display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none;
}
.joyn-account--instructor-ui .joyn-course-edit__topnav-scroll::-webkit-scrollbar { display: none; }
.joyn-account--instructor-ui .joyn-course-edit__nav-item {
    flex: none; display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 14px; border-radius: 11px; text-decoration: none; white-space: nowrap;
    border: 1px solid var(--jli-line); background: var(--jli-card);
    color: var(--jli-ink-2); font-size: 13px; font-weight: 700;
}
.joyn-account--instructor-ui .joyn-course-edit__nav-item--active {
    background: var(--jli-brand); border-color: var(--jli-brand); color: #fff;
}
.joyn-account--instructor-ui .joyn-course-edit__main,
.joyn-account--instructor-ui .joyn-instructor-profile-form,
.joyn-account--instructor-ui .joyn-earnings-summary,
.joyn-account--instructor-ui .joyn-cert-pending,
.joyn-account--instructor-ui .joyn-cert-issued,
.joyn-account--instructor-ui .joyn-wizard-panel {
    background: transparent; min-width: 0;
}

/* ============================================================
 * 폼 요소
 * ============================================================ */
.joyn-account--instructor-ui .joyn-form-group { margin-bottom: 16px; }
.joyn-account--instructor-ui label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 7px; color: var(--jli-ink); }
.joyn-account--instructor-ui input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
.joyn-account--instructor-ui select,
.joyn-account--instructor-ui textarea {
    width: 100%; border: 1px solid var(--jli-line); border-radius: 12px;
    padding: 13px 14px; font: inherit; font-size: 15px;
    background: var(--jli-card); color: var(--jli-ink); outline: none;
    -webkit-appearance: none; appearance: none;
}
.joyn-account--instructor-ui textarea { min-height: 110px; resize: vertical; }
.joyn-account--instructor-ui input:focus,
.joyn-account--instructor-ui select:focus,
.joyn-account--instructor-ui textarea:focus {
    border-color: var(--jli-brand); box-shadow: 0 0 0 3px rgba(69,65,255,.14);
}
.joyn-account--instructor-ui input[type="file"] {
    width: 100%; font-size: 13px; padding: 10px 0; color: var(--jli-ink-2);
}

/* ============================================================
 * 버튼
 * ============================================================ */
.joyn-account--instructor-ui .joyn-btn,
.joyn-account--instructor-ui .jce-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    font: inherit; font-weight: 700; font-size: 14px;
    border: 1px solid transparent; border-radius: 12px;
    padding: 12px 16px; cursor: pointer; text-decoration: none; line-height: 1.2;
    transition: background .16s, border-color .16s, transform .06s;
}
.joyn-account--instructor-ui .joyn-btn:active { transform: translateY(1px); }
.joyn-account--instructor-ui .joyn-btn--sm { padding: 9px 12px; font-size: 13px; border-radius: 10px; }
.joyn-account--instructor-ui .joyn-btn--primary,
.joyn-account--instructor-ui .jce-btn--primary,
.joyn-account--instructor-ui .joyn-btn--add-course {
    background: var(--jli-brand); color: #fff;
}
.joyn-account--instructor-ui .joyn-btn--primary:hover,
.joyn-account--instructor-ui .jce-btn--primary:hover,
.joyn-account--instructor-ui .joyn-btn--add-course:hover { background: var(--jli-brand-dark); }
.joyn-account--instructor-ui .joyn-btn--secondary {
    background: var(--jli-card); color: var(--jli-ink); border-color: var(--jli-line);
}
.joyn-account--instructor-ui .joyn-btn--secondary:hover { background: var(--jli-canvas); }
.joyn-account--instructor-ui .joyn-btn--danger { background: var(--jli-danger-t); color: var(--jli-danger); }
.joyn-account--instructor-ui .joyn-btn--danger:hover { background: #FBD9D6; }
.joyn-account--instructor-ui .joyn-btn:focus-visible,
.joyn-account--instructor-ui a:focus-visible,
.joyn-account--instructor-ui button:focus-visible,
.joyn-account--instructor-ui input:focus-visible,
.joyn-account--instructor-ui select:focus-visible,
.joyn-account--instructor-ui textarea:focus-visible {
    outline: 2px solid var(--jli-brand); outline-offset: 2px;
}

/* 배지 */
.joyn-account--instructor-ui .joyn-badge {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 8px;
}
.joyn-account--instructor-ui .joyn-badge--success { background: var(--jli-ok-t); color: var(--jli-ok); }

/* ============================================================
 * 수익 현황
 * ============================================================ */
.joyn-account--instructor-ui .joyn-account-stats + [href*="joyn-lms-earnings"],
.joyn-account--instructor-ui a.joyn-btn--primary[href*="joyn-lms-earnings"] { margin-top: 6px; }

/* ============================================================
 * 모달 → 바텀시트 (모바일)
 * ============================================================ */
.joyn-account--instructor-ui .joyn-modal,
.joyn-modal:has(.joyn-modal__content) { z-index: 1000; }
.joyn-account--instructor-ui .joyn-modal[aria-hidden="true"] { display: none; }
.joyn-account--instructor-ui .joyn-modal { position: fixed; inset: 0; display: flex; align-items: flex-end; justify-content: center; }
.joyn-account--instructor-ui .joyn-modal__backdrop { position: absolute; inset: 0; background: rgba(16,17,40,.45); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.joyn-account--instructor-ui .joyn-modal__content,
.joyn-account--instructor-ui .joyn-modal__container {
    position: relative; z-index: 1; width: 100%; max-width: 560px;
    background: var(--jli-card); border-radius: 24px 24px 0 0;
    max-height: 88vh; overflow-y: auto;
    box-shadow: var(--jli-shadow-lg);
    animation: jliSheetUp .32s cubic-bezier(.32,.72,0,1);
}
@keyframes jliSheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.joyn-account--instructor-ui .joyn-modal__header {
    display: flex; align-items: center; gap: 10px;
    padding: 18px 20px 12px; position: sticky; top: 0; background: var(--jli-card); z-index: 2;
}
.joyn-account--instructor-ui .joyn-modal__title { font-size: 18px; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.joyn-account--instructor-ui .joyn-modal__close {
    margin-left: auto; width: 36px; height: 36px; border-radius: 11px;
    background: var(--jli-canvas); border: 0; color: var(--jli-ink-2); font-size: 22px; cursor: pointer;
    display: grid; place-items: center; line-height: 1;
}
.joyn-account--instructor-ui .joyn-modal__body { padding: 4px 20px 24px; }

/* ============================================================
 * 커리큘럼 에디터 (jce-*) 최소 정돈
 * ============================================================ */
.joyn-account--instructor-ui .jce-root { background: transparent; }
.joyn-account--instructor-ui .jce-section {
    background: var(--jli-card); border: 1px solid var(--jli-line-2);
    border-radius: var(--jli-radius); box-shadow: var(--jli-shadow);
    margin-bottom: 12px; overflow: hidden;
}
.joyn-account--instructor-ui .jce-item {
    min-height: 60px; border-radius: 12px; border: 1px solid var(--jli-line-2);
    background: var(--jli-card);
}

/* 알림 박스 */
.joyn-account--instructor-ui .joyn-notice {
    background: var(--jli-card); border: 1px solid var(--jli-line-2);
    border-left: 4px solid var(--jli-brand);
    border-radius: 12px; padding: 15px 16px; font-size: 13.5px; color: var(--jli-ink-2);
    box-shadow: var(--jli-shadow);
}
.joyn-account--instructor-ui .joyn-notice--info { border-left-color: var(--jli-brand); }
.joyn-account--instructor-ui .joyn-notice--warning { border-left-color: var(--jli-warn); }
.joyn-account--instructor-ui .joyn-no-results { color: var(--jli-ink-3); font-size: 14px; padding: 24px 4px; text-align: center; }

/* 로딩/상태 */
.joyn-account--instructor-ui .joyn-loading,
.joyn-account--instructor-ui .joyn-status-message { color: var(--jli-ink-3); font-size: 13px; }

/* ============================================================
 * 태블릿 이상 (min-width: 768px)
 *   하단 탭바 → 상단 세그먼트 / 그리드 다열 / 모달 센터
 * ============================================================ */
@media (min-width: 768px) {
    .joyn-account--instructor-ui .joyn-account__layout,
    .joyn-account--instructor-ui .joyn-account__course-edit-only {
        padding: 24px 28px 40px;
    }

    /* 네비를 상단 세그먼트 바로 */
    .joyn-account--instructor-ui .joyn-account__topnav--instructor {
        position: static; z-index: auto;
        background: transparent; backdrop-filter: none; border-top: 0;
        margin-bottom: 20px; padding-bottom: 0;
    }
    .joyn-account--instructor-ui .joyn-account__topnav--instructor .joyn-account__topnav-scroll {
        max-width: none; margin: 0;
        gap: 8px; padding: 0; overflow-x: auto; scrollbar-width: none;
    }
    .joyn-account--instructor-ui .joyn-account__topnav--instructor .joyn-account__topnav-scroll::-webkit-scrollbar { display: none; }
    .joyn-account--instructor-ui .joyn-account__topnav-item--instructor {
        flex: none; flex-direction: row; gap: 8px;
        padding: 11px 18px; border-radius: 13px;
        background: var(--jli-card); border: 1px solid var(--jli-line);
        font-size: 14px; font-weight: 700;
    }
    .joyn-account--instructor-ui .joyn-account__topnav-item--instructor i { font-size: 18px; }
    .joyn-account--instructor-ui .joyn-account__topnav-item--instructor.joyn-account__topnav-item--active {
        background: var(--jli-brand); border-color: var(--jli-brand); color: #fff;
    }
    /* 데스크톱에선 사이트 하단바 숨김 해제 안 함 (계정 페이지에선 계속 숨김이 자연스러움) */

    .joyn-account--instructor-ui .joyn-account-stats { grid-template-columns: repeat(4, 1fr); }
    .joyn-account--instructor-ui .joyn-instructor-courses-grid { grid-template-columns: repeat(2, 1fr); }
    .joyn-account--instructor-ui .joyn-student-cards { display: grid; grid-template-columns: repeat(2, 1fr); }

    /* 모달을 화면 중앙 카드로 */
    .joyn-account--instructor-ui .joyn-modal { align-items: center; padding: 24px; }
    .joyn-account--instructor-ui .joyn-modal__content,
    .joyn-account--instructor-ui .joyn-modal__container {
        border-radius: 22px; max-height: 90vh; animation: jliFadeIn .2s ease;
    }
    @keyframes jliFadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

    /* 신청 대기: 카드→가로 배치 여유 */
    .joyn-account--instructor-ui .joyn-pending-students-table tr {
        display: grid; grid-template-columns: 1fr 1fr auto; align-items: center; gap: 4px 16px;
        padding: 16px 18px;
    }
    .joyn-account--instructor-ui .joyn-pending-students-table td:last-child { grid-column: 3; margin-top: 0; }
}

/* ============================================================
 * 데스크톱 넓은 화면 (min-width: 1024px)
 * ============================================================ */
@media (min-width: 1024px) {
    .joyn-account--instructor-ui .joyn-instructor-courses-grid { grid-template-columns: repeat(3, 1fr); }
    .joyn-account--instructor-ui .joyn-course-edit__header,
    .joyn-account--instructor-ui .joyn-course-edit__topnav { position: static; margin-inline: 0; background: transparent; backdrop-filter: none; }
    .joyn-account--instructor-ui .joyn-course-edit__topnav { padding: 0; margin-bottom: 20px; }
}

/* 접근성: 모션 최소화 */
@media (prefers-reduced-motion: reduce) {
    .joyn-account--instructor-ui * { animation: none !important; transition: none !important; }
}
