/* ===== Admin Correction Page Styles ===== */

/* Stats card active state (clicked filter) */
.correction-stat-card {
    cursor: pointer;
}

.correction-stat-card.active {
    border-color: var(--admin-accent);
    box-shadow: 0 0 0 2px rgba(148, 128, 197, 0.2), 0 8px 24px rgba(0,0,0,0.12);
}

/* Stat card label */
.stat-card-label {
    font-size: 12px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Status badges */
.correction-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.correction-badge-pending {
    background: #fff7ed;
    color: #ea580c;
}

.correction-badge-waiting {
    background: #dbeafe;
    color: #2563eb;
}

.correction-badge-complete {
    background: #dcfce7;
    color: #16a34a;
}

.correction-badge-processing {
    background: #f1f5f9;
    color: #94a3b8;
}

.correction-badge-stuck {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fca5a5;
    animation: pulse-stuck 2s infinite;
}

@keyframes pulse-stuck {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Elapsed time indicator */
.elapsed-time {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
}

.elapsed-green {
    background: #dcfce7;
    color: #16a34a;
}

.elapsed-orange {
    background: #fff7ed;
    color: #ea580c;
}

.elapsed-red {
    background: #fee2e2;
    color: #dc2626;
}

/* Selection bar */
.correction-selection-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #0369a1;
}

/* Task type badge */
.task-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.task-type-email {
    background: #ede9fe;
    color: #7c3aed;
}

.task-type-discussion {
    background: #fef3c7;
    color: #b45309;
}

.task-type-interview {
    background: #cffafe;
    color: #0891b2;
}

/* Draft round badge */
.draft-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.draft-badge-1 {
    background: #f1f5f9;
    color: #475569;
}

.draft-badge-2 {
    background: #ede9fe;
    color: #7c3aed;
}

/* Score display */
.score-display {
    font-weight: 700;
    font-size: 14px;
}

/* Admin loading spinner (reuse from admin.css, add if missing) */
.admin-loading {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

.admin-loading i {
    font-size: 36px;
    margin-bottom: 12px;
    display: block;
}

/* Admin empty state */
.admin-empty {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

.admin-empty i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

.admin-empty-title {
    font-size: 18px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 8px;
}

.admin-empty-text {
    font-size: 14px;
    color: #94a3b8;
}

/* Outline button */
.admin-btn-outline {
    background: white;
    color: var(--admin-secondary);
    border: 1px solid var(--admin-border);
}

.admin-btn-outline:hover {
    background: #f8fafc;
    border-color: var(--admin-accent);
    color: var(--admin-accent);
}

/* Admin card header for dashboard card */
.admin-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.admin-card-action {
    font-size: 14px;
    color: var(--admin-accent);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.admin-card-action:hover {
    text-decoration: underline;
}

/* ================================================
   구간 2: 상세 모달 (읽기 전용)
   ================================================ */

/* 모달 오버레이 */
.corr-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.corr-modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* 모달 컨테이너 */
.corr-modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 960px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform 0.2s;
}

.corr-modal-overlay.open .corr-modal {
    transform: translateY(0);
}

/* 모달 헤더 */
.corr-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.corr-modal-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.corr-modal-student-name {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
}

.corr-modal-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.corr-modal-meta-tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    background: #f1f5f9;
    color: #475569;
}

.corr-modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: #f1f5f9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    color: #64748b;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}

.corr-modal-close:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* 모달 토글 버튼 바 */
.corr-modal-toggles {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-bottom: 1px solid #f1f5f9;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.corr-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #9480c5;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.corr-toggle-btn:hover {
    background: #f9f7fc;
    border-color: #9480c5;
}

.corr-toggle-btn.active {
    background: #f0edf5;
    border-color: #9480c5;
    color: #7c3aed;
}

.corr-toggle-btn i {
    font-size: 12px;
}

/* 토글 패널 (1차 피드백 참고 / 학생 원문) */
.corr-toggle-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.corr-toggle-panel.open {
    max-height: none;
    height: 400px;
    min-height: 180px;
    margin: 0 24px 0;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    overflow-y: auto;
    transition: none;
}

.corr-toggle-panel-annotated {
    font-size: 14px;
    line-height: 1.8;
    color: #1e293b;
    margin-bottom: 12px;
}

/* Drag handle for resizing toggle panel */
.corr-resize-handle {
    height: 18px;
    cursor: row-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 24px 12px;
    user-select: none;
    border-radius: 6px;
    background: #e2e8f0;
    border: 1px solid #cbd5e1;
    transition: background 0.15s, border-color 0.15s;
}

.corr-resize-handle:hover,
.corr-resize-handle.dragging {
    background: #cbd5e1;
    border-color: #94a3b8;
}

.corr-resize-handle::after {
    content: '';
    display: block;
    width: 48px;
    height: 4px;
    background: #64748b;
    border-radius: 2px;
}

/* First-feedback split layout inside toggle panel */
.corr-fb1-split {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.corr-fb1-split-left {
    flex: 1;
    min-width: 0;
}

.corr-fb1-split-left .corr-toggle-panel-annotated {
    margin-bottom: 0;
}

.corr-fb1-split-right {
    width: 240px;
    flex-shrink: 0;
    overflow-y: auto;
    border-left: 1px solid #e2e8f0;
    padding-left: 12px;
}

.corr-toggle-panel-summary {
    background: #fff;
    border-radius: 10px;
    padding: 12px 16px;
}

.corr-toggle-panel-summary-title {
    font-size: 13px;
    font-weight: 700;
    color: #9480c5;
    margin-bottom: 6px;
}

.corr-toggle-panel-summary-title i {
    margin-right: 5px;
}

.corr-toggle-panel-summary-text {
    font-size: 13px;
    line-height: 1.7;
    color: #64748b;
    white-space: pre-line;
}

.corr-toggle-panel-draft {
    font-size: 14px;
    line-height: 1.8;
    color: #1e293b;
    white-space: pre-wrap;
    word-break: break-word;
}

.corr-toggle-panel-audio-path {
    font-size: 13px;
    color: #64748b;
    font-family: monospace;
    background: #f1f5f9;
    padding: 8px 12px;
    border-radius: 8px;
    word-break: break-all;
    margin-bottom: 6px;
}

/* 모달 본문 */
.corr-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.corr-modal-body-loading {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

.corr-modal-body-loading i {
    font-size: 36px;
    display: block;
    margin-bottom: 12px;
}

/* ================================================
   피드백 — annotated_html + correction-mark
   (testroom correction.css 복사)
   ================================================ */

.corr-feedback-annotated {
    font-size: 15px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 16px;
}

.correction-mark {
    background: #fef3c7;
    border-bottom: 2px solid #f59e0b;
    padding: 1px 2px;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    transition: background 0.2s;
}

.correction-mark:hover {
    background: #fde68a;
}

.correction-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: #fff;
    font-size: 13px;
    line-height: 1.5;
    padding: 8px 14px;
    border-radius: 8px;
    white-space: normal;
    min-width: 180px;
    max-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
    pointer-events: none;
}

.correction-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1f2937;
}

.correction-mark:hover .correction-tooltip {
    display: block;
}

.correction-mark.active .correction-tooltip {
    display: block;
}

/* ================================================
   피드백 — Speaking 질문별 구조
   ================================================ */

.corr-feedback-question {
    margin-bottom: 16px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 10px;
}

.corr-feedback-q-label {
    font-weight: 700;
    font-size: 14px;
    color: #9480c5;
    margin-bottom: 8px;
}

.corr-feedback-q-body {
    font-size: 15px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 8px;
}

.corr-feedback-q-comment {
    font-size: 13px;
    color: #666;
    font-style: italic;
    padding-top: 8px;
    border-top: 1px solid #e5e7eb;
    white-space: pre-line;
}

/* ================================================
   피드백 — Summary / Level / Encouragement
   ================================================ */

.corr-feedback-summary {
    margin-top: 16px;
}

.corr-feedback-summary-card {
    background: #f9f7fc;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 12px;
}

.corr-feedback-summary-title {
    font-size: 14px;
    font-weight: 700;
    color: #9480c5;
    margin-bottom: 8px;
}

.corr-feedback-summary-title i {
    margin-right: 6px;
}

.corr-feedback-summary-text {
    font-size: 14px;
    line-height: 1.7;
    color: #444;
    white-space: pre-line;
}

.corr-feedback-hint {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
}

.corr-feedback-level-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f0edf5;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 12px;
}

.corr-feedback-level-badge {
    font-size: 28px;
    font-weight: 800;
    color: #9480c5;
}

.corr-feedback-level-label {
    font-size: 13px;
    color: #888;
    font-weight: 600;
}

.corr-feedback-encouragement-card {
    background: #f0fdf4;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 12px;
}

.corr-feedback-encouragement-title {
    font-size: 14px;
    font-weight: 700;
    color: #77bf7e;
    margin-bottom: 8px;
}

.corr-feedback-encouragement-title i {
    margin-right: 6px;
}

.corr-feedback-encouragement-text {
    font-size: 14px;
    line-height: 1.7;
    color: #444;
    white-space: pre-line;
}

/* ================================================
   스플릿 레이아웃 (Writing 전용)
   ================================================ */

.corr-fb-split-wrap {
    font-family: 'Noto Sans KR', sans-serif;
}

.corr-fb-split {
    display: flex;
    gap: 16px;
    align-items: stretch;
}

.corr-fb-split-left {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
}

.corr-fb-split-right {
    width: 280px;
    min-width: 280px;
    max-height: 520px;
    overflow-y: auto;
    background: #f1f4f8;
    border-radius: 12px;
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.corr-memo-header {
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    padding-bottom: 6px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 2px;
}

.corr-memo-empty {
    font-size: 13px;
    color: #64748b;
    text-align: center;
    padding: 20px 0;
}

/* 메모 카드 (비활성) */
.corr-memo-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-left: 3px solid transparent;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.6;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.2s ease;
    word-break: break-word;
}

.corr-memo-card:hover {
    background: #f9f7fc;
}

/* 메모 카드 (활성) */
.corr-memo-card.memo-active {
    border-left: 3px solid #9480c5;
    box-shadow: 0 2px 8px rgba(148, 128, 197, 0.18);
    transform: scale(1.01);
    background: #fff;
}

/* Writing 전용 — correction-mark 보라색 계열 */
.corr-fb-split-wrap .correction-mark {
    background: rgba(148, 128, 197, 0.13);
    border-bottom: 2px solid rgba(148, 128, 197, 0.45);
    padding: 1px 2px;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.corr-fb-split-wrap .correction-mark:hover {
    background: rgba(148, 128, 197, 0.22);
}

.corr-fb-split-wrap .correction-mark.memo-active {
    background: rgba(148, 128, 197, 0.28);
    border-bottom-color: #9480c5;
    box-shadow: 0 1px 4px rgba(148, 128, 197, 0.25);
}

/* tooltip 숨김 (스플릿 내부) */
.corr-fb-split-wrap .correction-tooltip {
    display: none !important;
}

/* 토글 패널 내 마크: hover tooltip 표시 */
.corr-toggle-panel-annotated .correction-mark {
    background: rgba(148, 128, 197, 0.13);
    border-bottom: 2px solid rgba(148, 128, 197, 0.45);
    cursor: pointer;
    position: relative;
}

/* ================================================
   Speaking Q 탭 네비게이션
   ================================================ */

.corr-spk-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
}

.corr-spk-tab {
    padding: 8px 18px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.corr-spk-tab:hover {
    background: #f9f7fc;
    border-color: #9480c5;
}

.corr-spk-tab.active {
    background: #9480c5;
    border-color: #9480c5;
    color: #fff;
}

.corr-spk-q-panel {
    display: none;
}

.corr-spk-q-panel.active {
    display: block;
}

/* ================================================
   반응형
   ================================================ */

@media (max-width: 768px) {
    .corr-modal {
        max-width: 100%;
        max-height: 95vh;
        border-radius: 12px;
    }

    .corr-modal-header {
        padding: 16px;
    }

    .corr-modal-body {
        padding: 16px;
    }

    .corr-fb-split {
        flex-direction: column;
    }

    .corr-fb-split-right {
        width: 100%;
        min-width: 0;
        max-height: 200px;
    }

    .corr-modal-toggles {
        padding: 10px 16px;
    }

    .corr-modal-header-left {
        gap: 8px;
    }

    .corr-modal-student-name {
        font-size: 16px;
    }

    .corr-modal-footer {
        padding: 12px 16px;
    }
}

/* ================================================
   구간 3: 편집 모드
   ================================================ */

/* 편집/취소 버튼 (헤더 영역) */
.corr-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: #7c3aed;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.corr-edit-btn:hover {
    background: #f5f3ff;
    border-color: #7c3aed;
}

.corr-edit-btn.editing {
    background: #fef2f2;
    border-color: #ef4444;
    color: #ef4444;
}

.corr-edit-btn.editing:hover {
    background: #fee2e2;
}

/* 모달 푸터 (임시 저장 / 승인 버튼) */
.corr-modal-footer {
    display: none;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.corr-modal-footer.show {
    display: flex;
}

.corr-footer-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.corr-footer-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.corr-footer-btn-save {
    background: #f1f5f9;
    color: #475569;
}

.corr-footer-btn-save:hover:not(:disabled) {
    background: #e2e8f0;
}

.corr-footer-btn-silent {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.corr-footer-btn-silent:hover:not(:disabled) {
    background: #e2e8f0;
    color: #475569;
}

.corr-footer-btn-approve {
    background: #7c3aed;
    color: #fff;
}

.corr-footer-btn-approve:hover:not(:disabled) {
    background: #6d28d9;
}

/* 편집 모드 표시 배너 */
.corr-edit-banner {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 8px 24px;
    background: #fffbeb;
    border-bottom: 1px solid #fde68a;
    font-size: 13px;
    font-weight: 600;
    color: #b45309;
    flex-shrink: 0;
}

.corr-edit-banner.show {
    display: flex;
}

.corr-edit-banner i {
    font-size: 14px;
}

/* 편집 가능 메모 카드 */
.corr-memo-card.editable {
    position: relative;
    padding-right: 30px;
}

.corr-memo-card .memo-delete-btn {
    display: none;
    position: absolute;
    top: 6px;
    right: 6px;
    width: 20px;
    height: 20px;
    border: none;
    background: #fee2e2;
    color: #dc2626;
    border-radius: 4px;
    font-size: 10px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.corr-memo-card.editable .memo-delete-btn {
    display: flex;
}

.corr-memo-card .memo-delete-btn:hover {
    background: #fca5a5;
}

/* 인라인 편집 textarea (메모 카드) */
.corr-memo-edit-textarea {
    width: 100%;
    min-height: 60px;
    padding: 8px 10px;
    border: 2px solid #9480c5;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.6;
    color: #1e293b;
    resize: vertical;
    font-family: inherit;
    outline: none;
    background: #fefbff;
}

.corr-memo-edit-textarea:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

/* 편집 가능 총평/격려 영역 */
.corr-editable-textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.7;
    color: #1e293b;
    resize: vertical;
    font-family: inherit;
    outline: none;
    background: #fff;
}

.corr-editable-textarea:focus {
    border-color: #9480c5;
    box-shadow: 0 0 0 3px rgba(148, 128, 197, 0.1);
}

/* 편집 가능 점수 드롭다운 */
.corr-editable-select {
    padding: 10px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 20px;
    font-weight: 800;
    color: #9480c5;
    background: #fff;
    outline: none;
    cursor: pointer;
    font-family: inherit;
}

.corr-editable-select:focus {
    border-color: #9480c5;
    box-shadow: 0 0 0 3px rgba(148, 128, 197, 0.1);
}

/* Speaking 편집 가능 comment textarea */
.corr-spk-comment-textarea {
    width: 100%;
    min-height: 50px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.6;
    color: #666;
    font-style: italic;
    resize: vertical;
    font-family: inherit;
    outline: none;
    background: #fff;
    margin-top: 12px;
}

.corr-spk-comment-textarea:focus {
    border-color: #9480c5;
    box-shadow: 0 0 0 3px rgba(148, 128, 197, 0.1);
}

/* 새 마크 추가 팝업 (텍스트 선택 시) */
.corr-add-mark-popup {
    position: absolute;
    z-index: 10001;
    display: none;
    background: #1f2937;
    color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    font-size: 13px;
    overflow: hidden;
}

.corr-add-mark-popup.show {
    display: block;
}

.corr-add-mark-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: none;
    border: none;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
}

.corr-add-mark-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* 코멘트 입력 팝업 (마크 추가 시) */
.corr-comment-input-popup {
    position: fixed;
    z-index: 10002;
    display: none;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    width: 400px;
    max-width: 90vw;
    padding: 20px;
}

.corr-comment-input-popup.show {
    display: block;
}

.corr-comment-input-popup h4 {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 12px;
}

.corr-comment-input-popup textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    font-family: inherit;
    outline: none;
    resize: vertical;
    margin-bottom: 12px;
}

.corr-comment-input-popup textarea:focus {
    border-color: #9480c5;
    box-shadow: 0 0 0 3px rgba(148, 128, 197, 0.1);
}

.corr-comment-input-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.corr-comment-input-actions button {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.corr-comment-input-actions .btn-cancel {
    background: #f1f5f9;
    color: #64748b;
}

.corr-comment-input-actions .btn-confirm {
    background: #7c3aed;
    color: #fff;
}

.corr-comment-input-actions .btn-confirm:hover {
    background: #6d28d9;
}

/* 편집 모드 — annotated 영역 커서 변경 */
.corr-fb-split-left.edit-mode {
    cursor: text;
    user-select: text;
}

/* level_change 편집 영역 */
.corr-feedback-level-change-card {
    background: #f5f3ff;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 12px;
}

.corr-feedback-level-change-title {
    font-size: 14px;
    font-weight: 700;
    color: #7c3aed;
    margin-bottom: 8px;
}

.corr-feedback-level-change-title i {
    margin-right: 6px;
}

.corr-feedback-level-change-text {
    font-size: 14px;
    line-height: 1.7;
    color: #444;
    white-space: pre-line;
}

/* ================================================
   승인 예약 기능 스타일
   ================================================ */

/* 예약 배지 */
.correction-badge-scheduled {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fcd34d;
}

/* 승인 버튼 그룹 */
.corr-approve-wrap {
    display: flex;
    align-items: center;
    position: relative;
}

.corr-approve-wrap .corr-footer-btn-approve {
    border-radius: 8px 0 0 8px;
}

/* 예약 버튼 */
.corr-footer-btn-schedule {
    border-radius: 0 8px 8px 0;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    background: #16a34a;
    color: #fff;
    padding: 10px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

.corr-footer-btn-schedule:hover:not(:disabled) {
    background: #15803d;
}

.corr-footer-btn-schedule:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 프리셋 드롭다운 */
.corr-schedule-dropdown {
    display: none;
    position: absolute;
    bottom: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    min-width: 180px;
    z-index: 100;
    margin-bottom: 8px;
    padding: 4px;
}

.corr-schedule-dropdown.open {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* 프리셋 버튼 */
.corr-schedule-preset {
    background: none;
    border: none;
    padding: 10px 14px;
    text-align: left;
    border-radius: 8px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 8px;
}

.corr-schedule-preset:hover {
    background: #f3f4f6;
}

.corr-schedule-preset i {
    color: #9ca3af;
    margin-right: 0;
}

/* 예약 취소 버튼 */
.corr-schedule-cancel-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}

.corr-schedule-cancel-btn:hover {
    background: #fde68a;
}

/* ===== Deadline Extension Button & Popup ===== */
.corr-extend-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.corr-extend-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #93c5fd;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}

.corr-extend-btn:hover {
    background: #dbeafe;
}

.corr-extend-badge {
    display: inline-flex;
    align-items: center;
    background: #dbeafe;
    color: #1d4ed8;
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.corr-extend-popup {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    padding: 16px;
    min-width: 200px;
    z-index: 1000;
}

.corr-extend-popup.open {
    display: block;
}

.corr-extend-popup-title {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
}

.corr-extend-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.corr-extend-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    transition: background 0.15s;
}

.corr-extend-option:hover {
    background: #f1f5f9;
}

.corr-extend-option input[type="radio"] {
    accent-color: #2563eb;
}

.corr-extend-popup-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.corr-extend-popup-cancel {
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.corr-extend-popup-cancel:hover {
    background: #f8fafc;
}

.corr-extend-popup-confirm {
    padding: 6px 14px;
    border-radius: 8px;
    border: none;
    background: #2563eb;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
}

.corr-extend-popup-confirm:hover {
    background: #1d4ed8;
}

/* ===== Top-level Deadline Extension Button ===== */
.corr-deadline-extend-top-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #93c5fd;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    white-space: nowrap;
    flex-shrink: 0;
}

.corr-deadline-extend-top-btn:hover {
    background: #dbeafe;
    border-color: #60a5fa;
}

/* ===== Standalone Deadline Extension Modal ===== */
.corr-extend-modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform 0.2s;
}

.corr-modal-overlay.open .corr-extend-modal {
    transform: translateY(0);
}

.corr-extend-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
}

.corr-extend-modal-header h3 {
    font-size: 17px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.corr-extend-modal-header h3 i {
    color: #2563eb;
}

.corr-extend-modal-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.corr-extend-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.corr-extend-label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

.corr-extend-select {
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #1e293b;
    background: #fff;
    cursor: pointer;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.corr-extend-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.corr-extend-hours-group {
    display: flex;
    gap: 12px;
}

.corr-extend-hour-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    transition: all 0.15s;
    flex: 1;
    justify-content: center;
}

.corr-extend-hour-option:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.corr-extend-hour-option:has(input:checked) {
    background: #eff6ff;
    border-color: #2563eb;
    color: #2563eb;
}

.corr-extend-hour-option input[type="radio"] {
    accent-color: #2563eb;
}

.corr-extend-status-info {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
}

.corr-extend-status-info.info {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.corr-extend-status-info.warn {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.corr-extend-status-info.success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.corr-extend-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
}

.corr-extend-modal-cancel {
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
}

.corr-extend-modal-cancel:hover {
    background: #f8fafc;
}

.corr-extend-modal-confirm {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    background: #2563eb;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.corr-extend-modal-confirm:hover {
    background: #1d4ed8;
}

.corr-extend-modal-confirm:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .corr-extend-modal {
        max-width: 100%;
    }
    .corr-extend-hours-group {
        flex-direction: column;
    }
}
