:root {
    --font-base: 'IBM Plex Sans KR';
    --font-code: 'Cutive Mono';

    --menu-width: 230px;
    --box-margin: 17px;
    --menu-width-margin: calc(var(--menu-width) + var(--box-margin) * 2);
    --content-width: 1230px;

    /* 기본 컬러 시스템 */
    /* --main-color: #23C;
    --sub-color: #67D;
    --light-color: #89E;
    --dark-color: #129;
    --menu-color: #889;
    --font-color: #456;
    --title-color: #345;
    --line-color: #D7D7E0;
    --bg-color: #F1F2F3;
    --bg2-color: #F1F2FD;
    --bg-dark-color: #E4E8EC;
    --point-color: #E58; */

    /* 시맨틱 매핑 */
    --main-color: #289;
    --sub-color: #698;
    --light-color: #79A;
    --dark-color: #035;
    --brand-main: var(--dark-color);
    --menu-color: #889;
    --font-color: #567;
    --title-color: #135;
    --line-color: #D7D7E0;
    --bg-color: #F1F2F3;
    --bg2-color: #F1F7FD;
    --bg-dark-color: #E4E9EC;
    --point-color: #EB8;

    /* 데이터 상태 — 유지 */
    --up-color:       #D46;
    --down-color:     #34D;
    --same-color:     #4A7;
    --up-light-color: #E58;
    --down-light-color: #68E;
    --checked-color:  #FEF9D0;
    --warning-color:  #FEC9B7;
    --rest-color:     #EFEFF0;
    --zero-color:     #DDD;
    --text-sub: var(--menu-color);
    --color-border: var(--line-color);
    --color-primary: var(--same-color);
    --color-alert: var(--up-color);
    --color-alert-bg: #FDF1F2;
    --color-bg-util: var(--rest-color);
    --color-fg-sub: var(--menu-color);

}


/*------------------
CSS 일반
------------------*/
html, body, div, span, iframe, h1, h2, h3, h4, h5, h6, p, a, button, img, dl, dt, dd, ul, ol, li, fieldset, form, label, table, caption, hr { margin:0; padding:0; border:0; vertical-align:baseline; background:transparent; }

body { width:100%; font-family:var(--font-base), system-ui, sans-serif; font-size:14px; font-weight:400; line-height:100%; color:var(--font-color); background:#F1F2F3; border:none; overflow-x:auto; overflow-y:hidden; }

h1, h2, h3, h4, h5, h6 { font-weight:700; color:var(--title-color); }
h2, h3, h4 { font-size:16px; }
h5, h6 { margin-bottom:5px; font-size:14px; color:var(--menu-color); }

a { text-decoration:none; color:var(--font-color); }
a:hover { color:var(--point-color); padding-bottom:1px; border-bottom:0.9px solid var(--point-color); }
td a { display:inline-block; color:var(--dark-color); padding-bottom:1px; border-bottom:0.9px solid var(--sub-color); }

strong { font-weight:700; }
li { list-style:none; }

form, label, input, select, textarea, button { font-family:var(--font-base), system-ui, sans-serif; color:var(--font-color); box-sizing:border-box; }
option { font-family:var(--font-base), system-ui, sans-serif; color:var(--font-color); }
fieldset { margin:20px 0; }
form fieldset:last-child { margin-bottom:0; }
label, input, select, button { margin:0; padding:3px 10px 2px; font-size:14px; line-height:100%; }
label { display:inline-flex; align-items:center; gap:4px; }
input, select { border:1px solid var(--line-color); border-radius:3px; outline:none; background:#FFF; }
textarea { padding:10px; width:100%; font-size:14px; border:1px solid var(--line-color); border-radius:3px; outline:none; }
button, a.btn { -webkit-appearance:none; appearance:none; display:inline-block; align-items:center; justify-content:center; padding:7px 12px 6px; color:#FFF; background-color:var(--light-color); border:none; border-radius:5px; cursor:pointer; }
button:hover, a.btn:hover { text-decoration:none; background-color:var(--main-color); }
a.btn.filter_active { background-color:var(--main-color); }
button.inline { height:auto; }
.btn_linklike { padding:8px 12px; height:auto; color:var(--font-color); background:transparent; border:none; border-radius:0; }
.btn_linklike:hover { color:#FFF; background:var(--dark-color); border-radius:2px; }
.btn_list { margin-top:var(--box-margin); text-align:center; }
form td input { padding:3px 2px; height:auto; }
form td button { padding:7px 10px 6px; height:auto; }
form td { padding:2px; text-align:left; }
form td input:not([type="checkbox"]):not([type="radio"]),
form td select {
    width: 100%;
}
.time_selects { display:flex; gap:6px; }
form td .time_selects select { flex:1; width:auto; min-width:0; }

.fieldset { display:flex; flex-wrap:wrap; gap:10px; padding:calc(var(--box-margin) / 2); border:1px solid var(--line-color); border-radius:5px; align-items:center; }
.fieldset label { display:inline-flex; align-items:center; margin-right:10px; padding:0; height:40px; font-weight:700; }
.fieldset input, .fieldset button, .fieldset select { margin-right:10px; }
.fieldset div, .fieldset ul { display:flex; align-items:center; }
.fieldset div .item { display:flex; align-items:center; margin-right:20px; }
.fieldset ul li { display:inline-block; margin-right:10px; }

table, caption, thead, tbody, tfoot { width:100%; box-sizing:border-box; }
caption { text-align:left; }
table, th, td { border:1px solid var(--line-color); border-collapse:collapse; box-sizing:border-box; }
th, td { padding:10px; text-align:center; }
th.left, td.left { text-align:left; }
th.right, td.right { text-align:right; }
th { font-weight:700; background:var(--bg-dark-color); }
thead th { background:var(--bg-dark-color); }
tr.em td, td.em { background:var(--bg2-color); }

.box { margin:var(--box-margin); margin-left:0; padding:var(--box-margin); background:#FFF; border-radius:10px; box-shadow:2px 2px 3px 1px #DDD; box-sizing:border-box; }
#index .box { margin-left:var(--box-margin); }

.title_icon { display:flex; margin-bottom:10px; font-size:16px; font-weight:700; vertical-align:middle; }
.title_icon .feather { display:inline-block; width:20px; height:20px; }
.title_icon span, .title_icon a { display:inline-block; margin:3px 0 0 8px; }

.link_icon { display:inline-flex; align-items:center; height:16px; }
.link_icon .feather { display:inline-flex; width:12px; height:12px; }
.link_icon span, .link_icon a { display:inline-block; margin-right:3px; padding:1px 0; }

.title_icon span b, .link_icon span b { color:var(--same-color); }

.up { color:var(--up-color); }
.down { color:var(--down-color); }
.same { color:var(--same-color); }


/*------------------
CSS 레이아웃
------------------*/

/* 전체 레이아웃 */
#index { display:flex; flex-direction:row; justify-content:space-between; height:100vh; }
#aside { width:var(--menu-width); height:calc(100vh - var(--box-margin) * 2); }
#nav { position:fixed; top:0; left:calc(var(--menu-width) + var(--box-margin)); width:calc(100% - var(--menu-width-margin) - var(--box-margin)); min-width:0; background:var(--bg2-color); border:1px solid var(--light-color); box-shadow:3px 3px 4px 2px #DDD; z-index:100; }
#main { width:calc(100% - var(--menu-width-margin)); overflow-y:auto; padding-top:calc(55px + var(--box-margin)); }
#main .box { margin-left:0; }

/* 상단 고정 내비게이션 */
#nav { display:flex; flex-direction:row; align-items:center; height:55px; padding:0 var(--box-margin); }
#nav section, #nav ul { display:flex; flex-direction:row; justify-content:space-between; }
#nav section { width:100%; }

#nav ul li { margin:0 3px; }
#nav ul li a { display:inline-block; padding:8px 12px; border:none; font-size:14px; }
#nav ul li .menu_disabled { display:inline-block; padding:8px 12px; font-size:14px; color:var(--menu-color); opacity:0.55; cursor:default; }
#nav ul li a.on, #nav ul li a:hover { font-weight:700; color:#FFF; background:var(--dark-color); border-radius:2px; text-decoration:none; }
#nav #nav_util li form { display:inline; }
#nav #nav_campus { display:flex; align-items:center; white-space:nowrap; }
#nav #nav_campus label { padding-right:5px; font-weight:700; }

/* 사이드 메뉴 내비게이션 */
#aside { display:flex; flex-direction:column; justify-content:space-between; }

/* 섹션별 사이드바 전환 */
.sidebar-section { display:none; }
.sidebar-section.active { display:block; }
#aside .menu_list { display:flex; flex-direction:column; flex:1; overflow-y:hidden; }
#aside header { padding-bottom:0; }
#aside header h1 { margin:0; font-size:1.6rem; text-align:center; line-height:100%; }
#aside header .brand-mark { font-family:var(--font-base), sans-serif; color:var(--brand-main); text-decoration:none; }
#aside header .brand-mark:hover { color:var(--brand-main); text-decoration:none; border-bottom:none; padding-bottom:0; }
#aside header h2 { margin:var(--box-margin) 0; padding:3px; font-family:var(--font-code), var(--font-base), sans-serif; font-size:16px; text-align:center; line-height:100%; color:var(--dark-color); background:var(--bg-dark-color); border-radius:7px; }
#aside .menu_container { flex:1; overflow-y:auto; }
#aside section { padding:15px 0; }
#aside section ul { display:none; }
#aside section.on ul, #aside section.active ul { display:block; }
#aside section li { margin:3px 0; }
#aside section li a { display:inline-block; padding:7px 0 7px 20px; width:100%; color:var(--menu-color); border:none; box-sizing:border-box; }
#aside section li .menu_disabled { display:inline-block; padding:7px 0 7px 20px; width:100%; color:var(--menu-color); opacity:0.55; box-sizing:border-box; }
#aside section li a.on, #aside section li a:hover { color:#FFF; background:var(--main-color); border-radius:5px; text-decoration:none; }
#aside section h3 { margin-bottom:10px; cursor:pointer; }
#aside section select { width:100%; }
#aside footer { padding-top:var(--box-margin); border-top:1px dashed var(--line-color); }
#aside footer li { margin-left:10px; height:20px; font-size:14px; font-weight:400; }
#aside footer li.title_icon a { margin-top:1px; }
#aside footer li .feather { width:18px; height:18px; }
#aside footer li.new .feather { stroke:var(--point-color); stroke-width:3; }

/* 모달 메시지 */
#popup_msg { display:none; position:fixed; inset:0; width:100%; height:100vh; z-index:9999; background-color:rgba(200, 200, 200, 0.5); }
#popup_msg.on { display:flex; justify-content:center; align-items:center; }
#popup_msg section { display:flex; justify-content:center; align-items:center; width:300px; height:100px; background:#FDF1F2; border:1px solid var(--point-color); box-shadow:3px 3px 4px 2px #DDD; box-sizing:border-box; }
#popup_msg section p { text-align:center; line-height:1.5; }

/* 로그인 */
#login { display:flex; justify-content:center; align-items:center; padding:0; margin:0; height:100vh; }
#login h1 { position:absolute; left:-9999px; }
#login .login_wrapper { display:flex; flex-direction:column; align-items:center; gap:16px; }
#login .login_wrapper .brand-mark { font-size:1.5rem; }
#login section { background:#FFF; border-radius:5px; box-shadow:3px 3px 4px 2px #DDD; }
#login .login_error { margin:0 0 10px; padding:8px 12px; background:#FDF1F2; border:1px solid var(--up-light-color); border-radius:3px; color:var(--up-color); text-align:center; font-size:13px; }
#login form { padding-top:var(--box-margin); border-top:1px dashed var(--line-color); }
#login fieldset { display:flex; flex-direction:column; margin:0; width:300px; border:none; padding:var(--box-margin); }
#login fieldset legend { margin-bottom:var(--box-margin); text-align:center; color:var(--menu-color); }
#login fieldset div { position:relative; display:flex; flex-direction:row; justify-content:space-between; margin:15px 0; }
#login fieldset div label { position:absolute; display:inline-block; padding:13px 0; font-weight:700; text-align:center; pointer-events:none; }
#login fieldset div input { display:inline-block; margin:0; width:100%; border:0; border-bottom:1px var(--bg-dark-color) solid; background:transparent; }
#login fieldset div label span { display:inline-block; min-width:5px; transition:0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55); }
#login fieldset div input:focus { outline:0; border-bottom:2px #000 solid; }
#login fieldset div input:focus + label span, #login fieldset div input:valid + label span { transform:translateY(-30px); font-weight:700; font-size:1rem; }
#login .login_submit { margin-top:var(--box-margin); width:100%; height:40px; font-size:15px; font-weight:700; }


/*------------------
CSS 콘텐츠 영역
------------------*/

/* 페이지 메뉴 */
.page_menu { padding:8px var(--box-margin); border:1px solid var(--light-color); }
.page_menu ul { display:flex; }
.page_menu ul li { margin-left:var(--box-margin); padding-left:var(--box-margin); border-left:1px solid var(--font-color); }
.page_menu ul li:first-child { border:none; }
.page_menu ul li.sub { margin-left:calc(var(--box-margin)*2/3); padding-left:calc(var(--box-margin)*2/3); border-left:1px dotted var(--line-color); }
.page_menu strong { color:var(--point-color); }
.page_menu.sub { padding-top:calc(var(--box-margin)*2/3); padding-bottom:calc(var(--box-margin)*2/3); border:1px solid var(--line-color); }

/* 설명 텍스트 */
div.ex, p.ex, ul.ex { margin:var(--box-margin) 0; line-height:1.5; }
section div.ex:last-child, section p.ex:last-child, section ul.ex:last-child { margin-bottom:0; }
ul.ex li { list-style-type:circle; margin:5px 0 5px 16px; }
h5 strong { color:var(--down-color); }

/* 데이터 상태 테이블 */
table.con { margin-top:calc(var(--box-margin) / 2); }
.empty_cell { padding:30px 10px; color:var(--menu-color); background:var(--rest-color); }
.badge { display:inline; padding:1px 4px; font-family:var(--font-code), var(--font-base), sans-serif; font-size:12px; line-height:1; text-align:center; color:#FFF; background:var(--menu-color); border-radius:3px; }
.badge_true { background:var(--same-color); }
.badge_false { background:var(--menu-color); }
.badge_new { background:var(--point-color); }
.badge_contacted { background:var(--sub-color); }
.badge_done { background:var(--same-color); }
.badge_published { background:var(--same-color); }
.badge_draft { background:var(--menu-color); }
.badge_scheduled { background:var(--sub-color); }
.badge_closed { background:var(--same-color); }
.badge_cancelled { background:var(--up-color); }
.badge_active { background:var(--same-color); }
.badge_inactive { background:var(--menu-color); }
.data_ok th, .data_ok td, td.data_ok { background:var(--checked-color); }
.data_no th, .data_no td, td.data_no { background:var(--warning-color); }
.data_rest th, .data_rest td, td.data_rest { background:var(--rest-color); }
th.checked_ok, td.checked_ok { background:var(--checked-color); }
th.warning, td.warning { background:var(--warning-color); }
th.zero, td.zero { background:var(--zero-color); }
th.value, td.value { background:var(--checked-color); }

/* 페이징 */
.pageNav { margin:var(--box-margin) 0; text-align:center; }
.pageNav a { display:inline-block; margin:0 8px; padding:6px 10px; color:var(--dark-color); border:1px solid var(--line-color); border-radius:4px; }
.pageNav a:hover { color:#FFF; background:var(--main-color); border-color:var(--main-color); }
.pageNav strong { display:inline-block; margin:0 8px; }

/* 공통 레이아웃 조각 */
.page_header { display:flex; justify-content:space-between; align-items:center; margin-bottom:15px; gap:10px; }
.page_header_title { margin-bottom:0; }
.action_row { display:flex; justify-content:flex-end; align-items:center; gap:8px; margin-bottom:10px; }
.action_row_left { justify-content:flex-start; }
.inline_form { display:inline-block; }
.form_actions { display:flex; justify-content:center; gap:10px; margin-top:20px; text-align:center; }
.content_section { margin-top:30px; }
.text_pre_wrap { white-space:pre-wrap; }
.text_primary { color:var(--color-primary); }
.text_alert { color:var(--color-alert); }
.pinned_label { margin-right:4px; font-weight:700; color:var(--point-color); }
.w_full { width:100%; }

/* 카드/패널 */
.panel { padding:15px; border:1px solid var(--color-border); border-radius:4px; }
.panel_margin_y { margin:20px 0; }
.panel_margin_b { margin-bottom:20px; }
.panel_title { margin:0 0 10px; }
.panel_title_with_line { margin:0 0 12px; padding-bottom:8px; border-bottom:1px solid var(--line-color); }
.panel_help { margin:0 0 10px; font-size:12px; color:var(--text-sub); line-height:1.4; }
.panel_sticky { position:sticky; top:15px; }

/* 플렉스/그리드 */
.inline_form_row { display:flex; align-items:center; gap:10px; }
.inline_choice_group { display:flex; gap:15px; }
.inline_choice_label { display:inline-flex; align-items:center; gap:4px; font-weight:400; cursor:pointer; }
.stats_grid { display:flex; flex-wrap:wrap; gap:15px; margin-bottom:25px; }
.stats_card { flex:1; min-width:180px; margin:0; padding:15px; background:var(--bg2-color); border-left:4px solid var(--line-color); }
.stats_card_main { border-left-color:var(--main-color); }
.stats_card_sub { border-left-color:var(--sub-color); }
.stats_card_light { border-left-color:var(--light-color); }
.stats_card_same { border-left-color:var(--same-color); }
.stats_card_point { border-left-color:var(--point-color); }
.stats_card_menu { border-left-color:var(--menu-color); }
.stats_card_up_light { border-left-color:var(--up-light-color); }
.stats_label { margin-bottom:8px; font-size:0.9em; font-weight:700; color:var(--menu-color); }
.stats_value { font-size:1.8em; font-weight:700; color:var(--dark-color); }
.stats_value_font { color:var(--font-color); }
.stats_value_up { color:var(--up-color); }
.stats_value_same { color:var(--same-color); }
.dashboard_grid { display:flex; flex-wrap:wrap; gap:20px; }
.dashboard_col_main { flex:2; min-width:400px; }
.dashboard_col_side { flex:1; min-width:250px; }
.dashboard_col { flex:1; min-width:300px; }

/* 수업현황 대시보드 */
.dashboard_schedule_header { display:flex; justify-content:space-between; align-items:flex-start; gap:20px; }
.dashboard_campus_filter { display:flex; align-items:center; gap:8px; }
.dashboard_campus_filter label { padding:0; font-weight:700; }
.dashboard_week_toolbar { display:flex; justify-content:space-between; align-items:center; margin:20px 0 10px; }
.dashboard_week_navigation { display:flex; gap:6px; }
.dashboard_week_scroll { width:100%; overflow-x:auto; padding-bottom:5px; }
.dashboard_week_grid { display:grid; grid-template-columns:repeat(7, minmax(140px, 1fr)); gap:8px; min-width:1030px; }
.dashboard_day { display:flex; flex-direction:column; min-height:185px; padding:10px; border:1px solid var(--line-color); border-radius:6px; background:#FFF; box-sizing:border-box; }
.dashboard_day:hover { padding:10px; color:var(--font-color); border:1px solid var(--main-color); }
.dashboard_day.selected { border:2px solid var(--main-color); background:var(--bg2-color); }
.dashboard_day.today .dashboard_day_heading strong::after { content:'오늘'; margin-left:5px; padding:2px 4px; font-size:10px; color:#FFF; background:var(--main-color); border-radius:3px; }
.dashboard_day.saturday .dashboard_day_heading strong { color:var(--down-color); }
.dashboard_day.sunday .dashboard_day_heading strong { color:var(--up-color); }
.dashboard_day_heading { display:flex; justify-content:space-between; align-items:center; padding-bottom:8px; border-bottom:1px solid var(--line-color); }
.dashboard_day_heading > span { font-size:12px; color:var(--text-sub); }
.dashboard_day_classes { display:flex; flex-direction:column; gap:6px; margin-top:8px; }
.dashboard_class_card { display:flex; flex-direction:column; gap:3px; padding:7px; font-size:12px; line-height:1.3; background:var(--bg-color); border-left:3px solid var(--light-color); border-radius:3px; }
.dashboard_class_card > strong { color:var(--dark-color); }
.dashboard_class_card > small { color:var(--text-sub); }
.dashboard_day_empty { padding:25px 0; font-size:12px; text-align:center; color:var(--text-sub); }
.dashboard_selected_header { display:flex; justify-content:space-between; align-items:center; margin-top:25px; }
.dashboard_selected_header .title_icon { margin-bottom:0; }
.dashboard_attendance_table { margin-top:10px; }
.dashboard_attendance_form { display:flex; align-items:flex-end; gap:10px; }
.dashboard_student_list { display:flex; flex:1; flex-wrap:wrap; gap:7px; }
.dashboard_student_attendance { display:inline-flex; gap:4px; padding:4px 5px; font-size:12px; background:var(--bg-color); border:1px solid var(--line-color); border-radius:4px; }
.dashboard_attendance_form .attendance_select { width:auto; min-width:58px; padding:2px 3px; font-size:12px; font-weight:700; }
.attendance_present { color:var(--same-color); border-color:var(--same-color); }
.attendance_absent { color:var(--up-color); border-color:var(--up-color); }
.attendance_late { color:#A66A00; border-color:var(--point-color); }
.attendance_excused { color:var(--menu-color); border-color:var(--menu-color); }

/* 타이틀/아이콘 */
.title_icon_compact { margin-bottom:10px; font-size:15px; }
.title_icon_small { margin-bottom:10px; font-size:14px; }
.title_icon_compact .feather { width:18px; height:18px; }
.title_icon_small .feather { width:16px; height:16px; }
.title_icon_up .feather { stroke:var(--up-color); }
.title_icon_dark .feather { stroke:var(--dark-color); }
.title_icon_same .feather { stroke:var(--same-color); }
.icon_inline { vertical-align:middle; margin-right:4px; }

/* 테이블/폼 */
.data_table_flush { margin:0; }
.data_table_compact { margin-top:5px; }
.empty_cell_compact { padding:20px 10px; }
.col_80 { width:80px; }
.col_90 { width:90px; }
.col_100 { width:100px; }
.col_120 { width:120px; }
.col_150 { width:150px; }
.meta_text { margin-top:4px; font-size:0.85em; color:var(--color-fg-sub); line-height:1.4; }
.meta_text_success { margin-top:6px; font-size:0.8em; color:#059669; line-height:1.4; }
.textarea_vertical { width:100%; resize:vertical; }
.badge_muted { background:var(--menu-color); }

/* 교실 목록 액션 로우 & 필터 */
.action_row_between { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
.filter_bar { display:flex; align-items:center; gap:8px; }
.filter_bar label { font-weight:700; }

/* 수업일정 폼 */
.filter_form { margin-bottom:var(--box-margin); }
.calendar-container.calendar_container_flush { margin-top:0; margin-bottom:25px; }
.calendar_title { margin:0; font-size:1.3rem; font-weight:700; color:var(--font-color); }
.field_group { margin-bottom:12px; }
.field_row { display:flex; gap:8px; margin-bottom:12px; }
.field_col { flex:1; }
.field_label { display:block; margin-bottom:4px; font-size:13px; font-weight:700; }
.control_compact { width:100%; padding:6px; }
.control_readonly { background:#e9ecef; border:1px solid var(--line-color); }
.weekday_total { margin-top:10px; font-size:15px; font-weight:700; background:var(--bg-dark-color); border-left-color:var(--main-color); }
.submit_block { width:100%; margin-top:15px; font-weight:700; }
.return_note { margin-top:8px; font-size:13px; text-align:center; }
.return_link { color:var(--text-sub); text-decoration:none; }

/*------------------
수업일정 달력 (Calendar) 스타일
------------------*/
.calendar-container {
    margin-top: 15px;
    background: #FFF;
    border: 1px solid var(--line-color);
    border-radius: 6px;
    padding: var(--box-margin);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.calendar-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--line-color);
}

.current-month-select {
    display: flex;
    gap: 8px;
}

.current-month-select select {
    padding: 6px 10px;
    border: 1px solid var(--line-color);
    border-radius: 4px;
    font-size: 15px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-top: 1px solid var(--line-color);
    border-left: 1px solid var(--line-color);
    background: #fff;
}

.weekday {
    padding: 10px 5px;
    text-align: center;
    background: var(--bg2-color);
    border-right: 1px solid var(--line-color);
    border-bottom: 1px solid var(--line-color);
    font-weight: 600;
    color: var(--font-color);
}

.weekday.sun { color: var(--up-color); }
.weekday.sat { color: var(--down-color); }

.day-cell {
    position: relative;
    min-height: 90px;
    padding: 8px;
    border-right: 1px solid var(--line-color);
    border-bottom: 1px solid var(--line-color);
    transition: background 0.15s;
    box-sizing: border-box;
}

.day-cell:hover:not(.occupied):not(.disabled) {
    background: rgba(42, 125, 165, 0.05);
}

.day-cell.other-month {
    background: #FAFBFD;
}

.day-cell.other-month .day-number {
    color: var(--text-sub);
    opacity: 0.5;
}

.day-number {
    position: absolute;
    top: 6px;
    left: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--font-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.day-cell.sun .day-number { color: var(--up-color); }
.day-cell.sat .day-number { color: var(--down-color); }

.day-cell.today {
    background: rgba(42, 125, 165, 0.08);
}

.day-cell.today .day-number {
    background: var(--main-color);
    color: #FFF;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    text-align: center;
}

.lesson-badges-wrap {
    position: absolute;
    top: 6px;
    right: 6px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    max-width: calc(100% - 36px);
}

/* 6가지 세트용 색상 정의 (순환) */
.cycle-color-0 { background: #3a86c8; } /* 파랑 */
.cycle-color-1 { background: #47a066; } /* 녹색 */
.cycle-color-2 { background: #d0537e; } /* 분홍/로즈 */
.cycle-color-3 { background: #e07a34; } /* 오렌지 */
.cycle-color-4 { background: #8853b0; } /* 보라 */
.cycle-color-5 { background: #3da0b0; } /* 청록 */

.calendar-action-bar-top { display:flex; justify-content:flex-end; margin-bottom:12px; gap:8px; align-items:center; }


/* 수정/등록 모드에서의 선택 상태 */
.day-cell.selectable {
    cursor: pointer;
}

.day-cell.selected {
    /* 박스 강조 제거 — 뱃지로만 표시 */
}

.day-cell.selected::after {
    content: "선택됨";
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 9px;
    background: #1a8a8a;
    color: #FFF;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.day-cell.occupied {
    background: #F1F3F5 !important;
    cursor: not-allowed;
}

.day-cell.occupied .occupied-info {
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 10px;
    color: var(--text-sub);
    font-weight: 500;
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 4px;
    border-radius: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 36px);
}

.day-cell.sun.selectable, .day-cell.disabled {
    cursor: not-allowed;
    background: #F8F9FA;
}

/* 등록 폼 구성 레이아웃 */
.calendar-form-layout {
    display: flex;
    gap: var(--box-margin);
    margin-top: 15px;
    align-items: flex-start;
}

.calendar-main-pane {
    flex: 4;
}

.calendar-sidebar-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--box-margin);
}

.weekday-status-box {
    background: #FFF;
    border: 1px solid var(--line-color);
    border-radius: 6px;
    padding: 15px;
}

.weekday-status-list {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.weekday-status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg2-color);
    border-radius: 4px;
    border-left: 4px solid var(--line-color);
    font-size: 14px;
}

.weekday-status-item.complete {
    border-left-color: var(--same-color);
    background: rgba(74, 119, 112, 0.08);
}

.weekday-status-item.over {
    border-left-color: var(--up-color);
    background: rgba(212, 68, 102, 0.08);
}

@media (max-width: 1400px) {
    #nav { min-width: 720px; }
}
