/* 모렌이 — 왼쪽 줄(비서 모렌이 + 담당 채팅) + 채팅 + 가운데 작업 영역(대시보드 카드 + 크롬식 탭).
   디자인(2026-11-03 수정): 밝은 회색 바탕, 흰 패널(그림자·테두리 없음), 진회색 글자, 파랑 포인트 하나, 색은 급한 일에만, 알약 버튼(호버 시 반전),
   들어올 때 MOREN 글자 → 계약서 O가 왼쪽 칸으로 자라는 인트로, 글자 리빌 · 숫자 롤링 · 탭 커튼 · 유리 메뉴. 이징은 expo 계열.
   옛 토큰 이름(--accent, --head, --muted 등)은 아래 화면들이 그대로 쓰므로 값만 바꿨다. */
:root {
  --bg: #e6e8eb;              /* 페이지 바탕 · 왼쪽 줄 */
  --card: #ffffff;            /* 패널 */
  --surface2: #f2f3f5;        /* 패널 안 한 단계 */
  --line: rgba(20, 24, 30, .1);
  --line-soft: rgba(20, 24, 30, .06);
  --line-strong: rgba(20, 24, 30, .24);
  --fg: #15181d;              /* 진회색 글자 · 선 */
  --head: #15181d;
  --text: #2b3038;
  --muted: #5d636c;
  --gray: #5d636c;
  --dim: #8f959e;
  --rail-bg: #15181d;         /* 진한 면이 필요한 곳(엑셀 머리줄·손잡이)만 */
  --rail-line: rgba(20, 24, 30, .1);
  --rail-text: #6c727c;
  --rail-w: 76px;
  --chat-w: 400px;            /* 채팅 너비 — 조절바로 바꾸면 app.js가 html에 덮어쓴다 */

  --accent: #1d5ef0;          /* 파랑 포인트 하나 */
  --accent-dark: #1548c2;
  --accent-soft: rgba(29, 94, 240, .1);
  --primary: #1d5ef0;
  --green: #16a34a;
  --blue: #1d5ef0;
  --red: #dc2626;
  --cyan: #3fb8d6;
  --amber: #b45309;
  --purple: #5a4790;

  --font: "IBM Plex Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --display: "Archivo", "IBM Plex Sans KR", system-ui, sans-serif;   /* 숫자 · 영문 워드마크 */
  --easeOutExpo: cubic-bezier(.16, 1, .3, 1);
  --easeInOutExpo: cubic-bezier(.87, 0, .13, 1);
  --shadow: none;
  --r-panel: 16px;
  --r-pill: 32px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 14px/1.55 var(--font);
  word-break: keep-all;       /* 한국어는 띄어쓰기 단위로 줄바꿈 */
  color: var(--text);
  background: var(--bg);
  display: flex; overflow: hidden; -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: #fff; }
button { font: inherit; color: inherit; }
a { color: var(--accent); }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.mascot { width: auto; height: auto; fill: initial; stroke: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lbl { font: 600 11px/1 var(--display); text-transform: uppercase; letter-spacing: .12em; color: var(--dim); }
.num { font-family: var(--display); font-weight: 700; font-stretch: 110%; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* ── 공통 부품: 알약 버튼(호버 시 진회색 반전) · 동그라미 버튼 · 타일 · 숫자 롤러 ── */
.btn-line, .btn-main, .lnk, .chip, .btn {
  height: 36px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: var(--r-pill); background: transparent; color: var(--fg);
  font-size: 13px; font-weight: 500; white-space: nowrap; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none;
  transition: background .5s var(--easeOutExpo), color .5s var(--easeOutExpo), border-color .5s var(--easeOutExpo), transform .25s var(--easeOutExpo);
}
.btn-line:hover, .lnk:hover, .chip:hover, .btn:hover { background: var(--fg); color: #fff; border-color: var(--fg); filter: none; }
.btn-line:active, .btn-main:active, .chip:active, .btn:active { transform: scale(.95); }
.btn-line.icon { width: 36px; padding: 0; }
.btn-line svg, .btn-main svg, .btn svg { width: 15px; height: 15px; }
.btn-line .lbl { color: inherit; font-size: 10.5px; }
.btn-main { background: var(--accent); color: #fff; border-color: var(--accent); height: 40px; padding: 0 18px; }
.btn-main:hover { background: var(--fg); border-color: var(--fg); color: #fff; }
.lnk { height: 30px; padding: 0 12px; font-size: 12px; text-decoration: none; }
.btn { height: 30px; padding: 0 12px; font-size: 12px; background: #fff; }
.btn-sm { height: 26px; padding: 0 10px; font-size: 11px; }
.btn-green { background: var(--green); border-color: var(--green); color: #fff; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-green:hover, .btn-accent:hover { background: var(--fg); border-color: var(--fg); }
.btn:disabled, .btn-line:disabled, .btn-main:disabled { opacity: .45; cursor: default; }
.btn-line:disabled:hover { background: transparent; color: var(--fg); border-color: var(--line-strong); }
.icon-btn { width: 32px; height: 32px; border: 0; background: none; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.icon-btn:hover { background: var(--surface2); }
/* 담당 채팅·기능의 아이콘 타일 (맥 앱 아이콘 느낌) */
.av.tile, .chat .av.tile, .tile { border-radius: 30%; color: #fff; display: grid; place-items: center; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .14), inset 0 1px 0 rgba(255, 255, 255, .35), 0 3px 8px rgba(20, 24, 30, .18); }
.av.tile svg, .tile svg { width: 55%; height: 55%; stroke-width: 1.9; }
.av.tile, .chat .av.tile { color: var(--fg); box-shadow: none; }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 11px; border: 1px solid var(--line); background: #fff; font-size: 11.5px; font-weight: 500; color: var(--text); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--dim); }
.badge.ok::before { background: var(--green); }
.badge.wait::before { background: #f59e0b; }
.tag { font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
/* 숫자 롤러: 자리마다 0~9 기둥이 위로 굴러 올라간다 (현황 타일) */
.odo { display: inline-flex; line-height: 1; height: 1em; overflow: clip; vertical-align: -.02em; }
.odo .d { height: 1em; overflow: clip; }
.odo .col { display: flex; flex-direction: column; transform: translateY(0); transition: transform 1s var(--easeOutExpo); transition-delay: var(--delay, 0s); }
.odo .col.go { transform: translateY(calc(var(--d) * -1em)); }
.odo .col.now { transition: none; }
.odo .col span { display: block; height: 1em; line-height: 1; }

/* ── 맨 왼쪽 줄: 모렌이(맨 위) + 담당 채팅 ─── */
.rail {
  width: var(--rail-w); flex: none; height: 100vh; position: sticky; top: 0;
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 18px 0 14px;
  background: var(--bg); border-right: 1px solid var(--line); overflow-y: auto; scrollbar-width: none;
  transition: opacity .8s var(--easeOutExpo);
}
.agents { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.rail-lbl { display: flex; padding: 2px 0; }
.rail-lbl i { width: 36px; height: 1px; background: var(--line); }
/* 담당은 단색 아이콘: 색은 급한 일에만 쓴다. 지금 보는 담당만 흰 칸 */
.agent { position: relative; width: 60px; border: 0; border-radius: 12px; background: none; padding: 6px 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; transition: background .3s; }
.agent:hover { background: rgba(255, 255, 255, .55); }
.agent.on { background: var(--card); }
.agent .av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; }
.agent .av, .chat-head .av { background: none !important; }
.agent.moren .av { width: 44px; height: 44px; }
.agent .av.tile svg { width: 22px; height: 22px; stroke-width: 1.7; }
.agent .nm { font-size: 12.5px; font-weight: 500; color: var(--gray); max-width: 58px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color .3s; }
.agent.on .nm { color: var(--fg); font-weight: 600; }
.agent .badge-n {
  position: absolute; top: 2px; right: 14px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--accent); color: #fff; font: 700 11px/1 var(--display); display: grid; place-items: center; border: 2px solid var(--bg);
}
.agent.add .ava { width: 36px; height: 36px; color: var(--fg); display: grid; place-items: center; }
.agent.add .ava svg { width: 22px; height: 22px; stroke-width: 1.7; }
.rail-foot { margin-top: auto; padding-top: 10px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.user-av { width: 34px; height: 34px; border-radius: 50%; background: var(--fg); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.rail-foot .replay { border: 0; background: none; padding: 4px; cursor: pointer; color: var(--dim); }
.rail-foot .replay:hover { color: var(--fg); }

/* ── 채팅 · 조절바 · 작업 영역 ─────────────── */
.shell {
  flex: 1; min-width: 0; height: 100vh;
  display: grid; grid-template-columns: var(--chat-w) 16px minmax(0, 1fr); padding: 16px 16px 16px 12px;
}
body.chat-folded .shell { grid-template-columns: minmax(0, 1fr); }
body.chat-folded .chat, body.chat-folded .grip { display: none; }
body.dragging { cursor: col-resize; user-select: none; }
.grip { border: 0; background: none; padding: 0; cursor: col-resize; display: grid; place-items: center; touch-action: none; }
.grip span { width: 3px; height: 44px; border-radius: 2px; background: var(--line-strong); transition: background .3s, height .5s var(--easeOutExpo); }
.grip:hover span, .grip:focus-visible span, body.dragging .grip span { background: var(--accent); height: 80px; }
.work { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 12px; transition: opacity 1s var(--easeOutExpo) .35s, transform 1.2s var(--easeOutExpo) .35s; }
.cx .panel-head:has(.cx-tabs[hidden]) { display: none; }

/* 대시보드(2026-11-10 사용자 확정 '옵션 1 카드', 목업 docs/mockups/dashboard.html): 흰 판 없이 바탕 위에 윗줄(제목·날짜·탭 모두 닫기·줄이기·☰) + 흰 카드 4개.
   카드 = 파란 선 아이콘 + 이름 → 큰 숫자(Archivo 700) → 옅은 알약(나머지 숫자, 급한 것만 주황). 테두리·그림자 없음, 올리면 안쪽 테두리. 줄이면 윗줄에 작은 알약 4개 */
.dash { flex: none; container-type: inline-size; display: flex; flex-direction: column; gap: 10px; }
.dash-top { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 0 0 6px; }
.dash-top .ttl { display: flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.dash-top .ttl b { font-size: 17px; color: var(--fg); letter-spacing: -.01em; }
.dash-top .ttl .sub { font-size: 13px; color: var(--gray); }
.dash-top .lnk { margin-left: auto; }
.dash-top .lnk + .fold { margin-left: 0; }
.dash-top .fold { margin-left: auto; }
.dash-top .fold svg { transition: transform .5s var(--easeOutExpo); }
.dash-top .fold[aria-expanded="true"] svg { transform: rotate(180deg); }
.dash-cards { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) minmax(0, 1.1fr) minmax(0, 1.1fr); gap: 10px; }
.dcard { min-width: 0; text-align: left; border: 0; border-radius: 18px; background: var(--card); padding: 14px 18px 16px; display: flex; flex-direction: column; gap: 8px; cursor: pointer; transition: box-shadow .25s, transform .25s var(--easeOutExpo); }
.dcard:hover { box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.dcard:active { transform: scale(.985); }
.dcard .dh { display: flex; align-items: center; gap: 7px; min-height: 20px; font-size: 13.5px; font-weight: 500; color: var(--gray); white-space: nowrap; }
.dcard .dh svg { width: 19px; height: 19px; color: var(--accent); }
.dcard .dh .chev { width: 15px; height: 15px; margin-left: auto; color: var(--dim); transition: transform .3s var(--easeOutExpo), color .2s; }
.dcard:hover .dh .chev { transform: translateX(2px); color: var(--fg); }
.dbig { display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px; row-gap: 4px; min-height: 32px; white-space: nowrap; font: 700 30px/1.05 var(--display); letter-spacing: -.02em; color: var(--fg); font-variant-numeric: tabular-nums; }
.dbig small { font: 500 14px var(--font); letter-spacing: 0; color: var(--gray); }
.dbig.zero { color: var(--dim); }
.dbig.pend { align-items: center; font: 500 15px var(--font); letter-spacing: 0; color: var(--dim); }
/* 전월 대비(매출): 오르면 초록 ↑, 내리면 회색 ↓ — 내림은 급한 일이 아니라 주황을 쓰지 않는다 */
.dbig .dl { align-self: center; margin-left: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 32px; background: var(--surface2); font: 500 12px var(--font); letter-spacing: 0; color: var(--gray); }
.dbig .dl b { font: 600 12.5px var(--display); }
.dbig .dl.up { background: rgba(22, 163, 74, .1); color: var(--green); }
.dpills { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.dp { display: inline-flex; align-items: baseline; gap: 5px; padding: 3px 10px; border-radius: var(--r-pill); background: var(--surface2); font-size: 12.5px; color: var(--gray); white-space: nowrap; }
.dp b { font: 600 12.5px var(--display); color: var(--fg); font-variant-numeric: tabular-nums; }
.dp.w { background: rgba(180, 83, 9, .1); color: var(--amber); }
.dp.w b { color: var(--amber); }
.dp.w::before { content: ""; align-self: center; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }
/* 줄였을 때: 날짜 대신 윗줄에 작은 알약 4개 */
.dash-minis { display: none; flex: 1; min-width: 0; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.dash-minis::-webkit-scrollbar { display: none; }
/* 잘리면 휠 · 끌기로 양옆 (11-13, 목업 docs/mockups/dash-drag.html) — 넘칠 때만 손 모양, 잘린 쪽 가장자리를 흐리게(막대 대신) */
.dash-minis.can-drag { cursor: grab; }
.dash-minis.dragging, .dash-minis.dragging * { cursor: grabbing !important; user-select: none; }
.dash-minis.dragging .dmini { transform: none; }
.dash-minis.fade-r { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); }
.dash-minis.fade-l { -webkit-mask-image: linear-gradient(90deg, transparent, #000 36px); mask-image: linear-gradient(90deg, transparent, #000 36px); }
.dash-minis.fade-l.fade-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); }
body.dash-folded .dash-minis { display: flex; }
body.dash-folded .dash-cards, body.dash-folded .dash-top .ttl .sub { display: none; }
.dmini { flex: none; display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px 0 9px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--card); font-size: 12.5px; color: var(--gray); white-space: nowrap; cursor: pointer; transition: border-color .2s, transform .2s; }
.dmini:hover { border-color: var(--line-strong); }
.dmini:active { transform: scale(.97); }
.dmini svg { width: 16px; height: 16px; color: var(--accent); }
.dmini i { font-style: normal; }
.dmini i b { margin-left: 3px; font-family: var(--display); font-weight: 700; color: var(--fg); font-variant-numeric: tabular-nums; }
.dmini i.w, .dmini i.w b { color: var(--amber); }
.dmini i.up, .dmini i.up b { color: var(--green); }
.dmini .sep { width: 1px; height: 12px; background: var(--line); }
@container (max-width: 900px) { .dash-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ☰ 기능 메뉴: 작업 영역 오른쪽 위 유리 패널. 둥근 클립이 열리고 항목이 차례로 들어온다(--i) */
.menu-scrim { position: absolute; inset: 0; z-index: 29; display: none; }
.menu-scrim.on { display: block; }
.menu {
  position: absolute; top: 62px; right: 14px; z-index: 30; width: 300px; padding: 10px; border-radius: 24px;
  background: rgba(255, 255, 255, .8); -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px); border: 1px solid var(--line); box-shadow: 0 16px 48px rgba(20, 24, 30, .14);
  opacity: 0; visibility: hidden; transform: translateY(-8px) scaleY(.9); transform-origin: top right; pointer-events: none;
  transition: opacity .3s var(--easeOutExpo), transform .5s var(--easeInOutExpo), visibility 0s linear .5s;
}
.menu.on { opacity: 1; visibility: visible; transform: none; pointer-events: auto; transition: opacity .3s var(--easeOutExpo), transform .7s var(--easeOutExpo), visibility 0s; }
.mi { width: 100%; display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 0; border-radius: 16px; background: none; cursor: pointer; text-align: left; opacity: 0; transform: translateX(10px); transition: background .3s, opacity .5s var(--easeOutExpo), transform .7s var(--easeOutExpo); }
.menu.on .mi { opacity: 1; transform: none; transition-delay: calc(.08s + var(--i) * 60ms); }
.mi:hover { background: rgba(20, 24, 30, .05); }
.mi .tile { width: 40px; height: 40px; flex: none; }
.mi .tile svg { width: 22px; height: 22px; }
.mi .t { display: flex; flex-direction: column; min-width: 0; }
.mi .t b { color: var(--fg); font-size: 13.5px; }
.mi .t span { font-size: 11.5px; color: var(--gray); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mi .t { flex: 1; }
.mi .r, .msub .r { margin-left: auto; flex: none; font: 600 12px var(--display); color: var(--gray); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mi .r.w, .msub .r.w { color: var(--amber); }
.mi .chev { margin-left: 4px; width: 16px; height: 16px; flex: none; color: var(--gray); transition: transform .35s var(--easeOutExpo); }
.mi[aria-expanded="true"] .chev { transform: rotate(90deg); }
/* 묶음 펼침: 높이 0 → 내용만큼 (grid 0fr → 1fr) */
.msub { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--easeOutExpo); }
.msub.open { grid-template-rows: 1fr; }
.msub > div { overflow: hidden; display: flex; flex-direction: column; gap: 1px; padding-left: 52px; }
.msub button { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 0; border-radius: 10px; background: none; cursor: pointer; text-align: left; font: 500 13.5px var(--font); color: var(--text); }
.msub button:hover { background: rgba(20, 24, 30, .05); }
.msub button svg { margin-left: auto; width: 14px; height: 14px; color: var(--gray); }
.msub.open > div > button:last-child { margin-bottom: 4px; }

/* 탭 줄 + 탭 본문 (크롬처럼: 보이는 탭이 본문과 이어진다). 탭을 바꾸면 본문만 살짝 떠오르며 바뀐다 */
.desk { flex: 1; min-height: 0; display: flex; flex-direction: column; border-radius: var(--r-panel); background: var(--surface2); overflow: hidden; }
.tabs { flex: none; display: flex; align-items: flex-end; gap: 2px; padding: 8px 10px 0; min-height: 46px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tab { flex: 0 1 230px; min-width: 140px; height: 38px; display: flex; align-items: center; gap: 4px; padding: 0 6px 0 12px; border: 1px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0; transition: background .3s; user-select: none; }
.tab.dragging { position: relative; z-index: 3; background: var(--card); border-color: var(--line); box-shadow: 0 8px 20px rgba(20, 24, 30, .18); transition: none; cursor: grabbing; }
.tab.dragging .tab-open { cursor: grabbing; }
.tab:not(.on):hover { background: rgba(20, 24, 30, .05); }
.tab.on { background: var(--card); border-color: var(--line); margin-bottom: -1px; position: relative; z-index: 1; }
.tab-open { flex: 1; min-width: 0; height: 100%; border: 0; background: none; padding: 0; display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--gray); text-align: left; }
.tab.on .tab-open { font-weight: 700; color: var(--fg); }
.tab-open > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab-open .tmark { flex: none; display: grid; color: var(--gray); }
.tab-open .tmark svg { width: 15px; height: 15px; }
.tab-open .spin { flex: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(29, 94, 240, .25); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.tab-x { flex: none; width: 22px; height: 22px; border: 0; border-radius: 50%; background: none; color: var(--gray); cursor: pointer; display: grid; place-items: center; transition: background .3s, color .3s; }
.tab-x svg { width: 12px; height: 12px; }
.tab-x:hover { background: var(--fg); color: #fff; }
.tabbody { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--card); border-top: 1px solid var(--line); overflow: auto; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.tabbody > .panel.cx { border: 0; border-radius: 0; }
.tabbody > .enter { animation: pageIn .8s var(--easeOutExpo) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.tab-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--gray); text-align: center; padding: 24px; }
.tab-empty b { font-size: 17px; font-weight: 600; color: var(--fg); }
.tab-empty span { font-size: 14px; line-height: 1.6; }
.tab-empty .go { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; }
.tab-empty .go button { height: 36px; font-size: 13.5px; font-weight: 600; }

/* 채팅 */
.chat { position: relative; min-height: 0; display: flex; flex-direction: column; background: var(--card); border-radius: var(--r-panel); overflow: hidden; }
.chat [hidden] { display: none !important; }
/* 머리 바 (텔레그램식, 2026-11-09): 왼쪽 알약(아이콘·이름·상태, 남는 폭까지 늘어남, 모렌이 방은 누르면 '내 비서') · 오른쪽 둥근 버튼 따로따로(찾기·삭제·접기) */
.chat-head { flex: none; display: flex; align-items: center; gap: 8px; padding: 12px 14px 8px; }
.chat-head .hd-who, .chat-head .hd-tools button { height: 56px; border: 1px solid var(--line); background: var(--card); box-shadow: 0 2px 8px rgba(20, 24, 31, .06); }
.chat-head .hd-who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 0 24px 0 7px; border-radius: 28px; }
.chat-head .hd-tools { flex: none; display: flex; align-items: center; gap: 8px; }
.chat-head .hd-tools button { width: 56px; padding: 0; border-radius: 50%; display: grid; place-items: center; color: var(--fg); cursor: pointer; transition: background .2s; }
.chat-head .hd-tools svg { width: 20px; height: 20px; }
.chat-head .hd-tools button:hover { background: var(--surface2); }
.chat-head .who { display: flex; flex-direction: column; min-width: 0; }
.chat-head .who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-head .who b { font-size: 17px; color: var(--fg); letter-spacing: -.01em; }
.chat-head .state { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--gray); white-space: nowrap; }
.chat-head .state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--dim); }
.chat-head .state.ok::before { background: var(--green); }
.chat-head .state.bad { color: var(--red); }
.chat-head .state.bad::before { background: var(--red); }
.chat-head .state.wait::before { background: var(--accent); animation: stWait 1.2s infinite; }
@keyframes stWait { 50% { opacity: .3; } }
.chat .av { flex: none; border-radius: 50%; display: grid; place-items: center; }
.chat-head .av { width: 42px; height: 42px; margin-right: 2px; }
.chat-head .av.tile { width: 42px; height: 42px; }
body.win-contract .chat-head .state { display: inline-flex; }
.chat-scroll { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; }
.chat-body { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 12px; background: var(--card); scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.msg { display: flex; gap: 8px; align-items: flex-start; max-width: 92%; animation: msgIn .9s var(--easeOutExpo) both; }
@keyframes msgIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.msg.me { align-self: flex-end; }
.msg .col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.msg .bubble {
  padding: 11px 15px; border-radius: 4px 18px 18px 18px; background: var(--surface2); border: 1px solid var(--line);
  color: var(--fg); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6;
}
.msg.me .bubble { border-radius: 18px 18px 4px 18px; background: var(--accent); border-color: var(--accent); color: #fff; }
.msg.err .bubble { background: #fdf3f3; border-color: #f0cfcf; color: #8a2f2f; }
/* 시각은 말풍선 안 오른쪽 아래 (텔레그램식, 2026-11-09) — 마지막 줄에 자리가 있으면 그 줄 끝, 없으면 아래 줄 */
.msg .bubble .time { float: right; margin: 9px -5px -6px 12px; font: 500 11px/1 var(--display); letter-spacing: .02em; color: var(--dim); white-space: nowrap; user-select: none; }
.msg.me .bubble .time { color: rgba(255, 255, 255, .72); }
.msg.err .bubble .time { color: #c08a8a; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { height: auto; min-height: 32px; padding: 6px 14px; font-size: 12.5px; white-space: normal; text-align: left; line-height: 1.4; overflow-wrap: anywhere; max-width: 100%; }
.chip.strong { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip.strong svg { width: 15px; height: 15px; }
.chip.strong:hover { background: var(--fg); border-color: var(--fg); }

/* 계약서 담당 채팅에 올라오는 것들: 어느 계약서 이야기인지 줄, 시스템 한 줄, 카드(검토·추출 확인·제안·진행) */
.msg.sys { align-self: center; max-width: 100%; padding: 0 6px; font-size: 11.5px; color: var(--muted); text-align: center; }
.msg.sys.err { color: var(--red); }
.msg.sys.doc { margin-top: 4px; }
.msg.sys.doc span { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 10px; background: var(--line-soft); color: var(--text); font-size: 11px; }
.msg.sys.doc svg { width: 12px; height: 12px; }
.msg.card { align-self: stretch; max-width: 100%; display: block; font-size: 12px; }
.msg.card > * { width: 100%; box-sizing: border-box; }
/* 보낸 말 줄 세우기 (2026-11-12, 목업 docs/mockups/chat-queue.html): 시각 오른쪽에 물결(답 쓰는 중) · 멈춘 점(순서 기다림) · 체크(답 왔음) */
.msg .bubble .time .tk { display: inline-flex; align-items: center; gap: 2.5px; height: 11px; margin-left: 5px; vertical-align: -1px; }
.tk i { width: 3.5px; height: 3.5px; border-radius: 50%; background: currentColor; opacity: .55; }
.tk.tk-work i { animation: tkWave 1s infinite ease-in-out; }      /* 이름은 tk-: 그냥 .work는 가운데 작업 영역(세로 배치)이라 점이 세로로 섰다 */
.tk.tk-work i:nth-child(2) { animation-delay: .15s; } .tk.tk-work i:nth-child(3) { animation-delay: .3s; }
@keyframes tkWave { 0%, 80%, 100% { transform: translateY(0); opacity: .45; } 40% { transform: translateY(-3px); opacity: 1; } }
.tk svg { width: 13px; height: 13px; stroke-width: 2.4; }
/* 답 위 질문 한 줄 — 누르면 그 질문으로 올라가 잠깐 빛남 */
.msg .bubble .quote { display: block; width: 100%; margin: -2px 0 8px; padding: 6px 10px 6px 11px; border: 0; border-left: 3px solid var(--accent); border-radius: 6px; background: var(--accent-soft); text-align: left; white-space: normal; line-height: 1.45; cursor: pointer; transition: background .2s; }
.msg .bubble .quote:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.msg .bubble .quote:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.quote .q-who { display: block; font-size: 12px; font-weight: 600; color: var(--accent); }
.quote .q-text { display: block; font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg .bubble { transition: box-shadow .5s; }
.msg.flash .bubble { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 22%, transparent); }
/* 빛남이 웜그레이의 비서 말풍선 그림자(.msg:not(.me):not(.err) .bubble)에 덮이지 않게 (11-13) */
.chat .msg.flash .bubble, .chat .msg.flash:not(.me):not(.err) .bubble { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 28%, transparent); }

/* ── 말풍선 메뉴 · 고정 · 답장 (11-13, 목업 docs/mockups/chat-pins.html) ── */
.msg .bubble .time .pm { display: inline-flex; margin-right: 4px; vertical-align: -2px; }      /* 고정한 말: 시각 앞 작은 핀 */
.msg .bubble .time .pm svg { width: 11px; height: 11px; }
.msg.ctx .bubble { border-color: var(--line-strong); }                                       /* 메뉴를 띄운 말 */
.msg.me .bubble .quote { background: rgba(255, 255, 255, .45); }                             /* 내 말 위 답장한 말 */
.msg.me .bubble:has(.quote) { min-width: 0; }                                                /* 긴 한 줄이 말풍선을 밀어내지 않게(줄임표) */
.rail-menu.msg-menu { min-width: 150px; }
/* 입력칸 위 답장할 말 */
.chat-input .reply-to { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s var(--easeOutExpo); }
.chat-input .reply-to.on { grid-template-rows: 1fr; }
.chat-input .reply-to > div { overflow: hidden; min-height: 0; }
.chat-input .reply-to .rt { display: flex; align-items: center; gap: 8px; margin: 0 4px 8px; padding: 6px 6px 6px 11px; border-left: 3px solid var(--accent); border-radius: 6px; background: var(--accent-soft); }
.chat-input .reply-to .rt > svg { flex: none; width: 16px; height: 16px; color: var(--accent); }
.chat-input .reply-to .rt-txt { flex: 1; min-width: 0; line-height: 1.45; }
.chat-input .reply-to .q-who { display: block; font-size: 12px; font-weight: 600; color: var(--accent); }
.chat-input .reply-to .q-text { display: block; font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-input .reply-to .x { flex: none; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.chat-input .reply-to .x:hover { background: rgba(20, 24, 30, .06); color: var(--fg); }
.chat-input .reply-to .x svg { width: 15px; height: 15px; }
/* 복사 알림 */
.chat .copied { position: absolute; left: 50%; top: 84px; z-index: 8; transform: translate(-50%, 6px); opacity: 0; pointer-events: none; padding: 7px 14px; border-radius: 16px;
  background: var(--fg); color: #fff; font-size: 12.5px; white-space: nowrap; transition: opacity .2s, transform .3s var(--easeOutExpo); }
.chat .copied.on { opacity: 1; transform: translate(-50%, 0); }
/* 고정한 메시지 창: 채팅 패널 안에서만 오른쪽에서 밀려 들어오는 새 종이 (대시보드 · 탭은 그대로) */
.pin-sheet { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; background: var(--card); transform: translateX(100%); visibility: hidden;
  box-shadow: -18px 0 40px rgba(56, 45, 35, 0); transition: transform .6s var(--easeOutExpo), box-shadow .6s var(--easeOutExpo), visibility 0s linear .6s; }
.pin-sheet.on { transform: none; visibility: visible; box-shadow: -18px 0 40px rgba(56, 45, 35, .12); transition: transform .6s var(--easeOutExpo), box-shadow .6s var(--easeOutExpo), visibility 0s; }
.pin-sheet .ps-head { flex: none; display: flex; align-items: center; gap: 12px; padding: 12px 14px 8px; }
.pin-sheet .ps-back { flex: none; width: 56px; height: 56px; padding: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--line); background: var(--card); box-shadow: 0 2px 8px rgba(20, 24, 31, .06); color: var(--fg); transition: background .2s; }
.pin-sheet .ps-back:hover { background: var(--surface2); }
.pin-sheet .ps-back svg { width: 20px; height: 20px; }
.pin-sheet .ps-ttl { display: flex; flex-direction: column; min-width: 0; }
.pin-sheet .ps-ttl b { font-size: 17px; color: var(--fg); letter-spacing: -.01em; }
.pin-sheet .ps-ttl span { font-size: 12.5px; color: var(--gray); }
.pin-sheet .msg { animation: none; }
.pin-sheet .msg .go { flex: none; align-self: center; width: 30px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--card); color: var(--fg); cursor: pointer; display: grid; place-items: center; transition: background .2s; }
.pin-sheet .msg .go svg { width: 15px; height: 15px; }
.pin-sheet .msg .bubble { cursor: pointer; }
.pin-sheet .msg:hover .bubble { border-color: var(--line-strong); }
.pin-sheet .msg:hover .go { background: var(--surface2); }
.pin-sheet .msg .bubble .who { display: block; margin-bottom: 2px; font-size: 12px; font-weight: 600; color: var(--muted); }
.pin-sheet .none { margin: auto; padding: 24px; text-align: center; font-size: 13px; line-height: 1.6; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .pin-sheet, .pin-sheet.on, .chat-input .reply-to, .chat .copied { transition: none; } }
@keyframes blink { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.chat-input { flex: none; padding: 8px 12px 12px; }
.chat-input .box { display: flex; align-items: flex-start; gap: 8px; padding: 8px; border: 1px solid transparent; border-radius: 22px; background: var(--surface2); transition: border-color .4s; }
.chat-input .box:focus-within { border-color: var(--accent); }
.chat-input textarea { flex: 1; min-width: 0; height: 62px; min-height: 62px; border: 0; outline: 0; resize: none; padding: 9px 6px; line-height: 22px; font-family: inherit; font-size: 14px; color: var(--fg); background: none; }   /* 두 줄 높이로 고정(타자 쳐도 안 커짐), 버튼은 위에 맞춤 */
.chat-input textarea::placeholder { color: var(--dim); }
.chat-input .tool, .chat-input .send { flex: none; width: 40px; height: 40px; border: 1px solid transparent; border-radius: 50%; display: grid; place-items: center; cursor: pointer; transition: background .5s var(--easeOutExpo), color .5s var(--easeOutExpo), border-color .4s, transform .25s var(--easeOutExpo); }
.chat-input .tool { background: transparent; color: var(--gray); }
.chat-input .tool:hover { border-color: var(--line-strong); color: var(--fg); }
.chat-input .send { background: var(--accent); color: #fff; border-color: var(--accent); }
.chat-input .send:hover { background: var(--fg); border-color: var(--fg); }
.chat-input .send:active { transform: scale(.92); }
.chat-input .send:disabled { opacity: .5; cursor: default; }
.chat-input .send.stop { background: var(--red); border-color: var(--red); }      /* 작업·답변 중엔 보내기 대신 중지 */
.chat-input .send.stop svg { fill: currentColor; stroke: none; }
.chat-input .hint { margin-top: 8px; padding: 0 8px; font-size: 11.5px; color: var(--dim); }
/* ── 탭 페이지: 계약서 리스트 · 차량 리스트 · 연동 ── */
.page { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px 24px; }
.page-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.page-top .q { flex: 1; min-width: 180px; height: 36px; padding: 0 16px; border: 1px solid transparent; border-radius: var(--r-pill); background: var(--surface2); font: inherit; font-size: 13px; color: var(--fg); transition: border-color .4s; }
.page-top .q:focus { outline: 0; border-color: var(--accent); }
.page-top .q:disabled { background: #f7f8f9; }
.page-top .cnt { font-size: 13px; color: var(--muted); }
.page-top .btn-main { height: 34px; padding: 0 14px; font-size: 13px; }
.sub { font-size: 13px; color: var(--muted); }
.tbl-wrap { border: 1px solid var(--line); border-radius: 18px; overflow-x: auto; }
.tbl { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 13px; }
.tbl th { padding: 11px 14px; background: var(--surface2); color: var(--gray); font-weight: 500; font-size: 12px; text-align: left; white-space: nowrap; }
.tbl td { padding: 10px 14px; border-top: 1px solid var(--line-soft); color: var(--text); white-space: nowrap; }
.tbl tbody tr:hover td { background: rgba(29, 94, 240, .04); }
.tbl .r { text-align: right; }
.tbl .t { max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.tag { font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); }
.badge { font-size: 12px; font-weight: 500; padding: 2px 8px; border-radius: 6px; background: #eef0f3; color: var(--text); white-space: nowrap; }
.badge.ok { background: var(--accent-soft); color: var(--accent); }
.badge.wait { background: #fff4d6; color: #8a5a00; }
/* 차량 리스트 탭 */
.vfilters { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--line); }
.chip.vf { min-height: 34px; height: 34px; padding: 0 12px; border: 0; border-radius: 0; background: none; font-size: 13.5px; color: var(--gray); }
.chip.vf:hover { background: none; color: var(--fg); }
.chip.vf small { color: inherit; font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; margin-left: 2px; }
.chip.vf[aria-pressed="true"] { color: var(--accent); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }
.chip.vf.warn:not([aria-pressed="true"]) { color: var(--amber); }
/* 표를 탭 안에 고정된 창으로: 위 틀(검색·칩·조건)은 제자리, 표만 남은 높이를 차지해 안에서 양방향 스크롤.
   가로 손잡이는 창 바닥에 항상 붙어 어느 행을 보든 손이 닿는다. 머리줄은 위에, 차량번호 열은 왼쪽에 고정 */
.page.vpage { flex: 1; min-height: 0; padding-bottom: 12px; }
.vgrid { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; background: #fff; }
.vgrid .tbl-wrap { flex: 1; min-height: 0; overflow: auto; border: 0; border-radius: 0; scrollbar-width: none; }   /* 브라우저 가로 스크롤바 대신 아래 손잡이 */
.vgrid .tbl-wrap::-webkit-scrollbar { display: none; }
.vgrid .tbl { border-collapse: separate; border-spacing: 0; }
.vgrid .tbl th { position: sticky; top: 0; z-index: 2; border-bottom: 1px solid var(--line); }
.vgrid .tbl tbody tr:first-child td { border-top: 0; }
.vtbl th.plate, .vtbl td.plate { position: sticky; left: 0; z-index: 1; background: #fff; }
.vgrid:has(.hbar:not(.off)) .vtbl .plate { box-shadow: 1px 0 0 var(--line); }
.vtbl th.plate { z-index: 3; }
.vtbl th.plate.asc, .vtbl th.plate.desc { background: #e9edf3; }
.vtbl tbody tr:hover td.plate, .vtbl tr.vrow.open td.plate { background: #f7f8f9; }
.vtbl td.plate.hit { background: #f3f5f9; }
.vgrid .hbar { height: 26px; padding: 0 8px; border-top: 1px solid var(--line); background: #fafbfc; }
.vgrid .hbar.off { display: none; }
.vgrid .hbar button { width: 22px; height: 18px; border-radius: 5px; font-size: 13px; padding: 0; }
.vgrid .hbar .track { height: 8px; border-radius: 5px; }
.vgrid .hbar .thumb { top: 0; height: 8px; border-radius: 5px; opacity: .7; }
.vgrid .hbar .thumb:hover { opacity: 1; }
.vgrid .hbar .pos { font-size: 11px; min-width: 64px; }
/* 7열 고정(좌우로 밀지 않게): 연식·색상·주행거리·배차일은 차량 둘째 줄, 만기는 날짜 아래 남은 날 */
.vtbl { table-layout: fixed; min-width: 700px; font-size: 13.5px; }
.vtbl th, .vtbl td { padding: 4px 8px; overflow: hidden; text-overflow: ellipsis; }
.vtbl th { height: 34px; background: #fff; font-size: 12.5px; }
.vtbl td { height: 46px; line-height: 1.35; }
.vtbl th[data-sort="plate"] { width: 128px; }
.vtbl th[data-sort="status"] { width: 92px; }
.vtbl th[data-sort="who"] { width: 76px; }
.vtbl th[data-sort="back"] { width: 104px; }
.vtbl th[data-sort="ins_end"], .vtbl th[data-sort="inspect_end"] { width: 96px; }
.vtbl .t { max-width: none; }
.vtbl .t .nm { display: block; overflow: hidden; text-overflow: ellipsis; font-weight: 500; color: var(--fg); }
.vtbl .t small { display: block; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; color: var(--muted); }
/* 번호판 모양: 왼쪽 파란 띠 */
.vplate { position: relative; display: inline-flex; align-items: center; height: 26px; padding: 0 8px 0 11px; overflow: hidden; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--line-strong); font-weight: 600; color: var(--fg); font-variant-numeric: tabular-nums; vertical-align: middle; }
.vplate::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--accent); }
/* 상태 표시는 주차장 줄과 같은 칸 모양 */
.mk { display: inline-flex; align-items: center; gap: 6px; }
.mk i { flex: none; width: 9px; height: 14px; border-radius: 2px; background: var(--c); box-shadow: var(--sh, none); }
.mk.late { --c: #d9730d; }
.mk.run { --c: var(--accent); }
.mk.wait { --c: var(--card); --sh: inset 0 0 0 1.5px var(--line-strong); }
.mk.etc { --c: #c5c9cf; }
.vtbl tr.vrow { cursor: pointer; }
.vtbl tr.vrow.open td { background: #f7f8f9; }
.warn-dot { display: inline-grid; place-items: center; width: 15px; height: 15px; margin-left: 5px; border-radius: 50%; background: #b2452c; color: #fff; font-size: 10px; font-weight: 700; vertical-align: 1px; }
.due { display: block; font-variant-numeric: tabular-nums; }
.due small { display: block; font-size: 12.5px; }
.due.soon { color: var(--amber); font-weight: 600; }
.due.over { color: var(--red); font-weight: 600; }
.vtbl tr.vdetail td { padding: 0 12px 12px; white-space: normal; background: #f7f8f9; }
.vd { position: sticky; left: 12px; box-sizing: border-box; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.vd .kv { display: flex; gap: 8px; font-size: 12px; min-width: 0; padding: 3px 0; border-bottom: 1px solid var(--line-soft); }
.vd .k { flex: none; width: 96px; color: var(--muted); }
.vd .v { color: var(--head); white-space: pre-wrap; overflow-wrap: anywhere; }
.vd-foot { grid-column: 1 / -1; padding-top: 6px; font-size: 11px; color: var(--muted); }
/* 차량 ↔ 계약서 연결 (계약자 칸의 계약서 버튼 · 상세 맨 위 연결 줄 · 계약서 리스트의 차량번호) */
.lnk-doc, .lnk-veh { display: inline-flex; align-items: center; gap: 4px; height: 24px; margin-left: 6px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; color: var(--fg); font-size: 12px; cursor: pointer; white-space: nowrap; vertical-align: middle; }
.lnk-veh { margin-left: 0; margin-right: 6px; }
.lnk-doc { width: 24px; margin: 0 6px 0 0; padding: 0; justify-content: center; }
.lnk-doc svg, .lnk-veh svg { width: 13px; height: 13px; }
.lnk-doc:hover, .lnk-veh:hover { background: var(--fg); color: #fff; border-color: var(--fg); }
.vd-link { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; padding: 8px 10px; margin-bottom: 4px; border-radius: 8px; background: var(--accent-soft); font-size: 12.5px; color: var(--text); }
.vd-link span { flex: 1; min-width: 0; }
.vd-link svg { width: 15px; height: 15px; color: var(--accent); }
.page-top .btn-main svg { width: 15px; height: 15px; margin-right: 4px; vertical-align: -3px; }
.btn-open { height: 28px; padding: 0 10px; border: 1px solid #dde0e5; border-radius: 7px; background: #fff; color: var(--accent); font-size: 12px; cursor: pointer; white-space: nowrap; }
.btn-open:hover { background: var(--accent-soft); border-color: var(--accent); }
.empty-line { padding: 10px 6px; color: var(--muted); }
.empty-box { padding: 36px 20px; border: 1px dashed #cfd3d9; border-radius: 12px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty-box svg { width: 32px; height: 32px; color: #b5bac2; }
.empty-box b { color: var(--head); font-weight: 500; }
.empty-box span { font-size: 12px; line-height: 1.6; max-width: 480px; }
.links { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.lk { padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: #fff; display: flex; flex-direction: column; gap: 10px; transition: border-color .5s var(--easeOutExpo), transform .5s var(--easeOutExpo), background .5s; }
.lk:hover { border-color: var(--line-strong); background: var(--surface2); transform: translateY(-2px); }
.lk-h { display: flex; align-items: center; gap: 10px; }
.lk-h .tile { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .14), 0 2px 4px rgba(0, 0, 0, .15); }
.lk-h .tile svg { width: 22px; height: 22px; }
.lk-h b { font-size: 14px; color: var(--head); }
.lk-h .role { font-size: 12px; color: var(--muted); }
.lk-h .badge { margin-left: auto; }
.lk p { margin: 0; font-size: 12px; color: var(--text); }
.lk .btn-line { align-self: flex-start; height: 30px; font-size: 12px; }
.lk .btn-line:disabled { color: var(--muted); cursor: default; background: #f7f8f9; }

/* 새 에이전트 */
.new-agent { display: flex; flex-direction: column; gap: 18px; max-width: 760px; padding: 20px 24px; }
.new-agent .chip { white-space: nowrap; }
.na-head { display: flex; align-items: center; gap: 14px; }
.na-head .ava { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.na-head h2 { margin: 0; font-size: 18px; color: var(--head); }
.fld { display: flex; flex-direction: column; gap: 6px; }
.fld .lb { font-size: 13px; font-weight: 500; color: var(--head); }
.fld .lb small { font-weight: 400; color: var(--muted); }
.fld input:not([type]), .fld textarea { padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 14px; background: transparent; font: inherit; color: var(--fg); resize: vertical; }
.fld input:focus, .fld textarea:focus { outline: 0; border-color: var(--accent); }
.fld .row { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
/* 토픽 아이콘 고르기 (2026-11-12): 담당 방과 같은 아이콘 타일 20개 + 사진 올리기 */
.ic-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 8px; max-width: 560px; }
.ic-opt { aspect-ratio: 1; max-width: 100%; border: 1px solid var(--line); border-radius: 30%; background: var(--surface2); color: var(--fg); display: grid; place-items: center; cursor: pointer; transition: border-color .2s, background .2s; }
.ic-opt svg { width: 52%; height: 52%; stroke-width: 1.8; }
.ic-opt:hover { border-color: var(--line-strong); }
.ic-opt[aria-pressed="true"] { border-color: var(--fg); box-shadow: 0 0 0 1px var(--fg); background: var(--card); }
.ic-opt:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.na-head .ava.tile { border-radius: 30%; background: var(--surface2); }
.na-head .ava.tile svg { width: 28px; height: 28px; }
.na-head .ava.photo { overflow: hidden; }
.na-head .ava.photo img { width: 100%; height: 100%; object-fit: cover; }
.fld .row .btn-line svg { width: 15px; height: 15px; }
.na-err { font-size: 12.5px; color: var(--red); }
.new-agent [hidden] { display: none !important; }      /* '사진 빼기'는 사진이 있을 때만 (버튼 스타일이 hidden을 덮었다) */
.na-foot { display: flex; justify-content: flex-end; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line-soft); }

/* ── 전자계약서 화면이 쓰는 공용 조각 ─────── */
.btn {
  height: 30px; padding: 0 12px; border: 1px solid #d3d7dd; border-radius: 6px; cursor: pointer;
  background: #fff; white-space: nowrap;
}
.btn:hover { filter: brightness(.97); }
.btn-green { background: var(--green); border-color: var(--green); color: #fff; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-sm { height: 26px; padding: 0 9px; font-size: 11px; }
.icon-btn { width: 32px; height: 32px; border: 0; background: none; border-radius: 6px; display: grid; place-items: center; cursor: pointer; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 10px 20px 20px; font-size: 12px; }
.panel-head { display: flex; align-items: center; gap: 8px; padding: 6px 0 10px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; font-size: 17px; font-weight: 700; color: var(--head); }
.panel-head .right { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.section { padding: 18px 0 6px; border-bottom: 1px solid var(--line); }
.section:last-child { border-bottom: 0; }
.section-head { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.section-head h3 { margin: 0; font-size: 14px; font-weight: 700; color: var(--head); }
.section-head small { color: var(--muted); }

/* ── 전자계약서 관리 (contracts.js) ───────── */
.panel.cx { display: flex; flex-direction: column; height: 100%; min-height: 560px; padding-bottom: 0; }
.cx [hidden] { display: none !important; }
.cx .panel-head { flex: none; flex-wrap: wrap; }
.cx-tabs { display: flex; gap: 2px; margin-left: 14px; }
.cx-tabs { gap: 6px; }
.cx-tabs button { height: 30px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--r-pill); background: transparent; cursor: pointer; color: var(--fg); font-size: 12.5px; transition: background .4s var(--easeOutExpo), color .4s; }
.cx-tabs button:hover { background: var(--fg); border-color: var(--fg); color: #fff; }
.cx-tabs button.on { background: var(--fg); border-color: var(--fg); color: #fff; font-weight: 700; }
.cx-sel { height: 26px; max-width: 260px; padding: 0 4px; border: 1px solid #ccc; border-radius: 2px; background: #fff; font: inherit; color: #333; }
.cx-ic { display: inline-flex; align-items: center; gap: 3px; }
.cx-ic svg { width: 13px; height: 13px; }
.cx-st { margin-left: 6px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.cx-st::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 4px; border-radius: 50%; background: var(--green); }
.cx-st.bad { color: var(--red); }
.cx-st.bad::before { background: var(--red); }
.cx-in { height: 30px; width: 100%; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface2); font: inherit; color: var(--fg); }
.cx-in:focus { outline: 0; border-color: var(--accent); }
.cx-in.filled { background: var(--accent-soft); border-color: rgba(29, 94, 240, .45); }
.cx-in.check { background: #fff8e8; border-color: var(--amber); }
.warn { color: #b7791f; }

/* 새 계약 시작 화면 */
.cx-start { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 30px 0 60px; }
.cx-start h3 { margin: 0; font-size: 18px; font-weight: 400; color: var(--head); }
.cx-start-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 300px)); gap: 20px; width: 100%; justify-content: center; }
.cx-opt {
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 34px 20px 30px;
  border: 1px solid #dcdfe4; border-radius: 10px; background: #fff; cursor: pointer; text-align: center; color: var(--muted);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.cx-opt .ic { width: 64px; height: 64px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.cx-opt { border-radius: 18px; }
.cx-opt .ic svg { width: 30px; height: 30px; }
.cx-opt b { font-size: 17px; color: var(--head); }
.cx-opt span:last-child { line-height: 1.6; }
.cx-opt:hover { border-color: var(--accent); box-shadow: 0 6px 18px rgba(29, 94, 240, .14); }
.cx-opt.drop { border: 2px dashed #ccd1d9; }
.cx-opt.drop:hover, .cx-opt.drop.on { border-color: var(--accent); background: var(--accent-soft); }
.cx-back { border: 0; background: none; color: var(--muted); cursor: pointer; }
.cx-back:hover { color: var(--accent); }

/* 계약 입력 */
.cx-erp { flex: 1; overflow-y: auto; min-height: 0; }
.cx-erp-top { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 8px; padding: 12px 0; background: var(--card); border-bottom: 1px solid var(--line); }
.cx-erp-top label { font-weight: 700; color: var(--head); white-space: nowrap; }
.cx-erp-top .cx-name { width: 300px; }
.cx-erp-top .sp { flex: 1; }
.cx-ver { color: var(--muted); font-size: 11px; }
.cx-erp .section-head h3 { font-size: 13px; }
.cx-more { margin-left: 8px; border: 0; background: none; padding: 0; color: var(--accent); cursor: pointer; font-size: 11px; }
.cx-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 28px; padding-bottom: 8px; }
.cx-fld { display: grid; grid-template-columns: 110px minmax(0, 1fr) 64px; align-items: center; gap: 2px 8px; min-height: 30px; }
.cx-fld label { color: #444; }
.cx-fld .unit { color: var(--muted); font-size: 11px; white-space: nowrap; }
.cx-off { border: 0; background: none; padding: 0 0 0 4px; color: var(--muted); font-size: 11px; cursor: pointer; }
.cx-off:hover { color: var(--red); }
.cx-note { grid-column: 2 / 4; font-size: 11px; color: var(--muted); }
.cx-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0 12px; }
.cx-chip { border: 1px dashed #b5b9c0; background: #fafafa; border-radius: 12px; padding: 3px 10px; cursor: pointer; color: #333; font-size: 11px; }
.cx-chip:hover { border-color: var(--accent); color: var(--accent); }
.cx-empty { padding: 4px 0 10px; color: var(--muted); }
.cx-hint { padding: 12px 0 20px; color: var(--muted); font-size: 11px; }

/* AI 첨삭 · 미리보기 */
.cx-ai { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); margin: 0 -20px; }
.cx-ai aside { display: flex; flex-direction: column; min-height: 0; background: #fbfbfc; }
.cx .splitter { position: relative; cursor: col-resize; }
.cx .splitter::after { content: ""; position: absolute; top: 0; bottom: 0; left: 2px; width: 2px; background: var(--line); transition: background .15s; }
.cx .splitter:hover::after, .cx .splitter.on::after { background: var(--accent); }
.cx-drop { flex: none; display: flex; align-items: center; gap: 10px; margin: 12px; padding: 12px 14px; border: 2px dashed #ccd1d9; border-radius: 6px; color: var(--muted); cursor: pointer; }
.cx-drop svg { width: 24px; height: 24px; color: var(--accent); }
.cx-drop small { font-size: 11px; }
.cx-drop:hover, .cx-drop.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.cx-chat { flex: 1; overflow-y: auto; padding: 4px 12px 12px; display: flex; flex-direction: column; gap: 8px; font-size: 12px; }
.cx-chat > * { flex-shrink: 0; }
.cx-msg { max-width: 92%; padding: 7px 10px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.cx-msg.user { align-self: flex-end; background: var(--accent); color: #fff; border-radius: 12px 4px 12px 12px; }
.cx-msg.ai { align-self: flex-start; background: #fff; color: #1b1b1b; border: 1px solid var(--line); border-radius: 4px 12px 12px 12px; }
.cx-msg.typing { color: var(--muted); }
.cx-msg.sys { align-self: center; max-width: 100%; padding: 0 6px; color: var(--muted); font-size: 11px; text-align: center; }
.cx-msg.err { color: var(--red); }
.cx-box { align-self: stretch; background: #fff; border: 1px solid #dcdfe4; border-radius: 6px; padding: 10px; }
.cx-box > b { color: var(--head); }
.cx-row { display: grid; grid-template-columns: 16px 100px minmax(0, 1fr); gap: 2px 6px; padding: 4px 0; border-top: 1px solid #f0f1f3; font-size: 11px; }
.cx-row .q { grid-column: 3; color: var(--muted); }
.cx-op { display: flex; gap: 8px; padding: 6px 0; border-top: 1px solid #f0f1f3; }
.cx-op code { display: block; margin-top: 2px; font-size: 10px; color: var(--muted); overflow-wrap: anywhere; }
.cx-op.bad { color: var(--red); }
.cx-btns { display: flex; gap: 6px; margin-top: 8px; }
/* 만든 계정 카드 (11-16, chat.js accountCard) */
.acct dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; margin: 8px 0; }
.acct dt { color: var(--muted); }
.acct dd { margin: 0; color: var(--head); overflow-wrap: anywhere; }
.acct .pw { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 15px; letter-spacing: .04em; }
.acct p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.cx-btns .btn:disabled { opacity: .5; cursor: default; }
/* 추출 값 확인 (접힘) */
.cx-confirm-h { display: flex; align-items: center; gap: 8px; }
.cx-confirm-h > span { flex: 1; color: var(--head); }
.cx-confirm-list { margin-top: 8px; }

/* 진행 단계 */
.cx-prog .h { display: flex; align-items: center; margin-bottom: 10px; color: var(--head); }
.cx-prog .h .t { margin-left: auto; font-size: 11px; color: #666c75; }
.cx-prog ol { margin: 0; padding: 0; list-style: none; }
.cx-prog li { position: relative; display: flex; gap: 10px; padding-bottom: 10px; }
.cx-prog li:not(:last-child)::after { content: ""; position: absolute; left: 9px; top: 20px; bottom: 0; width: 2px; background: #e6e9ed; }
.cx-prog li.ok:not(:last-child)::after { background: var(--green); }
.cx-prog li i { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #d5d8de; box-sizing: border-box; background: #fff; }
.cx-prog li.on i { border-color: var(--accent); background: radial-gradient(var(--accent) 0 3.5px, #fff 4px); animation: blink 1s infinite; }
.cx-prog li.ok i { border-color: var(--green); background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat; }
.cx-prog li b { display: block; color: var(--head); }
.cx-prog li.on b { color: var(--accent); }
.cx-prog li small { font-size: 11px; color: #666c75; }
.cx-prog p { margin: 2px 0 0; font-size: 11px; color: #666c75; }
.cx-prog.bad p { color: var(--red); }

/* AI 검토 카드 */
.cx-rv { align-self: stretch; background: #fff; border: 1px solid #dcdfe4; border-radius: 8px; overflow: hidden; }
.cx-rv-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px 8px; }
.cx-rv-head .av { width: 26px; height: 26px; border-radius: 9px; background: var(--accent); color: #fff; display: grid; place-items: center; }
.cx-rv-head .av svg { width: 15px; height: 15px; }
.cx-rv-head h4 { margin: 0; font-size: 14px; color: var(--head); }
.cx-rv-head .meta { margin-left: auto; font-size: 11px; color: #666c75; }
.cx-rv-brief { margin: 0 14px 6px; padding: 10px 12px; border-radius: 6px; background: var(--accent-soft); color: var(--head); font-size: 13px; line-height: 1.65; }
/* 법률 검증 안내 — 검토 카드마다 고정으로 붙는다 (AI 문구에 기대지 않음) */
.cx-rv-note { display: flex; gap: 8px; align-items: flex-start; margin: 0 14px 8px; padding: 8px 10px; border-radius: 6px; background: #fff8e8; color: #6e5210; font-size: 11.5px; line-height: 1.55; }
.cx-rv-note svg { flex: none; width: 14px; height: 14px; margin-top: 2px; color: var(--amber); }
.cx-rv-note b { font-weight: 700; }
.cx-rv-h { display: flex; align-items: center; gap: 6px; padding: 10px 14px 4px; font-weight: 700; color: var(--head); }
.cx-rv-h i { width: 8px; height: 8px; border-radius: 50%; }
.cx-rv-h span { font-weight: 400; color: #666c75; }
.cx-rv-h.good i { background: var(--green); }
.cx-rv-h.must { border-top: 1px solid #f0f1f3; } .cx-rv-h.must i { background: var(--red); }
.cx-rv-h.sug { border-top: 1px solid #f0f1f3; } .cx-rv-h.sug i { background: var(--accent); }
.cx-rv-good { margin: 0; padding: 0 14px 8px 34px; color: #3d3d42; }
.cx-rv-good li { padding: 2px 0; }
.cx-rv-good li::marker { color: var(--green); }
.cx-it { display: flex; gap: 8px; padding: 8px 14px 10px; }
.cx-it.done { opacity: .7; }
.cx-it .no { flex: none; width: 20px; height: 20px; margin-top: 1px; padding: 0; border: 0; border-radius: 50%; font-size: 10px; font-weight: 700; cursor: pointer; display: grid; place-items: center; }
.cx-it .no:disabled { cursor: default; }
.cx-it.must .no { background: var(--red); color: #fff; }
.cx-it.sug .no { background: var(--accent-soft); color: var(--accent); }
.cx-it .no:not(:disabled):hover { box-shadow: 0 0 0 3px rgba(29, 94, 240, .25); }
.cx-it .body { flex: 1; min-width: 0; }
.cx-it .t { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.cx-it .t b { font-size: 13px; color: var(--head); }
.cx-it .val { padding: 0 6px; border-radius: 3px; background: #f1f2f4; color: #333; font-size: 11px; }
.cx-it .why { margin-top: 2px; color: #3d3d42; }
.cx-it .more { margin-top: 6px; padding: 7px 9px; border-left: 2px solid #c9ced6; background: #f7f8fa; font-size: 11px; color: #3d3d42; }
.cx-it .more span { display: block; color: #666c75; }
.cx-it .more > div + div { margin-top: 4px; }
.cx-it .acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.cx-it .acts .btn { height: 26px; font-size: 11px; }
.cx-link { margin-left: auto; border: 0; background: none; padding: 0 2px; color: var(--accent); cursor: pointer; font-size: 11px; }
.cx-done { color: #1f7a65; font-weight: 700; }
.cx-rv-foot { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px 12px; border-top: 1px solid #e6e9ed; background: #fafafb; }
.cx-rv-foot .btn:disabled { background: #f1f2f4; border-color: #dcdfe4; color: #666c75; cursor: default; }
.cx-next { border: 1px solid #dcdfe4; background: #fff; border-radius: 14px; padding: 4px 11px; color: #333; cursor: pointer; }
.cx-next:hover { border-color: var(--accent); color: var(--accent); }
.cx-flash { animation: cxflash 1.2s ease-out 2; }
@keyframes cxflash { 0% { box-shadow: 0 0 0 0 rgba(29, 107, 95, .45); } 100% { box-shadow: 0 0 0 10px rgba(29, 107, 95, 0); } }

.cx-ask { flex: none; display: flex; gap: 6px; padding: 10px 12px; background: #fff; border-top: 1px solid var(--line); }
.cx-ask .cx-in { height: 30px; }
.cx-ask .btn:disabled { opacity: .5; }

.cx-view { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.cx .bar { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.cx .bar #cx-verlist { width: 170px; }
.cx .bar #cx-skin { width: 110px; }
.cx .bar .btn.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.cx .zoom { display: inline-flex; align-items: center; gap: 2px; margin-left: 6px; }
.cx .zoom button { height: 24px; padding: 0 7px; border: 1px solid #ccc; border-radius: 3px; background: #fff; cursor: pointer; font-size: 11px; }
.cx .zoom-label { min-width: 36px; text-align: center; color: var(--muted); font-size: 11px; }
.cx-stage { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
.cx-stage.split { grid-template-columns: minmax(0, 1fr) 380px; }
.cx-stage iframe { width: 100%; height: 100%; border: 0; background: #e9eaec; }
.cx-clauses { display: none; overflow-y: auto; padding: 12px; background: #fbfbfc; border-left: 1px solid var(--line); }
.cx-stage.split .cx-clauses { display: block; }
.cx-src { display: flex; flex-wrap: wrap; gap: 6px 12px; padding: 8px 10px; margin-bottom: 10px; background: #fff; border: 1px solid #dcdfe4; border-radius: 6px; }
.cx-src label { display: inline-flex; align-items: center; gap: 4px; color: var(--head); font-weight: 700; font-size: 11px; }
.cx-src .cx-sel { height: 24px; font-weight: 400; }
.cx-src-hint { margin: -4px 0 10px; font-size: 11px; color: #666c75; }
.cx-src-hint code { padding: 0 3px; border-radius: 3px; background: #f1f2f4; color: #333; }
.cx-src-note { margin-top: 8px; padding-top: 8px; border-top: 1px solid #f0f1f3; font-size: 11px; color: #666c75; }
.cx-src-note .cx-link { margin-left: 2px; padding: 0; font-weight: 700; }
.cx-cl-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; color: var(--head); }
.cx-cl { background: #fff; border: 1px solid #dcdfe4; border-radius: 6px; padding: 8px; margin-bottom: 8px; }
.cx-cl .h { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.cx-cl .k { flex: none; color: var(--muted); font-size: 11px; }
.cx-cl .h .cx-in { font-weight: 700; }
.cx-cl textarea.cx-in { height: auto; min-height: 40px; padding: 6px 8px; line-height: 1.5; resize: vertical; }
.cx-cl.ed { border-color: #f0c96b; background: #fffdf5; }
.cx-edtag { display: inline-block; padding: 0 5px; border-radius: 3px; font-size: 10px; line-height: 16px; font-weight: 600; color: #7a4b00; background: #ffe9b8; }
.cx-cl .h .cx-link { font-size: 11px; padding: 0; }
.cx-cl .h .cx-x { margin-left: auto; }
.cx-part { margin-bottom: 8px; }
.cx-part > summary { cursor: pointer; padding: 6px 2px; font-weight: 700; color: var(--head); }
.cx-part > summary .n { font-weight: 400; color: var(--muted); font-size: 11px; }
.cx-tg { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--head); }
.cx-seg { display: inline-flex; border: 1px solid #d5d8de; border-radius: 4px; overflow: hidden; }
.cx-seg button { height: 26px; padding: 0 8px; border: 0; border-left: 1px solid #d5d8de; background: #fff; color: #444; font: inherit; font-size: 12px; cursor: pointer; }
.cx-seg button:first-child { border-left: 0; }
.cx-seg button.on { background: var(--accent); color: #fff; }
.cx-x { flex: none; width: 24px; height: 24px; border: 0; background: none; color: var(--muted); cursor: pointer; }
.cx-x:hover { color: var(--red); }


/* ── 좁은 화면 ───────────────────────────── */
@media (max-width: 1100px) {
  .cx-grid { grid-template-columns: 1fr; }
  .cx-start-opts { grid-template-columns: minmax(0, 300px); }
  .cx .splitter { display: none; }
  .cx-stage.split { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
}
/* 태블릿·폰: 왼쪽 줄은 위로 눕히고, 채팅 아래에 작업 영역을 쌓는다 */
@media (max-width: 900px) {
  body { flex-direction: column; height: auto; }
  .rail { width: auto; height: auto; position: static; flex-direction: row; padding: 10px 16px; overflow-x: auto; }
  .agents { flex-direction: row; }
  .rail-lbl { flex-direction: row; padding: 0 6px; }
  .rail-lbl i { width: 1px; height: 44px; }
  .rail-foot { display: none; }
  .shell { height: auto; grid-template-columns: 1fr !important; gap: 12px; padding: 12px 16px 24px; }
  .chat { height: 560px; }
  .grip { display: none; }
  .mi .tt { display: none; }
  .desk { height: 640px; }
}

/* 말로 입력 (마이크) — 듣는 중엔 붉게 깜빡인다 */
.chat-input .tool.mic.on { background: var(--red); color: #fff; animation: micpulse 1.4s ease-in-out infinite; }
@keyframes micpulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, .45); } 50% { box-shadow: 0 0 0 6px rgba(220, 38, 38, 0); } }

/* 답 기다리는 동안의 진행 카드 — 작업 카드보다 가볍게 */
.cx-prog.lite { padding: 8px 10px; background: #fafbfc; }
.cx-prog.lite .h { margin-bottom: 6px; }
.cx-prog.lite .h b { font-size: 12px; }
.cx-prog.lite li { padding-bottom: 6px; }
.cx-prog.lite li i { width: 16px; height: 16px; }
.cx-prog.lite li:not(:last-child)::after { left: 7px; top: 16px; }
.cx-prog.lite li b { font-size: 12px; }
.cx-prog.lite li small { display: none; }
.cx-prog.lite li.on small { display: inline; }

/* 오늘 현황 카드 (모렌이 채팅, 접속하면 먼저 올라온다) */
/* 오늘 현황: 카드 틀 없이 대화처럼. 한 줄 요약 → 챙길 일(왼쪽 색 막대, 줄 전체가 버튼) → 최근 계약서. 숫자는 옆 업무 현황에 있어 다시 쓰지 않는다 */
.cx-rv.brief { display: flex; flex-direction: column; gap: 16px; padding: 0 4px; border: 0; border-radius: 0; background: none; overflow: visible; }
.brief-lead { margin: 0; font-size: 17px; line-height: 1.5; font-weight: 600; color: var(--head); }
.brief-lead span { display: block; margin-bottom: 2px; font-size: 13px; font-weight: 400; color: var(--muted); }
.brief-grp h5 { margin: 0 0 2px; font-size: 13px; font-weight: 600; color: var(--muted); }
.todo { position: relative; display: block; width: 100%; padding: 8px 10px 8px 14px; border: 0; border-radius: 8px; background: none; text-align: left; cursor: pointer; transition: background .3s; }
.todo::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: var(--accent); }
.todo.must::before { background: var(--red); }
.todo:hover { background: var(--surface2); }
.todo b { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 600; color: var(--head); }
.todo b svg { width: 15px; height: 15px; color: var(--dim); }
.todo small { display: block; font-size: 13px; line-height: 1.5; color: var(--muted); }
.brief-docs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.brief-docs > span { width: 100%; font-size: 13px; font-weight: 600; color: var(--muted); }
.brief-docs .cx-next { display: inline-flex; align-items: center; gap: 5px; }
.brief-docs .cx-next svg { width: 13px; height: 13px; }
.brief .cx-next { font-size: 13px; }
.brief-off { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
/* 돈 흐름 (아침 보고 · 금융일정을 누르면 나오는 모렌이 설명 카드). 금액은 줄 오른쪽, 연체만 빨강 */
.todo b em { flex: none; font: 700 15px var(--display); font-stretch: 105%; font-style: normal; font-variant-numeric: tabular-nums; color: var(--head); }
.todo.must b em { color: var(--red); }
.todo.calm::before { background: var(--line-strong); }
.fin-month { display: flex; flex-direction: column; gap: 7px; width: 100%; margin-top: 6px; padding: 12px 14px; border: 0; border-radius: 12px; background: var(--surface2); text-align: left; cursor: pointer; font: inherit; color: inherit; }
.fin-month:hover { background: #eaecef; }
.fin-month .top { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--muted); }
.fin-month .top b { font: 700 19px var(--display); font-stretch: 105%; color: var(--head); font-variant-numeric: tabular-nums; }
.fin-month .bar { display: flex; height: 9px; border-radius: 5px; overflow: hidden; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.fin-month .bar i { display: block; height: 100%; }
.fin-month .bar .got { background: var(--accent); } .fin-month .bar .late { background: var(--red); }
.fin-month .lg { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--muted); }
.fin-month .lg span::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 5px; border-radius: 2px; vertical-align: -1px; }
.fin-month .lg .got::before { background: var(--accent); } .fin-month .lg .late::before { background: var(--red); } .fin-month .lg .left::before { background: #fff; box-shadow: inset 0 0 0 1px var(--line-strong); }
.fin-month .lg b, .fin-month .out b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.fin-month .out { font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.fin-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fin-sum > div { display: flex; flex-direction: column; gap: 1px; padding: 10px 12px; border-radius: 10px; background: var(--surface2); }
.fin-sum > div:first-child, .fin-sum > div:last-child { grid-column: 1 / -1; }
.fin-sum span { font-size: 12.5px; color: var(--muted); }
.fin-sum b { font: 700 18px var(--display); font-stretch: 105%; color: var(--head); font-variant-numeric: tabular-nums; }
.fin-sum small { font-size: 12px; color: var(--muted); }
.fin-sec h5 { display: flex; justify-content: space-between; margin: 0 0 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.fin-sec h5 em { font-style: normal; color: var(--text); font-variant-numeric: tabular-nums; }
.fin-sec.on h5 { color: var(--accent); }
.fin-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border: 0; border-radius: 8px; background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.fin-row:hover:not([disabled]) { background: var(--surface2); }
.fin-row[disabled] { cursor: default; }
.fin-row .d { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.fin-row .w { min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.fin-row .w b { font-size: 13.5px; font-weight: 600; color: var(--head); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fin-row .w small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fin-row .a { font-size: 13.5px; font-weight: 600; color: var(--head); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fin-row .s { height: 22px; padding: 0 8px; border-radius: 11px; display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface2); color: var(--muted); }
.fin-row .s.연체 { background: rgba(220, 38, 38, .08); color: var(--red); }
.fin-row .s.받음 { background: rgba(22, 163, 74, .09); color: var(--green); }
.fin-sec .none { margin: 2px 8px; font-size: 12.5px; color: var(--muted); }
.fin-sec .calc { margin: 4px 8px 0; font-size: 12px; line-height: 1.5; color: var(--dim); }
.brief-start { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 2px 14px 12px; }
.brief-start .bs { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 10px; border: 1px dashed #cfd3d9; border-radius: 12px; background: #fff; cursor: pointer; text-align: center; }
.brief-start .bs:hover { border-color: var(--accent); background: var(--accent-soft); }
.brief-start .tile { width: 40px; height: 40px; border-radius: 12px; color: #fff; display: grid; place-items: center; }
.brief-start .tile svg { width: 22px; height: 22px; }
.brief-start b { font-size: 13px; color: var(--head); }
.brief-start span:not(.tile) { font-size: 11px; color: var(--muted); }
@media (max-width: 1100px) { .brief-start { grid-template-columns: 1fr; } }

/* 차량 리스트 '조건 보기' — 조건 띠(왼쪽 줄 남색의 연한 색조) + 정렬 가능한 열 머리 */
.vcond { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; border: 1px solid #cfd6e0; border-radius: 10px; background: #e9edf3; font-size: 13px; color: var(--rail-bg); }
.vcond[hidden] { display: none; }
.vcond .lb { font-weight: 700; color: #4a5566; }
.vcond .pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 8px; background: #fff; border: 1px solid #cfd6e0; color: var(--rail-bg); }
.vcond .pill b { font-weight: 500; color: var(--rail-bg); }
.vcond .pill .rm { border: 0; background: none; color: #8a94a3; cursor: pointer; padding: 0; font-size: 14px; line-height: 1; }
.vcond .pill .rm:hover { color: var(--red); }
.vcond .n { margin-left: auto; color: var(--rail-bg); font-weight: 500; }
.vcond .clear { border: 0; background: none; color: #4a5566; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 12.5px; }
.vcond .clear:hover { color: var(--rail-bg); }
.vtbl th.s { cursor: pointer; user-select: none; }
.vtbl th.s:hover { color: var(--head); background: #eef0f3; }
.vtbl th .ar { display: inline-block; width: 14px; color: #b5bac2; font-size: 11px; margin-left: 2px; }
.vtbl th.asc, .vtbl th.desc { color: var(--rail-bg); background: #e9edf3; }
.vtbl th.asc .ar, .vtbl th.desc .ar { color: var(--rail-bg); }
.vtbl td.hit { background: #f3f5f9; }
.vtbl tr.vrow.open td { background: #f7f8f9; }
.chip.vf.zero:not([aria-pressed="true"]) { color: var(--muted); border-color: var(--line-soft); }
.chip.vf.zero:not([aria-pressed="true"]) small { color: #b5bac2; }

/* 차량 리스트 엑셀 내보내기 — 가로 손잡이 · 미리보기 모달 · 채팅 파일 카드 */
.hbar { display: flex; align-items: center; gap: 8px; padding: 2px 2px 0; }
.hbar.off { display: none; }
.hbar button { width: 28px; height: 24px; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; display: grid; place-items: center; color: var(--text); font-size: 15px; line-height: 1; }
.hbar button:hover { background: #eef0f3; }
.hbar .track { flex: 1; height: 14px; border-radius: 8px; background: #e3e7ee; position: relative; cursor: pointer; }
.hbar .thumb { position: absolute; top: 2px; height: 10px; border-radius: 6px; background: var(--rail-bg); opacity: .75; cursor: grab; min-width: 40px; }
.hbar .thumb:active { cursor: grabbing; opacity: 1; }
.hbar .pos { font-size: 11.5px; color: var(--muted); min-width: 70px; text-align: right; font-variant-numeric: tabular-nums; }
.xmodal { position: fixed; inset: 0; z-index: 60; background: rgba(27, 34, 44, .38); display: flex; align-items: center; justify-content: center; padding: 24px; }
.xmodal .sheet { width: min(1100px, 96vw); max-height: 90vh; background: #fff; border-radius: 14px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.xmodal .top { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.xmodal .top b { font-size: 14px; color: var(--head); }
.xmodal .top .fn { font: 12.5px ui-monospace, Menlo, monospace; color: var(--muted); background: #f3f5f9; padding: 3px 8px; border-radius: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.xmodal .top .x { margin-left: auto; border: 0; background: none; font-size: 20px; color: var(--muted); cursor: pointer; }
.xmodal .stabs { display: flex; gap: 4px; padding: 8px 16px 0; border-bottom: 1px solid var(--line); background: #fafbfc; }
.xmodal .stab { padding: 6px 12px; border: 1px solid var(--line); border-bottom: 0; border-radius: 8px 8px 0 0; background: #eef0f3; font-size: 12.5px; cursor: pointer; color: var(--muted); }
.xmodal .stab.on { background: #fff; color: var(--head); font-weight: 500; margin-bottom: -1px; }
.xmodal .body { overflow: auto; flex: 1; min-height: 0; scrollbar-color: #aeb6c2 #eef0f3; }
.xmodal .body::-webkit-scrollbar { height: 14px; width: 14px; }
.xmodal .body::-webkit-scrollbar-track { background: #eef0f3; }
.xmodal .body::-webkit-scrollbar-thumb { background: #aeb6c2; border-radius: 8px; border: 3px solid #eef0f3; }
.xmodal .hbar { padding: 6px 16px; border-top: 1px solid var(--line); background: #fafbfc; }
.xmodal .foot { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.xmodal .foot .btn-main { margin-left: auto; height: 34px; padding: 0 14px; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.xmodal .foot .btn-main svg { width: 15px; height: 15px; }
.xl { border-collapse: collapse; font: 12px/1.4 var(--font); min-width: 100%; }
.xl th, .xl td { border: 1px solid #d9dde3; padding: 4px 8px; white-space: nowrap; text-align: left; }
.xl th { background: var(--rail-bg); color: #fff; font-weight: 500; position: sticky; top: 0; z-index: 1; }
.xl td.n { text-align: right; font-variant-numeric: tabular-nums; }
.xl tr:nth-child(even) td { background: #fafbfc; }
.xl td.rowno, .xl th.rowno { background: #eef0f3; color: var(--muted); text-align: center; width: 36px; position: sticky; left: 0; z-index: 2; }
.xl th.rowno { z-index: 3; }
.kvs { padding: 14px 18px; display: grid; grid-template-columns: 140px 1fr; gap: 6px 14px; font-size: 13px; }
.kvs .k { color: var(--muted); }
.kvs .v { color: var(--head); overflow-wrap: anywhere; }
.fcard { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; }
.fcard .fh { display: flex; align-items: center; gap: 8px; min-width: 0; }
.fcard .fh .ic { width: 32px; height: 32px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-dark); display: grid; place-items: center; flex: none; }
.fcard .fh b { font-size: 13px; color: var(--head); overflow-wrap: anywhere; }
.fcard .fh span { display: block; color: var(--muted); }
.fcard .fc { color: var(--text); }
.fcard .fa { display: flex; gap: 6px; flex-wrap: wrap; }
.fcard .fa .btn svg { width: 14px; height: 14px; }

/* 대화 찾기(크롬식) — 머리줄 아래 오른쪽 위 띠, 말풍선 안 노란 표시(현재는 주황), 다른 담당 칩, 왼쪽 줄 노란 배지 */
.chat { position: relative; }
.chat .find { position: absolute; top: 74px; right: 12px; z-index: 5; display: flex; align-items: center; gap: 4px; padding: 6px 6px 6px 10px; background: #fff; border: 1px solid #cfd6e0; border-radius: 10px; box-shadow: 0 8px 24px rgba(27, 34, 44, .16); transform: translateY(-8px); opacity: 0; pointer-events: none; transition: transform .15s, opacity .15s; }
.chat .find.on { transform: none; opacity: 1; pointer-events: auto; }
.chat .find input { width: 190px; height: 30px; border: 0; outline: 0; font: inherit; font-size: 13.5px; color: var(--head); background: none; }
.chat .find .cnt { font-size: 12px; color: var(--muted); min-width: 46px; text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chat .find .cnt.none { color: var(--red); }
.chat .find .sep { width: 1px; height: 20px; background: var(--line); margin: 0 2px; }
.chat .find button { width: 28px; height: 28px; border: 0; border-radius: 6px; background: none; color: var(--text); cursor: pointer; display: grid; place-items: center; }
.chat .find button svg { width: 16px; height: 16px; }
.chat .find button:hover { background: #eef0f3; }
.chat .find button:disabled { opacity: .35; cursor: default; }
.chat .find .drop { position: absolute; right: 0; top: 46px; width: 340px; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.chat .find .results { width: 100%; max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; padding: 4px; background: #fff; border: 1px solid #cfd6e0; border-radius: 10px; box-shadow: 0 8px 24px rgba(27, 34, 44, .16); }
.chat .find .results:empty { display: none; }
.chat .find .results button { width: 100%; height: auto; display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 8px; place-items: start; padding: 7px 8px; text-align: left; font: inherit; }
.chat .find .results .d { font-size: 12px; font-weight: 600; color: var(--head); white-space: nowrap; }
.chat .find .results .d small { display: block; font-weight: 400; color: var(--muted); }
.chat .find .results .t { font-size: 12.5px; line-height: 1.5; color: var(--text); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.chat .find .results .who { margin-right: 4px; font-weight: 600; color: var(--muted); }
.chat .find .results mark { background: #ffe58a; color: inherit; border-radius: 2px; }
.chat .find .results .none { margin: 6px 8px; font-size: 12.5px; color: var(--muted); }
.chat .find .others { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; max-width: 320px; }
.chat .find .others button { width: auto; height: 24px; padding: 0 9px; border: 1px solid #e6d9a6; border-radius: 12px; background: #fff8dc; font-size: 11.5px; color: #5c4a00; display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; }
.chat .find .others button b { font-weight: 700; }
mark.f { background: #ffe066; color: #1b1f24; padding: 0 1px; border-radius: 2px; }
mark.f.cur { background: #ff9632; color: #1b1f24; box-shadow: 0 0 0 2px #ff9632; }
.msg.me .bubble mark.f { background: #ffe066; color: #1b1f24; }
.agent .badge-f { position: absolute; top: 0; right: 14px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #ffd766; color: #1b1f24; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--rail-bg); }

/* ── 인트로: 가운데 MOREN이 글자씩 떠오르고(O는 계약서 마크), 로딩이 끝나면 O가 커져 왼쪽(담당 줄 + 채팅) 칸이 된다 (intro.js) ── */
.PreLoader { position: fixed; inset: 0; z-index: 1000; background: var(--bg); display: grid; place-items: center; visibility: hidden; opacity: 0; }
body.intro .PreLoader { visibility: visible; opacity: 1; }
body.intro.loaded .PreLoader { opacity: 0; transition: opacity .6s var(--easeOutExpo) .2s; }
body.ready .PreLoader { visibility: hidden; }
.PreLoader .stack { display: flex; flex-direction: column; align-items: center; gap: 30px; }
.mark { display: flex; align-items: center; gap: .02em; font: 800 clamp(64px, 15vw, 220px)/1 var(--display); font-stretch: 118%; letter-spacing: -.02em; color: var(--fg); }
.mark .ch { display: block; opacity: 0; transform: translateY(.14em); transition: opacity .9s var(--easeOutExpo), transform 1.2s var(--easeOutExpo); transition-delay: var(--delay); }
.mark.show .ch { opacity: 1; transform: none; }
.mark.out .ch { opacity: 0; transform: translateX(var(--drift)); transition: opacity .45s var(--easeOutExpo), transform .9s var(--easeInOutExpo); transition-delay: 0s; }
.mark .o { position: relative; display: block; width: .74em; height: .92em; margin: 0 .05em; filter: drop-shadow(0 6px 14px rgba(20, 24, 30, .14)); opacity: 0; transform: scale(.7) translateY(.06em); transition: opacity .9s var(--easeOutExpo) .3s, transform 1.2s var(--easeOutExpo) .3s; }
.mark.show .o { opacity: 1; transform: none; }
.mark.out .o { opacity: 0; transition: opacity .25s; }
.doc { display: block; width: 100%; height: 100%; fill: none; stroke: var(--fg); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.doc .paper { fill: #fff; }
.doc .fold { fill: rgba(29, 94, 240, .1); }
.doc .ln { stroke-dasharray: 60; stroke-dashoffset: 60; opacity: .85; }
.doc .chk { stroke: var(--accent); stroke-width: 5; opacity: 1; }
.mark.show .doc .ln { animation: draw .7s var(--easeOutExpo) forwards; animation-delay: var(--delay); }
@keyframes draw { to { stroke-dashoffset: 0; } }
.PreLoader .loading { display: flex; gap: 2px; font: 600 12px/1 var(--display); text-transform: uppercase; letter-spacing: .2em; color: var(--accent); opacity: 0; transition: opacity .8s var(--easeOutExpo) .7s; }
.PreLoader.show .loading { opacity: 1; }
.PreLoader .loading i { font-style: normal; display: block; animation: char .8s var(--easeOutExpo) infinite alternate-reverse; animation-delay: var(--delay); }
@keyframes char { from { transform: translateY(4px); } to { transform: translateY(-4px); } }
.PreLoader .bar { width: clamp(160px, 22vw, 300px); height: 2px; background: var(--line); border-radius: 1px; overflow: hidden; opacity: 0; transition: opacity .6s .7s; }
.PreLoader.show .bar { opacity: 1; }
.PreLoader .bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 1.5s cubic-bezier(.45, 0, .55, 1) .8s; }
.PreLoader.show .bar i { width: 100%; }
/* O가 자라는 막: O 위에 똑같이 겹쳐 시작해 왼쪽 칸 크기·모서리·색으로 변한 뒤, 진짜 줄·채팅이 그 안에서 떠오르면 사라진다 */
.Morph { position: fixed; z-index: 1001; box-sizing: border-box; border: 2px solid var(--fg); background: transparent; visibility: hidden; pointer-events: none; }
.Morph.on { visibility: visible; }
.Morph.fade { opacity: 0; transition: opacity .7s var(--easeOutExpo) .15s; }
.in { transform: translateY(0); opacity: 1; transition: transform 1.1s var(--easeOutExpo), opacity .8s var(--easeOutExpo); transition-delay: var(--delay, 0s); }
body.intro:not(.ready) .in { transform: translateY(18px); opacity: 0; transition: none; }
body.intro:not(.ready) .rail { opacity: 0; }
body.intro:not(.ready) .work { opacity: 0; transform: translateX(28px); transition: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .PreLoader, .Morph { display: none !important; }
}

/* 적용 전 미리보기 (계약서 탭): 띠 + 제안 카드의 '바뀐 곳' 항목 */
.cx-prev { flex: none; display: flex; align-items: center; gap: 10px; padding: 7px 12px; background: var(--accent-soft); border-bottom: 1px solid rgba(29, 94, 240, .25); font-size: 12.5px; color: var(--head); }
.cx-prev[hidden] { display: none; }
/* 채팅으로 묻는 고치기(마지막 수단, 11-13): 적용은 채팅에서 말로 — 바뀌는 곳 수 · 이동 · 적용 버튼 대신 안내, 거절 자리는 '닫기' */
.cx-prev.voice > span:nth-of-type(2), .cx-prev.voice .cx-prev-nav, .cx-prev.voice #cx-prev-ok { display: none; }
.cx-prev.voice .cx-prev-tag::after { content: " · 주황 테두리가 바뀌는 곳 · 채팅에서 '응'이면 적용"; font-weight: 600; }
.cx-prev-tag { font-size: 11px; font-weight: 700; letter-spacing: .04em; color: #fff; background: var(--accent); padding: 3px 9px; border-radius: 12px; white-space: nowrap; }
.cx-prev-nav { display: inline-flex; align-items: center; gap: 3px; }
.cx-prev-nav button { width: 24px; height: 24px; border: 1px solid #ccc; border-radius: 12px; background: #fff; color: var(--head); cursor: pointer; font-size: 14px; line-height: 1; padding: 0; }
.cx-prev-nav span { min-width: 32px; text-align: center; font-size: 11.5px; color: var(--muted); }
.cx-prev .sp { flex: 1; }
.cx-chg-row { display: flex; align-items: flex-start; gap: 8px; width: 100%; padding: 6px 4px; border: 0; border-top: 1px solid #f0f1f3; background: transparent; text-align: left; font: inherit; font-size: 12px; color: var(--text); cursor: pointer; line-height: 1.45; }
.cx-chg-row:hover { background: rgba(29, 94, 240, .05); }
.cx-chg-row.on { background: var(--accent-soft); }
.cx-chg-row .t { flex: 1; overflow-wrap: anywhere; }
.cx-chg-row .pg { flex: none; font-size: 11px; color: var(--muted); white-space: nowrap; }
.cx-chg-no { flex: none; display: inline-grid; place-items: center; width: 17px; height: 17px; margin-top: 1px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; }
.cx-ops-raw { margin-top: 6px; font-size: 11px; color: var(--muted); }
.cx-ops-raw summary { cursor: pointer; }
.cx-ops-raw code { display: block; margin-top: 4px; font-size: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.cx-btns .cx-hint { margin-left: auto; align-self: center; font-size: 11px; color: var(--muted); }
.cx-cl.off { background: #fafafa; color: var(--muted); }
.cx-cl.off s { display: block; font-size: 12px; color: #9a3a3a; }

/* ── 회사 기본 세팅(템플릿): 시작 선택지 · 세팅 표시 · 저장 시트 · 카드 · 관리 탭 ── */
.cx-start-opts.three { grid-template-columns: repeat(3, minmax(0, 280px)); }
.cx-opt.tpl { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); cursor: default; }
.cx-opt.tpl .cx-sel { width: 100%; max-width: 220px; height: 30px; }
.cx-opt.tpl small { font-size: 11px; color: var(--muted); line-height: 1.4; }
#cx-tpl-save svg, .cx-tpl-tag svg { width: 13px; height: 13px; margin-right: 4px; vertical-align: -2px; }
.cx-tpl-tag { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 600; white-space: nowrap; }
.cx-ai { position: relative; }
.cx-sheet { position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: #fff; border-left: 1px solid var(--line); box-shadow: -10px 0 30px rgba(20, 24, 30, .1); display: flex; flex-direction: column; z-index: 5; animation: sheetIn .6s var(--easeOutExpo, cubic-bezier(.16, 1, .3, 1)) both; }
@keyframes sheetIn { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.cx-sheet .h { flex: none; display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--line); color: var(--accent); }
.cx-sheet .h b { font-size: 15px; color: var(--head); }
.cx-sheet .h svg { width: 16px; height: 16px; }
.cx-sheet .h .x { margin-left: auto; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-strong); background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--fg); }
.cx-sheet .h .x:hover { background: var(--fg); color: #fff; }
.cx-sheet .body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; scrollbar-width: thin; }
.cx-sheet .body > * { flex: none; }      /* overflow:hidden인 자식(.cat)이 세로 flex 안에서 0으로 쪼그라들지 않게 */
.cx-sheet .foot { flex: none; display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }
.cx-sheet .foot .hint { flex: 1; font-size: 12px; color: var(--muted); }
.cx-sheet .foot svg { width: 13px; height: 13px; margin-right: 4px; vertical-align: -2px; }
.cx-sheet .fld { display: flex; flex-direction: column; gap: 5px; }
.cx-sheet .fld > span { font-size: 12px; font-weight: 700; color: var(--head); }
.cx-sheet .fld .cx-in, .cx-sheet .fld .cx-sel { height: 36px; font-size: 13.5px; }
.cx-sheet .sec { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; }
.cx-sheet .sec b { font-size: 13px; color: var(--head); }
.cx-sheet .sec span { font-size: 11.5px; color: var(--muted); }
.cx-sheet .parts { display: flex; flex-direction: column; gap: 6px; }
.cx-sheet .part { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; font-size: 13px; cursor: pointer; }
.cx-sheet .part.fixed { cursor: default; background: #fafafb; }
.cx-sheet .part input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }
.cx-sheet .part .n { flex: 1; color: var(--head); font-weight: 500; display: flex; flex-direction: column; min-width: 0; }
.cx-sheet .part .n small { font-size: 11px; color: var(--muted); font-weight: 400; }
.cx-sheet .part i { font-style: normal; font-size: 10.5px; color: var(--accent); background: var(--accent-soft); border-radius: 8px; padding: 2px 7px; white-space: nowrap; }
.cx-sheet .cat { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.cx-sheet .cat .ch { display: flex; justify-content: space-between; padding: 7px 12px; background: var(--surface2, #f2f3f5); font-size: 12.5px; font-weight: 700; color: var(--head); }
.cx-sheet .cat .ch small { font-weight: 500; color: var(--muted); }
.cx-sheet .frow { display: flex; align-items: center; gap: 8px; padding: 5px 12px; border-top: 1px solid var(--line); font-size: 12.5px; }
.cx-sheet .frow .fn { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 6px; color: var(--text); overflow: hidden; }
.cx-sheet .frow .fn small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-seg3 { display: inline-flex; flex: none; border: 1px solid var(--line); border-radius: 14px; padding: 2px; gap: 1px; }
.cx-seg3 button { height: 22px; padding: 0 8px; border: 0; border-radius: 11px; background: transparent; font: inherit; font-size: 11px; font-weight: 600; color: var(--muted); cursor: pointer; }
.cx-seg3 button:hover { color: var(--head); }
.cx-seg3 button[aria-pressed="true"].fix { background: #6c727c; color: #fff; }
.cx-seg3 button[aria-pressed="true"].def { background: var(--green); color: #fff; }
.cx-seg3 button[aria-pressed="true"].per { background: var(--accent); color: #fff; }
.cx-sheet .note { margin: 0; font-size: 11.5px; color: var(--muted); }
.cx-sheet .note b.fix { color: #6c727c; } .cx-sheet .note b.def { color: var(--green); } .cx-sheet .note b.per { color: var(--accent); }
/* 채팅 카드: 만들까요? · 세팅에도 반영? */
.cx-tplask, .cx-tplsync { border-radius: 12px; }
.cx-tpl-sum { margin-top: 6px; font-size: 12.5px; color: var(--text); }
.cx-tpl-vals { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.cx-tpl-vals span { display: inline-flex; flex-direction: column; padding: 4px 9px; border: 1px solid var(--line); border-radius: 9px; font-size: 12px; color: var(--head); font-weight: 600; }
.cx-tpl-vals span small { font-size: 10px; font-weight: 400; color: var(--muted); }
.cx-tpl-note { margin: 8px 0 0; font-size: 11.5px; color: var(--muted); }
.cx-tpl-note.dim { font-size: 11px; }
.cx-tpl-note.cx-tpl-warn { color: #b45309; font-weight: 600; }
.cx-tplask .cx-btns { align-items: center; flex-wrap: wrap; }
.cx-tplask .cx-btns .cx-sel { height: 26px; font-size: 11px; max-width: 180px; }
.cx-tplask .cx-done, .cx-tplsync .cx-done { display: block; margin-top: 6px; font-size: 12px; color: var(--green); }
.cx-link-sum { margin: 8px 0 0; padding-left: 16px; font-size: 12.5px; color: var(--text); line-height: 1.6; }
.cx-vlink .cx-btns .cx-sel { max-width: 240px; }
/* 관리 탭 */
.tpl-list { display: flex; flex-direction: column; gap: 8px; }
.tpl-row { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 14px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.tpl-row .tile { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; color: #fff; }
.tpl-row .tile svg { width: 18px; height: 18px; }
.tpl-row b { display: block; font-size: 14px; color: var(--head); }
.tpl-row .sub { font-size: 12px; color: var(--muted); }
.tpl-row .meta { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 4px; }
.tpl-row .acts { display: flex; gap: 6px; }
.tpl-hist { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.tpl-hist .hh { padding: 10px 16px; background: var(--surface2, #f2f3f5); font-weight: 700; font-size: 13px; color: var(--head); display: flex; align-items: center; gap: 8px; }
.tpl-hist .hh select { margin-left: auto; }
.tpl-hist .hr { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; padding: 9px 16px; border-top: 1px solid var(--line); font-size: 13px; }
.tpl-hist .hr .v { font-weight: 700; color: var(--head); }
.tpl-hist .hr .v.cur { color: var(--accent); }
.tpl-hist .hr .d { color: var(--text); font-size: 12.5px; }
.tpl-hist .hr .u { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.tpl-rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.tpl-rules .rule { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; font-size: 12.5px; color: var(--text); }
.tpl-rules .rule b { display: block; color: var(--head); margin-bottom: 3px; }
.tpl-empty { padding: 40px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: 16px; }
.tpl-empty b { display: block; color: var(--head); margin-bottom: 6px; }

/* ── 채권 (app.js bondCard · renderBonds). 보고 카드 bk-, 가운데 진행판 bb-. 단계 색: 안내 파랑 · 미납 주황 · 시동차단 빨강 · 외주 진회색 ── */
.bk .brief-grp h5 { display: flex; justify-content: space-between; }
.bk .brief-grp h5 em { font-style: normal; color: var(--text); font-variant-numeric: tabular-nums; }
.bk-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.bk-kpis > div { display: flex; flex-direction: column; gap: 1px; padding: 10px 12px; border-radius: 10px; background: var(--surface2); }
.bk-kpis span { font-size: 12.5px; color: var(--muted); }
.bk-kpis b { font: 700 19px var(--display); font-stretch: 105%; color: var(--head); font-variant-numeric: tabular-nums; }
.bk-kpis .hot b { color: var(--red); }
.bk-kpis small { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bk-approve { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 12px; box-shadow: inset 0 0 0 1.5px var(--red); }
.bk-approve h5 { margin: 0; font-size: 13px; font-weight: 600; color: var(--red); }
.bk-approve .t { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.bk-approve .t b { font-size: 15px; color: var(--head); }
.bk-approve .t em { font: 700 15px var(--display); font-style: normal; color: var(--red); font-variant-numeric: tabular-nums; }
.bk-approve p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--muted); }
.bk-approve .acts { display: flex; flex-wrap: wrap; gap: 6px; }
.btn-main.red { background: var(--red); border-color: var(--red); }
.btn-main.red:hover { background: var(--fg); border-color: var(--fg); }
.bk-log { display: flex; flex-direction: column; }
.bk-log button { display: grid; grid-template-columns: 38px 54px minmax(0, 1fr) auto; align-items: center; gap: 8px; width: 100%; padding: 6px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 13px; text-align: left; cursor: pointer; color: inherit; }
.bk-log button:hover { background: var(--surface2); }
.bk-log .tm { color: var(--dim); font-variant-numeric: tabular-nums; }
.bk-log .who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.bk-log .who b { margin-right: 4px; color: var(--head); font-weight: 600; }
.bk-log .none { margin: 2px 6px; font-size: 12.5px; color: var(--muted); }
.bk-chip { height: 22px; padding: 0 8px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; font: 600 11.5px var(--display); white-space: nowrap; }
.g-pre { background: var(--accent-soft); color: var(--accent); }
.g-due { background: rgba(180, 83, 9, .09); color: var(--amber); }
.g-stop { background: rgba(220, 38, 38, .08); color: var(--red); }
.g-out { background: #3f4652; color: #fff; }
.g-ok { background: rgba(22, 163, 74, .09); color: var(--green); }
.bk-st { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bk-st.wait { color: var(--red); } .bk-st.plan { color: var(--accent); }

.page.bb { gap: 16px; }
.bb-lanes { display: grid; grid-template-columns: 3fr 5fr; gap: 10px; }
.bb-grp { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bb-grp .gh { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.bb-grp .gh::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.bb-grp .cols { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.bb-col { display: flex; flex-direction: column; gap: 6px; min-height: 190px; padding: 8px; border-radius: 10px; background: var(--surface2); }
.bb-col .ch { display: flex; flex-direction: column; gap: 1px; padding: 0 2px 4px; }
.bb-col .ch b { display: flex; justify-content: space-between; align-items: center; font: 700 13px var(--display); color: var(--head); }
.bb-col .ch b i { font: 600 11.5px var(--font); font-style: normal; color: var(--muted); }
.bb-col .ch small { font-size: 12px; line-height: 1.35; color: var(--muted); }
.bb-col .empty { margin: auto 0; text-align: center; font-size: 12px; color: var(--dim); }
.bb-card { display: flex; flex-direction: column; gap: 3px; padding: 9px 10px; border: 0; border-radius: 8px; background: #fff; box-shadow: 0 0 0 1px var(--line); font: inherit; text-align: left; cursor: pointer; color: inherit; }
.bb-card:hover { box-shadow: 0 0 0 1.5px var(--line-strong); }
.bb-card[aria-current="true"] { box-shadow: 0 0 0 2px var(--fg); }
.bb-card.stop { box-shadow: 0 0 0 1.5px var(--red); } .bb-card.stop[aria-current="true"] { box-shadow: 0 0 0 2.5px var(--red); }
.bb-card.out { background: #f7f7f8; }
.bb-card b { font-size: 13.5px; line-height: 1.3; color: var(--head); }
.bb-card small { font-size: 12px; line-height: 1.35; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bb-card .amt { font: 700 13.5px var(--display); color: var(--head); font-variant-numeric: tabular-nums; }
.bb-card .nx { margin-top: 3px; padding-top: 5px; box-shadow: inset 0 1px 0 var(--line); font-size: 11.5px; line-height: 1.35; color: var(--muted); }
.bb-card .nx b { font-size: 11.5px; color: var(--text); } .bb-card .nx b.wait { color: var(--red); }
.bb-detail { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; padding-top: 14px; box-shadow: inset 0 1px 0 var(--line); }
.bb-dh { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.bb-dh b { font-size: 16px; color: var(--head); }
.bb-dh span { font-size: 13px; color: var(--muted); }
.bb-dh .btn-line { margin-left: auto; }
.bb-steps { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); }
.bb-sp { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0 2px; text-align: center; }
.bb-sp::before { content: ""; position: absolute; top: 9px; left: -50%; width: 100%; height: 2px; background: var(--line); }
.bb-sp:first-child::before { display: none; }
.bb-sp.done::before, .bb-sp.now::before { background: var(--fg); }
.bb-sp .dot { position: relative; z-index: 1; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px var(--line-strong); }
.bb-sp.done .dot { background: var(--fg); box-shadow: none; }
.bb-sp.done .dot::after { content: ""; position: absolute; left: 7px; top: 4px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.bb-sp.now .dot { background: var(--red); box-shadow: 0 0 0 4px rgba(220, 38, 38, .12); }
.bb-sp b { font: 700 12px var(--display); color: var(--head); }
.bb-sp small { font-size: 11.5px; line-height: 1.3; color: var(--muted); }
.bb-sp .s { font-size: 11.5px; font-weight: 600; color: var(--text); }
.bb-sp.now .s { color: var(--red); }
.bb-sp.todo b, .bb-sp.todo small { color: var(--dim); }
.bb-facts { margin-top: 14px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.bb-facts div { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 8px; background: var(--surface2); }
.bb-facts span { font-size: 12px; color: var(--muted); }
.bb-facts b { font-size: 13.5px; color: var(--head); font-variant-numeric: tabular-nums; }
.bb-kakao { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; background: #b9cee6; align-self: start; }
.bb-kakao .kh { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; color: #36475c; }
.bb-kakao .bub { padding: 10px 12px; border-radius: 4px 14px 14px 14px; background: #fff; font-size: 13px; line-height: 1.55; color: #1c2430; }
.bb-kakao .bt { display: block; margin-top: 8px; padding: 7px 0; border-radius: 6px; background: var(--surface2); text-align: center; font-size: 12.5px; font-weight: 600; color: var(--fg); }
.bb-kakao .tm { align-self: flex-end; font-size: 11px; color: #36475c; }
.bb-kakao .none { font-size: 13px; color: #36475c; }
@media (max-width: 1100px) { .bb-lanes { grid-template-columns: 1fr; } .bb-detail { grid-template-columns: 1fr; } }

/* 하루 창 (chat.js): 맨 위 작은 버튼 두 개 · 날짜 구분선. 날짜는 새벽 4시에 바뀐다 */
.day-div { display: flex; align-items: center; gap: 10px; margin: 4px 0 0; font-size: 12px; font-weight: 600; color: var(--muted); }
.day-div::before, .day-div::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.day-div.today { color: var(--accent); }
.day-div.today::before, .day-div.today::after { background: rgba(29, 94, 240, .25); }
/* 스크롤하는 동안 위에 뜨는 날짜 · 오른쪽 아래 '최신 대화로' 버튼 (2026-11-09) */
.day-pill { position: absolute; top: 10px; left: 50%; z-index: 4; padding: 5px 12px; border-radius: 12px; background: rgba(27, 31, 36, .5); color: #fff;
  font-size: 12px; font-weight: 600; white-space: nowrap; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); pointer-events: none;
  opacity: 0; transform: translate(-50%, -4px); transition: opacity .25s, transform .25s; }
.day-pill.on { opacity: 1; transform: translate(-50%, 0); }
.to-end { position: absolute; right: 14px; bottom: 12px; z-index: 4; width: 38px; height: 38px; display: grid; place-items: center; padding: 0;
  border: 1px solid var(--line); border-radius: 50%; background: var(--card); color: var(--fg); box-shadow: 0 4px 14px rgba(20, 24, 31, .12); cursor: pointer;
  opacity: 0; transform: translateY(8px) scale(.9); pointer-events: none; transition: opacity .2s, transform .2s, background .2s; }
.to-end.on { opacity: 1; transform: none; pointer-events: auto; }
.to-end:hover { background: var(--surface2); }
.to-end svg { width: 18px; height: 18px; }
.to-end.new::after { content: ""; position: absolute; top: 0; right: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); border: 2px solid var(--card); }

/* ── 아침·저녁 보고 (app.js reportDoc · renderReport). 채팅은 문서 한 장(rdoc), 가운데는 목차 + 페이지(rpt) ── */
.rdoc { border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; line-height: 1.5; color: var(--text); overflow: hidden; }
.rdoc .dh { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 14px 16px 12px; background: var(--surface2); }
.rdoc .dh b { display: block; margin-top: 3px; font-size: 17px; font-weight: 700; color: var(--head); line-height: 1.3; }
.rdoc .dh small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.rdoc .dh .no { font: 500 11px var(--display); color: var(--dim); white-space: nowrap; padding-top: 3px; }
.rdoc .dr { padding: 12px 16px 0; }
.rdoc .dr .lbl { display: block; margin-bottom: 5px; }
.rdoc .dr .sum { font-size: 14px; font-weight: 600; color: var(--head); line-height: 1.55; }
.rdoc .mon { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.rdoc .mon div { display: flex; flex-direction: column; min-width: 0; padding: 8px 10px; border-radius: 10px; background: var(--surface2); }
.rdoc .mon span { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rdoc .mon b { font: 700 16px var(--display); font-stretch: 105%; color: var(--head); font-variant-numeric: tabular-nums; }
.rdoc .mon .hot b { color: var(--red); }
.rdoc .lines { display: flex; flex-direction: column; gap: 2px; margin: 0 -6px; }
.rdoc .line { display: grid; grid-template-columns: 7px 44px minmax(0, 1fr) 14px; align-items: center; gap: 8px; width: 100%; padding: 7px 8px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 12.5px; color: inherit; text-align: left; cursor: pointer; transition: background .2s; }
.rdoc .line:hover:not([disabled]) { background: var(--surface2); }
.rdoc .line i { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.rdoc .line.need i { background: var(--red); } .rdoc .line.ok i { background: var(--green); }
.rdoc .line b { font-size: 13px; color: var(--head); }
.rdoc .line span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.rdoc .line svg { width: 13px; height: 13px; color: var(--dim); }
.rdoc .line[disabled] { cursor: default; } .rdoc .line[disabled] b, .rdoc .line[disabled] span { color: var(--dim); } .rdoc .line[disabled] svg { visibility: hidden; }
.rdoc .df { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); }
.rdoc .df > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rdoc .df button { flex: none; white-space: nowrap; }
.rdoc .df button { height: 28px; padding: 0 12px; border: 0; border-radius: 14px; background: var(--accent); color: #fff; font: inherit; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 3px; cursor: pointer; }
.rdoc .df button:hover { background: var(--fg); }
.rdoc .df button svg { width: 12px; height: 12px; }

.page.rpt { flex: 1; min-height: 0; display: grid; grid-template-columns: 176px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: 0; padding: 0; overflow: hidden; }   /* 탭 크기에 고정 — 넘치면 페이지 안에서만 스크롤 */
.rtoc { min-height: 0; overflow-y: auto; padding: 16px 10px 16px 14px; display: flex; flex-direction: column; gap: 2px; background: var(--surface2); border-radius: 0 0 0 var(--r-panel); }
.rtoc > .lbl { padding: 4px 10px 8px; }
.rtoc button { display: grid; grid-template-columns: 22px minmax(0, 1fr) 8px; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border: 0; border-radius: 10px; background: none; font: inherit; font-size: 13.5px; font-weight: 500; color: var(--muted); text-align: left; cursor: pointer; transition: background .2s, color .2s; }
.rtoc button:hover { background: rgba(255, 255, 255, .6); color: var(--head); }
.rtoc button[aria-current="true"] { background: #fff; color: var(--head); font-weight: 600; }
.rtoc button .n { font: 600 11px var(--display); color: var(--dim); }
.rtoc button i { width: 7px; height: 7px; border-radius: 50%; }
.rtoc button.need i { background: var(--red); } .rtoc button.ok i { background: var(--green); }
.rtoc .mode { margin-top: auto; display: flex; flex-direction: column; gap: 4px; }
.rtoc .mode button { display: flex; justify-content: center; gap: 7px; height: 34px; border-radius: 17px; background: #fff; box-shadow: inset 0 0 0 1px var(--line-strong); font-size: 12.5px; }
.rtoc .mode button svg { width: 14px; height: 14px; }
.rtoc .mode button[aria-pressed="true"] { background: var(--fg); color: #fff; box-shadow: none; }
.rtoc .mode button[disabled] { color: var(--dim); box-shadow: inset 0 0 0 1px var(--line); cursor: default; }
.rpt .rp { min-width: 0; min-height: 0; overflow-y: auto; scrollbar-width: thin; padding: 22px 28px 28px; display: flex; flex-direction: column; gap: 16px; }
.rpt .head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.rpt .head h2 { margin: 3px 0 0; font-size: 22px; font-weight: 700; color: var(--head); line-height: 1.25; display: flex; align-items: center; gap: 10px; }
.rpt .head .meta { font-size: 13px; color: var(--muted); margin-top: 3px; }
.rpt .head .no { text-align: right; font: 500 11.5px var(--display); color: var(--dim); line-height: 1.6; white-space: nowrap; }
.rst { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 11px; }
.rst.need { background: rgba(220, 38, 38, .08); color: var(--red); } .rst.ok { background: rgba(22, 163, 74, .09); color: var(--green); } .rst.off { background: var(--surface2); color: var(--dim); }
.rpt .lead { margin: 0; font-size: 15.5px; line-height: 1.65; color: var(--head); max-width: 76ch; }
.rpt .kpi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.rpt .kpi div { padding: 12px 14px; border-radius: 12px; background: var(--surface2); display: flex; flex-direction: column; gap: 2px; }
.rpt .kpi span { font-size: 12.5px; color: var(--muted); }
.rpt .kpi b { font: 700 22px var(--display); font-stretch: 105%; color: var(--head); font-variant-numeric: tabular-nums; line-height: 1.1; }
.rpt .kpi b small { font: 500 12px var(--font); color: var(--muted); margin-left: 2px; }
.rpt .kpi .hot b { color: var(--red); }
.rsec h4 { margin: 14px 0 2px; font-size: 13px; font-weight: 600; color: var(--muted); display: flex; gap: 8px; }
.rsec h4:first-child { margin-top: 0; }
.rsec h4 em { font-style: normal; color: var(--text); font-variant-numeric: tabular-nums; }
.rsec .cap { font-size: 13px; color: var(--muted); font-weight: 400; }
.rtbl { width: 100%; border-collapse: collapse; font-size: 13.5px; table-layout: auto; }
.rtbl th { position: static; text-align: left; height: 32px; padding: 0 8px 0 0; font-size: 12px; font-weight: 500; color: var(--muted); background: none; box-shadow: inset 0 -1px 0 var(--line); white-space: nowrap; }
.rtbl td { height: auto; padding: 9px 8px 9px 0; box-shadow: inset 0 -1px 0 rgba(20, 24, 30, .06); vertical-align: top; font-size: 13.5px; white-space: normal; }
.rtbl tr:last-child td { box-shadow: none; }
.rtbl td.c1 { color: var(--head); font-weight: 600; white-space: nowrap; }
.rtbl td.c2 { color: var(--text); }
.rtbl td small { display: block; font-size: 12.5px; color: var(--muted); white-space: normal; }
.rtbl th.r, .rtbl td.r { text-align: right; padding-right: 0; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rtbl th.r:not(:last-child), .rtbl td.r:not(:last-child) { padding-right: 18px; }
.rtbl td.r.hot { color: var(--red); font-weight: 600; } .rtbl td.r.ok { color: var(--green); font-weight: 600; } .rtbl td.r.dim { color: var(--muted); }
.rtbl tr.rlk td { cursor: pointer; } .rtbl tr.rlk:hover td { background: var(--surface2); }
.rsec .sf { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; }
.rsec .sf .note { font-size: 12.5px; color: var(--muted); }
.rsec .sf .go { margin-left: auto; height: 34px; padding: 0 14px; font-size: 13px; }
.rsec .off { margin: 0; padding: 14px; border-radius: 12px; background: var(--surface2); font-size: 13.5px; color: var(--muted); line-height: 1.6; }
.rpt .nav { margin-top: auto; padding-top: 14px; display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--dim); }
.rpt .nav button { height: 32px; padding: 0 12px; border: 0; border-radius: 16px; background: none; box-shadow: inset 0 0 0 1px var(--line-strong); font: inherit; font-size: 13px; font-weight: 600; color: var(--head); display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.rpt .nav button svg { width: 13px; height: 13px; }
.rpt .nav button:hover { background: var(--fg); color: #fff; }
.rpt .nav button[disabled] { visibility: hidden; }

/* ── 과태료 (app.js finesCard · renderFines). 보고 카드 fk-, 탭 ff- (채권의 bb-·bk- 부품을 같이 쓴다) ── */
.fk-re { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 12px; box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.fk-re h5 { margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.fk-re .t { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.fk-re .t b { font-size: 15px; color: var(--head); }
.fk-re .t em { font: 700 15px var(--display); font-style: normal; color: var(--head); font-variant-numeric: tabular-nums; }
.fk-re p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--muted); }
.fk-re .acts { display: flex; gap: 6px; }
.page.ff { gap: 10px; }
.ff .filters { display: flex; gap: 2px; box-shadow: inset 0 -1px 0 var(--line); }
.ff .filters button { height: 34px; padding: 0 12px; border: 0; background: none; font: inherit; font-size: 13.5px; font-weight: 500; color: var(--muted); cursor: pointer; }
.ff .filters button b { font-weight: 600; margin-left: 3px; font-variant-numeric: tabular-nums; }
.ff .filters button[aria-pressed="true"] { color: var(--accent); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }
.ff-list { max-height: 46%; overflow-y: auto; }
.ff .rtbl th { position: sticky; top: 0; z-index: 1; background: #fff; }
.ff .rtbl td { white-space: nowrap; vertical-align: middle; padding: 7px 8px 7px 0; }
.ff .rtbl tr[aria-current="true"] td { background: var(--accent-soft); }
.ff-st { height: 24px; padding: 0 9px; border-radius: 12px; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; }
.ff-st.lost { background: rgba(220, 38, 38, .08); color: var(--red); } .ff-st.ok { background: rgba(22, 163, 74, .09); color: var(--green); }
.ff-st.wait { background: var(--surface2); color: var(--muted); } .ff-st.re { background: var(--accent-soft); color: var(--accent); }
.ff-det { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; padding: 14px 16px 16px; border-radius: 12px; background: var(--surface2); }
.ff-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ff-steps .bb-sp .dot { background: #fff; }
.ff-steps .bb-sp.done .dot { background: var(--fg); }
.ff-steps .bb-sp.wait .dot { box-shadow: inset 0 0 0 2px var(--accent); }
.ff-det .bb-facts div { background: #fff; }
.ff-det .bb-facts b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ff-match { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #fff; font-size: 12.5px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.ff-match b { color: var(--head); }
.ff-tl { position: relative; height: 8px; margin-bottom: 14px; border-radius: 4px; background: var(--accent-soft); }
.ff-tl i { position: absolute; top: -4px; width: 3px; height: 16px; border-radius: 2px; background: var(--red); }
.ff-tl span { position: absolute; top: 10px; font-size: 11px; color: var(--dim); white-space: nowrap; }
.ff-docs { display: flex; flex-direction: column; gap: 6px; }
.ff-docs .k { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.ff-docs button { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border: 0; border-radius: 10px; background: #fff; font: inherit; font-size: 13px; color: var(--head); text-align: left; cursor: pointer; }
.ff-docs button:hover:not([disabled]) { box-shadow: inset 0 0 0 1px var(--line-strong); }
.ff-docs button[disabled] { cursor: default; color: var(--muted); }
.ff-docs button small { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.ff-docs button svg { width: 15px; height: 15px; }

/* ── 시세 (app.js marketCard · renderMarket, 목업 docs/mockups/market.html). 탭 mk-: 왼쪽 모델 목록 + 오른쪽 상세(평균가 상단 고정, 아래 거래 7건 스크롤) ── */
.page.mk { flex: 1; min-height: 0; display: grid; grid-template-columns: 292px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: 0; padding: 0; overflow: hidden; }
.page.mk > * { height: 100%; min-height: 0; }                /* 칸이 줄 높이를 넘지 않게 — 넘치는 건 목록·거래만 안에서 스크롤 */
.mk-list { display: flex; flex-direction: column; box-shadow: inset -1px 0 0 var(--line); }
.mk-list .top { flex: none; padding: 14px 14px 8px 18px; display: flex; align-items: baseline; gap: 8px; }
.mk-list .top h3 { margin: 0; font-size: 14px; font-weight: 600; color: var(--muted); }
.mk-list .top span { font-size: 12.5px; color: var(--dim); }
.mk-list ul { list-style: none; margin: 0; padding: 0 8px 10px; overflow-y: auto; flex: 1; min-height: 0; }
.mk-mdl { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; font: inherit; text-align: left; cursor: pointer; color: inherit; transition: background .2s; }
.mk-mdl:hover { background: var(--surface2); }
.mk-mdl[aria-pressed="true"] { background: var(--accent-soft); }
.mk-mdl .nm { grid-column: 1; font-size: 14px; font-weight: 600; color: var(--head); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-mdl .mkr { grid-column: 1; font-size: 12px; color: var(--dim); line-height: 1.3; }
.mk-mdl .pr { grid-column: 2; grid-row: 1 / 3; text-align: right; font: 700 17px/1.2 var(--display); font-stretch: 105%; color: var(--head); font-variant-numeric: tabular-nums; }
.mk-mdl .pr small { display: block; font: 400 11.5px var(--font); color: var(--dim); }
.mk-mdl .pr.none { font: 500 13px var(--font); color: var(--dim); }              /* 최근 30일 모렌 실거래에 없는 모델 (11-18) */
.mk-detail .lab.none i { background: var(--dim); }
.mk-detail { display: flex; flex-direction: column; }
.mk-detail .hero { flex: none; padding: 20px 28px 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 24px; box-shadow: inset 0 -1px 0 var(--line); }
.mk-detail .ttl { grid-column: 1 / 3; display: flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.mk-detail .ttl h2 { margin: 0; font-size: 22px; font-weight: 700; color: var(--head); line-height: 1.3; }
.mk-detail .ttl span { font-size: 13px; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; }   /* 모렌 이름이 길어도 한 줄 */
.mk-detail .lab { font-size: 13.5px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.mk-detail .lab i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.mk-detail .avg { grid-column: 1; margin-top: 4px; font: 700 64px/1 var(--display); font-stretch: 108%; color: var(--head); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.mk-detail .avg small { font: 500 18px var(--font); color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.mk-detail .avg .pre { font: 600 24px var(--font); color: var(--muted); margin-right: 6px; }
.mk-detail .side { grid-column: 2; grid-row: 2 / 4; align-self: end; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.mk-detail .side b { color: var(--head); font-weight: 600; font-variant-numeric: tabular-nums; }
.mk-detail .side .days { display: flex; gap: 14px; }
.mk-detail .side .rng { display: flex; align-items: center; gap: 8px; }
.mk-detail .side .bar { position: relative; width: 140px; height: 6px; border-radius: 3px; background: var(--surface2); box-shadow: inset 0 0 0 1px var(--line); }
.mk-detail .side .bar em { position: absolute; top: -3px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px #fff; margin-left: -6px; }
.mk-detail .deals { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 28px 16px; }
.mk-detail .deals h3 { margin: 10px 0 2px; font-size: 13px; font-weight: 600; color: var(--muted); display: flex; justify-content: space-between; }
.mk-detail .deals h3 span { font-weight: 400; color: var(--dim); }
.mk-detail .deal { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; gap: 2px 16px; padding: 11px 0; box-shadow: inset 0 -1px 0 var(--line-soft); }
.mk-detail .deal:last-child { box-shadow: none; }
.mk-detail .deal .dt { grid-row: 1 / 3; font-size: 13.5px; color: var(--muted); font-variant-numeric: tabular-nums; line-height: 1.4; }
.mk-detail .deal .dt small { display: block; font-size: 12px; color: var(--dim); }
.mk-detail .deal .fee { font: 700 30px/1.1 var(--display); font-stretch: 105%; color: var(--head); font-variant-numeric: tabular-nums; }
.mk-detail .deal .fee small { font: 500 14px var(--font); color: var(--muted); margin-left: 2px; }
.mk-detail .deal .ds { grid-column: 2; font-size: 13px; color: var(--muted); line-height: 1.45; }
.mk-detail .deal .ds b { color: var(--text); font-weight: 500; }
.mk-detail .deal.old .fee { color: var(--text); font-weight: 600; }
/* 마케팅 담당 방 시세 카드(rdoc.mkc): 어제 움직임 줄 */
.mk-mv { display: flex; flex-direction: column; }
.mk-mv button { position: relative; display: block; width: 100%; padding: 8px 10px 8px 14px; border: 0; border-radius: 8px; background: none; font: inherit; text-align: left; cursor: pointer; color: inherit; }
.mk-mv button::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: var(--accent); }
.mk-mv button:hover { background: var(--surface2); }
.mk-mv b { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 14px; font-weight: 600; color: var(--head); }
.mk-mv b em { font: 700 14.5px var(--display); font-stretch: 105%; font-style: normal; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mk-mv em.up { color: var(--red); } .mk-mv em.down { color: var(--accent); }
.mk-mv small { display: block; font-size: 12.5px; line-height: 1.5; color: var(--muted); }

/* 담당 보고(채권·과태료)를 문서 한 장(rdoc)으로 — 안쪽 부품은 bk-·fk- 그대로 */
.rdoc.bk .dr .v { font-size: 13px; color: var(--text); }
.rdoc.bk .bk-log { margin: 0 -6px; }
.rdoc.bk .bk-approve, .rdoc.bk .fk-re { margin-top: 2px; }
.rdoc.bk .mon b { font-size: 14px; white-space: nowrap; }

/* ── RIMS 연동 (rims.js): 연동 탭 카드 · 카드에서 커지는 팝업(모렌 연동 창 형식) · 채팅 카드 ── */
.lk .btn-line.rm-go { background: var(--accent); border-color: var(--accent); color: #fff; }
.lk .btn-line.rm-go:hover { background: var(--fg); border-color: var(--fg); }
.lk.rm-flash { animation: rm-flash 1.6s var(--easeOutExpo); }
@keyframes rm-flash { 0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, .45); border-color: var(--green); } 100% { box-shadow: 0 0 0 14px rgba(22, 163, 74, 0); } }
.rm-wrap { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 24px; }
.rm-back { position: absolute; inset: 0; background: rgba(27, 34, 44, .38); }
.rm-box { position: relative; width: min(480px, 100%); max-height: calc(100vh - 48px); overflow-y: auto; padding: 28px 30px 26px; border-radius: 20px; background: #fff; box-shadow: 0 24px 60px rgba(21, 24, 29, .25); display: flex; flex-direction: column; gap: 16px; }
.rm-box h3 { margin: 0 0 2px; font-size: 20px; font-weight: 700; color: var(--head); display: flex; align-items: center; gap: 10px; }
.rm-box h3 .x { margin-left: auto; width: 32px; height: 32px; border: 0; border-radius: 50%; background: none; display: grid; place-items: center; color: var(--muted); cursor: pointer; }
.rm-box h3 .x:hover { background: var(--surface2); }
.rm-box h3 .x svg { width: 16px; height: 16px; }
.rm-fld { display: flex; flex-direction: column; gap: 6px; }
.rm-fld label { font-size: 14px; font-weight: 600; color: var(--head); }
.rm-fld label::before { content: "* "; color: #e8a33d; }
.rm-fld input { height: 46px; padding: 0 14px; border: 0; border-radius: 10px; font: 15px var(--font); color: var(--head); background: #fff; box-shadow: inset 0 0 0 1px var(--line-strong); transition: box-shadow .25s; }
.rm-fld input::placeholder { color: var(--dim); }
.rm-fld input:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--accent); }
.rm-fld input:disabled { background: var(--surface2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.rm-fld input.bad { box-shadow: inset 0 0 0 1.5px var(--red); }
.rm-fld small { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.rm-fld small.bad { color: var(--red); }
.rm-fld small a { color: var(--accent); text-decoration: none; }
.rm-cbx { display: flex; align-items: center; justify-content: flex-end; gap: 10px; font-size: 14px; color: var(--head); cursor: pointer; }
.rm-cbx input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rm-cbx i { width: 22px; height: 22px; border-radius: 6px; box-shadow: inset 0 0 0 1.5px var(--line-strong); display: grid; place-items: center; color: transparent; transition: background .2s; }
.rm-cbx i svg { width: 14px; height: 14px; stroke-width: 3; }
.rm-cbx input:checked + i { background: var(--accent); box-shadow: none; color: #fff; }
.rm-cbx input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.rm-btns { display: flex; gap: 8px; justify-content: flex-end; }
.rm-btns button { height: 46px; min-width: 120px; padding: 0 20px; border: 0; border-radius: 10px; font: 600 15px var(--font); display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; transition: background .25s; }
.rm-btns .rm-cancel { background: #fff; box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--head); }
.rm-btns .rm-cancel:hover:not(:disabled) { background: var(--surface2); }
.rm-btns .rm-go { background: var(--accent); color: #fff; }
.rm-btns .rm-go:hover:not(:disabled) { background: var(--fg); }
.rm-btns .rm-go:disabled { background: #d9dbdf; cursor: default; }
.rm-btns .rm-go:disabled:has(.sp) { background: var(--accent); }
.rm-btns .rm-red { margin-right: auto; background: #fff; box-shadow: inset 0 0 0 1px var(--red); color: var(--red); }
.rm-btns .sp, .rm-chk .spin { border-radius: 50%; animation: rm-spin .8s linear infinite; }
.rm-btns .sp { width: 14px; height: 14px; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; }
@keyframes rm-spin { to { transform: rotate(360deg); } }
.rm-chk { display: flex; flex-direction: column; gap: 6px; }
.rm-chk div { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text); }
.rm-chk em { margin-left: auto; font-style: normal; font-size: 12.5px; color: var(--muted); }
.rm-chk .d { width: 18px; height: 18px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.rm-chk .d svg { width: 11px; height: 11px; stroke-width: 3; }
.rm-chk .d.w { box-shadow: inset 0 0 0 2px var(--line-strong); }
.rm-chk .d.spin { border: 2px solid var(--accent-soft); border-top-color: var(--accent); }
.rm-chk .d.y { background: var(--green); animation: rm-pop .3s var(--easeOutExpo) both; }
.rm-chk .d.n { background: var(--red); animation: rm-pop .3s var(--easeOutExpo) both; }
@keyframes rm-pop { from { transform: scale(.4); opacity: 0; } }
.rm-err { display: flex; gap: 10px; padding: 10px 12px; border-radius: 10px; background: rgba(220, 38, 38, .07); color: var(--red); font-size: 13px; line-height: 1.5; }
.rm-err svg { width: 14px; height: 14px; flex: none; margin-top: 3px; }
.rm-kv { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 5px 12px; font-size: 13.5px; }
.rm-kv span { color: var(--muted); }
.rm-kv b { color: var(--head); font-weight: 600; overflow-wrap: anywhere; }
.rm-how { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 12px; background: var(--surface2); font-size: 13px; color: var(--text); }
.rm-how b { color: var(--head); }
.rm-how .note { font-size: 12.5px; color: var(--muted); }
.rm-sel { display: inline-flex; gap: 2px; padding: 2px; border-radius: 14px; background: #fff; align-self: flex-start; }
.rm-sel button { height: 26px; padding: 0 11px; border: 0; border-radius: 12px; background: none; font: 600 12.5px var(--font); color: var(--muted); cursor: pointer; }
.rm-sel button.on { background: var(--fg); color: #fff; }
.rm-card { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.rm-card.ok { border-color: var(--green); }
.rm-card .h { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.rm-card .h b { color: var(--head); }
.rm-card.ok .h, .rm-card.ok .h b { color: var(--green); }
.rm-card .h svg { width: 15px; height: 15px; }
.rm-card p { margin: 0; color: var(--text); line-height: 1.55; }
.rm-card .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.rm-mini { display: flex; flex-direction: column; gap: 6px; }
.rm-mini label { display: grid; grid-template-columns: 82px minmax(0, 1fr); align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.rm-mini input { height: 34px; padding: 0 10px; border: 0; border-radius: 8px; font: 13.5px var(--font); color: var(--head); box-shadow: inset 0 0 0 1px var(--line-strong); }
.rm-mini input:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--accent); }
.rm-mini input.bad { box-shadow: inset 0 0 0 1.5px var(--red); }
.rm-mini input:disabled { background: var(--surface2); }
.rm-agree { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; background: var(--surface2); font-size: 12.5px; color: var(--text); line-height: 1.5; }
.rm-agree svg { width: 13px; height: 13px; flex: none; margin-top: 3px; color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .lk.rm-flash, .rm-chk .d { animation: none; } }

/* ── 계약서 면허 확인 (contracts.js · RIMS 단건 조회) ── */
.cx-lic { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }
.cx-lic-tb { margin-left: 0; }                   /* 미리보기 툴바: 줄 끝으로 밀지 않는다 */
.cx-lic:empty { display: none; }
.cx-lic-b { height: 22px; padding: 0 9px; border-radius: 11px; display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; background: var(--surface2); color: var(--muted); white-space: nowrap; }
.cx-lic-b::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--dim); }
.cx-lic-b.ok { background: rgba(22, 163, 74, .1); color: #15803d; } .cx-lic-b.ok::before { background: var(--green); }
.cx-lic-b.bad { background: rgba(220, 38, 38, .08); color: var(--red); } .cx-lic-b.bad::before { background: var(--red); }
.cx-lic-b.wait { background: rgba(180, 83, 9, .1); color: var(--amber); } .cx-lic-b.wait::before { background: #f59e0b; }
.cx-lic-go { height: 24px; padding: 0 10px; border: 1px solid var(--accent); border-radius: 12px; background: #fff; color: var(--accent); font: 600 11.5px var(--font); cursor: pointer; transition: background .3s, color .3s; }
.cx-lic-go:hover:not(:disabled) { background: var(--accent); color: #fff; }
.cx-lic-go:disabled { opacity: .45; cursor: default; }
.cx-lic-card { border-radius: 12px; display: flex; flex-direction: column; gap: 8px; }
.cx-lic-card .lr { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; align-items: start; }
.cx-lic-card .lr .d { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px; background: var(--dim); }
.cx-lic-card .lr .d svg { width: 12px; height: 12px; stroke-width: 3; }
.cx-lic-card .lr.ok .d { background: var(--green); } .cx-lic-card .lr.bad .d { background: var(--red); } .cx-lic-card .lr.err .d { background: var(--amber); }
.cx-lic-card .lr b { font-size: 13px; color: var(--head); }
.cx-lic-card .lr.ok b { color: #15803d; } .cx-lic-card .lr.bad b { color: var(--red); }
.cx-lic-card .lr p { margin: 2px 0 0; font-size: 12.5px; color: var(--text); line-height: 1.5; }
.cx-lic-card .lr p.warn { color: var(--amber); }
.cx-lic-card .lr small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.cx-lic-card .cx-btns { margin-top: 2px; }

/* 계약서 리스트 면허 열 (2026-11-04): 버전 태그 크기 칩 + 셀 옆 창 */
.tbl th.c, .tbl td.c { text-align: center; }
.lic { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px 0 7px; border-radius: 11px; font-size: 11px; font-weight: 600; white-space: nowrap; background: var(--surface2); color: var(--head); border: 0; cursor: pointer; font-family: inherit; transition: transform .2s, box-shadow .2s; }
.lic:hover { transform: translateY(-1px); box-shadow: 0 2px 8px rgba(20, 24, 30, .12); }
.lic i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; background: var(--gray); }
.lic small { font-weight: 500; font-size: 10.5px; opacity: .75; }
.lic.ok { background: rgba(22, 163, 74, .1); color: #15803d; } .lic.ok i { background: var(--green); }
.lic.bad { background: rgba(220, 38, 38, .09); color: var(--red); } .lic.bad i { background: var(--red); }
.lic.stale { background: rgba(180, 83, 9, .1); color: var(--amber); } .lic.stale i { background: var(--amber); }
.lic.none { color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-strong); }
.lic.nolic, .lic.unlinked, .lic.skip { color: var(--gray); opacity: .8; }
.lic.busy { background: var(--accent-soft); color: var(--accent); }
.lic.busy::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: licpulse 1s infinite; }
@keyframes licpulse { 50% { opacity: .25; } }
.lic.open { outline: 2px solid var(--accent); outline-offset: 1px; }
.lic-sum { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.lic-sum .lbl { color: var(--muted); margin-right: 2px; }
.lic-sum .lch { height: 28px; padding: 0 11px; border-radius: 14px; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); border: 1px solid var(--line); background: none; cursor: pointer; font-family: inherit; }
.lic-sum .lch[aria-pressed="true"] { background: var(--head); color: #fff; border-color: var(--head); }
.lic-sum .lch i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.lic-sum .lch.ok i { background: var(--green); } .lic-sum .lch.bad i { background: var(--red); } .lic-sum .lch.stale i { background: var(--amber); } .lic-sum .lch.none i { background: var(--gray); }
.lic-sum .btn-line.sm { margin-left: auto; height: 30px; font-size: 12.5px; }
.lic-sum .btn-line.sm:disabled { opacity: .5; cursor: default; }
.lic-pop { position: fixed; z-index: 60; width: 380px; max-height: calc(100vh - 24px); overflow: auto; background: #fff; border-radius: 14px; box-shadow: 0 12px 40px rgba(20, 24, 30, .18), 0 0 0 1px var(--line); padding: 14px 16px; display: grid; gap: 10px; font-size: 13px; animation: licrise .25s cubic-bezier(.16, 1, .3, 1); }
@keyframes licrise { from { opacity: 0; transform: translateY(6px); } }
.lic-pop h3 { margin: 0; font-size: 14px; color: var(--head); display: flex; align-items: center; gap: 8px; }
.lic-pop h3 svg { width: 16px; height: 16px; }
.lic-pop h3 .x { margin-left: auto; width: 26px; height: 26px; border-radius: 13px; display: grid; place-items: center; color: var(--muted); border: 0; background: none; cursor: pointer; }
.lic-pop h3 .x svg { width: 14px; height: 14px; } .lic-pop h3 .x:hover { background: var(--surface2); color: var(--head); }
.lic-person { display: grid; gap: 6px; padding: 10px 0; border-top: 1px solid var(--line); }
.lic-person:first-of-type { border-top: 0; padding-top: 0; }
.lic-person .ph { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--head); }
.lic-person .ph .who { font-weight: 500; color: var(--muted); font-size: 12px; }
.lic-person .ph .st { margin-left: auto; font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.lic-person .ph .st i { width: 9px; height: 9px; border-radius: 50%; background: var(--gray); }
.lic-person .st.ok { color: #15803d; } .lic-person .st.ok i { background: var(--green); }
.lic-person .st.bad { color: var(--red); } .lic-person .st.bad i { background: var(--red); }
.lic-person .st.stale { color: var(--amber); } .lic-person .st.stale i { background: var(--amber); }
.lic-person .st.none, .lic-person .st.nolic, .lic-person .st.unlinked, .lic-person .st.skip { color: var(--muted); }
.lic-pop .kv { display: grid; grid-template-columns: 84px 1fr; gap: 4px 10px; font-size: 12.5px; }
.lic-pop .kv span { color: var(--muted); } .lic-pop .kv b { font-weight: 500; color: var(--head); }
.lic-pop .note { margin: 0; font-size: 12px; color: var(--muted); }
.lic-pop .note.warn { color: var(--amber); font-weight: 600; } .lic-pop .note.bad { color: var(--red); font-weight: 600; } .lic-pop .note.busy { color: var(--accent); font-weight: 600; }
.lic-pop .btns { display: flex; gap: 6px; flex-wrap: wrap; }

/* 부족한 정보 카드 (2026-11-04) */
.cx-req > b { display: flex; align-items: center; gap: 8px; }
.cx-req .rq-cost { margin-left: auto; font-size: 11px; font-weight: 600; color: #15803d; background: rgba(22, 163, 74, .1); border-radius: 9px; padding: 2px 8px; }
.cx-req .rq-prog { height: 6px; border-radius: 3px; background: var(--surface2); overflow: hidden; margin-top: 8px; }
.cx-req .rq-prog i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .5s cubic-bezier(.16, 1, .3, 1); }
.cx-req.done .rq-prog i { background: var(--green); }
.cx-req .rq-g { margin-top: 9px; }
.cx-req .rq-g h4 { margin: 0 0 5px; font-size: 12px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.cx-req .rq-g h4 em { font-style: normal; font-weight: 500; color: var(--gray); font-size: 11px; }
.cx-req .rq-g h4 .ok { color: #15803d; }
.cx-req .cx-tpl-vals { margin-top: 0; }
.cx-req .rq-v { display: inline-flex; flex-direction: column; padding: 4px 9px; border-radius: 9px; font-size: 12.5px; font-weight: 600; color: var(--head); background: rgba(22, 163, 74, .1); line-height: 1.35; }
.cx-req .rq-v small { font-size: 10.5px; font-weight: 400; color: var(--muted); }
.cx-req .rq-v.new { animation: rqflash 1.4s; }
@keyframes rqflash { 0% { background: var(--accent-soft); } }
.cx-req .rq-miss { padding: 4px 9px; border-radius: 9px; font-size: 12.5px; font-weight: 500; color: var(--muted); background: #fff; border: 0; box-shadow: inset 0 0 0 1px var(--line-strong); cursor: pointer; font-family: inherit; }
.cx-req .rq-miss:hover { box-shadow: inset 0 0 0 1px var(--accent); color: var(--accent); }
.cx-req .rq-warn { margin-top: 8px; background: rgba(180, 83, 9, .1); color: var(--amber); border-radius: 10px; padding: 7px 10px; font-size: 12.5px; font-weight: 600; }
.cx-req .rq-say { margin-top: 8px; background: var(--accent-soft); border-radius: 10px; padding: 7px 10px; font-size: 12.5px; color: var(--head); display: grid; gap: 3px; }
.cx-req .rq-say span { font-size: 11.5px; color: var(--accent); font-weight: 600; }
.rq-focus { outline: 2px solid var(--accent) !important; outline-offset: 2px; transition: outline .2s; }

/* 전자계약서 발행 · 서명 (2026-11-05) */
.cx-esg { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 12px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.cx-esg::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.cx-esg.waiting { background: rgba(180, 83, 9, .1); color: var(--amber); }
.cx-esg.signed { background: rgba(22, 163, 74, .1); color: #15803d; }
.cx-esg.draft { background: var(--surface2); color: var(--muted); }
.cx-locked { opacity: .75; }
.cx-pub .cx-pubrow { display: flex; gap: 12px; align-items: center; margin-top: 8px; }
.cx-pub .cx-qr { width: 96px; height: 96px; flex: none; background: #fff; border-radius: 8px; box-shadow: 0 0 0 1px var(--line); padding: 4px; }
.cx-pub .cx-qr svg { width: 100%; height: 100%; display: block; }
.cx-pub .cx-publink { display: grid; gap: 8px; min-width: 0; flex: 1; }
.cx-pub .cx-publink code { display: block; background: var(--surface2); border-radius: 8px; padding: 7px 9px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-pub a.btn { text-decoration: none; display: inline-flex; align-items: center; }
.tbl .st-chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.tbl .st-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tbl .st-chip.draft { background: var(--surface2); color: var(--muted); }
.tbl .st-chip.waiting { background: rgba(180, 83, 9, .1); color: var(--amber); }
.tbl .st-chip.signed { background: rgba(22, 163, 74, .1); color: #15803d; }

/* ── 매출 담당 · '매출 · 자금' 탭 (static/revenue.js, 목업 docs/mockups/revenue.html). 모두 .rv 안에서만 ── */
.page.rv { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 0; padding: 0; overflow: hidden; background: var(--card);
  --ink: var(--head); --panel: var(--card); --sunken: var(--surface2); --r-inner: 8px; --red: #c8261e; --green: #15803d; }
.rv .rv-pg { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.rv .n { font-variant-numeric: tabular-nums; }
.rv .rv-pg h3 { margin: 0; font-size: 14px; font-weight: 600; color: var(--ink); display: flex; align-items: baseline; gap: 8px; }
.rv .rv-pg h3 span { font-size: 12.5px; font-weight: 400; color: var(--dim); }
.rv .rv-pg h3 .r { margin-left: auto; }
.rv svg.ic { width: 1em; height: 1em; }
.rv button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; text-align: left; }
.rv .neu { color: var(--ink); }
.rv .rv-sub { flex: none; display: flex; align-items: stretch; gap: 0 22px; padding: 0 22px; box-shadow: inset 0 -1px 0 var(--line); }
.rv .rv-sub button { position: relative; height: 50px; padding: 0 1px; font-size: 15px; font-weight: 500; color: var(--muted); display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; transition: color .2s; }
.rv .rv-sub button:hover { color: var(--ink); }
.rv .rv-sub button[aria-pressed="true"] { color: var(--ink); font-weight: 700; }
.rv .rv-sub button::after { content: ""; position: absolute; left: -6px; right: -6px; bottom: 0; height: 3px; border-radius: 2px 2px 0 0; background: var(--ink); transform: scaleX(0); transition: transform .25s cubic-bezier(.16, 1, .3, 1); }
.rv .rv-sub button[aria-pressed="true"]::after { transform: scaleX(1); }
.rv .rv-sub button .cnt { min-width: 22px; height: 20px; padding: 0 6px; border-radius: 6px; background: var(--sunken); color: var(--text); font-size: 12px; font-weight: 600; display: inline-grid; place-items: center; }
.rv .rv-sub button .cnt.red { background: rgba(200, 38, 30, .1); color: var(--red); }
.rv .split { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 16px; align-items: start; }
.rv .acl { display: flex; flex-direction: column; gap: 2px; padding: 8px; position: sticky; top: 0; }
.rv .acl h4 { margin: 8px 8px 2px; font-size: 12px; font-weight: 600; color: var(--dim); }
.rv .acl h4:first-child { margin-top: 2px; }
.rv .acl button { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 8px; align-items: baseline; padding: 7px 10px; border-radius: var(--r-inner); font-size: 13.5px; color: var(--text); transition: background .2s; }
.rv .acl button:hover { background: var(--sunken); }
.rv .acl button[aria-pressed="true"] { background: var(--accent-soft); color: var(--ink); font-weight: 600; }
.rv .acl button span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv .acl button em { font-style: normal; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 500; }
.rv .acl button em.red { color: var(--red); }
.rv .facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 16px; margin-top: 10px; }
.rv .facts div { font-size: 12.5px; color: var(--muted); }
.rv .facts b { display: block; font-size: 14px; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.rv tr.plan td { color: var(--dim); }
/* 재무 장부: 계정별원장 · 거래처별원장 (11-17, revenue.js ledgerPages) */
.rv .lg-trust { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; font-size: 12.5px; color: var(--dim); }
.rv .lg-acl button small { display: block; font-size: 11.5px; font-weight: 400; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv .lg-acl button span:first-child { white-space: normal; }
.rv .lg-acl button em.amber { color: #a85a04; font-weight: 600; }
.rv .lg-acl { max-height: calc(100vh - 220px); overflow-y: auto; }
.rv tr[data-lno] { cursor: pointer; }
.rv tr[data-lno]:hover td { background: var(--sunken); }
.rv tr.lg-hit td { background: var(--accent-soft); }
.rv .lg-pt { color: var(--accent); cursor: pointer; white-space: nowrap; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.rv .lg-src { font-size: 12px; color: var(--dim); white-space: nowrap; }
.rv .lg-month { height: 28px; padding: 0 8px; border-radius: 8px; border: 0; box-shadow: inset 0 0 0 1px var(--line); background: var(--card); color: var(--text); font: inherit; font-size: 12.5px; }
.rv .lg-vch { box-shadow: inset 0 0 0 1px var(--line-strong); }
.rv tr.open td { background: var(--sunken); color: var(--muted); }
.rv .drop { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 12px; border: 1.5px dashed var(--line-strong); background: var(--sunken); font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.rv .drop .ic { width: 26px; height: 26px; color: var(--accent); }
.rv .drop b { display: block; color: var(--ink); font-size: 14.5px; }
.rv .drop .rv-btn { margin-left: auto; }
.rv .fs td.ind { padding-left: 22px; }
.rv .fs tr.sum td { font-weight: 700; color: var(--ink); box-shadow: inset 0 1px 0 var(--line-strong); }
.rv .fs tr.grp td { font-weight: 600; color: var(--ink); padding-top: 14px; }
.rv .ex-tag { font-size: 11.5px; font-weight: 700; color: #a85a04; background: rgba(217, 119, 6, .11); padding: 2px 7px; border-radius: 6px; }
.rv .box { border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); padding: 14px 16px; min-width: 0; }
.rv .row { display: grid; gap: 12px; }
.rv .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rv .kpi { display: flex; flex-direction: column; gap: 4px; text-align: left; transition: background .2s; }
.rv button.kpi:hover { background: var(--sunken); }
.rv .kpi .k { font-size: 12.5px; color: var(--muted); display: flex; justify-content: space-between; }
.rv .kpi .v { font: 700 26px/1.1 var(--display); font-stretch: 105%; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rv .kpi .v small { font: 500 13px var(--font); color: var(--muted); margin-left: 2px; }
.rv .kpi .s { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.rv .kpi.hot .v { color: var(--red); }
.rv .prog { display: flex; gap: 2px; height: 8px; margin: 4px 0 2px; }
.rv .prog i { height: 100%; border-radius: 2px; }
.rv .lg { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); }
.rv .lg span { display: inline-flex; align-items: center; gap: 5px; }
.rv .lg i { width: 8px; height: 8px; border-radius: 2px; }
.rv .two { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.rv .chart { position: relative; }
.rv .chart svg { display: block; width: 100%; height: auto; overflow: visible; stroke: none; stroke-width: 1; }   /* 앱 전역 svg(선 아이콘) 스타일을 끈다 */
.rv .chart .ax { font: 400 11.5px var(--font); fill: var(--dim); }
.rv .chart .axm { font: 500 12px var(--font); fill: var(--muted); }
.rv .chart .vl { font: 600 11.5px var(--font); fill: var(--text); }
.rv .chart .grid { stroke: rgba(20, 24, 30, .08); stroke-width: 1; }
.rv .chart .hit { fill: transparent; cursor: default; }
.rv .chart .hit:hover, .rv .chart .hit.on { fill: rgba(20, 24, 30, .04); }
.rv .tip { position: absolute; pointer-events: none; z-index: 5; min-width: 168px; padding: 9px 12px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 12.5px; line-height: 1.6; opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s; }
.rv .tip.on { opacity: 1; transform: none; }
.rv .tip b { display: block; font-size: 13px; margin-bottom: 2px; }
.rv .tip p { margin: 0; display: flex; justify-content: space-between; gap: 14px; }
.rv .tip p i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.rv .tip p em { font-style: normal; font-variant-numeric: tabular-nums; font-weight: 600; }
.rv .cap { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.rv .sched { list-style: none; margin: 8px 0 0; padding: 0; }
.rv .sched li { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 0 10px; align-items: baseline; padding: 7px 0; box-shadow: inset 0 -1px 0 rgba(20, 24, 30, .07); font-size: 13px; }
.rv .sched li:last-child { box-shadow: none; }
.rv .sched .d { color: var(--muted); font-variant-numeric: tabular-nums; }
.rv .sched .t { color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv .sched .t small { color: var(--dim); margin-left: 4px; }
.rv .sched .a { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rv .pos { color: var(--accent); }
.rv .neu { color: var(--ink); }
.rv .rv-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rv .rv-chip { height: 30px; padding: 0 12px; border-radius: 15px; background: var(--sunken); display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text); }
.rv .rv-chip i, .rv .st-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.rv .ok { background: #16a34a; }
.rv .no { background: #a3a8b0; }
.rv .wait { background: #d97706; }
.rv .rv-chip b { font-weight: 600; }
.rv table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rv th { text-align: left; font-weight: 500; font-size: 12px; color: var(--dim); padding: 0 8px 8px; white-space: nowrap; box-shadow: inset 0 -1px 0 var(--line); }
.rv td { padding: 9px 8px; box-shadow: inset 0 -1px 0 rgba(20, 24, 30, .07); vertical-align: middle; color: var(--text); }
.rv tr:last-child td { box-shadow: none; }
.rv td.nr, .rv th.nr { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rv td .sm { display: block; font-size: 12px; color: var(--dim); line-height: 1.4; }
.rv td b { font-weight: 600; color: var(--ink); }
.rv .rv-tag { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--sunken); color: var(--muted); }
.rv .rv-tag.blue { background: var(--accent-soft); color: var(--accent); }
.rv .rv-tag.red { background: rgba(200, 38, 30, .09); color: var(--red); }
.rv .rv-tag.amber { background: rgba(217, 119, 6, .11); color: #a85a04; }
.rv .rv-tag.green { background: rgba(21, 128, 61, .09); color: var(--green); }
.rv .rv-tag .ic { width: 12px; height: 12px; stroke-width: 2.2; }
.rv tr.flag td { background: rgba(217, 119, 6, .05); }
.rv .filters { display: flex; gap: 6px; }
.rv .filters span { height: 28px; padding: 0 12px; border-radius: 14px; font-size: 12.5px; display: inline-flex; align-items: center; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.rv .filters span.on { background: var(--ink); color: #fff; box-shadow: none; }
.rv .ai-note { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 10px; background: var(--accent-soft); font-size: 13px; line-height: 1.55; color: var(--text); }
.rv .ai-note .ic { width: 16px; height: 16px; color: var(--accent); margin-top: 2px; }
.rv .ai-note b { color: var(--ink); }
.rv .pl td.lab { width: 40%; }
.rv .pl tr.sum td { font-weight: 700; color: var(--ink); box-shadow: inset 0 1px 0 var(--line-strong); }
.rv .pl tr.ex td { color: var(--dim); }
.rv .share { display: inline-block; height: 6px; border-radius: 3px; background: var(--line-strong); vertical-align: middle; }
.rv .seg { display: inline-flex; padding: 3px; border-radius: 15px; background: var(--sunken); gap: 2px; }
.rv .seg span { height: 24px; padding: 0 10px; border-radius: 12px; font-size: 12px; display: inline-flex; align-items: center; color: var(--muted); }
.rv .seg span.on { background: var(--panel); color: var(--ink); font-weight: 600; box-shadow: 0 0 0 1px var(--line); }
.rv .neg { color: var(--red); }
.rv .vat { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.rv .vat > div { padding: 2px 16px; box-shadow: inset -1px 0 0 var(--line); }
.rv .vat > div:first-child { padding-left: 0; }
.rv .vat > div:last-child { box-shadow: none; }
.rv .vat .k { font-size: 12.5px; color: var(--muted); }
.rv .vat .v { font: 700 24px/1.2 var(--display); font-stretch: 105%; color: var(--ink); font-variant-numeric: tabular-nums; }
.rv .vat .v small { font: 500 13px var(--font); color: var(--muted); margin-left: 2px; }
.rv .vat .s { font-size: 12px; color: var(--dim); }
.rv .rv-btn { height: 32px; padding: 0 14px; border-radius: 16px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.rv .rv-btn.off { background: var(--sunken); color: var(--dim); cursor: not-allowed; }
.rv .rv-btn.line { background: var(--panel); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.rv .banner { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 12px; background: rgba(217, 119, 6, .08); font-size: 13.5px; line-height: 1.55; }
.rv .banner .ic { width: 20px; height: 20px; color: #a85a04; }
.rv .banner div { flex: 1; }
.rv .banner b { color: var(--ink); }
.rv .st-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.rv .st-step { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; font-size: 13.5px; line-height: 1.6; color: var(--muted); }
.rv .st-step h4 { margin: 2px 0 4px; font-size: 14.5px; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.rv .st-step p { margin: 0 0 6px; }
.rv .st-step b { color: var(--ink); }
.rv .st-n { width: 28px; height: 28px; border-radius: 14px; display: grid; place-items: center; background: var(--sunken); color: var(--ink); font-weight: 700; font-size: 13px; }
.rv .st-step.done .st-n { background: var(--accent); color: #fff; }
.rv .st-sub { font-size: 12.5px; color: var(--dim); }
.rv .st-act { display: flex; gap: 8px; margin-top: 4px; }
.rv .st-ask { margin: 10px 0 0; padding-left: 18px; font-size: 13.5px; line-height: 1.9; color: var(--ink); }
.rv .fm-pg img { display: block; width: 100%; height: auto; margin-top: 8px; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--line); }
.rv .fm-cap { display: grid; grid-template-columns: 1fr 1fr; margin-top: 8px; font-size: 12px; color: var(--dim); text-align: center; }
.bankup .bu-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.bankup .bu-new { display: contents; }
.bankup .bu-new[hidden] { display: none; }
.bankup select, .bankup input:not([type=file]) { height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--panel); color: var(--ink); font: inherit; font-size: 13.5px; min-width: 0; }
.bankup input[name=number] { width: 210px; }
.bankup label.rv-btn { cursor: pointer; }
.bankup .bu-out { margin-top: 12px; font-size: 13.5px; line-height: 1.6; }
.bankup .bu-out:empty { display: none; }
.bankup .bu-pv { padding: 12px 14px; border-radius: 10px; background: var(--sunken); }
.bankup .bu-pv table { margin: 8px 0; }
.bankup .bu-act { display: flex; gap: 8px; margin-top: 8px; }
.bankup .bu-err { color: var(--red); }
.bankup .bu-ok { color: var(--ink); font-weight: 600; }
.bankup .bu-note { color: var(--muted); }
@media (max-width: 640px) { .bankup input[name=number] { width: 100%; } }
.rv .conns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rv .conn { display: flex; flex-direction: column; gap: 8px; }
.rv .conn .hd { display: flex; align-items: center; gap: 10px; }
.rv .conn .hd .lo { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--sunken); color: var(--ink); flex: none; }
.rv .conn .hd .lo .ic { width: 18px; height: 18px; }
.rv .conn .hd b { font-size: 14.5px; color: var(--ink); display: block; line-height: 1.3; }
.rv .conn .hd small { font-size: 12px; color: var(--dim); }
.rv .conn .hd .rv-tag { margin-left: auto; }
.rv .conn .what { margin: 0; font-size: 13px; color: var(--text); line-height: 1.55; }
.rv .conn dl { margin: 0; display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 3px 10px; font-size: 12.5px; line-height: 1.5; }
.rv .conn dt { color: var(--dim); }
.rv .conn dd { margin: 0; color: var(--muted); }
.rv .conn.self { box-shadow: inset 0 0 0 1.5px var(--accent); }
.rv .steps { margin: 0; padding-left: 20px; font-size: 13px; line-height: 1.75; color: var(--text); }
.rv .steps b { color: var(--ink); }
.rv td:first-child { white-space: nowrap; }

/* 내 비서 (profile.js): 사진은 동그라미, 창은 RIMS 창(rm-*) 모양을 그대로 쓴다 */
.av.photo { flex: none; border-radius: 50%; overflow: hidden; display: block; box-shadow: 0 0 0 1px var(--line); }
.av.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chat-head .hd-who.me { cursor: pointer; transition: background .2s; }     /* 모렌이 방: 가운데 알약을 누르면 '내 비서' 창 */
.chat-head .hd-who.me:hover { background: var(--surface2); }
.chat-head .hd-who.me:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pf-pic { display: flex; align-items: center; gap: 18px; }
.pf-av { width: 88px; height: 88px; flex: none; border-radius: 50%; background: #e5f4ee; display: grid; place-items: center; overflow: hidden; }
.pf-av.photo { background: none; box-shadow: 0 0 0 1px var(--line); }
.pf-av img { width: 100%; height: 100%; object-fit: cover; }
.pf-pic > div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.pf-pic .rm-cancel { height: 38px; padding: 0 16px; border: 0; border-radius: 10px; font: 600 14px var(--font); cursor: pointer; background: #fff; box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--head); }
.pf-pic .rm-cancel:hover { background: var(--surface2); }
.pf-link { border: 0; background: none; padding: 0; font: 13.5px var(--font); color: var(--muted); text-decoration: underline; cursor: pointer; }
.pf-pic small { flex-basis: 100%; font-size: 12.5px; color: var(--muted); }

/* 보고 말풍선 아래 시동차단 승인 버튼 (app.js bondActsCard, 2026-11-09 — 보고는 채팅 안에서) */
.bk-acts { display: flex; flex-direction: column; gap: 8px; max-width: 92%; }
.bk-acts .bk-approve { background: var(--card); }
.bk-acts .acts .btn-main, .bk-acts .acts .btn-line { height: 34px; padding: 0 14px; font-size: 13px; }
.bk-acts .done { font-size: 13px; font-weight: 600; color: var(--muted); }

/* 왼쪽 줄 고정 (app.js rail · openRailMenu, 2026-11-10): 고정한 방은 왼쪽 위 작은 핀, 오른쪽 클릭 메뉴는 유리 메뉴 */
.agent .pin { position: absolute; top: 2px; left: 8px; width: 17px; height: 17px; border-radius: 50%; background: var(--card); box-shadow: 0 0 0 1px var(--line); display: grid; place-items: center; color: var(--accent); }
.agent .pin svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.agent { -webkit-touch-callout: none; }
.rail-menu { position: fixed; z-index: 60; min-width: 170px; padding: 6px; border-radius: 12px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(20, 24, 31, .18), 0 0 0 1px var(--line); }
.rail-menu .cap { padding: 4px 10px 6px; margin-bottom: 4px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.rail-menu button { width: 100%; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 13.5px; color: var(--fg); cursor: pointer; text-align: left; }
.rail-menu button:hover:not(:disabled), .rail-menu button:focus-visible { background: var(--surface2); outline: none; }
.rail-menu button:disabled { color: var(--muted); cursor: default; }
.rail-menu button svg { width: 15px; height: 15px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* 담당 방 이름·사진 창의 기본 아이콘 (profile.js openRoom, 2026-11-10) */
.pf-av.tile { background: var(--surface2); }
.pf-av .pf-ic { width: 40px; height: 40px; fill: none; stroke: var(--fg); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* 매출 · 자금 › 받을 돈: 확인이 필요한 입금 카드 (deposit_match, 2026-11-11) — 버튼 없음, 모렌이가 채팅에서 묻는다 */
.rv .dcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-top: 10px; }
.rv .dcard { border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.rv .dcard.now { box-shadow: inset 0 0 0 2px var(--accent); }
.rv .dcard .h { display: flex; justify-content: space-between; gap: 10px; }
.rv .dcard .h span { color: var(--muted); font-weight: 400; font-size: 13px; }
.rv .dcard p { margin: 0; font-size: 13.5px; color: var(--muted); }
.rv .dcard .cd { font-size: 13px; background: var(--sunken); border-radius: 8px; padding: 7px 10px; }
.rv .dcard .st { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.rv .dcard.now .st { color: var(--accent); }

/* 매출 · 자금 › 영수증 (receipt_match, 2026-11-11) — 처리는 채팅, 여기엔 상태 · 배운 것 · 시연용 사진 */
.rv .rthumb { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; }
.rv .rthumb img { width: 26px; height: 34px; object-fit: cover; border-radius: 4px; box-shadow: 0 0 0 1px var(--line); }
.rv .rwaits { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-top: 10px; }
.rv .rwait { display: flex; gap: 10px; padding: 10px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line); }
.rv .rwait img { width: 54px; height: 72px; object-fit: cover; border-radius: 6px; box-shadow: 0 0 0 1px var(--line); }
.rv .rwait > div { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; min-width: 0; }
.rv .rlearn { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
@media (max-width: 760px) { .rv .rlearn { grid-template-columns: minmax(0, 1fr); } }
.rv .rlearn > div { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line); }
.rv .rlearn .chips { display: flex; flex-wrap: wrap; gap: 5px; }
.rv .rchip { padding: 2px 9px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-size: 12.5px; font-weight: 600; }
.rv .rchip.def { background: var(--sunken); color: var(--muted); font-weight: 400; }
.rv .rsamples { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.rv .rpaper { width: 150px; display: flex; flex-direction: column; gap: 2px; padding: 10px 11px 12px; border-radius: 6px; background: #f6f3ea; color: #222; font-size: 12px; box-shadow: 0 1px 0 rgba(0,0,0,.08), 0 6px 14px rgba(0,0,0,.08); cursor: pointer; text-align: left; }
.rv .rpaper b { font-size: 13px; color: #111; }
.rv .rpaper .tot { margin-top: 4px; font-weight: 700; color: #111; }
.rv .rpaper:hover { transform: translateY(-2px); }

