@font-face { font-family: "NanumGothic"; src: url("/font/NanumGothic.ttf") format("truetype"); font-weight: 400; }
@font-face { font-family: "NanumGothic"; src: url("/font/NanumGothicBold.ttf") format("truetype"); font-weight: 700; }
/* V0.8 Pretendard (SIL OFL, static/fonts/Pretendard-OFL.txt) — 제목·숫자·버튼·메뉴용. 본문은 나눔고딕 */
@font-face { font-family: "Pretendard"; src: url("/static/fonts/Pretendard-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Pretendard"; src: url("/static/fonts/Pretendard-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Pretendard"; src: url("/static/fonts/Pretendard-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Pretendard"; src: url("/static/fonts/Pretendard-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #f5f6f8; --card: #ffffff; --line: #e4e6eb; --ink: #16181d; --ink2: #5b6070; --ink3: #8a8f9c;
  --blue: #2a64f6; --blue-weak: #eaf0ff; --blue-ink: #1f4fd1;
  --ok: #1f8f47; --ok-weak: #e7f6ec; --warn: #b7791f; --warn-weak: #fdf3e1; --bad: #c62f2f; --bad-weak: #fdeaea;
  --gray-weak: #f0f1f4; --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: "NanumGothic", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif; background: var(--bg);
       color: var(--ink); font-size: 14px; line-height: 1.55; }
a { color: var(--blue-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 17px; margin: 0 0 12px; }
h3 { font-size: 15px; margin: 0 0 8px; }
.muted { color: var(--ink2); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }

/* 틀 */
.layout { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side { background: #fff; border-right: 1px solid var(--line); padding: 18px 12px; position: sticky; top: 0; height: 100vh; }
.logo { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.logo-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--blue); color: #fff; display: grid;
             place-items: center; font-weight: 700; font-size: 15px; }
.logo-name { font-weight: 700; font-size: 15px; line-height: 1.2; }
.logo-ver { font-size: 11px; color: var(--ink3); }
.menu-title { font-size: 11.5px; color: var(--ink3); padding: 14px 10px 6px; }
.menu a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; color: var(--ink);
          font-size: 14px; }
.menu a:hover { background: var(--gray-weak); text-decoration: none; }
.menu a.on { background: var(--blue-weak); color: var(--blue-ink); font-weight: 700; }
.menu .ico { width: 20px; text-align: center; }
.badge-n { margin-left: auto; background: var(--bad); color: #fff; border-radius: 10px; font-size: 11px; padding: 0 7px; }

.main { min-width: 0; }
.top { height: 58px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center;
       padding: 0 24px; gap: 12px; position: sticky; top: 0; z-index: 5; }
.crumb { color: var(--ink2); font-size: 13.5px; }
.crumb b { color: var(--ink); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--blue); color: #fff; display: grid;
          place-items: center; font-weight: 700; }
.content { padding: 24px; max-width: 1280px; }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* 안내 띠 */
.banner { border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; display: flex; gap: 10px; align-items: center; }
.banner.warn { background: var(--warn-weak); color: #7a4e09; }
.banner.bad { background: var(--bad-weak); color: #8e1f1f; }
.banner.info { background: var(--blue-weak); color: var(--blue-ink); }
.banner.ok { background: var(--ok-weak); color: #145c2e; }
.banner .grow { flex: 1; }

/* 카드 */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.mt { margin-top: 16px; }
.mt2 { margin-top: 24px; }
@media (max-width: 1100px) { .g4, .g5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: 1fr; } }
@media (max-width: 800px) { .layout { grid-template-columns: 1fr; } .side { position: static; height: auto; } .g2 { grid-template-columns: 1fr; } }

.tile .label { color: var(--ink2); font-size: 12.5px; }
.tile .value { font-size: 24px; font-weight: 700; margin-top: 4px; letter-spacing: -0.3px; }
.tile .sub { color: var(--ink3); font-size: 12px; margin-top: 2px; }
.tag { display: inline-block; font-size: 11px; color: var(--ink2); background: var(--gray-weak); border-radius: 6px; padding: 0 6px; margin-left: 4px; }

/* 상태 배지 (색 + 글자 함께) */
.st { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st.ok { background: var(--ok-weak); color: var(--ok); }
.st.warn { background: var(--warn-weak); color: var(--warn); }
.st.bad { background: var(--bad-weak); color: var(--bad); }
.st.none { background: var(--gray-weak); color: var(--ink3); }

/* 버튼 (같은 줄 세로 가운데, 같은 높이) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px;
       border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit;
       font-size: 13.5px; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--gray-weak); text-decoration: none; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 700; }
.btn.primary:hover { background: var(--blue-ink); }
.btn.danger { color: var(--bad); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn.icon { width: 30px; padding: 0; height: 30px; border-radius: 50%; }
.btn-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* 입력 */
.field { display: grid; grid-template-columns: 180px 1fr; gap: 10px; align-items: center; margin-bottom: 10px; }
.field label { color: var(--ink2); font-size: 13px; }
.field .ctl { display: flex; gap: 8px; align-items: center; }
input[type=text], input[type=password], input[type=number], input[type=date], select, textarea {
  height: 36px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; font: inherit; font-size: 13.5px;
  width: 100%; background: #fff; color: var(--ink); }
textarea { height: auto; min-height: 60px; padding: 8px 10px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue-weak); border-color: var(--blue); }
input[type=file] { font: inherit; font-size: 13px; }
.file-box { flex: 1; display: flex; gap: 12px; align-items: center; min-width: 0; }
.file-note { overflow: hidden; text-overflow: ellipsis; }
.check { display: inline-flex; gap: 5px; align-items: center; color: var(--ink2); font-size: 12.5px; white-space: nowrap; }

/* 연동 카드 */
.steps-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.step-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
             border: 1px solid var(--line); background: #fff; font-size: 12.5px; color: var(--ink2); }
.step-chip.done { border-color: #bfe5cc; background: var(--ok-weak); color: var(--ok); }
.step-chip.fail { border-color: #f3c4c4; background: var(--bad-weak); color: var(--bad); }
.step-chip .no { font-weight: 700; }
.conn-card { scroll-margin-top: 80px; }
.conn-card.open { outline: 2px solid var(--blue); }
.conn-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.conn-head h2 { margin: 0; }
.conn-head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.conn-explain { color: var(--ink2); font-size: 13px; margin: 0 0 14px; padding-left: 18px; }
.result { border-radius: 9px; padding: 10px 12px; font-size: 13px; margin-top: 10px; }
.result.ok { background: var(--ok-weak); color: #145c2e; }
.result.bad { background: var(--bad-weak); color: #8e1f1f; }
.result.none { background: var(--gray-weak); color: var(--ink2); }
.ipbox { display: flex; gap: 10px; align-items: center; font-size: 15px; }
.ipbox code { font-size: 18px; font-weight: 700; background: var(--gray-weak); padding: 4px 10px; border-radius: 8px; }

/* 체크리스트 */
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--line); }
.check-list li:last-child { border-bottom: 0; }
.check-ico { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700;
             background: var(--gray-weak); color: var(--ink3); flex: none; }
.check-ico.done { background: var(--ok); color: #fff; }
.check-ico.fail { background: var(--bad); color: #fff; }
.check-list .t { flex: 1; }
.next-box { border: 2px solid var(--blue); background: var(--blue-weak); border-radius: var(--radius); padding: 18px 20px; display: flex; align-items: center; gap: 16px; }
.next-box .big { font-size: 17px; font-weight: 700; }

/* 점수 */
.score { display: flex; align-items: center; gap: 18px; }
.score-num { font-size: 44px; font-weight: 700; letter-spacing: -1px; }
.grade { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; font-size: 26px; font-weight: 700; color: #fff; }
.grade.A { background: var(--ok); } .grade.B { background: #3a7bd5; } .grade.C { background: var(--warn); } .grade.D { background: var(--bad); }
.grade.none { background: var(--ink3); }

/* 경고 카드 */
.issue { border: 1px solid var(--line); border-left-width: 5px; border-radius: 10px; padding: 12px 14px; background: #fff; scroll-margin-top: 80px; }
.issue.bad { border-left-color: var(--bad); }
.issue.warn { border-left-color: var(--warn); }
.issue.done { border-left-color: var(--ok); opacity: .8; }
.issue .head { display: flex; gap: 8px; align-items: center; }
.issue .head b { font-size: 14px; }
.issue .head .right { margin-left: auto; }
.issue .todo { background: var(--gray-weak); border-radius: 8px; padding: 8px 10px; margin: 8px 0; font-size: 13px; }
.issue form { display: grid; grid-template-columns: 120px 1fr auto; gap: 8px; align-items: center; }

/* 표 (엑셀처럼: 머리글 고정, 격자, NO 맨 왼쪽 가운데) */
.table-wrap { overflow: auto; max-height: 560px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
table.grid-table { border-collapse: collapse; width: 100%; font-size: 13px; }
.grid-table th, .grid-table td { border: 1px solid #e9ebef; padding: 7px 10px; text-align: right; white-space: nowrap; }
.grid-table th { position: sticky; top: 0; background: #f3f5f9; color: var(--ink2); font-weight: 700; text-align: center; z-index: 1; }
.grid-table td.l { text-align: left; }
.grid-table td.c, .grid-table td.no { text-align: center; }
.grid-table td.no { color: var(--ink3); width: 48px; }
.grid-table td.wrap { white-space: normal; min-width: 240px; text-align: left; }
.grid-table tr:hover td { background: #fafbfd; }
.grid-table tr.sum td { font-weight: 700; background: #f8f9fb; }

/* 그래프 */
.chart { width: 100%; height: auto; display: block; border-radius: 8px; }

/* 도움말 창 */
.drawer { position: fixed; top: 0; right: 0; width: 460px; max-width: 100vw; height: 100vh; background: #fff;
          border-left: 1px solid var(--line); box-shadow: -8px 0 30px rgba(0,0,0,.08); z-index: 20; display: flex; flex-direction: column; }
.drawer-head { display: flex; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); gap: 10px; }
.drawer-head b { font-size: 15px; }
.drawer-head .btn { margin-left: auto; }
.drawer-body { overflow: auto; padding: 18px; }
.help-steps { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.help-steps li { counter-increment: s; position: relative; padding: 0 0 18px 38px; }
.help-steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%;
                         background: var(--bad); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 13px; }
.help-steps img { width: 100%; border: 1px solid var(--line); border-radius: 8px; margin-top: 8px; }
.help-fail { background: var(--gray-weak); border-radius: 8px; padding: 10px 12px; font-size: 13px; }
.help-fail b { color: var(--bad); }

/* 로그인 */
.login-wrap { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, #eef3ff, #f6f7f9); }
.login-card { width: 380px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 30px; box-shadow: 0 10px 30px rgba(20,40,90,.06); }
.login-card .logo { padding: 0 0 18px; }
.login-card .field { grid-template-columns: 1fr; gap: 4px; }
.login-card .btn { width: 100%; height: 42px; margin-top: 6px; }
.err { color: var(--bad); font-size: 13px; margin: 6px 0; }
.okmsg { color: var(--ok); font-size: 13px; margin: 6px 0; }

.tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.tabs a { padding: 7px 14px; border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--ink2); min-width: 92px; text-align: center; }
.tabs a.on { background: var(--blue); color: #fff; border-color: var(--blue); font-weight: 700; }
.period { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.period input[type=date] { width: 150px; }
pre.card-text { white-space: pre-wrap; font-family: inherit; background: var(--gray-weak); border-radius: 10px; padding: 14px; margin: 0; }
.narrow { max-width: 620px; }
.grow { flex: 1; }
.w-180 { width: 180px !important; }
.grid-table td.alt { color: #1f4fd1; }
.value.small { font-size: 18px; }
a.issue { display: block; color: inherit; }
a.issue:hover { text-decoration: none; background: #fafbfd; }
.invisible { visibility: hidden; }
.score-row { grid-template-columns: 320px 1fr; }
@media (max-width: 900px) { .score-row { grid-template-columns: 1fr; } }
.btn-row select, .period select { width: auto; min-width: 150px; }
.page-head .actions form { display: flex; gap: 8px; align-items: center; }
.logo { color: inherit; }
.logo:hover { text-decoration: none; }
.logo-img { width: 46px; height: auto; flex: none; }
.logo-name { font-weight: 700; font-size: 13.5px; line-height: 1.25; }
.logo-name2 { font-weight: 700; font-size: 13px; line-height: 1.25; color: #0f7a4a; }
.login-logo { display: block; width: 210px; height: auto; margin: 0 auto 10px; }
.login-title { text-align: center; font-weight: 700; font-size: 16px; }
.center { text-align: center; }
.layout { grid-template-columns: 256px 1fr; }
.logo { gap: 8px; padding: 4px 4px 18px; }
.logo-img { width: 42px; }
.logo-name, .logo-name2 { white-space: nowrap; font-size: 13px; }

/* ── V0.5 대시보드 ─────────────────────────────────────────── */
:root { --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s-muted: #b7bcc7; --target: #5b6070; }
/* 왼쪽 메뉴 바탕이 화면 끝까지 이어지게 */
.layout { background: linear-gradient(to right, #fff 0, #fff 256px, var(--bg) 256px); }
.side { border-right: 1px solid var(--line); }

.g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1280px) { .g6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tile .value .unit, .tile .unit { font-size: 14px; color: var(--ink2); margin-left: 2px; font-weight: 400; }
.tile .sub { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.delta { font-size: 12px; font-weight: 700; border-radius: 6px; padding: 0 6px; white-space: nowrap; }
.delta.good { color: var(--ok); background: var(--ok-weak); }
.delta.bad { color: var(--bad); background: var(--bad-weak); }
.delta.flat, .delta.none { color: var(--ink3); background: var(--gray-weak); font-weight: 400; }
.ok-ink { color: var(--ok); font-weight: 700; }
.bad-ink { color: var(--bad); font-weight: 700; }
.note { font-size: 12.5px; color: #7a4e09; background: var(--warn-weak); border-radius: 8px; padding: 6px 10px; }
.card .note { margin: 0 0 8px; }

.live { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--s1);
        border-radius: var(--radius); padding: 12px 16px; flex-wrap: wrap; }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-weak); flex: none; }
.live-main { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.live-main b { font-size: 20px; }
.live-side { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }

.split-row { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
@media (max-width: 1100px) { .split-row { grid-template-columns: 1fr; } }
.share-bar { display: flex; height: 34px; border-radius: 8px; overflow: hidden; gap: 2px; background: #fff; margin: 4px 0 14px; }
.share-bar .seg { display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12.5px; font-weight: 700; min-width: 0; white-space: nowrap; overflow: hidden; }
.share-bar .seg span { padding: 0 8px; overflow: hidden; text-overflow: ellipsis; }
.seg.s1, .sw.s1 { background: var(--s1); } .seg.s2, .sw.s2 { background: var(--s2); }
.sw.s3 { background: var(--s3); } .sw.s4 { background: var(--s4); }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.sw.target { height: 0; border-top: 2px dashed var(--target); border-radius: 0; width: 16px; vertical-align: 3px; }
table.mini { width: 100%; border-collapse: collapse; font-size: 13px; }
table.mini th { color: var(--ink3); font-weight: 400; font-size: 12px; text-align: right; padding: 4px 6px; border-bottom: 1px solid var(--line); }
table.mini td { text-align: right; padding: 8px 6px; border-bottom: 1px solid var(--gray-weak); white-space: nowrap; }
table.mini td:first-child, table.mini th:first-child { text-align: left; }

.chart-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.chart-head h2 { margin-bottom: 4px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--ink2); margin: 2px 0 8px; }
.viz { width: 100%; min-height: 260px; position: relative; }
.viz.short { min-height: 200px; }
.viz svg { display: block; width: 100%; height: auto; font-family: inherit; }
.viz .grid { stroke: #eef0f3; stroke-width: 1; }
.viz .axis { stroke: #c9cdd5; stroke-width: 1; }
.viz .tick { fill: var(--ink3); font-size: 11px; }
.viz .target { stroke: var(--target); stroke-width: 1.5; stroke-dasharray: 5 4; }
.viz .target-label { fill: var(--target); font-weight: 700; }
.viz .event { stroke: var(--ink3); stroke-width: 1; stroke-dasharray: 2 3; }
.viz .cross { stroke: #9aa0ac; stroke-width: 1; }
.viz .hit { fill: transparent; cursor: crosshair; }
.viz .dot { stroke: #fff; stroke-width: 1.5; }
.viz-empty { display: grid; place-items: center; height: 200px; color: var(--ink3); background: var(--gray-weak); border-radius: 8px; font-size: 13px; }
.viz-tip { position: absolute; z-index: 30; background: #fff; border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 6px 20px rgba(0,0,0,.12);
           padding: 8px 10px; font-size: 12.5px; pointer-events: none; min-width: 170px; }
.viz-tip b { display: block; margin-bottom: 4px; }
.viz-tip div { display: flex; align-items: center; gap: 6px; }
.viz-tip i { width: 9px; height: 9px; border-radius: 2px; flex: none; }
.viz-tip span { margin-left: auto; padding-left: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-row { display: flex; gap: 24px; flex-wrap: wrap; margin: 2px 0 6px; }
.stat-row b { font-size: 18px; }

/* 표: 숫자 자리 맞춤, 정렬 표시, 엑셀처럼 열 문자 줄, 합계 고정 */
.grid-table td { font-variant-numeric: tabular-nums; }
.grid-table th.sortable { cursor: pointer; user-select: none; }
.grid-table th.sortable:hover { background: #e8ecf3; }
.grid-table th.asc::after { content: " ▲"; font-size: 10px; }
.grid-table th.desc::after { content: " ▼"; font-size: 10px; }
.grid-table tr.letters th { background: #fafbfc; color: var(--ink3); font-weight: 400; font-size: 11px; padding: 2px 6px; top: 0; }
.grid-table.sheet thead tr:nth-child(2) th { top: 23px; }
.grid-table tfoot td { position: sticky; bottom: 0; }
.table-wrap.short { max-height: 320px; }
.grid-table a[data-day] { font-weight: 700; }

/* 기간 고르기 + 달력 */
.seg-btns { display: inline-flex; gap: 0; }
.seg-btns .btn { border-radius: 0; margin-left: -1px; }
.seg-btns .btn:first-child { border-radius: 9px 0 0 9px; margin-left: 0; }
.seg-btns .btn:last-child { border-radius: 0 9px 9px 0; }
.btn.on { background: var(--blue-weak); border-color: var(--blue); color: var(--blue-ink); font-weight: 700; position: relative; z-index: 1; }
.cal-field { display: inline-flex; align-items: center; gap: 4px; }
.period input[data-cal] { width: 118px; cursor: pointer; text-align: center; height: 30px; font-variant-numeric: tabular-nums; }
.icon-btn { width: 32px; padding: 0; }
.cal-pop { position: absolute; z-index: 40; width: 280px; background: #fff; border: 1px solid var(--line); border-radius: 12px;
           box-shadow: 0 10px 30px rgba(0,0,0,.14); padding: 10px; }
.cal-head { display: flex; align-items: center; gap: 4px; margin-bottom: 6px; }
.cal-head b { flex: 1; text-align: center; }
.cal-head button, .cal-grid button { border: 0; background: none; font: inherit; cursor: pointer; border-radius: 8px; height: 32px; }
.cal-head button { width: 30px; color: var(--ink2); }
.cal-head button:hover, .cal-grid button:hover { background: var(--gray-weak); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.cal-wd { font-size: 11.5px; color: var(--ink3); padding: 4px 0; }
.cal-grid .sun { color: var(--bad); } .cal-grid .sat { color: var(--blue-ink); }
.cal-grid button.today { outline: 1px solid var(--blue); }
.cal-grid button.sel { background: var(--blue); color: #fff; font-weight: 700; }
.cal-foot { display: flex; gap: 6px; justify-content: flex-end; margin-top: 8px; }
.drawer.wide { width: 640px; }

/* ── 휴대폰 화면 ─────────────────────────────────────────── */
@media (max-width: 800px) {
  .layout { grid-template-columns: 1fr; background: var(--bg); }
  .side { position: sticky; top: 0; z-index: 10; height: auto; padding: 8px 10px; border-right: 0; border-bottom: 1px solid var(--line);
          display: flex; align-items: center; gap: 8px; }
  .side .logo { padding: 0; flex: none; }
  .side .logo > div { display: none; }
  .logo-img { width: 34px; }
  .menu { display: flex; gap: 4px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .menu::-webkit-scrollbar { display: none; }
  .menu-title { display: none; }
  .menu a { padding: 7px 10px; white-space: nowrap; font-size: 13px; }
  .top { position: static; height: auto; padding: 8px 12px; flex-wrap: wrap; }
  .top .crumb { display: none; }
  .top-right { margin-left: 0; flex-wrap: wrap; gap: 6px; }
  .top-right .muted { display: none; }
  .content { padding: 12px; }
  h1 { font-size: 19px; }
  .card { padding: 14px; }
  .g4, .g5, .g6 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile .value { font-size: 19px; }
  .page-head .actions { margin-left: 0; width: 100%; }
  .period { width: 100%; }
  .period input[data-cal] { width: 104px; }
  .live-side { margin-left: 0; }
  .next-box { flex-wrap: wrap; }
  .field { grid-template-columns: 1fr; gap: 4px; }
  .issue form { grid-template-columns: 1fr; }
  .drawer, .drawer.wide { width: 100vw; }
  .viz { min-height: 220px; }
  .score-row { grid-template-columns: 1fr; }
}
@media (max-width: 340px) { .g4, .g5, .g6 { grid-template-columns: 1fr; } }

.g6 .tile .value { font-size: 21px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 800px) { .g6 .tile .value { font-size: 18px; } }
/* 표가 들어 있는 칸이 화면보다 넓어지지 않게 (휴대폰에서 가로로 밀리는 문제) */
.grid > * { min-width: 0; }
.main, .content { min-width: 0; max-width: 100%; }
@media (max-width: 800px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side, .menu { min-width: 0; }
}
@media (max-width: 800px) {
  table.mini { font-size: 12px; }
  table.mini td, table.mini th { padding: 6px 3px; }
  .field .ctl { flex-wrap: wrap; min-width: 0; }
  .field .ctl input[type=file] { max-width: 100%; }
}
@media (max-width: 800px) { .tabs { flex-wrap: wrap; } .tabs a { min-width: 0; flex: 1 1 30%; padding: 7px 6px; font-size: 12.5px; } }


/* ── V0.8 글꼴: 제목·숫자·버튼·메뉴는 Pretendard, 본문·안내문은 나눔고딕 ───────────── */
:root { --f-body: "NanumGothic", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
        --f-head: "Pretendard", "NanumGothic", "Malgun Gothic", sans-serif;
        /* 별색 (버튼 글자 → 바탕·테두리·글자) — 색표는 여기 한 곳에서만 바꾼다 */
        --sp-save: #2a64f6; --sp-save-d: #1f4fd1;
        --sp-check: #1e3a8a; --sp-check-w: #eef2ff;
        --sp-view: #475569; --sp-view-w: #f1f5f9;
        --sp-help: #0f766e; --sp-help-w: #e6f6f4;
        --sp-clear: #c62f2f; --sp-clear-w: #fdeaea;
        --sp-otp: #7c3aed; --sp-otp-w: #f3edff; }
body { font-family: var(--f-body); }
h1, h2, h3, .logo-name, .logo-name2, .menu a, .btn, .st, .tag, .crumb b, .tile .label, .tile .value, .tile .sub,
.chip, th, .conn-head h2, .login-title, .modal-head, .num, .k-num { font-family: var(--f-head); }
h1 { font-weight: 700; letter-spacing: -0.4px; }
h2, h3 { font-weight: 700; letter-spacing: -0.2px; }
.tile .value, td.num, .num, .k-num { font-variant-numeric: tabular-nums; }
.tile .value { font-weight: 700; letter-spacing: -0.5px; }
.btn { font-weight: 600; letter-spacing: -0.1px; }
.menu a { font-weight: 500; }
.menu a.on { font-weight: 700; }

/* ── V0.8 별색 버튼 (색 + 글자로 구분) ─────────────────────────────────────── */
.btn.sp-save { background: var(--sp-save); border-color: var(--sp-save); color: #fff; }
.btn.sp-save:hover { background: var(--sp-save-d); }
.btn.sp-check { background: var(--sp-check-w); border-color: var(--sp-check); color: var(--sp-check); }
.btn.sp-check:hover { background: #dfe6ff; }
.btn.sp-view { background: var(--sp-view-w); border-color: #cbd5e1; color: var(--sp-view); }
.btn.sp-help { background: var(--sp-help-w); border-color: #99d5cd; color: var(--sp-help); }
.btn.sp-help:hover { background: #d4efeb; }
.btn.sp-clear { background: #fff; border-color: var(--sp-clear); color: var(--sp-clear); }
.btn.sp-otp { background: var(--sp-otp-w); border-color: #c4b5fd; color: var(--sp-otp); }
/* 같은 역할 버튼은 같은 너비 */
.conn-card .btn-row .btn { width: 168px; }
.conn-card .ctl .btn.sm { width: 64px; }
.conn-head .btn.sm { width: 132px; }
.chips .chip { min-width: 0; }

/* ── V0.8 연동 카드 로고 자리 ──────────────────────────────────────────────── */
.conn-head { display: flex; align-items: center; gap: 12px; }
.svc-logo { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; flex: 0 0 40px;
            border: 1px solid var(--line); background: #fff; overflow: hidden; }
.svc-logo img { max-width: 32px; max-height: 32px; display: block; }
.svc-logo svg { width: 24px; height: 24px; display: block; }
.svc-logo.sym { border: 0; color: #fff; }
.chip .svc-mini { width: 16px; height: 16px; border-radius: 4px; display: inline-grid; place-items: center; margin-right: 6px;
                  vertical-align: -3px; color: #fff; overflow: hidden; }
.chip .svc-mini svg { width: 11px; height: 11px; }
.chip .svc-mini img { width: 14px; height: 14px; }

/* ── V0.8 연결 확인 결과 팝업 (표) ─────────────────────────────────────────── */
.modal-back { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 50; display: grid; place-items: center; padding: 16px; }
.modal { background: #fff; border-radius: 14px; width: min(860px, 100%); max-height: 88vh; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 16px; }
.modal-head .right { margin-left: auto; display: flex; gap: 8px; }
.modal-body { padding: 16px 20px 20px; }
.modal table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.modal th, .modal td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.modal th { background: var(--gray-weak); font-weight: 700; white-space: nowrap; }
.modal td.no { width: 44px; text-align: center; color: var(--ink2); }
.modal td.res { width: 72px; text-align: center; font-weight: 700; white-space: nowrap; }
.modal tr.r-ok td.res { color: var(--ok); }
.modal tr.r-fail td { background: #fff7f7; }
.modal tr.r-fail td.res { color: var(--bad); }
.modal tr.r-skip td.res { color: var(--ink3); }
.modal .summary { margin-bottom: 12px; }

/* ── V0.8 OTP ───────────────────────────────────────────────────────────── */
.otp-input { font-family: var(--f-head); font-size: 22px; letter-spacing: 8px; text-align: center; width: 180px; }
.otp-qr { width: 200px; height: 200px; border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: #fff; }
.otp-key { font-family: ui-monospace, Consolas, monospace; font-size: 15px; letter-spacing: 1px; background: var(--gray-weak);
           padding: 6px 10px; border-radius: 8px; word-break: break-all; }

/* ── V0.8 로그인 화면 ─────────────────────────────────────────────────────── */
body.login-page { min-height: 100vh; background: #0b1530; }
.login-split { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; }
.login-art { position: relative; overflow: hidden; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
             background: radial-gradient(1200px 600px at 10% 10%, #1d4ed8 0%, transparent 60%),
                         radial-gradient(900px 500px at 90% 90%, #0ea5a4 0%, transparent 55%),
                         linear-gradient(135deg, #0b1530 0%, #111c44 100%); }
.login-art.v1 { background: radial-gradient(1100px 600px at 85% 15%, #7c3aed 0%, transparent 60%),
                            radial-gradient(900px 500px at 10% 90%, #2563eb 0%, transparent 55%), linear-gradient(135deg, #0b1530, #1e1b4b); }
.login-art.v2 { background: radial-gradient(1100px 600px at 20% 80%, #0f766e 0%, transparent 60%),
                            radial-gradient(900px 500px at 80% 10%, #1d4ed8 0%, transparent 55%), linear-gradient(135deg, #04121f, #0b1530); }
.login-art svg.flow { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .35; pointer-events: none; }
.login-art .brand { display: flex; align-items: center; gap: 14px; position: relative; }
.login-art .brand img { width: 56px; height: 56px; }
.login-art .brand .t1 { font-family: var(--f-head); font-weight: 700; font-size: 20px; }
.login-art .brand .t2 { font-family: var(--f-head); font-size: 13px; opacity: .8; }
.login-art .headline { position: relative; font-family: var(--f-head); font-weight: 700; font-size: 34px; line-height: 1.25; letter-spacing: -0.8px; }
.login-art .headline small { display: block; font-size: 15px; font-weight: 500; opacity: .8; margin-top: 12px; letter-spacing: 0; }
.login-art .flow-steps { position: relative; display: flex; gap: 10px; flex-wrap: wrap; }
.login-art .flow-steps span { font-family: var(--f-head); font-size: 12.5px; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.12);
                               border: 1px solid rgba(255,255,255,.25); }
.login-side { background: #fff; display: grid; place-items: center; padding: 32px; }
.login-side form { width: min(360px, 100%); }
.login-side h2 { font-size: 22px; margin-bottom: 4px; }
.login-side .field { grid-template-columns: 1fr; gap: 6px; }
.login-side .field input { height: 44px; font-size: 15px; }
.login-side .btn.primary { width: 100%; height: 46px; font-size: 15px; margin-top: 6px; }
.login-side .foot { margin-top: 18px; color: var(--ink3); font-size: 12px; }
@media (max-width: 860px) { .login-split { grid-template-columns: 1fr; } .login-art { min-height: 260px; padding: 28px; } .login-art .headline { font-size: 24px; } }
.last-login { font-size: 12.5px; }
/* 상징 아이콘 색 (카드 구분용) */
.c-green { background: #16a34a; } .c-orange { background: #ea580c; } .c-blue { background: #2563eb; }
.c-indigo { background: #4f46e5; } .c-sky { background: #0284c7; } .c-plum { background: #9333ea; }
.c-amber { background: #d97706; } .c-red { background: #dc2626; } .c-teal { background: #0d9488; } .c-slate { background: #475569; }
.otp-input.otp-sm { width: 132px; height: 36px; font-size: 15px; letter-spacing: 3px; }
.banner .otp-input { height: 38px; font-size: 18px; width: 150px; }
/* V0.8 연동 목록 칩: 같은 너비 격자 (PC 4칸 · 좁은 화면 2칸 · 휴대폰 1칸), 긴 이름은 말줄임 + 마우스 올리면 전체 */
.steps-bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.steps-bar .step-chip { display: flex; width: 100%; min-width: 0; height: 36px; padding: 0 12px; border-radius: 10px;
                        justify-content: flex-start; overflow: hidden; }
.steps-bar .step-chip .no { flex: 0 0 18px; text-align: right; }
.steps-bar .step-chip .svc-mini { flex: 0 0 16px; margin-right: 0; }
.steps-bar .step-chip .chip-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.steps-bar .step-chip .chip-s { flex: 0 0 auto; font-weight: 700; }
@media (max-width: 1100px) { .steps-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps-bar { grid-template-columns: 1fr; } }

/* ── V0.9 엄격 검증 (종합상황판) ─────────────────────────────────────────── */
.proof .banner { margin: 8px 0 14px; }
.proof-step { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fff; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.proof-step.p-ok { border-color: #bfe5cc; background: #f6fcf8; }
.proof-step.p-bad { border-color: #f3c4c4; background: #fff7f7; }
.proof-step .ps-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-family: var(--f-head); }
.proof-step .ps-value { font-family: var(--f-head); font-weight: 700; font-size: 20px; }
.dim { opacity: .45; filter: grayscale(.6); }
.funnel .f-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 120px; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.funnel .f-bar { height: 12px; background: var(--gray-weak); border-radius: 6px; overflow: hidden; }
.funnel .f-fill { display: block; height: 100%; background: var(--blue); border-radius: 6px; }
.funnel .f-row:last-child .f-fill { background: #7c3aed; }
.funnel .f-num { text-align: right; font-family: var(--f-head); font-weight: 600; }
table.kv { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.kv th { text-align: left; width: 130px; color: var(--ink2); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.kv td { padding: 6px 8px; border-bottom: 1px solid var(--line); }
.lift-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.w-90 { width: 96px; }
@media (max-width: 800px) { .funnel .f-row { grid-template-columns: 1fr; } }
.w-150 { width: 150px; }
.lift-form input { height: 34px; }
