@charset "UTF-8";
/*
    모바일 반응형 (LGOPS 전체)

    이 파일 하나에 모바일 규칙을 모은다. 화면별 CSS 를 각각 고치면
    "폰에서 왜 이렇게 보이지" 를 여섯 군데서 찾아다녀야 한다.
    header.jsp 에서 **맨 마지막에** 읽어 다른 파일을 이기게 한다.

    기준 폭
      1024px 이하  = 모바일 배치 (좌측 메뉴를 서랍으로, 2단을 1단으로, 표를 카드로)
      560px 이하   = 좁은 폰 보정

    바꾸는 것
      1) 앱 뼈대   : 260px 고정 사이드바 → 햄버거 + 서랍, 하단 탭바
      2) 페이지머리: 큰 배너 → 제목 한 줄
      3) 카드/2단  : 가로 나열 → 세로 쌓기
      4) 표        : 가로 스크롤 대신 한 건 = 한 카드 (td 앞에 항목명을 붙인다)
      5) 모달      : 전체화면 시트, 저장 버튼은 아래에 고정
      6) 달력      : 칸 안 막대를 색 띠로 줄이고, 날짜를 누르면 하단 시트
*/

/* ═══════════════════════════════════════════════════════════════
   0) 데스크톱에서는 안 보이는 조각들
   ═══════════════════════════════════════════════════════════════ */

.nav-toggle,
.nav-backdrop,
.mobile-tabs,
.oc-back,
.sc-sheet{ display: none; }


@media (max-width: 1024px){

/* ═══════════════════════════════════════════════════════════════
   1) 먼저 : 문서가 뷰포트보다 넓어지지 않게

   index.css 에 body{min-width:1280px} 가 박혀 있다. 데스크톱만 보던 때의
   가정이라, 폰에서도 문서가 1280px 로 벌어져 화면 전체가 가로 스크롤이 된다.
   (이것 하나 때문에 아래 배치가 전부 무의미해진다 — 제일 먼저 푼다)

   넘치는 조각이 하나라도 남으면 가로 스크롤이 되살아나므로,
   표처럼 '좁힐 수 없는' 것만 그 안에서 스크롤하게 두고 나머지는 잘라낸다.
   ═══════════════════════════════════════════════════════════════ */

html, body{
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
}
body{ height: auto; min-height: 100vh; }

/* grid · flex 칸은 기본 최소폭이 '내용 폭' 이라 긴 글이 칸을 밀어낸다.
   화면 조각들에 0 을 깔아 두면 그 안에서 줄바꿈 · 말줄임이 먹는다 */
.app > *,
.content > *,
.od-page > *, .oc-page > *, .sc-page > *, .mt-page > *,
.is-page > *, .ss-page > *, .ht-page > *{ min-width: 0; }

/*
   안쪽 SimpleBar 를 흐름 안으로 되돌린다.

   데스크톱은 영역마다 높이 상한을 주고 그 안에서 스크롤한다. 폰에서는 그 상한을
   풀어 화면이 통째로 스크롤하게 바꿨는데, SimpleBar 가 안쪽에 깔아 둔
   .simplebar-mask · .simplebar-offset 이 position:absolute 라
   바깥 높이가 auto 가 되는 순간 0 으로 접힌다 — 내용이 통째로 사라진다
   (고객사 체크리스트가 빈 칸으로 보이던 원인).

   그래서 폰에서는 그 구조를 static 으로 되돌려 평범한 흐름처럼 쌓이게 한다.
   화면 전체 스크롤러인 #content 자신은 건드리지 않는다 (자손만 고른다).
*/
.content [data-simplebar] .simplebar-wrapper{ height: auto; max-height: none; }
.content [data-simplebar] .simplebar-mask,
.content [data-simplebar] .simplebar-offset{
    position: static; overflow: visible;
}
.content [data-simplebar] .simplebar-content-wrapper{
    height: auto; max-height: none; overflow: visible;
}
.content [data-simplebar] .simplebar-track,
.content [data-simplebar] .simplebar-height-auto-observer-wrapper{ display: none; }

/* ═══════════════════════════════════════════════════════════════
   2) 앱 뼈대 — 사이드바를 서랍으로
   ═══════════════════════════════════════════════════════════════ */

.app{
    grid-template-columns: 1fr;
    grid-template-rows: 56px 1fr;
    grid-template-areas: "topbar" "content";
}

.topbar{
    height: 56px;
    grid-template-columns: auto 1fr auto;
    padding: 0 4px;
}
/* 로고는 가운데 절대배치라 햄버거와 겹친다. 폰에서는 흐름 안으로 돌린다 */
.topbar .brand__logo{
    position: static;
    transform: none;
    margin: 0 0 0 4px;
}
.topbar .brand__logo img{ height: 34px !important; }
/* '서비스 운영 감시' 까지 넣으면 사용자 이름이 밀린다 */
.topbar .brand__logo span{ display: none; }
.topbar__actions{ gap: 4px; }
.avatar__label{ max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 햄버거 */
.nav-toggle{
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; flex: 0 0 auto;
    border: 0; background: transparent; cursor: pointer;
}

/* 서랍 : 평소에는 화면 밖에 있다 */
.sidenav{
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 60;
    width: 288px; max-width: 86vw;
    transform: translateX(-100%);
    transition: transform .22s ease;
    overflow-y: auto;
}
body.nav-open .sidenav{ transform: translateX(0); }

.nav-backdrop{
    position: fixed; inset: 0; z-index: 55;
    background: rgba(9, 24, 46, .55);
    opacity: 0; pointer-events: none; transition: opacity .22s ease;
}
body.nav-open .nav-backdrop{ display: block; opacity: 1; pointer-events: auto; }
/* 서랍이 열린 동안 뒤가 따라 스크롤되지 않게 */
body.nav-open{ overflow: hidden; }

/* 본문 : 하단 탭바 높이만큼 자리를 비운다 */
.content{
    padding: 14px 12px;
    height: calc(100vh - 56px);
    padding-bottom: 74px;
}

/* 하단 탭바 */
.mobile-tabs{
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    height: 60px; background: #fff; border-top: 1px solid #e3e8f0;
}
.mobile-tabs a{
    flex: 1 1 0; min-width: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    text-decoration: none; color: #626f85; font-size: 11px; font-weight: 500;
}
.mobile-tabs a.is-on{ color: #0a529d; font-weight: 700; }

/* ═══════════════════════════════════════════════════════════════
   3) 페이지 머리 — 배너를 제목 한 줄로
   ═══════════════════════════════════════════════════════════════ */

.page-header{ margin-bottom: 14px; }
.page-header .breadcrumb{ display: none; }
.page-header .page-title{ font-size: 20px; }
/* 설명은 줄이 길어 두세 줄을 먹는다. 폰에서는 뺀다 */
.page-header .ph--desc{ display: none; }
.page-header .ph--stats{ flex-wrap: wrap; gap: 8px; }

/* ═══════════════════════════════════════════════════════════════
   4) 2단 · 카드 배치 — 세로로 쌓는다
   ═══════════════════════════════════════════════════════════════ */

.od-bottom{ grid-template-columns: 1fr; gap: 12px; }
.od-panel__body{ max-height: none; }
.od-cards{ gap: 8px; }
.od-card{ width: 100% !important; }
.od-tabs{ flex-wrap: wrap; }
.od-tabs__right{ width: 100%; margin-left: 0; justify-content: flex-end; }

/* 도구줄 ─────────────────────────────────────────────────────────
   index.css 의 .btn 은 width:90px 고정에 flex 안에서 줄어들기까지 한다.
   폰처럼 좁은 데서는 '새로 고침' · '+ 이슈 등록' 이 세로로 깨진다.
   줄어들지 못하게 막고, 자리가 없으면 다음 줄로 넘긴다. */

.cfg-tool,
.sc-tool{ flex-direction: column; align-items: stretch; }
.cfg-tool__left, .cfg-tool__right,
.sc-tool__left, .sc-tool__right{ width: 100%; flex-wrap: wrap; }

/* 도구줄 안에서 묶음으로 쓰이는 span 도 같이 접히게 한다
   (업무일정의 '목록일 때만' 묶음이 통째로 삐져나가던 것) */
.sc-tool__left > span,
.sc-tool__right > span,
.cfg-tool__left > span,
.cfg-tool__right > span{ display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }

/* 검색칸은 한 줄을 다 쓴다 */
.sc-tool .sc-search,
.cfg-tool .search-box,
.is-search{ width: 100% !important; flex: 1 1 100%; }

/* 선택칸은 나눠 갖되 화면을 넘지 않게 */
.sc-tool .form-control,
.cfg-tool .form-control{ flex: 1 1 140px; width: auto; min-width: 0; max-width: 100%; }

/* 버튼 : 고정폭을 풀고 글자가 세로로 깨지지 않게 */
.cfg-tool .btn,
.sc-tool .btn{
    flex: 0 0 auto;
    width: auto; min-width: 0; padding: 0 14px;
    height: 40px; font-size: 14px; white-space: nowrap;
}
.sc-tool .sc-ym{ flex: 1 1 auto; }

/* ═══════════════════════════════════════════════════════════════
   5) 표 → 카드
      머리글을 숨기고 칸마다 항목명을 앞에 붙인다.
      항목명은 JS 가 td 에 넣어 준 data-label 을 쓴다.
   ═══════════════════════════════════════════════════════════════ */

.cfg-table-scroll{ max-height: none; overflow: visible; }

.cfg-table{ display: block; }
.cfg-table thead{ display: none; }
.cfg-table tbody{ display: block; }

.cfg-table tbody tr{
    display: block;
    margin-bottom: 8px; padding: 10px 12px;
    border: 1px solid #e3e8f0; border-radius: 10px; background: #fff;
}
.cfg-table tbody tr td{
    display: flex; align-items: flex-start; gap: 10px;
    padding: 5px 0; border: 0; width: auto !important;
    font-size: 13px; text-align: left;
}
.cfg-table tbody tr td::before{
    content: attr(data-label);
    flex: 0 0 84px;
    color: #626f85; font-size: 12px; font-weight: 600;
}
/* 항목명이 없는 칸(관리 버튼 · 안내문)은 통째로 쓴다 */
.cfg-table tbody tr td:not([data-label])::before{ content: none; }
.cfg-table tbody tr td.cfg-empty{ display: block; text-align: center; }
.cfg-table tbody tr td.cfg-empty::before{ content: none; }

/* 관리 버튼은 카드 아래에 가로로 */
.cfg-table tbody tr td.cfg-act{
    margin-top: 6px; padding-top: 8px; border-top: 1px solid #f2f5f9;
    justify-content: flex-end;
}
.cfg-table tbody tr td.cfg-act .btn{ height: 38px; }

/* 카드로 안 바뀌는 표(이슈 · 자료공유)는 min-width 1180px 가 박혀 있다.
   화면 전체를 끌지 않게, 그 표만 자기 칸 안에서 가로로 움직이게 둔다 */
.is-table, .ss-table{ min-width: 0; table-layout: auto; }
.is-scroll, .ss-scroll, .cfg-table-scroll{ max-width: 100%; }

/* 내업무 담당 사이트 : [이름 | 지표] 두 칸인데 1fr 의 최소폭이 '내용 폭' 이라
   지표 줄이 길면 칸을 밀어낸다. 0 을 깔아 줄바꿈 · 말줄임이 먹게 한다 */
.mt-sitebody{ grid-template-columns: 1fr; }
.mt-site{ grid-template-columns: auto minmax(0, 1fr); }
.mt-line{ grid-template-columns: minmax(0, 1fr) auto auto; }
.mt-label{ min-width: 0; }
.mt-row{ flex-wrap: wrap; }

/* 이력 화면의 고정 폭 칸들 */
.ht-dnm{ min-width: 0; }
.ht-tool #htMgr, .ht-tool #htFrom, .ht-tool #htTo{ width: auto; min-width: 120px; }

/* ═══════════════════════════════════════════════════════════════
   6) 모달 → 전체화면 시트
   ═══════════════════════════════════════════════════════════════ */

.modal .modal__box{
    width: 100% !important; max-width: 100% !important;
    max-height: 100%; height: 100%;
    margin: 0; border-radius: 0;
}
.modal .modal__body{ flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.modal .modal__card{ padding: 14px 16px; }
.modal .modal__foot{
    position: sticky; bottom: 0;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: #fff; border-top: 1px solid #e3e8f0;
    display: flex; gap: 8px;
}
.modal .modal__foot .btn{ flex: 1 1 0; height: 50px; font-size: 15px; }
/* 삭제는 저장보다 좁게 — 잘못 누르면 되돌릴 수 없다 */
.modal .modal__foot .btn.danger{ flex: 0 0 96px; }

/* 입력칸은 손가락에 맞춘 높이로 */
.cfg-f .form-control,
.oc-f .form-control{ height: 46px; font-size: 15px; }
.sc-row2, .sc-row4, .is-row2{ grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ═══════════════════════════════════════════════════════════════
   7) 달력
   ═══════════════════════════════════════════════════════════════ */

.sc-grid{ grid-template-rows: none !important; grid-auto-rows: 74px; }
.sc-cell{ min-height: 0; padding: 4px 2px; }
.sc-day{ padding: 1px 2px 3px; text-align: center; }
.sc-evs{ align-items: center; gap: 2px; }

/* 칸 너비가 50px 남짓이라 '이름 + 종류' 막대는 못 들어간다.
   색 띠 하나로 줄이고, 자세한 건 날짜를 눌러 아래 시트에서 본다 */
.sc-ev{
    width: 34px; height: 5px; padding: 0; border-radius: 3px;
    font-size: 0; overflow: hidden;
    margin: 0 !important;
}
.sc-ev.is-start, .sc-ev.is-mid, .sc-ev.is-end{ border-radius: 3px; }
/* 글자를 지운 띠 안에 흰 알약만 남으면 색 띠가 끊겨 보인다 */
.sc-ev i, .sc-ev u{ display: none; }
/* 이름은 칸마다 한 명까지만 (JS 가 .sc-who 로 따로 넣는다) */
.sc-who{
    display: block; max-width: 100%;
    font-size: 10px; color: #41506a; line-height: 1.3;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.sc-legend{ font-size: 11px; }
.sc-hint{ font-size: 11.5px; }

/* 날짜를 누르면 열리는 하단 시트 */
.sc-sheet{
    display: block;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    transform: translateY(100%); transition: transform .22s ease;
    background: #fff; border-radius: 18px 18px 0 0;
    box-shadow: 0 -6px 24px rgba(9,24,46,.18);
    max-height: 72vh; display: flex; flex-direction: column;
}
.sc-sheet.is-open{ transform: translateY(0); }
.sc-sheet__dim{
    position: fixed; inset: 0; z-index: 65;
    background: rgba(9,24,46,.42); opacity: 0; pointer-events: none;
    transition: opacity .22s ease;
}
.sc-sheet__dim.is-open{ opacity: 1; pointer-events: auto; }
.sc-sheet__grip{ padding: 10px 0 0; display: flex; justify-content: center; }
.sc-sheet__grip i{ width: 40px; height: 4px; border-radius: 2px; background: #d7dee8; display: block; }
.sc-sheet__head{
    display: flex; align-items: center; gap: 8px;
    padding: 12px 18px 10px; border-bottom: 1px solid #eef1f6;
}
.sc-sheet__head h3{ margin: 0; font-size: 17px; font-weight: 700; color: #16233a; }
.sc-sheet__close{
    margin-left: auto; margin-right: -10px; width: 44px; height: 44px;
    border: 0; background: transparent; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.sc-sheet__body{
    flex: 1 1 auto; min-height: 0; overflow-y: auto;
    padding: 12px 18px; display: flex; flex-direction: column; gap: 8px;
}
.sc-sheet__foot{
    padding: 10px 18px calc(14px + env(safe-area-inset-bottom));
    border-top: 1px solid #eef1f6;
}
.sc-sheet__foot .btn{ width: 100%; height: 50px; font-size: 15px; }

/* 시트 안의 일정 한 줄 */
.sc-sitem{
    display: flex; align-items: center; gap: 10px;
    padding: 12px; border: 1px solid #eef1f6; border-left-width: 4px;
    border-radius: 10px; background: #fff; cursor: pointer; text-align: left;
    font-family: inherit; width: 100%;
}
.sc-sitem b{ font-size: 15px; color: #16233a; }
.sc-sitem__sub{ margin-top: 4px; font-size: 12px; color: #626f85; }

/* 등록 버튼(+)은 탭바 위에 띄운다 */
.sc-fab{
    position: fixed; right: 16px; bottom: 76px; z-index: 45;
    width: 56px; height: 56px; border-radius: 28px; border: 0;
    background: #047bb6; box-shadow: 0 4px 12px rgba(4,73,120,.35);
    display: flex; align-items: center; justify-content: center; cursor: pointer;
}

/* ═══════════════════════════════════════════════════════════════
   8) 고객사대시보드 — 좌우 2단을 드릴다운으로
   ═══════════════════════════════════════════════════════════════ */

.oc-mid{
    grid-template-columns: 1fr;
    height: auto; min-height: 0;
}
.oc-col{ min-height: 0; }
.oc-list-scroll,
.oc-chk-scroll{ flex: 0 0 auto; max-height: none; overflow: visible; }
.oc-list-scroll > .simplebar-wrapper,
.oc-chk-scroll > .simplebar-wrapper{ height: auto; }

/* 평소에는 목록만, 고객사를 고르면 체크리스트만 */
.oc-page .oc-col--chk{ display: none; }
.oc-page.is-detail .oc-col--cust{ display: none; }
.oc-page.is-detail .oc-col--chk{ display: flex; }

/* 체크리스트 머리에 뒤로가기 */
.oc-back{
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; margin-left: -8px;
    border: 0; background: transparent; cursor: pointer; flex: 0 0 auto;
}
.oc-col__head{ flex-wrap: wrap; }

/* 체크 한 줄 : 체크박스 + 항목명 + 날짜.
   좁은 폭에서는 항목명이 여러 줄로 풀리고 날짜는 아래로 내려간다 */
.oc-chk-row{ flex-wrap: wrap; align-items: flex-start; }
.oc-chk-label{ flex: 1 1 100%; min-width: 0; align-items: flex-start; }
.oc-chk-label > span{
    white-space: normal; overflow: visible; text-overflow: clip;
    line-height: 1.5; word-break: keep-all;
}
.oc-chk-date{ flex: 1 1 100%; width: 100% !important; margin-top: 6px; }

}

/* ═══════════════════════════════════════════════════════════════
   좁은 폰 보정
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 560px){
    .sc-row2, .sc-row4, .is-row2{ grid-template-columns: 1fr; }
    .cfg-table tbody tr td::before{ flex-basis: 72px; }
    .sc-ev{ width: 26px; }
    .modal .modal__foot .btn.danger{ flex: 0 0 80px; }
}
