/* =========================================================
   momo ERP 데모 — 모모패밀리디자인
   (기준 : 모모원격 app/ui.py 디자인 토큰 · 2026-09-09 개정)
   ========================================================= */
:root {
  --navy: #1f2a44;      /* 제목 글씨 · 사이드바 */
  --navy2: #26324f;
  --blue: #5a63ea;      /* 강조 — 단추 · 고른 탭 · 링크 */
  --blue-d: #4a52d6;
  --blue-soft: #eef0fe;
  --cyan: #12b0c9;
  --green: #12a870;
  --mint: #22c7a9;
  --red: #e5484d;
  --orange: #f5a524;
  --page: #f5f7fb;
  --soft: #f7f9fd;
  --soft2: #eef2f9;
  --line: #e4e8f2;
  --gray: #64748b;
  --gray2: #94a3b8;
  --red-soft: #fdeced;
  --orange-soft: #fef5e4;
  --green-soft: #e5f6ef;
  --cyan-soft: #e3f6f9;
  --side-w: 236px;
  --top-h: 60px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: "Pretendard Variable", Pretendard, "Malgun Gothic", "맑은 고딕", sans-serif; background: var(--page); color: var(--navy);
  font-size: 13px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
svg.i { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.tab { font-variant-numeric: tabular-nums; }
.mono { font-family: Consolas, "D2Coding", monospace; font-size: 12px; }

/* ---------- 레이아웃 ---------- */
.side { position: fixed; inset: 0 auto 0 0; width: var(--side-w); background: var(--navy); color: #cfd5e6; display: flex; flex-direction: column; z-index: 40; }
.brand { height: var(--top-h); display: flex; align-items: center; gap: 10px; padding: 0 18px; border-bottom: 1px solid rgba(255,255,255,.07); }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; background: var(--blue); display: grid; place-items: center; color: #fff; }
.brand b { display: block; color: #fff; font-size: 15px; letter-spacing: -.2px; }
.brand small { display: block; font-size: 11px; color: #9aa4c2; margin-top: -2px; }
.nav { flex: 1; overflow-y: auto; padding: 10px 10px 16px; }
.nav::-webkit-scrollbar { width: 6px; } .nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 3px; }
.nav-h { font-size: 11px; color: #7f8aa8; padding: 14px 10px 6px; font-weight: 600; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: 13px; font-weight: 500; color: #c3cadb; transition: background .15s, color .15s; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.on { background: var(--blue); color: #fff; box-shadow: 0 4px 12px rgba(90,99,234,.35); }
.side-ft { padding: 12px 18px; border-top: 1px solid rgba(255,255,255,.07); font-size: 11px; color: #7f8aa8; display: flex; justify-content: space-between; align-items: center; }
.side-ft a { color: #aab3ff; }

.top { position: fixed; top: 0; left: var(--side-w); right: 0; height: var(--top-h); background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; padding: 0 20px; z-index: 30; }
.menu-t { display: none; }
.search { position: relative; flex: 0 1 440px; }
.search input { width: 100%; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); padding: 0 12px 0 34px; outline: none; }
.search input:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px var(--blue-soft); }
.search > svg { position: absolute; left: 11px; top: 10px; color: var(--gray2); }
.sr { position: absolute; top: 42px; left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px rgba(31,42,68,.12); max-height: 380px; overflow: auto; display: none; }
.sr.show { display: block; }
.sr-h { font-size: 11px; color: var(--gray2); padding: 8px 12px 4px; font-weight: 600; }
.sr a { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; }
.sr a:hover, .sr a.act { background: var(--blue-soft); }
.sr a span { color: var(--gray); font-size: 12px; }
.sr-none { padding: 16px 12px; color: var(--gray); }
.top-r { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; color: var(--gray); background: #fff; }
.pill b { color: var(--navy); }
.pill .ok { color: var(--green); font-weight: 700; }
.pill.spin svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.dd { position: relative; }
.dd-btn { position: relative; height: 36px; min-width: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; background: #fff; }
.dd-btn:hover { background: var(--soft); }
.badge-n { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; border: 2px solid #fff; }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.who { text-align: left; line-height: 1.2; } .who b { display: block; font-size: 12px; } .who small { font-size: 11px; color: var(--gray); }
.dd-menu { position: absolute; right: 0; top: 42px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px rgba(31,42,68,.14); min-width: 220px; display: none; z-index: 50; overflow: hidden; }
.dd.open .dd-menu { display: block; }
.dd-h { padding: 10px 14px; font-size: 12px; font-weight: 700; border-bottom: 1px solid var(--line); background: var(--soft); }
.notice { display: flex; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--soft2); width: 320px; }
.notice i { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.notice .t { display: flex; justify-content: space-between; font-size: 11px; color: var(--gray); }
.notice .t b { color: var(--navy); }
.notice .d { font-size: 12px; color: var(--gray); }
.dd-foot { display: block; text-align: center; padding: 9px; font-size: 12px; color: var(--blue); font-weight: 600; }
.role-btn { display: flex; align-items: center; gap: 6px; width: 100%; padding: 9px 14px; text-align: left; font-size: 13px; }
.role-btn:hover { background: var(--soft); }
.role-btn.on { color: var(--blue); font-weight: 700; }
.date { text-align: right; line-height: 1.25; font-size: 12px; } .date small { color: var(--gray); font-size: 11px; }

.main { margin-left: var(--side-w); padding: calc(var(--top-h) + 24px) 24px 40px; min-height: 100vh; }
.ph { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; }
.ph h1 { font-size: 21px; font-weight: 800; letter-spacing: -.4px; }
.ph p { color: var(--gray); margin-top: 3px; font-size: 13px; }
.ph-act { display: flex; gap: 8px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--gray); font-size: 12px; margin-bottom: 8px; }
.back:hover { color: var(--blue); }

/* ---------- 공통 부품 ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 8px; font-weight: 700; font-size: 13px; white-space: nowrap; transition: background .15s, box-shadow .15s; }
.btn-p { background: var(--blue); color: #fff; } .btn-p:hover { background: var(--blue-d); }
.btn-g { background: #fff; color: var(--blue); border: 1px solid var(--line); } .btn-g:hover { background: var(--blue-soft); }
.btn-s { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn-d { background: var(--red-soft); color: var(--red); }
.btn[disabled] { opacity: .5; cursor: default; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; background: var(--blue-soft); color: var(--blue); }
.c-blue { background: var(--blue-soft); color: var(--blue); }
.c-navy { background: #e6e9f2; color: var(--navy); }
.c-green { background: var(--green-soft); color: var(--green); }
.c-red { background: var(--red-soft); color: var(--red); }
.c-amber { background: var(--orange-soft); color: #c27c00; }
.c-cyan { background: var(--cyan-soft); color: #0e8ea3; }
.c-gray { background: var(--soft2); color: var(--gray); }
.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.card-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); min-height: 54px; }
.card-h h3 { font-size: 14px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.card-h small { color: var(--gray); font-size: 12px; }
.card-b { padding: 16px 18px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(4, 1fr); } .g5 { grid-template-columns: repeat(5, 1fr); }
.g-7-3 { grid-template-columns: 1.75fr 1fr; }
.mb { margin-bottom: 14px; }

.kpi { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; overflow: hidden; }
.kpi::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: transparent; }
.kpi.t-red::before { background: var(--red); } .kpi.t-amber::before { background: var(--orange); } .kpi.t-green::before { background: var(--green); } .kpi.t-blue::before { background: var(--blue); }
.kpi-l { display: flex; justify-content: space-between; align-items: center; color: var(--gray); font-size: 12px; }
.kpi-ic { width: 30px; height: 30px; border-radius: 8px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; }
.t-red .kpi-ic { background: var(--red-soft); color: var(--red); } .t-amber .kpi-ic { background: var(--orange-soft); color: #d18700; } .t-green .kpi-ic { background: var(--green-soft); color: var(--green); }
.kpi-v { font-size: 24px; font-weight: 800; letter-spacing: -.6px; margin-top: 8px; }
.kpi-s { font-size: 12px; color: var(--gray); margin-top: 2px; }
.kpi-s.up { color: var(--green); font-weight: 600; }

.seg { display: inline-flex; background: var(--soft2); border-radius: 8px; padding: 3px; gap: 2px; }
.seg button { padding: 4px 12px; border-radius: 6px; font-size: 12px; font-weight: 600; color: var(--gray); }
.seg button.on { background: #fff; color: var(--blue); box-shadow: 0 1px 3px rgba(31,42,68,.12); }

.filter { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; }
.filter label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--gray); font-weight: 600; }
.inp, .sel { height: 32px; border: 1px solid var(--line); border-radius: 7px; background: #fff; padding: 0 10px; outline: none; font-size: 12px; color: var(--navy); }
.inp:focus, .sel:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.inp.w { width: 240px; }
.count { font-size: 12px; color: var(--gray); margin: 0 0 8px 2px; }
.count b { color: var(--navy); }

.tbl-w { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: auto; }
.card .tbl-w { border: 0; border-radius: 0 0 12px 12px; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
.t th { background: var(--soft2); color: var(--gray); font-size: 12px; font-weight: 700; text-align: left; padding: 10px 12px; white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.t td { padding: 11px 12px; border-top: 1px solid var(--soft2); white-space: nowrap; vertical-align: middle; }
.t tr.click { cursor: pointer; } .t tr.click:hover td { background: var(--soft); }
.t .r { text-align: right; } .t .c { text-align: center; }
.neg { color: var(--red); font-weight: 700; } .pos { color: var(--green); font-weight: 700; } .muted { color: var(--gray); } .b { font-weight: 700; }
.lnk { color: var(--blue); font-weight: 600; } .lnk:hover { text-decoration: underline; }
.bar { display: flex; align-items: center; gap: 8px; }
.bar i { display: block; width: 64px; height: 6px; border-radius: 3px; background: var(--soft2); overflow: hidden; }
.bar i b { display: block; height: 100%; border-radius: 3px; }
.note { font-size: 12px; color: var(--gray); margin-top: 10px; display: flex; align-items: center; gap: 6px; }
.warn-line { font-size: 11px; color: var(--red); display: flex; align-items: center; gap: 4px; margin-top: 4px; font-weight: 600; }

/* 칸반 */
.kb { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; align-items: flex-start; }
.kb-col { flex: 0 0 248px; background: var(--soft2); border-radius: 12px; padding: 8px; min-height: 360px; transition: background .15s, outline .15s; }
.kb-col.over { background: var(--blue-soft); outline: 2px dashed var(--blue); }
.kb-h { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px 10px; font-weight: 800; font-size: 13px; }
.kb-h span { background: #fff; border-radius: 10px; font-size: 11px; padding: 1px 8px; color: var(--gray); }
.kb-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 8px; cursor: grab; box-shadow: 0 1px 2px rgba(31,42,68,.05); transition: box-shadow .15s, transform .15s; }
.kb-card:hover { box-shadow: 0 6px 18px rgba(31,42,68,.1); }
.kb-card.drag { opacity: .45; }
.kb-card .ttl { font-weight: 800; font-size: 14px; display: flex; justify-content: space-between; gap: 6px; }
.kb-card .sub { color: var(--gray); font-size: 12px; }
.kb-card .amt { font-size: 16px; font-weight: 800; margin: 6px 0; }
.kb-card .ft { display: flex; justify-content: space-between; font-size: 12px; color: var(--gray); border-top: 1px solid var(--soft2); padding-top: 8px; margin-top: 8px; }
.kb-card .img { margin: -12px -12px 10px; border-radius: 10px 10px 0 0; overflow: hidden; background: #eceef3; height: 150px; }
.kb-card .img svg { width: 100%; height: 100%; display: block; }

/* 업무현황 타일 */
.flow { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; }
.flow-t { border: 1px solid var(--line); border-top: 3px solid var(--blue); border-radius: 8px; padding: 12px; min-height: 108px; }
.flow-t.navy { border-top-color: var(--navy); } .flow-t.amber { border-top-color: var(--orange); } .flow-t.green { border-top-color: var(--green); }
.flow-t.alert { border-color: #f7c6c8; border-top-color: var(--red); background: #fffafa; }
.flow-t .l { font-size: 12px; color: var(--gray); } .flow-t .v { font-size: 22px; font-weight: 800; margin: 4px 0; } .flow-t .s { font-size: 11px; color: var(--gray2); }

/* 차트 */
.chart { width: 100%; position: relative; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .grid-l { stroke: var(--line); stroke-dasharray: 3 3; }
.chart text { font-size: 11px; fill: var(--gray); font-family: inherit; }
.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; font-size: 12px; color: var(--gray); margin-top: 6px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 14px; height: 3px; border-radius: 2px; }
.ctip { position: absolute; pointer-events: none; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(31,42,68,.14); padding: 8px 10px; font-size: 12px; display: none; z-index: 5; min-width: 130px; }
.ctip b { display: block; margin-bottom: 4px; }
.ctip div { display: flex; justify-content: space-between; gap: 12px; }
.donut-w { display: flex; flex-direction: column; align-items: center; }
.donut-c { position: relative; width: 180px; height: 180px; }
.donut-c .ctr { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.donut-c .ctr small { display: block; font-size: 11px; color: var(--gray); } .donut-c .ctr b { font-size: 19px; }
.dl { width: 100%; margin-top: 16px; }
.dl div { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 13px; }
.dl i { width: 9px; height: 9px; border-radius: 50%; } .dl .v { margin-left: auto; font-weight: 700; } .dl .p { width: 42px; text-align: right; color: var(--gray); }

/* 모달 · 드로어 · 토스트 */
.ov { position: fixed; inset: 0; background: rgba(20,27,45,.45); z-index: 80; display: grid; place-items: center; padding: 20px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: #fff; border-radius: 14px; width: min(760px, 100%); max-height: calc(100vh - 40px); overflow: auto; box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.modal.sm { width: min(420px, 100%); }
.modal-h { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); font-weight: 800; font-size: 15px; position: sticky; top: 0; background: #fff; z-index: 2; }
.modal-b { padding: 18px 20px; }
.modal-f { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); }
.x { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--gray); } .x:hover { background: var(--soft2); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: #fff; z-index: 81; box-shadow: -12px 0 40px rgba(0,0,0,.18); overflow: auto; animation: slide .2s; }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 11px 18px; border-radius: 10px; font-size: 13px; font-weight: 600; z-index: 99; box-shadow: 0 10px 30px rgba(0,0,0,.25); display: flex; align-items: center; gap: 8px; animation: up .2s; }
@keyframes up { from { transform: translate(-50%, 10px); opacity: 0; } }
.tip { position: fixed; z-index: 90; background: var(--navy); color: #fff; font-size: 12px; padding: 7px 10px; border-radius: 7px; max-width: 280px; pointer-events: none; box-shadow: 0 6px 20px rgba(0,0,0,.2); }

/* 옵션 매트릭스 */
.mx { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; font-size: 13px; }
.mx th { background: var(--soft2); color: var(--gray); font-weight: 700; padding: 9px; text-align: center; }
.mx th:first-child, .mx td:first-child { text-align: left; padding-left: 12px; }
.mx td { padding: 7px 5px; border-top: 1px solid var(--soft2); text-align: center; }
.mx input { width: 56px; height: 32px; text-align: center; border: 1px solid var(--line); border-radius: 6px; outline: none; background: var(--soft); }
.mx input:focus { border-color: var(--blue); background: #fff; }
.mx input.lv1 { border-color: var(--orange); background: var(--orange-soft); }
.mx input.lv2 { border-color: var(--red); background: var(--red-soft); }
.mx .sum { font-weight: 800; color: var(--blue); }
.mx tr.tot td { background: var(--soft2); font-weight: 800; }
.mx td.grand { background: var(--blue); color: #fff; font-weight: 800; }
.mx-legend { display: flex; gap: 14px; align-items: center; margin-top: 10px; font-size: 12px; color: var(--gray); flex-wrap: wrap; }
.mx-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--line); vertical-align: -2px; margin-right: 4px; }
.mx-legend .tq { margin-left: auto; font-weight: 800; color: var(--navy); font-size: 14px; } .mx-legend .tq b { color: var(--blue); }

/* 스텝퍼 */
.steps { display: flex; gap: 0; overflow-x: auto; padding: 4px 0 2px; }
.step { flex: 1 0 auto; min-width: 76px; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; font-size: 12px; color: var(--gray2); }
.step::before { content: ""; position: absolute; top: 13px; left: -50%; right: 50%; height: 2px; background: var(--line); z-index: 0; }
.step:first-child::before { display: none; }
.step .dot { width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 2px solid var(--line); display: grid; place-items: center; font-weight: 700; z-index: 1; font-size: 12px; }
.step.done { color: var(--navy); } .step.done .dot { background: var(--blue); border-color: var(--blue); color: #fff; } .step.done::before, .step.cur::before { background: var(--blue); }
.step.cur { color: var(--blue); font-weight: 800; } .step.cur .dot { border-color: var(--blue); color: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { padding: 11px 14px; font-weight: 700; color: var(--gray); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.on { color: var(--blue); border-bottom-color: var(--blue); }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 10px 12px; font-size: 13px; }
.kv dt { color: var(--gray); } .kv dd { font-weight: 600; }
.log { list-style: none; }
.log li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--soft2); }
.log .tm { width: 76px; color: var(--gray); font-size: 12px; flex-shrink: 0; }
.log .who { width: 88px; font-weight: 700; flex-shrink: 0; }
.timeline { list-style: none; position: relative; padding-left: 18px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 16px; }
.timeline li::before { content: ""; position: absolute; left: -17px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--blue); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.timeline li.green::before { background: var(--green); } .timeline li.amber::before { background: var(--orange); } .timeline li.navy::before { background: var(--navy); } .timeline li.slate::before { background: var(--gray2); }
.timeline small { color: var(--gray); display: block; font-size: 11px; }

/* 상품 · 카드 격자 */
.pcard { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.pcard .pimg { background: #eceef3; height: 190px; }
.pcard .pimg svg { width: 100%; height: 100%; display: block; }
.pcard .pb { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.pcard .code { display: flex; justify-content: space-between; font-size: 11px; color: var(--gray); }
.pcard .nm { font-size: 15px; font-weight: 800; }
.pcard .pr { display: flex; justify-content: space-between; align-items: baseline; }
.pcard .pr b { font-size: 18px; }
.pcard .colors { display: flex; gap: 4px; flex-wrap: wrap; margin: 6px 0 10px; }
.pcard .pb .btn { margin-top: auto; justify-content: center; }

/* 카카오 */
.chat { display: grid; grid-template-columns: 290px 1fr 250px; height: calc(100vh - var(--top-h) - 130px); min-height: 520px; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.chat-l { border-right: 1px solid var(--line); overflow: auto; }
.chat-l .seg { margin: 10px; }
.room { display: block; width: 100%; text-align: left; padding: 12px 14px; border-top: 1px solid var(--soft2); }
.room:hover { background: var(--soft); } .room.on { background: var(--blue-soft); }
.room .h { display: flex; justify-content: space-between; font-weight: 800; } .room .h small { color: var(--gray2); font-weight: 400; }
.room .m { display: flex; gap: 6px; align-items: center; margin: 4px 0; }
.room .n { background: var(--red); color: #fff; border-radius: 9px; font-size: 10px; min-width: 18px; height: 18px; display: grid; place-items: center; font-weight: 700; }
.room .p { color: var(--gray); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-c { display: flex; flex-direction: column; min-width: 0; }
.chat-h { padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.msgs { flex: 1; overflow: auto; padding: 16px; background: var(--soft); display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 72%; } .msg.me { align-self: flex-end; text-align: right; }
.msg .bb { display: inline-block; padding: 9px 13px; border-radius: 12px; background: #fff; border: 1px solid var(--line); text-align: left; font-size: 13px; }
.msg.me .bb { background: var(--blue); color: #fff; border-color: var(--blue); }
.msg small { display: block; color: var(--gray2); font-size: 11px; margin-top: 3px; }
.chat-in { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.chat-in input { flex: 1; }
.chat-r { border-left: 1px solid var(--line); padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.chat-r .btn { justify-content: flex-start; }

/* 설정 */
.set-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.set-row .lab { width: 110px; }
.tg { width: 44px; height: 24px; border-radius: 12px; background: var(--line); position: relative; transition: background .2s; flex-shrink: 0; }
.tg::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: left .2s; }
.tg.on { background: var(--blue); } .tg.on::after { left: 23px; }
.opt { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--soft2); }
.opt b { display: block; } .opt small { color: var(--gray); }
.form-r { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; } .form-r > span { width: 120px; color: var(--gray); font-size: 12px; } .form-r .inp { flex: 1; }

/* 연동 */
.int { border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.int .top-l { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.int .ic { width: 36px; height: 36px; border-radius: 9px; background: var(--soft2); display: grid; place-items: center; color: var(--navy); }
.int b { font-size: 14px; }
.int .ft { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-size: 12px; color: var(--gray); }

.empty { padding: 28px; text-align: center; color: var(--gray); }
.status-tile { border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: #fff; text-align: left; }
.status-tile.on { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.status-tile .v { font-size: 22px; font-weight: 800; }
.wo-img { width: 160px; height: 160px; border-radius: 10px; overflow: hidden; background: #eceef3; flex-shrink: 0; }
.wo-img svg { width: 100%; height: 100%; display: block; }

@media print {
  body * { visibility: hidden; }
  .print-area, .print-area * { visibility: visible; }
  .print-area { position: absolute; left: 0; top: 0; width: 100%; }
  .no-print { display: none !important; }
}

/* 반응형 */
@media (max-width: 1100px) {
  .g4, .g5 { grid-template-columns: repeat(2, 1fr); }
  .g-7-3 { grid-template-columns: 1fr; }
  .chat { grid-template-columns: 240px 1fr; } .chat-r { display: none; }
}
@media (max-width: 860px) {
  .side { transform: translateX(-100%); transition: transform .2s; }
  body.nav-open .side { transform: none; box-shadow: 20px 0 60px rgba(0,0,0,.3); }
  .top { left: 0; padding: 0 12px; }
  .menu-t { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line); }
  .main { margin-left: 0; padding: calc(var(--top-h) + 16px) 14px 32px; }
  .pill, .date, .who { display: none; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .ph { flex-direction: column; align-items: flex-start; }
  .chat { grid-template-columns: 1fr; height: auto; } .chat-l { max-height: 240px; border-right: 0; border-bottom: 1px solid var(--line); } .msgs { min-height: 320px; }
  .kv { grid-template-columns: 90px 1fr; }
}
@media (max-width: 520px) { .g4, .g5 { grid-template-columns: 1fr 1fr; } .kpi-v { font-size: 19px; } .search { flex: 1; } }
