/* ==================== schedule.css ==================== */
/* 수업진도 간트차트 전용 스타일 */

/* ========== 간트차트 컨테이너 ========== */
.gantt-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: var(--white);
    border-radius: 12px;
}

/* ========== 툴바 ========== */
.schedule-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--surface);
    border-bottom: 2px solid var(--border);
}

.schedule-toolbar-left {
    display: flex;
    gap: 12px;
    align-items: center;
}

.schedule-toolbar-right {
    display: flex;
    gap: 12px;
    align-items: center;
}

.schedule-toolbar-item {
    padding: 8px 14px;
    background: var(--surface-muted);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
}

.schedule-toolbar-stat {
    padding: 8px 14px;
    background: var(--surface-muted);
    border-radius: 6px;
    font-size: 13px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.schedule-toolbar-stat-label {
    color: var(--text-muted);
    font-weight: 500;
}

.schedule-toolbar-stat-value {
    font-weight: 600;
    color: var(--text);
}

.schedule-toolbar-stat-value.done {
    color: #27ae60;
}

.schedule-toolbar-stat-value.remain {
    color: #e74c3c;
}

.schedule-toolbar-btn {
    padding: 8px 14px;
    background: #F4F0FF;
    border: none;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.schedule-toolbar-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* ========== 간트차트 통계 행 ========== */
.gantt-stats-row {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border-bottom: 2px solid var(--border);
    padding: 10px 16px;
    gap: 16px;
    font-size: 13px;
}

.gantt-stats-label {
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}

.gantt-stats-value {
    font-size: 20px;
    font-weight: bold;
    color: var(--text);
    min-width: 60px;
}

.gantt-stats-value.delayed {
    color: #d32f2f;
}

.gantt-stats-value.ahead {
    color: #388e3c;
}

.gantt-stats-detail {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

.gantt-stats-spacer {
    flex: 1;
}

/* ========== 간트차트 헤더 ========== */
.gantt-header-row {
    display: flex;
    background: var(--primary);
    border-bottom: 2px solid var(--primary-dark);
}

.gantt-header-labels {
    display: flex;
    width: 460px;
    flex-shrink: 0;
    background: var(--primary);
}

.gantt-header-dates {
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
}

.gantt-header-dates::-webkit-scrollbar {
    height: 8px;
}

.gantt-header-dates::-webkit-scrollbar-track {
    background: var(--surface-muted);
}

.gantt-header-dates::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 4px;
}

.gantt-header-dates-inner {
    display: flex;
}

.gantt-label-col {
    background: var(--primary);
    color: white;
    padding: 12px;
    font-weight: 600;
    font-size: 13px;
    border-right: 2px solid var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gantt-label-col.major {
    width: 120px;
}

.gantt-label-col.middle {
    width: 140px;
}

.gantt-label-col.minor {
    width: 200px;
}

.gantt-date-cell {
    width: 70px;
    min-width: 70px;
    flex-shrink: 0;
    background: var(--primary);
    color: white;
    padding: 10px 5px;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    border-right: none;
    line-height: 1.4;
}

.gantt-date-cell.today {
    position: relative;
}

.gantt-date-cell.today::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #ffa726;
}

.gantt-date-cell.today-right {
    position: relative;
}

.gantt-date-cell.today-right::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #ffa726;
}

.gantt-cell.today {
    position: relative;
}

.gantt-cell.today::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #ffa726;
}

.gantt-cell.today-right {
    position: relative;
}

.gantt-cell.today-right::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #ffa726;
}

/* ========== 간트차트 바디 ========== */
.gantt-body {
    display: flex;
    flex: 1;
    overflow-y: scroll;
    overflow-x: hidden;
}

.gantt-body::-webkit-scrollbar {
    width: 8px;
}

.gantt-body::-webkit-scrollbar-track {
    background: var(--surface-muted);
}

.gantt-body::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 4px;
}

.gantt-labels {
    width: 460px;
    flex-shrink: 0;
    background: var(--white);
}

.gantt-scroll-area {
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    height: fit-content;  /* 추가 */
    min-height: 100%;     /* 추가 */
}

.gantt-scroll-area::-webkit-scrollbar {
    height: 8px;
}

.gantt-scroll-area::-webkit-scrollbar-track {
    background: var(--surface-muted);
}

.gantt-scroll-area::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 4px;
}

.gantt-dates {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

/* ========== 간트차트 행 ========== */
.gantt-row {
    display: flex;
    border-bottom: none;
    height: 42px;
}

.gantt-row-labels {
    display: flex;
}

.gantt-row-dates {
    display: flex;
}

.gantt-row-label {
    padding: 10px;
    font-size: 12px;
    border-right: 2px solid var(--border);
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 42px;
    box-sizing: border-box;
}

.gantt-row-label:hover {
    background: var(--surface-muted);
}

.gantt-row-label.major {
    width: 120px;
    background: #e3f2fd;
    font-weight: 600;
    color: var(--text);
}

.gantt-row-label.middle {
    width: 140px;
    background: #f1f8ff;
    color: var(--text);
}

.gantt-row-label.minor {
    width: 200px;
    background: var(--surface);
    color: var(--text);
}

.gantt-cell {
    width: 70px;
    min-width: 70px;
    flex-shrink: 0;
    border-right: none;
    border-bottom: none;
    padding: 5px;
    min-height: 40px;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.gantt-cell:hover {
    background: #e3f2fd;
    border-color: var(--primary);
}

.gantt-cell-number {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: baseline;
    gap: 3px;
}

.gantt-cell-number .done-count {
    color: #27ae60;
    font-size: 18px;
}

.gantt-cell-number .total-count {
    color: var(--text-muted);
    font-size: 14px;
}

.gantt-cell-number .slash {
    color: var(--border);
    font-size: 14px;
}

/* ========== 모달 ========== */
.schedule-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.schedule-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.schedule-modal-content {
    background: var(--white);
    border-radius: 12px;
    width: 500px;
    max-width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.schedule-modal-header {
    padding: 20px 24px;
    border-bottom: 2px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.schedule-modal-header h3 {
    margin: 0;
    color: var(--text);
    font-size: 18px;
    font-weight: 600;
}

.schedule-modal-close {
    font-size: 28px;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    transition: all 0.2s;
}

.schedule-modal-close:hover {
    color: var(--text);
}

.schedule-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.schedule-modal-body.center {
    text-align: center;
}

.schedule-modal-footer {
    padding: 16px 24px;
    border-top: 2px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.schedule-modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
}

.schedule-modal-btn:hover {
    transform: translateY(-1px);
}

.schedule-modal-btn.primary {
    background: var(--primary);
    color: white;
}

.schedule-modal-btn.primary:hover {
    background: var(--primary-dark);
}

.schedule-modal-btn.cancel {
    background: var(--surface-muted);
    color: var(--text);
}

.schedule-modal-btn.cancel:hover {
    background: var(--border);
}

/* ========== 입력 필드 ========== */
.schedule-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    background: var(--surface);
    color: var(--text);
    transition: all 0.2s;
}

.schedule-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(106, 59, 255, 0.1);
}

.schedule-input-number {
    width: 140px;
    height: 50px;
    font-size: 24px;
    text-align: center;
}

/* ========== 유형 목록 ========== */
.type-list-item {
    padding: 8px 12px;
    margin: 6px 0;
    background: var(--surface);
    border-radius: 6px;
    font-size: 13px;
    border-left: 3px solid var(--border);
    transition: all 0.2s;
}

.type-list-item.done {
    border-left-color: #27ae60;
    background: #d4edda;
}

/* ========== 사이드바 클래스 목록 ========== */
.class-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.class-list-item {
    padding: 12px 14px;
    margin-bottom: 8px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.class-list-item:hover {
    background: var(--surface-muted);
    border-color: var(--primary);
    transform: translateX(2px);
}

.class-list-item.active {
    background: var(--primary);
    border-color: var(--primary);
}

.class-list-item.active .class-list-name,
.class-list-item.active .class-list-info {
    color: white;
}

.class-list-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.class-list-info {
    font-size: 12px;
    color: var(--text-muted);
}
/* ========== 수업현황 패널 (진행률/일정차 박스) ========== */
#schedule-status-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
}

.status-box {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    width: 100%;
}

.status-label {
    font-size: 11px;
    color: #666;
    margin-bottom: 6px;
    font-weight: 500;
}

.status-value {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
    line-height: 1;
}

.status-value.delayed {
    color: #d32f2f;
}

.status-value.ahead {
    color: #388e3c;
}

.status-detail {
    font-size: 9px;
    color: #666;
    white-space: nowrap;
    line-height: 1.4;
}