/* ──────────────────────────────────────────────
   school 사이드바 — base 의 header 를 좌측 사이드바로 배치
   (색상 팔레트 :root 는 base/css/style.css 에서 전역 로드)
   ────────────────────────────────────────────── */
#base_wrap>header {
    margin: 0;
}

#base_wrap>main {
    min-height: 100vh;
    margin-left: calc(var(--nav-w) + var(--wait-w));
    transition: margin-left .25s ease;
}

#base_wrap>footer {
    display: none;
}

/* 대기리스트 접힘 상태 (PC 토글) */
body.wait-collapsed #school_wait {
    width: 0;
    border-right: 0;
    opacity: 0;
    pointer-events: none;
    flex: initial;
}

body.wait-collapsed #base_wrap>main {
    margin-left: var(--nav-w);
}

/* ──────────────────────────────────────────────
   좌측 전체 사이드바 (아이콘 네비 + 대기리스트)
   ────────────────────────────────────────────── */
#school_aside {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    display: flex;
    z-index: 99;
    font-family: "Noto Sans KR", sans-serif;
}

/* ──────────────────────────────────────────────
   아이콘 네비 — 기본 접힘(56px) / body.nav-open 펼침(220px, 시안)
   ────────────────────────────────────────────── */
body.nav-open {
    --nav-w: 220px;
}

#school_nav {
    position: relative;
    width: var(--nav-w);
    flex: 0 0 var(--nav-w);
    background: #fff;
    border-right: 1px solid #ebebeb;
    display: flex;
    flex-direction: column;
    transition: width .2s ease;
}

/* 펼침/접힘 토글 (오른쪽 경계에 떠 있는 원형 버튼) */
.sn_toggle {
    /* position: absolute; */
    /* top: 18px; */
    /* right: -12px; */
    /* z-index: 6; */
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #e1e1e1;
    background: #fff;
    color: #5c6573;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}

.sn_toggle i {
    transition: transform .2s ease;
}

body.nav-open .sn_toggle i {
    transform: rotate(180deg);
}

/* 로고 (60px, 메인 탑바와 정렬) */
.sn_logo_wrap {
    height: 60px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 14px;
    border-bottom: 1px solid #ebebeb;
}

.sn_logo {
    width: 95px;
    flex: 0 0 auto;
    display: none;
}



/* 학교 / 학년 셀렉트 (펼침 전용) */
.sn_selects {
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 12px 12px 6px;
}

.sn_select {
    display: block;
    width: 100%;
    height: 33px;
    border: 1px solid #e1e1e1;
    border-radius: 6px;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235c6573' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 9px center;
    padding: 0 30px 0 11px;
    font-size: 12px;
    font-weight: 700;
    color: #222;
    cursor: pointer;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    outline: none;
}

.sn_select:focus {
    border-color: var(--main);
}

/* 알림 / 대기 */
.sn_rail_head {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
}

.sn_railbtn {
    position: relative;
    border: 0;
    background: transparent;
    cursor: pointer;
    border-radius: 6px;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-direction: column;
}

.sn_railico {
    position: relative;
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    border-radius: 8px;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5c6573;
    font-size: 16px;
}

.sn_railbtn:hover .sn_railico {
    background: #f0f1f3;
}

.sn_raillabel {
    flex: 1 1 auto;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: #5c6573;
    letter-spacing: -.6px;
    line-height: 1;
}

.sn_dot {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 16px;
    height: 16px;
    padding: 0 5px;
    border-radius: 9px;
    border: 2px solid #fff;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.sn_dot.red {
    background: #e53935;
}

.sn_dot.orange {
    background: var(--main);
}

/* 스크롤(메뉴) 영역 */
.sn_scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1px;
    padding: 0px 10px 6px;
}

.sn_scroll::-webkit-scrollbar {
    width: 0;
}

.sn_scroll .hr {
    width: 100%;
    display: block;
    margin: 6px 0;
    border-bottom: 1px solid #E5E8EC;
}

.sn_menu_label {
    display: none;
    padding: 8px 10px 4px;
    font-size: 10px;
    font-weight: 700;
    color: #9e9e9e;
    letter-spacing: .3px;
}

/* 메뉴 항목 */
.sn_item {
    position: relative;
    border: 0;
    background: transparent;
    cursor: pointer;
    border-radius: 6px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background .15s;
    text-decoration: none;
}

.sn_ico {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5e5e5e;
    font-size: 16px;
}

.sn_ico .material-symbols-outlined {
    font-size: 18px;
}

.sn_label {
    flex: 1 1 auto;
    font-size: 13px;
    font-weight: 500;
    color: #5e5e5e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: none;
}

.sn_item:hover {
    background: #f5f6f8;
}

.sn_item.on {
    background: #fff4ec;
}

.sn_item.on .sn_ico,
.sn_item.on .sn_label {
    color: var(--main);
}

.sn_item.on .sn_label {
    font-weight: 700;
}

.sn_item.on::before {
    content: "";
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 18px;
    background: var(--main);
    border-radius: 0 2px 2px 0;
}

/* 2depth 그룹 (부모 + 서브메뉴) */
.sn_group {
    display: flex;
    flex-direction: column;
}

/* 펼침 화살표 (펼침 상태 전용) */
.sn_arrow {
    flex: 0 0 auto;
    color: #9aa1ac;
    font-size: 16px;
    margin-left: auto;
    display: none;
    transition: transform .2s ease;
}

body.nav-open .sn_group .sn_arrow {
    display: block;
}

.sn_group.open .sn_arrow {
    transform: rotate(180deg);
}

/* 서브메뉴 */
.sn_sub {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-height: 0;
    transition: max-height .25s ease;
}

body.nav-open .sn_group.open .sn_sub {
    max-height: 400px;
}

.sn_subitem {
    display: none;
    padding: 7px 8px 7px 34px;
    border-radius: 6px;
    font-size: 13px;
    color: #5e5e5e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
    transition: background .15s;
}

body.nav-open .sn_subitem {
    display: block;
}

.sn_subitem:hover {
    background: #f5f6f8;
}

.sn_subitem.on {
    color: var(--main);
    font-weight: 700;
}

/* 계정 */
.sn_bottom {
    flex: 0 0 auto;
    border-top: 1px solid #ebebeb;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 12px 10px;
}

.sn_account {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6d01 0%, #ff9540 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
}

.sn_acc_info {
    flex: 1 1 auto;
    min-width: 0;
    display: none;
    flex-direction: column;
}

.sn_acc_info b {
    font-size: 12px;
    font-weight: 700;
    color: #222;
    line-height: 17px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sn_acc_info span {
    font-size: 10px;
    color: #9e9e9e;
    line-height: 14px;
}

.sn_logout {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #5c6573;
    font-size: 15px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
}

.sn_logout:hover {
    background: #eef1f5;
}

/* ── 펼침 상태 표시 전환 ── */
body.nav-open .sn_logo,
body.nav-open .sn_toggle,
body.nav-open .sn_selects,
body.nav-open .sn_raillabel,
body.nav-open .sn_menu_label,
body.nav-open .sn_label,
body.nav-open .sn_acc_info {
    display: flex;
}

body.nav-open .sn_logo_wrap {
    justify-content: space-between;
}

body.nav-open .sn_rail_head {
    align-items: stretch;
}

body.nav-open .sn_railbtn {
    width: 100%;
    background: #f8f8f8;
    padding: 9px 10px;
    flex-direction: row;
}

body.nav-open .sn_railbtn:hover {
    background: #f0f1f3;
}

body.nav-open .sn_railico {
    width: auto;
    height: auto;
    background: transparent;
}

body.nav-open .sn_railbtn:hover .sn_railico {
    background: transparent;
}

body.nav-open .sn_dot {
    position: static;
    border: 0;
    min-width: 16px;
}

body.nav-open .sn_item {
    justify-content: flex-start;
}

body.nav-open .sn_logout {
    display: flex;
}

/* ──────────────────────────────────────────────
   대기리스트 패널 (200px)
   ────────────────────────────────────────────── */
#school_wait {
    width: var(--wait-w);
    flex: 0 0 var(--wait-w);
    background: #fff;
    border-right: 1px solid #e5e8ec;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: width .25s ease, opacity .2s ease;
}

.sw_head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 14px 16px;
    flex: 0 0 auto;
}

.sw_title {
    font-size: 16px;
    font-weight: 700;
    color: #222;
    letter-spacing: -.2px;
    white-space: nowrap;
}

.sw_collapse {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 0;
    background: transparent;
    color: #5c6573;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 6px;
}

.sw_collapse:hover {
    background: #eef1f5;
}

.sw_search {
    position: relative;
    padding: 0 12px 8px;
    flex: 0 0 auto;
}

.sw_search input {
    width: 100%;
    height: 34px;
    border: 1px solid #e5e8ec;
    border-radius: 8px;
    background: #FAFBFC;
    padding: 0 32px 0 12px;
    font-size: 12px;
    color: #222;
    outline: none;
}

.sw_search input::placeholder {
    color: #9aa1ac;
}

.sw_search input:focus {
    border-color: var(--main);
    background: #fff;
}

.sw_search i {
    position: absolute;
    right: 24px;
    top: 8px;
    color: #9aa1ac;
    font-size: 16px;
}

.sw_search .h_search_res {
    position: absolute;
    top: calc(100% - 4px);
    left: 12px;
    right: 12px;
    background-color: #FFF;
    border: 1px solid #E5E8EC;
    border-radius: 10px;
    overflow-y: auto;
    max-height: 295px;
}

.h_search_item {
    display: block;
    padding: 12px 16px;
}

.h_search_item:not(:last-child) {
    border-bottom: 1px solid #E5E8EC;
}

.h_search_item:hover {
    background-color: #F8F8F8;
}

.h_search_item .name {
    font-size: 13px;
    font-weight: 700;
    color: #222;
}

.h_search_item .gubun {
    margin-top: 3px;
    font-size: 11px;
    font-weight: 500;
    color: #5C6573;
}

.h_search_res .empty_head {
    background-color: #FAFBFC;
    border-bottom: 1px solid #F2F4F7;
    padding: 9px 14px;
    font-size: 11px;
    font-weight: 400;
    color: #222;
}

.h_search_res .empty_item {
    padding: 12px 10px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.h_search_res .empty_item .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #FFF3EA;
    border-radius: 6px;
    color: #FF6D01;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.h_search_res .empty_item .icon i {
    position: relative;
    top: initial;
    right: initial;
    color: inherit;
}

.h_search_res .empty_item .title {
    font-size: 13px;
    font-weight: 400;
    color: #222;
}

.h_search_res .empty_item .desc {
    margin-top: 2px;
    font-size: 10px;
    font-weight: 400;
    color: #B45309;
}

/* 담당 범위 세그먼트 */
.sw_scoperow {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 10px 8px;
    flex: 0 0 auto;
}

.sw_seg {
    flex: 1 1 auto;
    display: flex;
    background: #f2f4f7;
    border-radius: 7px;
    padding: 2px;
}

.sw_seg button {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: 24px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #5c6573;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
}

.sw_seg button b {
    font-weight: 600;
}

.sw_seg button.on {
    background: #fff;
    color: var(--main);
    box-shadow: 0 1px 1px rgba(0, 0, 0, .1);
}

.sw_gear {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #9aa1ac;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #E5E8EC;
}

.sw_gear:hover {
    background: #eef1f5;
    color: #5c6573;
}

.sw_scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    padding-bottom: 12px;
}

.sw_scroll::-webkit-scrollbar {
    width: 4px;
}

.sw_scroll::-webkit-scrollbar-thumb {
    background: #d6dae0;
    border-radius: 4px;
}

.sw_sec {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #fafbfc;
    border-top: 1px solid #e5e8ec;
    border-bottom: 1px solid #e5e8ec;
    padding: 7px 12px;
    font-size: 10.5px;
    font-weight: 600;
    color: #5c6573;
    letter-spacing: -.2px;
}

.sw_sec b {
    color: var(--main);
    font-weight: 700;
}

.sw_sec .sw_edit {
    margin-left: auto;
    border: 0;
    background: transparent;
    color: #9aa1ac;
    font-size: 11px;
    cursor: pointer;
}

.sw_sec .sw_edit:hover {
    color: var(--main);
}

.sw_list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sw_item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid #eef1f5;
    border-left: 3px solid transparent;
    padding: 12px;
    transition: background .15s;
}

.sw_item:hover {
    background: #fafbfc;
}

.sw_item.on {
    background: #f4f8ff;
    border-left-color: #3b82f6;
}

.sw_btns {
    display: none;
    gap: 4px;
}

.sw_btns.on {
    display: flex;
}

.sw_btn_item {
    display: flex;
    width: 29px;
    aspect-ratio: 1/1;
    border-radius: 6px;
    border: 1px solid #E5E8EC;
    padding: 6px;
    background-color: #fff;
}

.sw_btn_item:hover {
    background-color: #eef1f5;
}

.sw_btn_item.bd_orange {
    background-color: #FFF8F2;
    border-color: #FFD9BD;
}

.sw_btn_item.bd_orange:hover {
    background-color: #fbeadc;
}

.sw_btn_item.bd_red {
    border-color: #F3C8CA;
}

.sw_btn_item.bd_red:hover {
    background-color: #fff4f4;
}

.sw_item_top {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sw_name {
    font-size: 13.5px;
    font-weight: 700;
    color: #222;
    letter-spacing: -.3px;
}

.sw_g {
    width: 13px;
    height: 13px;
    border-radius: 3px;
    font-size: 8px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.sw_g.m {
    background: #60a5fa;
}

.sw_g.f {
    background: #f472b6;
}

.sw_item_sub {
    margin-top: 5px;
    font-size: 11px;
    color: #5c6573;
    letter-spacing: -.2px;
}

.sw_item_time {
    margin-top: 3px;
    font-size: 10px;
    color: #9aa1ac;
    vertical-align: text-bottom;
}

.sw_item_time .icon {
    font-size: inherit;
    vertical-align: inherit;
}

/* 딤 미사용 */
#school_dim {
    display: none;
}

/* ──────────────────────────────────────────────
   반응형 — 모바일 (대기리스트 오버레이, 딤 없음)
   열기: 슬라이드 인 / 접기: width 축소
   ────────────────────────────────────────────── */
@media (max-width: 1024px) {
    #school_wait {
        position: fixed;
        top: 0;
        bottom: 0;
        left: var(--nav-w);
        width: var(--wait-w);
        z-index: 1001;
        /* box-shadow: 4px 0 20px rgba(0, 0, 0, .12); */
        /* transform: translateX(calc(-100% - var(--nav-w))); */
        transition: transform .25s ease, width .25s ease, opacity .2s ease;
        opacity: 1;
    }

    /* 오버레이 — 메인은 밀지 않음 */
    #base_wrap>main,
    body.wait-collapsed #base_wrap>main {
        margin-left: var(--nav-w);
    }

    /* 열기: 슬라이드 인 */
    body.wait-open #school_wait {
        /* transform: translateX(0); */
    }

    /* 접기: 제자리에서 width 축소 */
    body.wait-collapsed #school_wait {
        /* transform: translateX(0); */
        width: 0;
        opacity: 0;
        border-right: 0;
    }
}