@charset "UTF-8";
/*
    설정 화면 공통 (/config/*)

    담당자 · 서버 · 서비스 · SSL · 체크리스트 다섯 화면이 같은 모양을 쓴다.
    HTML 은 js/main/OPS_CRUD.js 가 만들고, 여기서 그 모양을 잡는다.
      .cfg-tool   상단 : 총건수 · 검색 · 새로고침 · 추가
      .cfg-table  목록 표 (머리글 고정, 안쪽 스크롤)
      .cfg-modal  등록/수정 모달 (입력 한 칸 = .cfg-f)
*/

.cfg-page{
    background:#fff; border:1px solid #e3e8f0; border-radius:10px; padding:16px 18px;
}

/* ── 상단 도구줄 ────────────────────────────────────────── */

.cfg-tool{
    display:flex; align-items:center; justify-content:space-between;
    gap:12px; margin-bottom:12px;
}
.cfg-tool__left,
.cfg-tool__right{ display:flex; align-items:center; gap:8px; }

.cfg-total{ font-size:14px; color:#41506a; }
.cfg-total b{ color:#0a529d; font-weight:700; }

.cfg-tool .search-box{
    display:flex; align-items:center; width:260px; height:36px;
    border:1px solid #d8dee8; border-radius:6px; background:#fff; overflow:hidden;
}
.cfg-tool .search-box input{
    flex:1 1 auto; min-width:0; height:100%; border:none; padding:0 12px; font-size:14px;
}
.cfg-tool .search-box input:focus{ outline:none; }

/* ── 목록 표 ────────────────────────────────────────────── */

.cfg-table-scroll{
    max-height:calc(100vh - 330px);
    min-height:240px;
    overflow:auto;
}

.cfg-table{
    width:100%; border-collapse:separate; border-spacing:0;
    table-layout:fixed; font-size:13px;
}
.cfg-table th,
.cfg-table td{
    padding:9px 10px; border-bottom:1px solid #eef1f6;
    text-align:left; vertical-align:middle;
    overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.cfg-table thead th{
    position:sticky; top:0; z-index:1;
    background:#f4f7fb; border-bottom:1px solid #dfe5ee;
    font-size:13px; font-weight:700; color:#41506a;
}
.cfg-table tbody tr:hover{ background:#fafcff; }

.cfg-table td.cfg-empty{
    padding:40px 10px; text-align:center; color:#8a94a6; white-space:normal;
}

.cfg-act{ text-align:right !important; }
.cfg-act .btn{ margin-left:4px; }

.cfg-muted{ color:#a9b2c1; }
.cfg-err{ color:#c9313d; }
.cfg-url{ color:#41506a; }

/* 작은 버튼 (표 안에서 쓴다. index.css 의 .btn.small 보다 한 단 더 작다) */
.btn.tiny{
    width:auto; min-width:48px; height:28px; padding:0 10px;
    font-size:12px; border-radius:4px;
    border:1px solid #d8dee8; background:#fff; color:#41506a;
}
.btn.tiny.danger{ border-color:#e3b6ba; background:#fff; color:#c9313d; }
.btn.tiny:hover{ box-shadow:0 1px 3px rgba(0,0,0,.12); }

/* ── 상태 배지 ──────────────────────────────────────────── */

.cfg-st{
    display:inline-block; padding:2px 9px; border-radius:11px;
    font-size:12px; font-weight:700; white-space:nowrap;
}
.cfg-st.is-on{    background:#eaf6ee; color:#1f7a45; }
.cfg-st.is-off{   background:#fdecee; color:#c9313d; }
.cfg-st.is-wait{  background:#f1f3f7; color:#77839a; }
.cfg-st.is-warn{  background:#fdf1dc; color:#a3670a; }
.cfg-st.is-ai{    background:#e8f1ff; color:#1359c0; }
.cfg-st.is-route{ background:#fff3e0; color:#b06a00; }

/* ── 등록 · 수정 모달 ───────────────────────────────────── */

.cfg-modal .modal__dim{ position:absolute; inset:0; background:rgba(16,32,56,.45); }
.cfg-modal .modal__box{
    position:relative; width:min(560px, calc(100% - 32px)); max-height:92vh;
    margin:4vh auto; display:flex; flex-direction:column;
    background:#fff; border-radius:10px; overflow:hidden;
}
.cfg-modal .modal__body{ overflow-y:auto; }
.cfg-modal .modal__card{ padding:18px 22px; }

.cfg-f{ margin-bottom:12px; }
.cfg-f > span{
    display:block; margin-bottom:5px;
    font-size:13px; font-weight:600; color:#41506a;
}
.cfg-f > span em{ color:#d93a45; font-style:normal; }
.cfg-f .form-control{ width:100%; height:40px; }
.cfg-f select.form-control{ padding:0 10px; }
.cfg-ta{ height:68px; padding:8px 10px; resize:vertical; }

/* '+ 직접 입력' 을 골랐을 때 select 밑에 열리는 입력칸 */
.cfg-f .cfg-addnew{ margin-top:6px; border-color:#9dc0ee; background:#f8fbff; }
.cfg-f .cfg-addnew:focus{ border-color:#4a8de0; }

.cfg-hint{ margin:4px 0 0; font-size:12px; color:#8a94a6; line-height:1.55; }
.cfg-hint b{ color:#41506a; }

/* 다중 선택 (담당업무) */
.cfg-checks{
    display:flex; flex-direction:column; gap:6px;
    padding:10px; border:1px solid #e3e8f0; border-radius:6px; background:#fafbfd;
}
.cfg-checks__item{
    display:flex; align-items:center; gap:8px;
    padding:6px 8px; border:1px solid #e6eaf1; border-radius:6px;
    background:#fff; cursor:pointer; font-size:13px; color:#1b2b46;
}
.cfg-checks__item:has(input:checked){ border-color:#0a529d; background:#eef4fc; }
.cfg-checks__item input{ width:15px; height:15px; flex:0 0 auto; cursor:pointer; }
.cfg-checks__item i{
    margin-left:auto; font-style:normal; font-size:11px; color:#8a94a6;
}

/* ── 일일업무 배정 (type: tasks) ──────────────────────────
   한 줄 = [체크 + 업무명] [주기] [설명]
   .cfg-f .form-control 이 width:100% 라 주기 select 가 업무명을 덮었다.
   여기서 칸을 나눠 잡아 준다. */

.cfg-tasks{
    display:flex; flex-direction:column; gap:6px;
    padding:10px; border:1px solid #e3e8f0; border-radius:6px; background:#fafbfd;
}
.cfg-tasks__item{
    display:grid; grid-template-columns:1fr 96px; gap:8px; align-items:center;
    padding:6px 8px; border:1px solid #e6eaf1; border-radius:6px; background:#fff;
}
.cfg-tasks__item:has(.cfg-task-on:checked){ border-color:#0a529d; background:#eef4fc; }

.cfg-tasks__nm{
    display:flex; align-items:center; gap:8px; min-width:0;
    cursor:pointer; font-size:13px; color:#1b2b46;
}
.cfg-tasks__nm input{ width:15px; height:15px; flex:0 0 auto; cursor:pointer; }
.cfg-tasks__nm span{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* 주기 select 는 '매일/당일' 두 글자라 좁아도 된다 */
.cfg-tasks__item .cfg-task-cycle.form-control{
    width:96px; height:32px; padding:0 8px; font-size:12px;
}
.cfg-tasks__item .cfg-task-cycle:disabled{ background:#f4f6f9; color:#a9b2c1; }

/* 설명은 업무명 아래 줄에 (좁은 칸에 밀어 넣으면 둘 다 안 보인다) */
.cfg-tasks__item i{
    grid-column:1 / -1;
    font-style:normal; font-size:11px; color:#8a94a6;
    overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}

/* 새 업무 직접 추가 */
.cfg-tasks__add{
    display:grid; grid-template-columns:1fr auto; gap:6px;
    margin-top:2px; padding-top:8px; border-top:1px dashed #d8dee8;
}
.cfg-tasks__add .form-control{ height:32px; font-size:12px; }
.cfg-tasks__add .btn{ height:32px; white-space:nowrap; }

/* ── 한 화면에 목록 두 개 (설정 > 서비스유형 및 업무) ────── */

.bc-page{ display:flex; flex-direction:column; gap:18px; }

.bc-sec__head{
    display:flex; align-items:baseline; gap:10px; margin:0 2px 8px;
}
.bc-sec__head h2{ font-size:16px; font-weight:700; color:#243247; margin:0; }
.bc-sec__head i{ font-style:normal; font-size:12px; color:#8a94a6; }

/* 두 목록을 한 화면에 담으므로 표 하나가 화면을 다 먹지 않게 낮춘다 */
.bc-page .cfg-table-scroll{ max-height:340px; min-height:0; }

@media (max-width: 1100px){
    .cfg-tool{ flex-wrap:wrap; }
    .cfg-tool .search-box{ width:200px; }
    .bc-sec__head{ flex-direction:column; gap:2px; }
}
