*{margin:0;padding:0;box-sizing:border-box}
body{font-family:'Noto Sans KR','Malgun Gothic',sans-serif;background:#F8F9FA;color:#202124;font-size:14px}
.page{display:none}.page.on{display:block}

/* ══════════════════════════════════════════
   모바일 반응형 (768px 이하)
   ══════════════════════════════════════════ */
@media(max-width:768px){

  /* ── 공통 ── */
  body{font-size:13px}

  /* ── 헤더 ── */
  .site-header{padding:0 10px;height:50px}
  .sh-logo{font-size:0;gap:6px}
  .sh-logo .sh-icon{width:28px;height:28px;font-size:14px}
  .sh-logo-text{display:none!important}
  .sh-right{gap:6px;font-size:12px;flex-shrink:0}
  .sh-right>span{
    max-width:72px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:12px!important;
  }
  .sh-clock{display:none}
  .sh-btn{padding:5px 10px;font-size:11px;white-space:nowrap}
  .sh-div{display:none}

  /* ── 로그인 ── */
  #page-login>div{flex-direction:column!important}
  #loginBrandPanel{width:100%!important;padding:24px 20px 20px!important;flex-direction:row!important;gap:16px;justify-content:flex-start!important}
  #loginBrandPanel img{width:130px!important;margin-bottom:0!important}
  #loginBrandPanel>div:last-of-type{display:none}
  .login-box{padding:22px 18px;border-radius:14px}

  /* ── 학교 접수 페이지 ── */
  .school-wrap{padding:14px 12px 80px}
  .clock-area{margin-bottom:12px;padding-bottom:10px}
  .big-clock{font-size:36px;letter-spacing:-1px}
  .big-date{font-size:12px}
  .big-title{font-size:15px}
  .contact-grid{grid-template-columns:1fr 1fr;gap:8px}
  .contact-card{padding:10px 12px;gap:8px}
  .c-avatar{width:36px;height:36px;font-size:16px}
  .c-name{font-size:13px}
  .c-label{font-size:9px}
  .c-sub{font-size:10px}
  .two-panels{grid-template-columns:1fr 1fr;gap:10px}
  .cat-grid{grid-template-columns:repeat(2,1fr);gap:5px}
  .cat-btn{padding:8px 3px 6px}
  .cat-icon{font-size:20px}
  .cat-label{font-size:10px}
  .hints{gap:5px;flex-wrap:wrap}
  .hint{font-size:11px;padding:5px 10px}
  .search-box{padding:10px 14px}
  .search-box input{font-size:14px}
  .submit-btn{font-size:14px;padding:13px}
  .panel-body{padding:10px 8px}
  .panel-head{padding:9px 10px}
  .panel-title{font-size:12px}
  /* 접수 폼 압축 */
  .two-panels .fc{font-size:13px;padding:8px 10px}
  .two-panels .fg{margin-bottom:6px}
  .two-panels .fl{font-size:11px;margin-bottom:3px}
  .two-panels .submit-btn{font-size:13px;padding:11px 8px}
  .two-panels .cat-toggle-btn{font-size:12px;padding:8px 10px}
  /* 현황 카드 */
  .t-card{padding:8px 10px}
  .t-num{font-size:10px}
  .t-school{font-size:11px}
  .t-who{font-size:10px}
  .t-sym{font-size:11px}
  .t-date{font-size:10px}
  .t-badge{font-size:10px;padding:2px 6px}
  .t-scroll{max-height:calc(100vh - 320px)}
  .s-legend{display:none}
  .t-scroll{max-height:260px}
  .t-card{padding:9px 11px}
  .s-legend{gap:5px;flex-wrap:wrap}
  .s-leg{font-size:10px}

  /* ── 전체보기 모달 ── */
  .fl-overlay{padding:0}
  .fl-modal{border-radius:0;width:100%;min-height:100vh;margin:0;max-height:none}
  .fl-head{border-radius:0;padding:14px 16px}
  .fl-toolbar{padding:10px 12px;gap:5px;flex-wrap:wrap}
  .fl-filter{padding:5px 10px;font-size:11px}
  .fl-search{margin-left:0;width:100%;margin-top:6px}
  .fl-search input{width:100%}
  .fl-body{max-height:calc(100vh - 180px);padding:10px 12px;gap:8px}
  .fl-row{grid-template-columns:80px 1fr;gap:8px;padding:10px 12px}
  .fl-row>div:last-child{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:6px}

  /* ── 직원 레이아웃: 사이드바 → 하단 탭바 ── */
  .staff-layout{flex-direction:column;padding-bottom:60px}
  /* 기본 사이드바(직원용) → 하단 탭바 */
  .sidebar{
    width:100%!important;
    height:auto!important;
    position:fixed!important;
    bottom:0!important;top:auto!important;
    left:0;right:0;z-index:200;
    flex-direction:row!important;
    display:flex!important;
    padding:0!important;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    box-shadow:0 -2px 10px rgba(0,0,0,.15);
    border-top:1px solid rgba(255,255,255,.1);
  }
  .sb-sec{display:none}
  .slink{
    flex:1;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    padding:7px 4px 5px!important;
    font-size:9px!important;
    gap:3px!important;
    border-left:none!important;
    border-bottom:none!important;
    border-top:3px solid transparent!important;
    white-space:nowrap;
    min-width:56px;
    text-align:center;
  }
  .slink span:first-child{font-size:17px!important;line-height:1}
  .slink.on{border-top-color:#fff!important;border-left:none!important;background:rgba(255,255,255,.2)!important}
  .main-area{padding:10px 12px;overflow-y:auto;height:calc(100vh - 50px);padding-bottom:16px}

  /* ── 슈퍼관리자/팀장admin: 드로어 메뉴 ── */
  .drawer-sidebar{
    position:fixed!important;
    top:0!important; left:-100%!important;
    width:240px!important;
    height:100vh!important;
    z-index:400!important;
    flex-direction:column!important;
    display:flex!important;
    padding:56px 0 20px!important;
    overflow-y:auto!important;
    transition:left .25s ease!important;
    box-shadow:none!important;
    border-top:none!important;
  }
  .drawer-sidebar.open{
    left:0!important;
    box-shadow:4px 0 20px rgba(0,0,0,.25)!important;
  }
  .drawer-sidebar .sb-sec{
    display:block!important;
    padding:10px 16px 4px!important;
    font-size:10px!important;
  }
  .drawer-sidebar .slink{
    flex:none!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:flex-start!important;
    padding:12px 18px!important;
    font-size:13px!important;
    gap:10px!important;
    border-left:3px solid transparent!important;
    border-top:none!important;
    border-bottom:none!important;
    min-width:unset!important;
    text-align:left!important;
    width:100%!important;
  }
  .drawer-sidebar .slink span:first-child{font-size:18px!important}
  .drawer-sidebar .slink.on{
    border-left-color:#fff!important;
    border-top:none!important;
    background:rgba(255,255,255,.15)!important;
  }
  .drawer-overlay{
    display:none;
    position:fixed;inset:0;
    background:rgba(0,0,0,.4);
    z-index:399;
  }
  .drawer-overlay.open{display:block}
  /* 드로어 버튼 */
  .drawer-btn{
    display:flex!important;
    align-items:center;justify-content:center;
    width:36px;height:36px;
    background:rgba(255,255,255,.15);
    border:none;border-radius:8px;
    color:#fff;font-size:20px;
    cursor:pointer;
    flex-shrink:0;
  }
  /* 슈퍼/팀장admin 레이아웃: 하단 탭바 없음, 전체 높이 */
  .drawer-layout{padding-bottom:0!important}
  .drawer-layout .main-area{height:calc(100vh - 50px)!important;padding-bottom:20px!important}

  /* ── 접수현황 ── */
  .k-toolbar{gap:4px;padding:8px 10px;flex-wrap:wrap}
  .kbtn{padding:5px 10px;font-size:11px}
  .ksearch{margin-left:0;width:100%;margin-top:4px}
  .ksearch input{width:100%;flex:1}
  .k-list-header{display:none!important}
  /* ── 접수현황 카드: 모바일 꽉차게 ── */
  .k-list-row{
    display:flex!important;
    flex-direction:column!important;
    gap:6px!important;
    padding:12px 14px!important;
    width:100%!important;
    box-sizing:border-box!important;
  }
  .k-list-row>div{width:100%!important;white-space:normal!important;overflow:visible!important;text-overflow:unset!important}
  .k-list-row>div:nth-child(1){order:1;display:flex;align-items:center;justify-content:space-between}
  .k-list-row>div:nth-child(2){order:2;font-size:13px!important}
  .k-list-row>div:nth-child(3){order:3;font-size:13px!important;color:#202124!important;font-weight:600!important;white-space:normal!important}
  .k-list-row>div:nth-child(4){order:4;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
  .k-list-row>div:nth-child(5){order:5;font-size:11px!important;color:#9AA0A6!important;text-align:left!important}

  /* ── 통계/차트 ── */
  .stat-grid{grid-template-columns:repeat(2,1fr);gap:8px}
  .stat-card{padding:11px;gap:8px}
  .s-num{font-size:22px}
  .s-lbl{font-size:10px}
  .chart-grid{grid-template-columns:1fr;gap:10px}
  .c-box{border-radius:10px}
  .c-head{font-size:12px;padding:10px 13px}
  .c-body{padding:10px 13px}
  .area-title{font-size:14px;margin-bottom:10px}

  /* ── 테이블 ── */
  .tbl-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
  .tbl-wrap th,.tbl-wrap td{padding:6px 8px;white-space:nowrap;font-size:11px}
  table{min-width:600px}
  .h-bar{flex-direction:column;align-items:flex-start;gap:8px}
  .h-filters{gap:5px;flex-wrap:wrap;width:100%}
  .h-filters .afc{font-size:11px;padding:5px 8px}
  .h-filters input[type=date]{width:120px!important;font-size:11px}

  /* ── 편집 모달: 모바일 바텀시트 ── */
  .overlay{
    align-items:flex-end!important;
    justify-content:center!important;
    padding:0!important;
  }
  .modal{
    border-radius:16px 16px 0 0!important;
    margin:0!important;
    max-height:88vh!important;
    width:100vw!important;
    max-width:100vw!important;
    box-sizing:border-box!important;
    position:relative!important;
    animation:slideUp .25s ease!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
  }
  .m-head{padding:13px 14px}
  .m-head>div:first-child{
    max-width:calc(100vw - 80px);
    overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
    font-size:13px!important;
  }
  /* 모달 테이블 — 넘침 방지, 레이아웃 유지 */
  .m-table{
    width:100%!important;
    table-layout:fixed!important;
    box-sizing:border-box!important;
  }
  .m-table th{
    padding:8px 10px!important;
    font-size:11px!important;
    width:64px!important;
    white-space:nowrap!important;
    vertical-align:top!important;
  }
  .m-table td{
    padding:8px 10px!important;
    font-size:13px!important;
    word-break:break-word!important;
    overflow-wrap:break-word!important;
    white-space:normal!important;
    max-width:0!important; /* table-layout:fixed 에서 남은 폭 차지 */
  }
  /* td 안 select — 화면 넘침 방지 */
  .m-table td input{
    font-size:13px!important;
    padding:7px 9px!important;
    width:100%!important;
    max-width:100%!important;
    box-sizing:border-box!important;
    display:block!important;
  }
  /* td 안 select: 내용 길이에 맞게 자동 조절 */
  .m-table td select{
    font-size:13px!important;
    padding:7px 9px!important;
    width:auto!important;
    max-width:100%!important;
    box-sizing:border-box!important;
  }
  .m-foot{
    padding:10px 12px;
    position:sticky;bottom:0;
    background:#fff;
    border-top:1px solid #F1F3F4;
    z-index:1;
  }
  .m-actions{
    display:flex!important;
    gap:6px!important;
    flex-wrap:nowrap!important;
    margin-top:8px!important;
    overflow:hidden!important;
  }
  .m-actions .mb{flex:1!important;min-height:42px!important;text-align:center!important;padding:9px 6px!important;font-size:12px!important;white-space:nowrap!important}
  .mb{padding:9px 10px;font-size:12px}
  /* m-foot 안 textarea, select */
  .mfc{
    font-size:13px!important;padding:8px 10px!important;
    width:100%!important;max-width:100%!important;
    box-sizing:border-box!important;
    min-height:52px!important;display:block!important;
  }
  .msel{
    font-size:13px!important;padding:7px 9px!important;
    width:auto!important;max-width:calc(100vw - 28px)!important;
    box-sizing:border-box!important;
  }

  /* ── 원격/챗봇/플로팅 ── */
  .remote-panel{width:100%!important;border-radius:0;height:100vh}
  .chat-wrap{width:calc(100vw - 20px)!important;right:10px;bottom:72px}
  .chat-panel{height:400px}
  .float-group{bottom:68px;right:12px;gap:9px}
  .float-btn{width:48px;height:48px;font-size:19px}
  .float-btn .tip{display:none}

  /* ── 푸터 ── */
  /* ── 모바일 푸터: 한 줄 컴팩트 ── */
  .school-footer,.staff-footer{
    flex-direction:row!important;
    align-items:center!important;
    justify-content:center!important;
    gap:8px!important;
    padding:7px 14px!important;
    margin-top:8px!important;
    border-top:1px solid #F1F3F4!important;
  }
  .school-footer .ft-logo,
  .staff-footer .ft-logo{
    height:16px!important;
    opacity:.55!important;
    flex-shrink:0;
  }
  .school-footer .ft-copy,
  .staff-footer .ft-copy{
    font-size:9px!important;
    color:#C8CDD2!important;
    line-height:1.3!important;
    text-align:left!important;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    max-width:calc(100vw - 80px);
  }
  .school-footer .ft-copy strong,
  .staff-footer .ft-copy strong{color:#BDC1C6!important;font-weight:500!important}

  /* ── 어드민 그리드 ── */
  div#sdGrid,div#adminSdGrid{grid-template-columns:repeat(2,1fr)!important;gap:8px!important;display:grid!important}
  /* 내 업무 현황 카드 컴팩트 */
  #sdGrid .stat-card,#adminSdGrid .stat-card{
    padding:10px 12px!important;
    gap:8px!important;
    border-radius:9px!important;
  }
  #sdGrid .stat-card>span:first-child,
  #adminSdGrid .stat-card>span:first-child{font-size:20px!important}
  #sdGrid .s-num,#adminSdGrid .s-num{font-size:20px!important}
  #sdGrid .s-lbl,#adminSdGrid .s-lbl{font-size:10px!important}
  /* ── 관리팀 k-toolbar: 학교선택 별도 줄 ── */
  #mgtab-mg-main .k-toolbar{
    display:flex!important;
    flex-direction:column!important;
    gap:6px!important;
  }
  #mgtab-mg-main .k-toolbar>:first-child,
  #mgtab-mg-main .k-toolbar .kbtn{
    flex:none!important;
  }
  /* 필터 버튼들만 가로 한 줄 */
  #mgtab-mg-main .k-toolbar{
    flex-wrap:nowrap!important;
    flex-direction:row!important;
    flex-wrap:wrap!important;
    align-items:center!important;
  }
  #mgtab-mg-main .msel{
    width:100%!important;
    order:99!important;
    margin-left:0!important;
  }
  #mgtab-mg-main .ksearch{
    width:100%!important;
    order:100!important;
  }
  #mgtab-mg-main .ksearch input{width:100%!important;flex:1!important}

  /* ── 견적/발주 칸반보드 모바일 (인라인 스타일 override) ── */
  div#mgKanbanBoard{grid-template-columns:1fr!important;display:grid!important}
  div#soKanbanBoard{grid-template-columns:1fr!important;display:grid!important}
  /* 관리팀/공사팀 대시보드 통계 그리드: 5열→2열 */
  div#mgStatGrid{grid-template-columns:repeat(2,1fr)!important;gap:8px!important;display:grid!important}
  div#soStatGrid{grid-template-columns:repeat(2,1fr)!important;gap:8px!important;display:grid!important}
  /* 견적/발주 칸반 카드 내부 테이블 넘침 방지 */
  #mgKanbanBoard .c-box,
  #soKanbanBoard .c-box{
    min-width:0!important;
    overflow:hidden!important;
  }
  #mgKanbanBoard table,
  #soKanbanBoard table{
    min-width:0!important;
    width:100%!important;
    table-layout:fixed!important;
  }
  /* 견적/발주 필터 툴바 모바일 */
  #mgtab-mg-main .k-toolbar,
  #sotab-so-main .k-toolbar{
    gap:4px!important;
    flex-wrap:wrap!important;
  }
  #mgtab-mg-main .k-toolbar .kbtn,
  #sotab-so-main .k-toolbar .kbtn{
    font-size:10px!important;
    padding:4px 7px!important;
  }
  /* 견적/발주 접수건 리스트 카드: 모바일 세로 정렬 */
  .mg-card,
  .so-card{
    flex-direction:column!important;
    align-items:flex-start!important;
    gap:6px!important;
    padding:10px 12px!important;
    font-size:12px!important;
  }
  #mgStatGrid,#soStatGrid{grid-template-columns:repeat(2,1fr)!important}
  .sdGrid-mobile{grid-template-columns:repeat(2,1fr)!important}

  /* ── FAQ 관리 ── */
  #leaderFaqWrap,[id$="FaqWrap"]{grid-template-columns:1fr!important}
  #stab-leader-faq>[style*="grid-template-columns"],
  #stab-admin-faq>[style*="grid-template-columns"],
  #atab-admin-faq>[style*="grid-template-columns"],
  #stab-super-faq>[style*="grid-template-columns"]{grid-template-columns:1fr!important}

  /* ── 직원 관리 그리드 ── */
  #stab-super-users>[style*="grid-template-columns"]:last-child{grid-template-columns:1fr!important}

  /* ── 모바일 고정 그리드 전체 보강 (입력 폼/통계 깨짐 방지) ── */
  /* 학교 통계 요약 3열 → 1열 */
  div#schoolStatSummary{grid-template-columns:1fr!important}
  /* 학교 등록(300px 1fr) → 1열 */
  div#schoolMgGrid{grid-template-columns:1fr!important;gap:10px!important}
  /* 직원 등록(300px 1fr) → 1열 : stab-super-users 내 첫 그리드 */
  #stab-super-users>div[style*="grid-template-columns:300px"]{grid-template-columns:1fr!important;gap:10px!important}
  /* 420px / 400px 좌우 분할 레이아웃 → 1열 */
  #stab-super-schools>div[style*="420px"],
  #stab-super-notice>div[style*="420px"],
  #stab-super-faq>div[style*="420px"],
  div[style*="grid-template-columns:400px 1fr"]{grid-template-columns:1fr!important;gap:12px!important}
  /* 통계 카드 4·5열 → 2열 */
  div#superStatGrid{grid-template-columns:repeat(2,1fr)!important}
  div#sdGrid,div#adminSdGrid{grid-template-columns:repeat(2,1fr)!important}
  /* 팀 설정 데스크탑 그리드 → 1열 */
  div#teamSettingDesktop{grid-template-columns:1fr!important}

  /* ── 직원/관리팀/공사팀 사이드바 기본 색상 ── */
  #staffSidebar{background:#4A86C8}
  #constructionSidebar{background:#455A64}

  /* ── soTab 모바일: 탭버튼 행 + 전체학교/검색 별도 행 ── */
  .so-tab-wrap{display:flex;flex-direction:column}
  .so-tab-btns{
    display:flex!important;
    overflow-x:auto!important;
    -webkit-overflow-scrolling:touch!important;
    border-bottom:1px solid #E8EAED!important;
    gap:0!important;
  }
  .so-tab-btn{
    flex:1!important;
    min-width:0!important;
    padding:9px 6px!important;
    font-size:11px!important;
    white-space:nowrap!important;
    text-align:center!important;
  }
  .so-tab-tools{
    display:flex!important;
    align-items:center!important;
    gap:8px!important;
    padding:8px 10px!important;
    flex-wrap:nowrap!important;
    margin-left:0!important;
    border-bottom:1px solid #F1F3F4!important;
  }
  .so-tab-tools .msel{flex:1!important;min-width:0!important;max-width:140px!important}
  .so-tab-tools .ksearch{flex:1!important}
  .so-tab-tools .ksearch input{width:100%!important;flex:1!important}

  /* ── 기간 필터 바 모바일 ── */
  .period-bar{gap:5px!important}
  .period-bar button{padding:6px 11px!important;font-size:11px!important;flex:0 0 auto}
  .period-bar input[type=date]{font-size:11px!important;padding:5px 6px!important;width:auto!important;max-width:130px}
  .period-bar>span:last-child{display:none!important}
}

/* ══════════════════════════════════════════
   480px 이하 (소형폰)
   ══════════════════════════════════════════ */
@media(max-width:768px){
  /* ── 슈퍼관리자 대시보드 모바일 ── */
  #superStatGrid{grid-template-columns:repeat(2,1fr)!important;gap:8px!important}
  #superStaffRank table{font-size:11px}
  #superStaffRank th,#superStaffRank td{padding:6px 6px!important;font-size:11px!important}

  /* ── 직원 관리 모바일 ── */
  #stab-super-users .c-box>[style*="grid-template-columns:repeat(3,1fr)"]{
    grid-template-columns:1fr!important;
    gap:6px!important;
  }
  #stab-super-users [id^="teamList-"]{
    height:auto!important;
    min-height:0!important;
    padding:6px!important;
  }
  #teamList-staff,#teamList-manage,#teamList-construction{
    display:flex!important;
    flex-wrap:wrap!important;
    gap:6px!important;
    height:auto!important;
    min-height:36px!important;
    padding:6px!important;
  }
  /* 직원 등록/목록 그리드: JS로 처리 */
  #userRegForm{
    overflow:hidden;
    transition:max-height .3s ease;
  }
  #userCardList{margin-top:8px}
}

/* ── 학교 상세 모달: 모바일에서 바텀시트 ── */
@media(max-width:768px){
  #schoolDetailOverlay{
    align-items:flex-end!important;
    padding:0!important;
  }
  #schoolDetailOverlay>div{
    border-radius:16px 16px 0 0!important;
    max-width:100%!important;
    width:100%!important;
    animation:slideUp .25s ease!important;
  }
}

@media(max-width:480px){
  .big-clock{font-size:30px}
  .contact-grid{grid-template-columns:1fr!important}
  .two-panels{grid-template-columns:1fr!important}
  .cat-grid{grid-template-columns:repeat(3,1fr)!important}
  .stat-grid{grid-template-columns:repeat(2,1fr)}
  .k-list-row{grid-template-columns:1fr;gap:4px}
  .k-list-row>div{grid-column:1!important;grid-row:auto!important}
  .fl-row{grid-template-columns:1fr}
  .fl-row>div:first-child{flex-wrap:wrap}
  #sdGrid,#adminSdGrid{grid-template-columns:repeat(2,1fr)!important;gap:6px!important}
  .slink{min-width:48px;font-size:8px!important}
  .slink span:first-child{font-size:15px!important}
}

/* 일정 관리 반응형 */
@media(max-width:768px){
  #stab-schedule > div:nth-child(2){
    grid-template-columns:1fr!important;
  }
  #scheduleCalGrid div{min-height:60px!important;}
}

.page-nav{background:#fff;border-bottom:2px solid #E8EAED;display:flex;align-items:center;padding:0 20px;position:sticky;top:0;z-index:100;box-shadow:0 1px 4px rgba(0,0,0,.06)}
.demo-badge{background:#E07070;color:#fff;font-size:10px;font-weight:700;padding:2px 8px;border-radius:10px;margin-right:14px}
.pnav-tab{padding:14px 18px;font-size:13px;font-weight:500;color:#5F6368;cursor:pointer;border-bottom:3px solid transparent;margin-bottom:-2px;transition:all .15s;white-space:nowrap;user-select:none}
.pnav-tab:hover{color:#4A86C8;background:#F8F9FA}
.pnav-tab.on{color:#4A86C8;border-bottom-color:#4A86C8;font-weight:700}
.rb{font-size:10px;padding:1px 7px;border-radius:8px;margin-left:5px;font-weight:600}
.rb-s{background:#E6F4EA;color:#5D9E70}.rb-d{background:#EEF4FB;color:#4A86C8}.rb-a{background:#FDF0F0;color:#CC7A7A}

.site-header{background:#5A8FC4;color:#fff;padding:0 24px;height:56px;display:flex;align-items:center;justify-content:space-between;box-shadow:0 2px 8px rgba(0,0,0,.2)}
.sh-logo{display:flex;align-items:center;gap:12px;font-size:16px;font-weight:700}
.sh-icon{width:36px;height:36px;background:rgba(255,255,255,.2);border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:20px}
.sh-right{display:flex;align-items:center;gap:14px;font-size:13px}
.sh-div{width:1px;height:20px;background:rgba(255,255,255,.3)}
.sh-clock{font-size:17px;font-weight:700;font-variant-numeric:tabular-nums;background:rgba(0,0,0,.15);padding:4px 12px;border-radius:8px}
.sh-btn{background:rgba(255,255,255,.15);border:1px solid rgba(255,255,255,.35);color:#fff;padding:5px 13px;border-radius:7px;font-size:12px;font-weight:600;cursor:pointer;font-family:inherit}
.sh-btn:hover{background:rgba(255,255,255,.25)}
/* 데스크탑: drawer버튼 숨김 */
.drawer-btn{display:none}

.school-wrap{max-width:1100px;margin:0 auto;padding:24px 24px}
.clock-area{text-align:center;margin-bottom:20px;padding-bottom:18px;border-bottom:1px solid #E8EAED}
.big-clock{font-size:58px;font-weight:300;font-variant-numeric:tabular-nums;letter-spacing:-2px;line-height:1}
.big-date{font-size:13px;color:#5F6368;margin-top:5px}
.big-title{font-size:18px;font-weight:700;color:#4A86C8;margin-top:8px}

.contact-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:16px}
.contact-card{background:#fff;border:1px solid #E8EAED;border-radius:12px;padding:13px 18px;display:flex;align-items:center;gap:14px;box-shadow:0 1px 4px rgba(0,0,0,.07)}
.c-avatar{width:44px;height:44px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:20px;flex-shrink:0}
.c-info{flex:1;min-width:0}
.c-label{font-size:10px;color:#9AA0A6;font-weight:700;text-transform:uppercase;letter-spacing:.4px;margin-bottom:2px}
.c-name{font-size:15px;font-weight:700;color:#202124}
.c-sub{font-size:12px;color:#5F6368;margin-top:1px}
.call-btn{display:flex;align-items:center;gap:6px;color:#fff;border:none;border-radius:9px;padding:9px 14px;font-size:12px;font-weight:700;cursor:pointer;text-decoration:none;white-space:nowrap;transition:opacity .18s}
.call-btn:hover{opacity:.85}

.search-box{display:flex;align-items:center;gap:12px;background:#fff;border-radius:28px;box-shadow:0 1px 8px rgba(32,33,36,.2);padding:12px 20px;margin-bottom:9px;transition:box-shadow .2s}
.search-box:hover,.search-box:focus-within{box-shadow:0 2px 12px rgba(32,33,36,.3)}
.search-box input{flex:1;border:none;outline:none;font-size:15px;font-family:inherit;color:#202124;background:transparent}
.search-box input::placeholder{color:#BDC1C6}
.hints{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:14px}
.hint{background:#fff;border:1px solid #E8EAED;color:#5F6368;padding:4px 12px;border-radius:14px;font-size:12px;cursor:pointer;font-family:inherit;transition:all .15s}
.hint:hover{background:#EEF4FB;color:#4A86C8;border-color:#C5D8EF}
.faq-area{margin-bottom:14px}
.faq-card{background:#fff;border:1px solid #E8EAED;border-radius:10px;margin-bottom:7px;overflow:hidden}
.faq-q{padding:10px 15px;cursor:pointer;font-size:13px;font-weight:600;color:#4A86C8;display:flex;justify-content:space-between;align-items:center;background:#F8F9FA;user-select:none}
.faq-q:hover{background:#EEF4FB}
.faq-a{display:none;padding:11px 15px;font-size:12px;line-height:1.85;white-space:pre-line;border-top:1px solid #F1F3F4}

.two-panels{display:grid;grid-template-columns:1.4fr 1fr;gap:16px}
.panel{background:#fff;border-radius:14px;box-shadow:0 1px 5px rgba(32,33,36,.1);overflow:hidden}
.panel-head{padding:12px 16px;border-bottom:1px solid #F1F3F4;display:flex;align-items:center;justify-content:space-between;background:#FAFAFA}
.panel-title{font-size:13px;font-weight:700;display:flex;align-items:center;gap:6px}
.pdot{width:8px;height:8px;border-radius:50%;flex-shrink:0}
.panel-body{padding:14px 16px}
.fg{margin-bottom:11px}
.fl{font-size:10px;font-weight:700;color:#5F6368;display:block;margin-bottom:4px;text-transform:uppercase;letter-spacing:.4px}
.fc{width:100%;padding:8px 12px;border:1.5px solid #E8EAED;border-radius:9px;font-size:13px;font-family:inherit;color:#202124;background:#fff;transition:all .18s}
.fc:focus{outline:none;border-color:#6EA3E0;box-shadow:0 0 0 3px rgba(66,133,244,.1)}
textarea.fc{resize:none;min-height:76px}
.submit-btn{width:100%;padding:11px;background:#5A96D4;color:#fff;border:none;border-radius:10px;font-size:14px;font-weight:700;cursor:pointer;font-family:inherit;box-shadow:0 2px 8px rgba(21,101,192,.3);transition:all .18s}
.submit-btn:hover{opacity:.9;transform:translateY(-1px)}
.done-box{text-align:center;padding:18px 0}
.done-num{font-size:24px;font-weight:700;color:#4A86C8;letter-spacing:2px;background:#EEF4FB;display:inline-block;padding:8px 22px;border-radius:10px;margin:8px 0}
.reset-btn{background:#EEF4FB;color:#4A86C8;border:none;border-radius:8px;padding:8px 18px;cursor:pointer;font-family:inherit;font-size:13px;font-weight:600;margin-top:8px}

/* ── 카테고리 선택 토글 버튼 ── */
.cat-toggle-btn{width:100%;display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border:1.5px solid #E8EAED;border-radius:10px;background:#fff;cursor:pointer;font-family:inherit;font-size:13px;font-weight:600;color:#5F6368;transition:all .15s}
.cat-toggle-btn:hover{border-color:#6EA3E0;background:#F8F9FA;color:#4A86C8}
.cat-toggle-btn.has-sel{border-color:#4A86C8;background:#EEF4FB;color:#4A86C8}
.cat-toggle-arrow{font-size:11px;transition:transform .2s}
.cat-toggle-btn.open .cat-toggle-arrow{transform:rotate(180deg)}
.cat-panel{display:none;margin-top:6px;border:1.5px solid #E8EAED;border-radius:10px;padding:10px;background:#FAFAFA;animation:fadeIn .18s}
.cat-panel.open{display:block}
.cat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}
.cat-btn{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:12px 6px 10px;border:1.5px solid #E8EAED;border-radius:10px;background:#fff;cursor:pointer;font-family:inherit;transition:all .15s;position:relative;min-width:0;overflow:visible}
.cat-btn:hover{border-color:#6EA3E0;background:#F0F4FF}
.cat-btn.sel{border-color:#4A86C8;background:#EEF4FB;box-shadow:0 0 0 2px rgba(21,101,192,.12)}
.cat-icon{font-size:22px;line-height:1;flex-shrink:0}
.cat-label{font-size:11.5px;font-weight:600;color:#202124;text-align:center;line-height:1.3;word-break:keep-all;white-space:normal;width:100%}
.cat-btn.sel .cat-label{color:#4A86C8}
.cat-help{width:15px;height:15px;border-radius:50%;background:#BDC1C6;color:#fff;font-size:9px;font-weight:700;display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;transition:background .15s;position:absolute;top:5px;right:5px;z-index:2}
.cat-help:hover{background:#4A86C8}
.cat-tooltip{position:absolute;bottom:calc(100% + 8px);left:50%;transform:translateX(-50%);background:#202124;color:#fff;font-size:11px;line-height:1.65;padding:8px 13px;border-radius:9px;white-space:nowrap;z-index:9999;pointer-events:none;opacity:0;transition:opacity .15s;box-shadow:0 4px 14px rgba(0,0,0,.28);min-width:150px;text-align:left}
.cat-tooltip::after{content:'';position:absolute;top:100%;left:50%;transform:translateX(-50%);border:6px solid transparent;border-top-color:#202124}
.cat-btn:hover .cat-tooltip{opacity:1}
.toner-field{display:none;margin-top:6px;animation:fadeIn .2s}
.toner-field.show{display:block}
@keyframes fadeIn{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}

.s-legend{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:10px}
.s-leg{display:flex;align-items:center;gap:3px;font-size:11px;color:#5F6368}
.t-scroll{max-height:320px;overflow-y:auto;display:flex;flex-direction:column;gap:7px}
.t-scroll::-webkit-scrollbar{width:3px}
.t-scroll::-webkit-scrollbar-thumb{background:#E8EAED;border-radius:2px}
.t-card{background:#F8F9FA;border:1px solid #E8EAED;border-radius:10px;padding:10px 13px;cursor:pointer;border-left:4px solid #ccc;transition:all .15s}
.t-card:hover{box-shadow:0 2px 10px rgba(0,0,0,.1);transform:translateY(-1px);background:#fff}
.t-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}
.t-num{font-size:10px;font-weight:700;color:#9AA0A6}
.t-badge{display:inline-block;padding:2px 8px;border-radius:9px;font-size:10px;font-weight:700;color:#fff}
.t-school{font-size:13px;font-weight:700;color:#202124;margin-bottom:2px}
.t-who{font-size:11px;color:#5F6368}
.t-sym{font-size:12px;color:#5F6368;margin-top:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.t-date{font-size:10px;color:#BDC1C6;margin-top:4px}

.staff-layout{display:flex;min-height:calc(100vh - 56px)}
.sidebar{width:190px;background:#4A7FB8;flex-shrink:0;padding:12px 0;overflow-y:auto;height:calc(100vh - 56px);position:sticky;top:0;align-self:flex-start}
.sb-sec{padding:8px 16px 4px;font-size:10px;color:rgba(255,255,255,.4);text-transform:uppercase;letter-spacing:.8px}
.slink{display:flex;align-items:center;gap:8px;padding:10px 16px;color:rgba(255,255,255,.8);cursor:pointer;font-size:13px;border:none;background:none;font-family:inherit;width:100%;text-align:left;border-left:3px solid transparent;transition:all .15s}
.slink:hover{background:rgba(255,255,255,.1);color:#fff}
.slink.on{background:rgba(255,255,255,.15);border-left-color:#fff;color:#fff;font-weight:600}
.main-area{flex:1;padding:18px;background:#F8F9FA;overflow-y:auto}
.stab{display:none}.stab.on{display:block}
.area-title{font-size:17px;font-weight:700;color:#4A86C8;margin-bottom:14px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}

.k-toolbar{display:flex;gap:6px;flex-wrap:wrap;align-items:center;margin-bottom:12px;background:#fff;padding:10px 13px;border-radius:10px;box-shadow:0 1px 4px rgba(0,0,0,.07)}
.kbtn{padding:4px 12px;border-radius:12px;border:1.5px solid #E8EAED;font-size:11px;font-weight:600;cursor:pointer;font-family:inherit;background:#fff;color:#5F6368;transition:all .15s}
.kbtn:hover{transform:translateY(-1px)}
.kbtn.on{font-weight:700}
.ksearch{display:flex;align-items:center;gap:6px;border:1px solid #E8EAED;border-radius:8px;padding:5px 11px;margin-left:auto;background:#fff}
.ksearch input{border:none;outline:none;font-size:12px;font-family:inherit;width:120px;color:#202124}
.k-board{display:flex;flex-direction:column;gap:6px}
.k-list-row{background:#fff;border-radius:10px;border:1px solid #E8EAED;border-left:4px solid #ccc;padding:11px 14px;cursor:pointer;display:grid;grid-template-columns:90px 1fr 1fr 110px 80px;align-items:center;gap:10px;transition:all .15s}
.k-list-row:hover{box-shadow:0 2px 10px rgba(0,0,0,.1);transform:translateY(-1px);background:#FAFAFA}
.k-list-row.cancelled{opacity:0.5}
.k-col{background:#F1F3F4;border-radius:11px;overflow:hidden;min-width:0}
.k-col-head{padding:8px 11px;font-size:11px;font-weight:700;display:flex;align-items:center;justify-content:space-between}
.k-cnt{background:rgba(255,255,255,.35);padding:1px 6px;border-radius:6px;font-size:10px}
.k-col-body{padding:6px;display:flex;flex-direction:column;gap:5px;min-height:130px}
.k-card{background:#fff;border-radius:8px;padding:9px 10px;cursor:pointer;border:1px solid #E8EAED;border-left:3px solid #ccc;transition:all .15s}
.k-card:hover{box-shadow:0 2px 8px rgba(0,0,0,.1);transform:translateY(-1px)}
.k-num{font-size:10px;color:#9AA0A6;margin-bottom:2px;font-weight:600}
.k-school{font-size:11px;font-weight:700;color:#202124;margin-bottom:2px}
.k-who{font-size:10px;color:#5F6368;margin-bottom:3px}
.k-sym{font-size:11px;color:#5F6368;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-bottom:4px}
.k-foot{display:flex;align-items:center;justify-content:space-between}
.k-date{font-size:10px;color:#BDC1C6}
.k-memo{background:#EEF4FB;color:#4A86C8;padding:1px 5px;border-radius:5px;font-size:10px;font-weight:600}

.h-bar{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px;flex-wrap:wrap;gap:10px}
.h-filters{display:flex;gap:7px;align-items:center;flex-wrap:wrap}

.stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:16px}
.stat-card{background:#fff;border-radius:11px;padding:15px;box-shadow:0 1px 4px rgba(0,0,0,.08);display:flex;align-items:center;gap:12px;border-left:4px solid #4A86C8}
.s-num{font-size:26px;font-weight:700;color:#4A86C8;line-height:1}
.s-lbl{font-size:11px;color:#5F6368;margin-top:2px;font-weight:500}
.chart-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px}
.c-box{background:#fff;border-radius:11px;box-shadow:0 1px 4px rgba(0,0,0,.08);overflow:hidden;margin-bottom:13px}
.c-head{padding:11px 15px;border-bottom:1px solid #F1F3F4;background:#FAFAFA;font-size:13px;font-weight:700}
.c-body{padding:13px 15px}
.bar-row{margin-bottom:9px}
.bar-lbl{display:flex;justify-content:space-between;font-size:12px;margin-bottom:3px;color:#5F6368}
.bar-track{background:#F1F3F4;border-radius:4px;height:8px;overflow:hidden}
.bar-fill{height:100%;border-radius:4px;transition:width .5s}

.tbl-wrap{overflow-x:auto}
.tbl-wrap thead th{position:sticky;top:0;z-index:1}
table{width:100%;border-collapse:collapse;font-size:12px}
thead tr{background:#5A8FC4;color:#fff}
thead th{padding:9px 12px;font-weight:600;text-align:left;white-space:nowrap}
tbody tr{border-bottom:1px solid #F1F3F4;transition:background .12s}
tbody tr:hover{background:#F8F9FA}
tbody td{padding:8px 12px;vertical-align:middle}

.btn{display:inline-flex;align-items:center;gap:4px;padding:5px 12px;border-radius:7px;border:none;font-size:11px;font-weight:700;cursor:pointer;font-family:inherit;transition:all .15s}
.btn:hover{transform:translateY(-1px)}
.btn-blue{background:#4A86C8;color:#fff}.btn-green{background:#5CB87A;color:#fff}.btn-red{background:#D9534F;color:#fff}.btn-gray{background:#F1F3F4;color:#5F6368}
.afc{width:100%;padding:7px 11px;border:1.5px solid #E8EAED;border-radius:8px;font-size:13px;font-family:inherit;color:#202124;background:#fff;transition:border-color .18s}
.afc:focus{outline:none;border-color:#6EA3E0}
.msel{padding:7px 11px;border:1.5px solid #E8EAED;border-radius:8px;font-size:12px;font-family:inherit;background:#fff;color:#202124}

.sb{display:inline-block;padding:2px 9px;border-radius:9px;font-size:10px;font-weight:700;color:#fff}
.sb-submitted{background:#9E9E9E}.sb-confirmed{background:#5B96D8}.sb-processing{background:#D4A017;color:#333}
.sb-ordering{background:#C08A5A}.sb-pending{background:#CC7A7A}.sb-completed{background:#5CB87A}.sb-cancelled{background:#424242}

.overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:500;align-items:center;justify-content:center;padding:20px}
.overlay.open{display:flex}
.modal{background:#fff;border-radius:16px;width:100%;max-width:540px;max-height:90vh;overflow-y:auto;box-shadow:0 16px 56px rgba(0,0,0,.24);animation:mIn .22s cubic-bezier(.34,1.56,.64,1)}
@keyframes slideUp{from{transform:translateY(100%)}to{transform:translateY(0)}}
@keyframes mIn{from{opacity:0;transform:translateY(16px) scale(.95)}to{opacity:1;transform:scale(1)}}
.m-head{background:#5A8FC4;color:#fff;padding:14px 18px;display:flex;align-items:center;justify-content:space-between;position:sticky;top:0}
.m-title{font-size:14px;font-weight:700;display:flex;align-items:center;gap:7px}
.m-x{background:none;border:none;color:rgba(255,255,255,.8);font-size:22px;cursor:pointer;width:28px;height:28px;display:flex;align-items:center;justify-content:center;border-radius:50%;transition:background .15s}
.m-x:hover{background:rgba(255,255,255,.2);color:#fff}
.m-table{width:100%;border-collapse:collapse}
.m-table tr{border-bottom:1px solid #F8F9FA}
.m-table th{padding:9px 16px;font-size:11px;font-weight:700;color:#5F6368;text-align:left;width:86px;background:#FAFAFA;text-transform:uppercase;letter-spacing:.3px;white-space:nowrap}
.m-table td{padding:9px 16px;font-size:13px;color:#202124;line-height:1.5;word-break:break-word;overflow-wrap:break-word;white-space:normal}
.m-foot{padding:13px 17px;border-top:1px solid #F1F3F4;background:#FAFAFA}
.m-notice{background:#FFF8E1;border:1px solid #FFE082;border-radius:8px;padding:9px 13px;font-size:12px;color:#C47A4A;margin-bottom:10px;font-weight:500}
.mfc{width:100%;padding:8px 12px;border:1.5px solid #E8EAED;border-radius:9px;font-size:13px;font-family:inherit;resize:none;min-height:56px;margin-bottom:10px;color:#202124}
.mfc:focus{outline:none;border-color:#6EA3E0}
.m-actions{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.mb{padding:7px 14px;border-radius:8px;border:none;font-size:12px;font-weight:700;cursor:pointer;font-family:inherit;transition:all .15s}
.mb:hover{transform:translateY(-1px)}
.mb-green{background:#5CB87A;color:#fff}.mb-gray{background:#F1F3F4;color:#5F6368}

.fl-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:450;align-items:flex-start;justify-content:center;padding:30px 16px;overflow-y:auto}
.fl-overlay.open{display:flex}
.fl-modal{background:#fff;border-radius:16px;width:100%;max-width:920px;box-shadow:0 16px 56px rgba(0,0,0,.22);animation:mIn .22s ease;margin:auto}
.fl-head{background:#5A8FC4;color:#fff;padding:15px 20px;border-radius:16px 16px 0 0;display:flex;align-items:center;justify-content:space-between}
.fl-toolbar{padding:12px 18px;border-bottom:1px solid #F1F3F4;display:flex;gap:6px;align-items:center;flex-wrap:wrap;background:#FAFAFA}
.fl-filter{padding:4px 12px;border-radius:12px;border:1.5px solid #E8EAED;font-size:11px;font-weight:600;cursor:pointer;font-family:inherit;background:#fff;color:#5F6368;transition:all .15s}
.fl-filter.on{color:#fff}
.fl-search{display:flex;align-items:center;gap:6px;border:1.5px solid #E8EAED;border-radius:8px;padding:5px 12px;margin-left:auto;background:#fff}
.fl-search:focus-within{border-color:#6EA3E0}
.fl-search input{border:none;outline:none;font-size:12px;font-family:inherit;width:160px;color:#202124}
.fl-cnt{font-size:11px;color:#5F6368;padding:7px 18px;background:#FAFAFA;border-bottom:1px solid #F1F3F4}
.fl-body{padding:14px 18px;display:flex;flex-direction:column;gap:9px;max-height:58vh;overflow-y:auto}
.fl-body::-webkit-scrollbar{width:4px}
.fl-body::-webkit-scrollbar-thumb{background:#E8EAED;border-radius:2px}
.fl-row{background:#F8F9FA;border:1px solid #E8EAED;border-radius:11px;padding:13px 16px;cursor:pointer;border-left:4px solid #ccc;display:grid;grid-template-columns:110px 1fr auto;gap:12px;align-items:start;transition:all .15s}
.fl-row:hover{box-shadow:0 3px 12px rgba(0,0,0,.1);transform:translateY(-1px);background:#fff}

.remote-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:400;align-items:flex-end;justify-content:flex-end}
.remote-overlay.open{display:flex}
.remote-panel{background:#fff;width:390px;height:100vh;box-shadow:-6px 0 30px rgba(0,0,0,.16);display:flex;flex-direction:column;animation:slideIn .25s ease}
@keyframes slideIn{from{transform:translateX(100%)}to{transform:translateX(0)}}
.rp-head{background:#5A8FC4;color:#fff;padding:16px 20px;display:flex;align-items:center;justify-content:space-between;flex-shrink:0}
.rp-body{flex:1;overflow-y:auto;padding:18px}
.rp-info{background:#EEF4FB;border-radius:10px;padding:12px;margin-bottom:16px;border-left:4px solid #4A86C8;font-size:12px;color:#4A86C8;font-weight:500;line-height:1.7}
.rp-sec{font-size:11px;font-weight:700;color:#5F6368;text-transform:uppercase;letter-spacing:.5px;margin-bottom:9px}
.rp-fg{margin-bottom:11px}
.rp-lbl{font-size:10px;font-weight:700;color:#5F6368;display:block;margin-bottom:4px;text-transform:uppercase;letter-spacing:.3px}
.rp-in{width:100%;padding:8px 12px;border:1.5px solid #E8EAED;border-radius:9px;font-size:13px;font-family:inherit;color:#202124;background:#fff}
.rp-in:focus{outline:none;border-color:#6EA3E0}
textarea.rp-in{resize:none;min-height:72px}
.rp-sub{width:100%;padding:11px;background:#5A96D4;color:#fff;border:none;border-radius:10px;font-size:14px;font-weight:700;cursor:pointer;font-family:inherit;box-shadow:0 2px 8px rgba(21,101,192,.3)}
.rp-sub:hover{opacity:.9}
.rp-done{text-align:center;padding:28px 0}
.rp-done-num{font-size:22px;font-weight:700;color:#4A86C8;letter-spacing:2px;background:#EEF4FB;padding:8px 22px;border-radius:10px;display:inline-block;margin:9px 0}
.rp-reset{background:#EEF4FB;color:#4A86C8;border:none;border-radius:8px;padding:8px 18px;cursor:pointer;font-family:inherit;font-size:13px;font-weight:600;margin-top:9px}

.chat-wrap{display:none;position:fixed;bottom:104px;right:24px;z-index:400;width:360px}
.chat-wrap.open{display:block;animation:chatPop .22s cubic-bezier(.34,1.56,.64,1)}
@keyframes chatPop{from{opacity:0;transform:scale(.9) translateY(18px)}to{opacity:1;transform:scale(1) translateY(0)}}
.chat-panel{background:#fff;border-radius:18px;box-shadow:0 8px 36px rgba(0,0,0,.18);overflow:hidden;display:flex;flex-direction:column;height:470px}
.cp-head{background:#5CB87A;color:#fff;padding:13px 17px;display:flex;align-items:center;justify-content:space-between;flex-shrink:0}
.cp-av{width:36px;height:36px;background:rgba(255,255,255,.25);border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:18px;flex-shrink:0}
.cp-status{font-size:11px;opacity:.85;display:flex;align-items:center;gap:4px;margin-top:1px}
.cp-dot{width:7px;height:7px;background:#A8D4B8;border-radius:50%;animation:blink 1.5s infinite}
@keyframes blink{0%,100%{opacity:1}50%{opacity:.4}}
.cp-msgs{flex:1;overflow-y:auto;padding:13px;display:flex;flex-direction:column;gap:9px;background:#F8F9FA}
.cp-msgs::-webkit-scrollbar{width:3px}
.cp-msgs::-webkit-scrollbar-thumb{background:#E8EAED;border-radius:2px}
.msg{max-width:82%;display:flex;flex-direction:column;gap:2px}
.msg-bot{align-self:flex-start}.msg-user{align-self:flex-end}
.msg-bub{padding:9px 13px;border-radius:14px;font-size:13px;line-height:1.55}
.msg-bot .msg-bub{background:#fff;color:#202124;border-radius:4px 14px 14px 14px;box-shadow:0 1px 3px rgba(0,0,0,.1)}
.msg-user .msg-bub{background:#5CB87A;color:#fff;border-radius:14px 4px 14px 14px}
.msg-time{font-size:10px;color:#9AA0A6;padding:0 3px}
.msg-user .msg-time{text-align:right}
.qrs{display:flex;flex-wrap:wrap;gap:5px;margin-top:4px}
.qr{background:#E8F5EE;color:#5D9E70;border:1px solid #A8D4B8;border-radius:12px;padding:4px 11px;font-size:11px;font-weight:600;cursor:pointer;font-family:inherit;transition:all .15s}
.qr:hover{background:#5CB87A;color:#fff;border-color:#5CB87A}
.cp-input-row{padding:11px 13px;border-top:1px solid #E8EAED;display:flex;gap:7px;align-items:flex-end;background:#fff;flex-shrink:0}
.cp-in{flex:1;border:1.5px solid #E8EAED;border-radius:18px;padding:8px 13px;font-size:13px;font-family:inherit;color:#202124;resize:none;outline:none;min-height:37px;max-height:88px;line-height:1.4;transition:border-color .15s}
.cp-in:focus{border-color:#5CB87A}
.cp-send{width:37px;height:37px;border-radius:50%;background:#5CB87A;border:none;color:#fff;font-size:15px;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:transform .18s}
.cp-send:hover{transform:scale(1.08)}

.float-group{position:fixed;bottom:26px;right:22px;display:flex;flex-direction:column;gap:11px;z-index:300}
.float-btn{width:54px;height:54px;border-radius:50%;border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:22px;box-shadow:0 4px 16px rgba(0,0,0,.2);transition:all .2s;position:relative}
.float-btn:hover{transform:translateY(-3px) scale(1.08)}
.float-btn .tip{position:absolute;right:62px;top:50%;transform:translateY(-50%);background:#202124;color:#fff;font-size:11px;font-weight:600;padding:5px 11px;border-radius:7px;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .18s;font-family:'Noto Sans KR',sans-serif}
.float-btn .tip::after{content:'';position:absolute;left:100%;top:50%;transform:translateY(-50%);border:5px solid transparent;border-left-color:#202124}
.float-btn:hover .tip{opacity:1}
.fb-r{background:#5A96D4}
.fb-c{background:#5CB87A}

.login-wrap{min-height:calc(100vh - 48px);display:flex;align-items:center;justify-content:center;background:#F8F9FA;padding:20px}
.login-box{background:#fff;border-radius:16px;padding:36px 38px;width:100%;max-width:380px;box-shadow:0 4px 20px rgba(0,0,0,.1);border:1px solid #E8EAED}
.login-logo{text-align:center;margin-bottom:26px}
.login-icon{width:64px;height:64px;background:#5A96D4;border-radius:16px;display:flex;align-items:center;justify-content:center;font-size:30px;margin:0 auto 11px}
.login-err{display:none;background:#FDF0F0;border:1px solid #F0CCCC;border-radius:8px;padding:9px 13px;font-size:12px;color:#CC7A7A;margin-bottom:12px}

.site-footer{background:#fff;border-top:1px solid #E8EAED;padding:18px 28px;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin-top:auto}
.site-footer .ft-logo{height:36px;object-fit:contain;opacity:.85}
.site-footer .ft-copy{font-size:11px;color:#9AA0A6;line-height:1.7;text-align:right}
.site-footer .ft-copy strong{color:#5F6368;font-weight:600}
/* 학교 페이지 footer는 school-wrap 아래 */
.school-footer{background:#fff;border-top:1px solid #E8EAED;padding:16px 24px;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;margin-top:20px}
.school-footer .ft-logo{height:32px;object-fit:contain;opacity:.9}
.school-footer .ft-copy{font-size:11px;color:#9AA0A6;line-height:1.7;text-align:right}
.school-footer .ft-copy strong{color:#5F6368;font-weight:600}
/* staff-layout 기반 footer */
.staff-footer{background:#fff;border-top:1px solid #E8EAED;padding:14px 22px;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px}
.staff-footer .ft-logo{height:30px;object-fit:contain;opacity:.9}
.staff-footer .ft-copy{font-size:11px;color:#9AA0A6;line-height:1.6;text-align:right}
.staff-footer .ft-copy strong{color:#5F6368;font-weight:600}
/* ── 로그인 페이지 모바일 ── */
@media(max-width:640px){
  #page-login>div{flex-direction:column}
  #loginBrandPanel{width:100%!important;padding:28px 24px;min-height:180px}
  #loginBrandPanel img{width:160px!important}
  #page-login>div>div:last-child{padding:28px 20px}
}

/* ── 모바일 팀 모달 슬라이드업 ── */
@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
@media(max-width:768px){
  #teamSettingDesktop { display:none !important; }
  #teamSettingMobile  { display:flex !important; flex-direction:column; }
}
@media(min-width:769px){
  #teamSettingDesktop { display:grid !important; }
  #teamSettingMobile  { display:none !important; }
}

/* ── soTab 견적/발주 탭바 (데스크탑: 탭버튼 + 도구 한 줄) ── */
.so-tab-wrap{
  border-bottom:1px solid #E8EAED;
  display:flex;
  align-items:center;
  flex-wrap:nowrap;
}
.so-tab-btns{display:flex;align-items:center}
.so-tab-btn{
  padding:11px 18px;font-size:12px;font-weight:500;
  border:none;background:#fff;color:#5F6368;
  cursor:pointer;border-bottom:2px solid transparent;
  font-family:inherit;white-space:nowrap;
}
.so-tab-btn:hover{background:#F8F9FA;color:#4A86C8}
.so-tab-active{color:#4A86C8!important;border-bottom-color:#4A86C8!important;font-weight:700!important}
/* 도구(학교선택+검색)를 완료 버튼 옆(우측)으로 */
.so-tab-tools{display:flex;align-items:center;padding:6px 12px;gap:7px;margin-left:auto}