/*
 * cm-client-web 콘솔 스타일
 * msghub 사용자 콘솔(cm-web-front)의 레이아웃·디자인 토큰을 따른다:
 *   header(#headerTop) → .contentWrap[ nav#sidebar + section#content > article + footer ]
 * Bootstrap(webjars)은 그리드·폼·드롭다운 정도로만 쓴다. 외부 CDN·폰트·이미지 미사용.
 */
:root {
    --c-primary: #FD004E;
    --c-primary-soft: #FFF2F6;
    --c-header: #090D19;
    --c-bg: #eee;
    --c-text: #000;
    --c-text-sub: #707070;
    --c-line: #E5E5E5;
    --c-line-strong: #B2B2B2;
    --c-line-table: #ddd;
    --c-box: #F1F1F1;
    --c-gray: #A5A5A5;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    background: var(--c-bg);
    color: var(--c-text);
    font-family: "Malgun Gothic", "맑은 고딕", "Apple SD Gothic Neo", sans-serif;
    font-size: 14px;
    letter-spacing: -0.3px;
}
/* 폼 요소 글꼴을 본문과 통일한다.
   - Bootstrap .form-control/.form-select 는 font-size: 1rem(=16px, html 루트 기준)이라 본문 14px 보다 크다
   - 브라우저 기본 스타일은 입력 요소의 letter-spacing 을 normal 로 되돌려 본문(-0.3px)과 글꼴이 달라 보인다
   - 글꼴 계열(font-family)은 Bootstrap reboot 가 inherit 로 두지만, 순서 의존을 없애려고 여기서도 명시한다
   높이는 Bootstrap 패딩(.375rem)·line-height(1.5) 그대로 두어 14px 기준 약 35px(-sm 약 29px). 검색 박스는 아래 .menuBox 에서 40px 고정 */
input, select, textarea, button, optgroup { font-family: inherit; letter-spacing: inherit; }
.form-control, .form-select { font-size: 14px; }
.form-control-sm, .form-select-sm { font-size: 13px; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }

/* ---------------------------------------------------------------- header */
#headerTop {
    height: 64px;
    padding: 0 30px;
    background: var(--c-header);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
#headerTop h1 { font-size: 18px; font-weight: 700; margin: 0; display: flex; align-items: baseline; gap: 10px; }
#headerTop h1 a { color: #fff; }
#headerTop h1 .consoleName { font-size: 13px; font-weight: 400; color: #bbb; }
#headerTop .adminUtil { display: flex; align-items: center; gap: 10px; }
#headerTop .adminUtil .dropdown-toggle { color: #fff; background: none; border: none; font-size: 14px; font-weight: 500; }
.userDrop { border-radius: 0; padding: 5px 20px; min-width: 160px; }
.userDrop > li { border-bottom: 1px solid #D5D5D5; }
.userDrop > li:last-child { border-bottom: none; }
.userDrop > li > a, .userDrop > li > form > button {
    display: block; width: 100%; text-align: left; padding: 12px 0; font-size: 13px; color: #333;
    background: none; border: none;
}
.userDrop > li > a:hover, .userDrop > li > form > button:hover { color: var(--c-primary); }

/* ---------------------------------------------------------------- 본문 레이아웃 */
.contentWrap {
    display: flex;
    align-items: flex-start;
    padding: 25px;
    min-height: calc(100vh - 64px);
    background: var(--c-bg);
}

/* LNB */
#sidebar { width: 230px; flex-shrink: 0; }
#sidebar > ul { background: #fff; border-radius: 15px; overflow: hidden; }
#sidebar > ul > li { border-bottom: 1px solid var(--c-line); }
#sidebar > ul > li:last-child { border-bottom: none; }
#sidebar > ul > li > a {
    display: block; padding: 18px 20px; font-size: 16px; font-weight: 500; color: var(--c-text-sub); transition: 0.3s;
}
#sidebar > ul > li > a:hover { color: #000; }
#sidebar > ul > li.active > a { background: var(--c-primary); color: #fff; }
#sidebar .depth2Lnb { display: none; }
#sidebar > ul > li.active .depth2Lnb { display: block; }
#sidebar .depth2Lnb > ul { background: var(--c-primary-soft); padding: 10px 10px 10px 45px; }
#sidebar .depth2Lnb > ul > li > a { display: block; font-size: 14px; color: var(--c-text-sub); padding: 4px 0; transition: 0.3s; }
#sidebar .depth2Lnb > ul > li.active > a,
#sidebar .depth2Lnb > ul > li > a:hover { color: var(--c-primary); font-weight: 700; }

/* 콘텐츠 카드 */
#content {
    flex: 1;
    min-width: 0;
    margin-left: 30px;
    padding: 20px 50px 100px 50px;
    background: #fff;
    border-radius: 15px;
    position: relative;
}
#content > article { margin: 0 auto; }
.contentHeader { padding: 15px 0; border-bottom: 1px solid var(--c-line-strong); margin-bottom: 30px; }
.contentHeader h2 { font-size: 26px; font-weight: 700; color: #000; margin: 0; }
.contentHeader .sub { font-size: 14px; color: var(--c-text-sub); margin-left: 10px; font-weight: 400; }
.sectionTitle { font-size: 18px; font-weight: 700; margin: 30px 0 12px; }
.lc-1 { line-height: 1.6; }
.color3 { color: var(--c-text-sub); }
.colorRed { color: var(--c-primary); }
.bgColorGray { background: var(--c-box); }

footer.consoleFooter {
    margin-top: 60px; padding-top: 15px; border-top: 1px solid var(--c-line);
    font-size: 12px; color: #999; text-align: center;
}

/* 검색조건 박스 */
.menuBox { background: var(--c-box); padding: 15px 30px; margin-bottom: 20px; }
.menuBox .form-control, .menuBox .form-select { height: 40px; border-radius: 4px; }
.menuBox label { font-size: 14px; color: #333; margin-right: 6px; }

/* ---------------------------------------------------------------- 버튼 */
.btnStyle1, .btnStyle2 {
    display: inline-flex; align-items: center; justify-content: center;
    height: 40px; padding: 0 18px; border-radius: 4px; font-size: 14px; font-weight: 500;
    border: 1px solid var(--c-primary); color: var(--c-primary); background: #fff;
    cursor: pointer; transition: 0.2s; white-space: nowrap;
}
.btnStyle1:hover, .btnStyle2:hover { background: var(--c-primary); color: #fff; }
.btnStyle1.small, .btnStyle2.small { height: 30px; padding: 0 12px; font-size: 13px; }
.btnStyle2 { min-width: 100px; }
.backRed { background: var(--c-primary); color: #fff; }
.backRed:hover { background: #fff; color: var(--c-primary); }
.backBlack { background: #222; border-color: #222; color: #fff; }
.backBlack:hover { background: #fff; color: #222; }
.backWhite { background: #fff; border-color: #222; color: #222; }
.backWhite:hover { background: #222; color: #fff; }
.backGray { background: var(--c-gray); border-color: var(--c-gray); color: #fff; }
.backGray:hover { background: #fff; color: var(--c-gray); }
.borderLightGray { border-color: #ccc; color: #555; background: #fff; }
.borderLightGray:hover { border-color: #555; background: #555; color: #fff; }
.btnStyle1[disabled], .btnStyle2[disabled] { opacity: 0.45; pointer-events: none; }
.btnGroup { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------------------------------------------------------------- 탭 */
.tab_s6 { display: flex; border-bottom: 1px solid #222; margin-bottom: 25px; }
.tab_s6 > li > a, .tab_s6 > li > button {
    display: block; min-width: 120px; padding: 12px 20px; text-align: center; font-size: 15px;
    color: var(--c-text-sub); background: #f7f7f7; border: 1px solid var(--c-line); border-bottom: none; margin-right: -1px;
    cursor: pointer;
}
.tab_s6 > li.active > a, .tab_s6 > li.active > button { background: #222; color: #fff; border-color: #222; font-weight: 700; }

/* ---------------------------------------------------------------- 폼 표 */
.formTable { width: 100%; border-top: 1px solid #222; border-collapse: collapse; margin-bottom: 20px; }
.formTable th {
    width: 180px; background: var(--c-box); padding: 14px 20px; text-align: left; font-weight: 500;
    border-bottom: 1px solid var(--c-line-table); vertical-align: top;
}
.formTable td { padding: 10px 20px; border-bottom: 1px solid var(--c-line-table); }
.formTable .form-control, .formTable .form-select { border-radius: 4px; }
.formTable .help { font-size: 12px; color: var(--c-text-sub); margin-top: 6px; }

/* ---------------------------------------------------------------- 목록 표 */
.tableScroll { width: 100%; overflow-x: auto; }
.table_skin1 { width: 100%; border-collapse: collapse; border-top: 1px solid #222; text-align: center; background: #fff; }
.table_skin1 th {
    background: var(--c-box); font-weight: 500; font-size: 14px; color: #000; padding: 12px 10px;
    border-bottom: 1px solid var(--c-line-table); white-space: nowrap;
}
.table_skin1 td { font-size: 14px; color: var(--c-text-sub); padding: 11px 10px; border-bottom: 1px solid var(--c-line-table); white-space: nowrap; }
.table_skin1 tbody tr:hover td { background: #fafafa; }
.table_skin1 td.left { text-align: left; }
.table_skin1 td.right, .table_skin1 th.right { text-align: right; }
.table_skin1 a { color: #000; text-decoration: underline; }
.table_skin1 .empty { color: #999; padding: 40px 0; }

/* 상태 배지 */
.stat { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px; background: #eee; color: #555; }
.stat-SUCCESS { background: #e6f6ec; color: #137a3a; }
.stat-FAILED, .stat-REJECTED { background: #fde8ee; color: var(--c-primary); }
.stat-UNKNOWN { background: #fff4d6; color: #8a6100; }
.stat-ACCEPTED, .stat-SENDING { background: #e8effd; color: #2856b6; }
.stat-CANCELED { background: #f1f1f1; color: #999; }

/* 요약 카드 */
.summaryBox { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 25px; }
.summaryBox > div { flex: 1 1 120px; border: 1px solid var(--c-line); border-radius: 8px; padding: 14px 18px; }
.summaryBox .label { font-size: 13px; color: var(--c-text-sub); }
.summaryBox .num { font-size: 24px; font-weight: 700; margin-top: 4px; }
.summaryBox .num.red { color: var(--c-primary); }
.summaryBox .num.green { color: #137a3a; }
.summaryBox .num.yellow { color: #8a6100; }

/* 알림 */
.noticeBox { padding: 12px 18px; border-radius: 4px; margin-bottom: 20px; font-size: 14px; }
.noticeBox.ok { background: #e6f6ec; color: #137a3a; }
.noticeBox.err { background: #fde8ee; color: var(--c-primary); }
.noticeBox.warn { background: #fff4d6; color: #8a6100; }
.noticeBox ul { padding-left: 18px; list-style: disc; }

/* 페이징 */
.paging { display: flex; justify-content: center; gap: 6px; margin-top: 25px; }
.paging a, .paging span { min-width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid #ddd; padding: 0 10px; font-size: 13px; color: #555; }
.paging span.current { background: #222; color: #fff; border-color: #222; }
.paging .disabled { color: #ccc; pointer-events: none; }

pre.msgPreview { white-space: pre-wrap; word-break: break-all; font-family: inherit; margin: 0; background: #fafafa;
    border: 1px solid var(--c-line); padding: 12px; border-radius: 4px; }
.byteInfo { font-size: 12px; color: var(--c-text-sub); }
.byteInfo.over { color: var(--c-primary); font-weight: 700; }

/* ---------------------------------------------------------------- 로그인 (중앙 카드형) */
body.loginPage { background: var(--c-header); }
.loginWrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; }
.loginBox { width: 420px; max-width: 100%; background: #fff; border-radius: 15px; padding: 45px 40px 40px; }
.loginBox h1 { font-size: 24px; font-weight: 700; margin: 0 0 6px; text-align: center; }
.loginBox .loginSub { text-align: center; color: var(--c-text-sub); margin-bottom: 30px; }
/* 로그인 화면은 입력창 48px·버튼 16px 의 큰 구성이 의도된 것이라 입력 글자도 기존 크기(16px)를 유지한다 */
.loginBox .form-control { height: 48px; border-radius: 4px; margin-bottom: 12px; font-size: 16px; }
.loginBox .btnStyle1 { width: 100%; height: 50px; font-size: 16px; }
.loginWrap footer { color: #888; font-size: 12px; margin-top: 25px; }

/* ---------------------------------------------------------------- 알림톡 말풍선 미리보기 (명세 R16)
 * 외부 이미지·폰트 미사용: 로고는 CSS 도형. 줄바꿈은 pre-wrap(<br> 삽입 안 함 — R23). */
.kkoPreviewPane { background: #b2c7d9; border-radius: 8px; padding: 16px; min-height: 200px; }
.kkoChatList { display: flex; gap: 8px; align-items: center; background: #fff; border-radius: 6px; padding: 8px 10px;
    margin-bottom: 12px; font-size: 12px; }
.kkoChatList .kkoChatName { font-weight: 700; white-space: nowrap; }
.kkoChatList .kkoChatMsg { color: #555; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kkoBubble { background: #fff; border-radius: 10px; max-width: 300px; overflow: hidden; font-size: 13px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .1); }
.kkoHead { background: #fee500; padding: 8px 12px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.kkoLogo { width: 16px; height: 14px; background: #3c1e1e; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; display: inline-block; }
.kkoImage img { display: block; width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }
.kkoImgPlaceholder { aspect-ratio: 2 / 1; background: #ccc; color: #555; display: flex; align-items: center;
    justify-content: center; font-size: 12px; word-break: break-all; padding: 8px; text-align: center; }
.kkoEmph { padding: 10px 12px 0; border-bottom: 1px solid #eee; }
.kkoSub { color: #888; font-size: 12px; white-space: pre-wrap; word-break: break-all; }
.kkoTitle { font-size: 18px; font-weight: 700; padding-bottom: 8px; white-space: pre-wrap; word-break: break-all; }
.kkoItem { padding: 10px 12px; color: #8a6100; background: #fff4d6; font-size: 12px; }
.kkoBody { padding: 12px; white-space: pre-wrap; word-break: break-all; line-height: 1.5; }
.kkoExtra { padding: 0 12px 12px; color: #888; font-size: 12px; white-space: pre-wrap; word-break: break-all; }
.kkoAd { padding: 0 12px 12px; color: #888; font-size: 12px; white-space: pre-wrap; }
.kkoBtns { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.kkoBtn { background: #f2f2f2; border-radius: 4px; padding: 7px 8px; text-align: center; }
.kkoBtnName { display: block; font-weight: 700; }
.kkoBtnLink { display: block; font-size: 11px; color: #777; word-break: break-all; text-align: left; }
.kkoVar { color: #1a5fb4; background: #e8f0fb; border-radius: 2px; }
.kkoVarFilled { color: inherit; }
.kkoVarMissing { color: var(--c-primary); background: var(--c-primary-soft); border-radius: 2px; font-weight: 700; }
.kkoEmpty { color: #fff; font-size: 13px; }
.kkoFallback { background: #fff; border-radius: 10px; max-width: 300px; padding: 10px 12px; font-size: 13px; }
.kkoFbHead { font-weight: 700; color: #555; margin-bottom: 6px; }
.kkoFbTitle { font-weight: 700; margin-bottom: 4px; white-space: pre-wrap; word-break: break-all; }
.kkoFbBody { white-space: pre-wrap; word-break: break-all; }
.kkoStat-A { color: #137a3a; font-weight: 700; }
.kkoStat-S { color: var(--c-primary); font-weight: 700; }
.fieldErr { color: var(--c-primary); font-size: 12px; margin-top: 4px; }
.kkoButtonRow { border: 1px solid var(--c-line); border-radius: 4px; padding: 8px; margin-bottom: 8px; background: #fafafa; }
.preWrap { white-space: pre-wrap; word-break: break-all; }

/* 결과 화면 대체발송 표시(명세 R19) */
.fbInfo { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 3px; background: #fff4e5; color: #b35c00; font-size: 12px; }
.kkoVarLabel { min-width: 120px; font-size: 13px; color: #555; }
