/* =====================================================================
   대부 오피스 - Toss Design System 스타일
   ===================================================================== */

:root {
  /* Grey scale */
  --grey-900:#191F28; --grey-800:#333D4B; --grey-700:#4E5968; --grey-600:#6B7684;
  --grey-500:#8B95A1; --grey-400:#B0B8C1; --grey-300:#D1D6DB; --grey-200:#E5E8EB;
  --grey-100:#F2F4F6; --grey-50:#F9FAFB;
  /* Brand */
  --blue:#3182F6; --blue-dark:#1B64DA; --blue-weak:#E8F3FF; --blue-weak2:#C9E2FF;
  --red:#F04452; --red-weak:#FEECEC;
  --green:#00B050; --green-weak:#E5F8ED;
  --amber:#FF9500; --amber-weak:#FFF5E5;
  /* Surface */
  --bg:#F2F4F6; --card:#FFFFFF; --line:#E5E8EB; --line-soft:#F2F4F6;
  --radius-lg:20px; --radius:16px; --radius-sm:12px; --radius-xs:8px;
  --shadow:0 1px 3px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.03);
  --shadow-lg:0 8px 32px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.06);
  --ease:cubic-bezier(.25,.46,.45,.94);
}

* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html,body { height:100%; }
body {
  font-family:"Pretendard Variable","Pretendard","Apple SD Gothic Neo","Malgun Gothic",-apple-system,BlinkMacSystemFont,system-ui,sans-serif;
  font-size:14px; line-height:1.5; color:var(--grey-900); background:var(--bg);
  letter-spacing:-0.3px; -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale;
}
button { font-family:inherit; cursor:pointer; letter-spacing:-0.3px; }
button:disabled { cursor:not-allowed; }
input,select,textarea { font-family:inherit; font-size:14px; letter-spacing:-0.3px; color:var(--grey-900); }
textarea { resize:none; }
a { color:var(--blue); text-decoration:none; }
.hidden { display:none !important; }

::-webkit-scrollbar { width:10px; height:10px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:var(--grey-300); border-radius:10px; border:3px solid transparent; background-clip:content-box; }
::-webkit-scrollbar-thumb:hover { background:var(--grey-400); background-clip:content-box; }

#app { display:flex; height:100vh; overflow:hidden; }

/* ---------- 사이드바 ---------- */
#sidebar {
  width:248px; min-width:248px; background:var(--card); color:var(--grey-700);
  display:flex; flex-direction:column; overflow:hidden; border-right:1px solid var(--line);
}
.brand { display:flex; align-items:center; gap:12px; padding:22px 20px 18px; }
.brand-logo {
  width:40px; height:40px; border-radius:13px; background:var(--blue); color:#fff;
  display:flex; align-items:center; justify-content:center; font-weight:800; font-size:15px;
  letter-spacing:-0.5px; box-shadow:0 4px 12px rgba(23,49,102,.24); overflow:hidden; flex-shrink:0;
}
.brand-logo img { width:100%; height:100%; object-fit:cover; display:block; }
/* 업체명은 긴 이름도 한 줄에 들어가게 작게 쓰고, 그래도 넘치면 어절 단위로만 줄을 넘긴다. */
.brand-name { font-size:13.5px; font-weight:700; color:var(--grey-900); letter-spacing:-0.6px; word-break:keep-all; }
.brand-sub { font-size:11.5px; color:var(--grey-500); margin-top:2px; font-weight:500; }

#gnb { flex:1; overflow-y:auto; padding:6px 12px 16px; display:flex; flex-direction:column; }

.gnb-item {
  display:block; padding:8px 12px 8px 20px; font-size:13.5px; color:var(--grey-600);
  cursor:pointer; border-radius:10px; font-weight:500; transition:background .15s var(--ease), color .15s var(--ease);
}
.gnb-item:hover { color:var(--grey-900); background:var(--grey-100); }
.gnb-item.active { color:var(--blue); background:var(--blue-weak); font-weight:700; }

/* 평면 메뉴 (최상위 직접 링크) */
.gnb-item.top { padding:12px 14px; font-size:15px; color:var(--grey-700); font-weight:600; margin-bottom:2px; }
.gnb-item.top:hover { background:var(--grey-100); color:var(--grey-900); }
.gnb-item.top.active { color:var(--blue); background:var(--blue-weak); font-weight:700; }

.gnb-badge {
  float:right; background:var(--red); color:#fff; font-size:11px; font-weight:700;
  min-width:20px; text-align:center; padding:1px 6px; border-radius:10px; letter-spacing:0;
}

/* 강조 메뉴 (데이터 이전) - 업무 메뉴와 구분되게 맨 아래로 밀어 내리고(margin-top:auto), 파란 카드처럼 채워서 그린다.
   위쪽 업무 메뉴와의 경계는 ::before 로 얇은 선을 긋는다. */
.gnb-item.top.accent {
  position:relative; margin-top:auto; display:flex; align-items:center; gap:12px; padding:14px 16px;
  background:linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%); color:#fff;
  border-radius:14px; box-shadow:0 6px 18px rgba(49,130,246,.32);
  transition:transform .15s var(--ease), box-shadow .15s var(--ease);
}
.gnb-item.top.accent::before {
  content:''; position:absolute; left:4px; right:4px; top:-12px; height:1px; background:var(--line);
}
.gnb-item.top.accent:hover { background:linear-gradient(135deg, var(--blue-dark) 0%, #1550B8 100%); color:#fff; transform:translateY(-1px); box-shadow:0 8px 22px rgba(49,130,246,.4); }
.gnb-accent-icon {
  width:34px; height:34px; border-radius:10px; background:rgba(255,255,255,.18); flex-shrink:0;
  display:flex; align-items:center; justify-content:center; font-size:18px; font-weight:800;
}
.gnb-accent-text { display:flex; flex-direction:column; line-height:1.25; font-weight:700; font-size:15px; }
.gnb-accent-text small { font-size:11.5px; font-weight:500; opacity:.8; margin-top:3px; letter-spacing:-0.2px; }
/* 화면이 낮아 메뉴가 꽉 차도 카드가 위 메뉴에 붙지 않게 최소 간격을 둔다. */
.gnb-item.top:has(+ .gnb-item.accent) { margin-bottom:22px; }
.sidebar-foot { padding:16px 20px; font-size:11.5px; color:var(--grey-400); font-weight:500; }
/* ---------- 상단바 ---------- */
#body-col { flex:1; display:flex; flex-direction:column; min-width:0; }
#topbar {
  height:64px; background:var(--card); border-bottom:1px solid var(--line);
  display:flex; align-items:center; justify-content:space-between; padding:0 24px; flex-shrink:0;
}
#breadcrumb { font-size:15px; color:var(--grey-800); font-weight:700; letter-spacing:-0.4px; }
.topbar-right { display:flex; align-items:center; gap:8px; }

/* ---------- 메인 ---------- */
#main { flex:1; overflow-y:auto; padding:28px 28px 64px; }

.page-head { display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:20px; gap:16px; }
.page-title { font-size:26px; font-weight:700; color:var(--grey-900); letter-spacing:-0.9px; line-height:1.35; }
.page-desc { font-size:14px; color:var(--grey-600); margin-top:6px; font-weight:500; letter-spacing:-0.4px; }
.page-actions { display:flex; gap:8px; flex-shrink:0; flex-wrap:wrap; justify-content:flex-end; align-items:center; }

/* ---------- 버튼 ---------- */
.btn {
  padding:11px 18px; border-radius:12px; border:none; background:var(--card);
  box-shadow:inset 0 0 0 1px var(--grey-300);
  font-size:14px; color:var(--grey-700); font-weight:600; letter-spacing:-0.3px;
  transition:background .15s var(--ease), transform .08s var(--ease), color .15s var(--ease);
}
a.btn { display:inline-block; text-decoration:none; }
/* 누를 수 있는 버튼은 흰색 + 테두리, 회색 배경은 disabled 전용 */
.btn:hover { background:var(--grey-100); }
.btn:active { transform:scale(.97); }
.btn:disabled { background:var(--grey-100); color:var(--grey-400); box-shadow:none; }
.btn:disabled:hover { background:var(--grey-100); }
.btn:disabled:active { transform:none; }

.btn.primary { background:var(--blue); color:#fff; box-shadow:none; }
.btn.primary:hover { background:var(--blue-dark); }
.btn.primary:disabled { background:var(--grey-200); color:var(--grey-400); }

.btn.danger { background:var(--red-weak); color:var(--red); box-shadow:none; }
.btn.danger:hover { background:#FBDADA; }
.btn.danger-solid { background:var(--red); color:#fff; box-shadow:none; }
.btn.danger-solid:hover { background:#D93A47; }
.btn.danger-solid:disabled { background:var(--grey-200); color:var(--grey-400); }

.btn.ghost { background:transparent; color:var(--blue); box-shadow:none; }
.btn.ghost:hover { background:var(--blue-weak); }

.btn.outline { background:var(--card); color:var(--blue); box-shadow:inset 0 0 0 1.5px var(--blue); white-space:nowrap; }
.btn.outline:hover { background:var(--blue-weak); }

.btn.kakao { background:#FEE500; color:#191919; white-space:nowrap; box-shadow:none; }
.btn.kakao:hover { background:#F2DA00; }

.btn.sm {padding:7px 12px; font-size:12.5px; border-radius:9px; }

/* ---------- 카드/패널 ---------- */
.panel {
  background:var(--card); border-radius:var(--radius); margin-bottom:16px;
  box-shadow:var(--shadow); overflow:hidden;
}
.panel-head {
  padding:18px 22px 14px; font-size:16px; font-weight:700; color:var(--grey-900);
  display:flex; justify-content:space-between; align-items:center; gap:12px; letter-spacing:-0.5px;
}
/* 패널 머리 오른쪽 - 동작 버튼과 '전체보기'가 같이 붙는다. 머리 자체가 space-between 이라 오른쪽은 한 묶음으로 둔다. */
.head-actions { display:flex; align-items:center; gap:10px; }
.panel-body { padding:6px 22px 20px; }
.panel-body.nopad { padding:0; }
.panel-head + .panel-body.nopad { padding-top:0; }

/* ---------- KPI 카드 ---------- */
.kpi-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(212px,1fr)); gap:14px; margin-bottom:20px; }
.kpi-grid.cols4 { grid-template-columns:repeat(4,minmax(0,1fr)); }
.kpi-card {
  background:var(--card); border-radius:var(--radius); padding:20px 22px;
  box-shadow:var(--shadow); transition:transform .18s var(--ease), box-shadow .18s var(--ease);
}
/* 누를 수 있는 카드만 손가락 커서 / 떠오름 / 화살표 - 대출상세의 지표 카드는 그냥 표시용이다 */
.kpi-card.clickable { cursor:pointer; position:relative; }
.kpi-card.clickable::after {
  content:'›'; position:absolute; top:16px; right:18px; font-size:20px; line-height:1; font-weight:600;
  color:var(--grey-400); transition:transform .18s var(--ease), color .18s var(--ease);
}
.kpi-card.clickable:hover { transform:translateY(-2px); box-shadow:0 4px 12px rgba(0,0,0,.06), 0 12px 28px rgba(0,0,0,.06); }
.kpi-card.clickable:hover::after { color:var(--blue); transform:translateX(3px); }
.kpi-card.clickable:hover .kpi-label { color:var(--grey-800); }
.kpi-card.clickable:active { transform:translateY(0); }
.kpi-card.clickable:focus-visible { outline:2px solid var(--blue); outline-offset:2px; }
.kpi-label { font-size:13.5px; color:var(--grey-600); font-weight:600; letter-spacing:-0.4px; }
.kpi-value { font-size:23px; font-weight:700; color:var(--grey-900); margin-top:8px; letter-spacing:-1px;
  line-height:1.3; white-space:nowrap; word-break:keep-all; font-variant-numeric:tabular-nums; }
.kpi-sub { font-size:12.5px; margin-top:6px; color:var(--grey-500); font-weight:600; letter-spacing:-0.3px; }
.kpi-sub.up { color:var(--red); } .kpi-sub.down { color:var(--blue); } .kpi-sub.good { color:var(--green); }

/* ---------- 필터바 ---------- */
.filter-bar {
  display:flex; flex-wrap:wrap; gap:10px; align-items:flex-end; background:var(--card);
  border-radius:var(--radius); padding:18px 22px; margin-bottom:16px; box-shadow:var(--shadow);
}
.filter-field { display:flex; flex-direction:column; gap:6px; }
.filter-field label { font-size:12.5px; color:var(--grey-600); font-weight:600; padding-left:2px; }
.filter-field input,.filter-field select {
  padding:10px 13px; border:none; border-radius:11px; min-width:130px; background-color:var(--card);
  box-shadow:inset 0 0 0 1px var(--grey-300);
  font-size:13.5px; transition:box-shadow .15s var(--ease), background .15s var(--ease);
}
.filter-field input:hover,.filter-field select:hover { box-shadow:inset 0 0 0 1px var(--grey-400); }
.filter-field input:focus,.filter-field select:focus { outline:none; background-color:var(--card); box-shadow:0 0 0 2px var(--blue); }
.filter-field input[type=date] { min-width:150px; }
.filter-bar .btn { padding:10px 18px; }
/* 필터바 위의 한정 안내 - 고객상세에서 넘어와 목록이 한 고객으로 좁혀져 있을 때만 뜬다.
   필터바에 고객 칸이 없으므로 걸려 있다는 표시와 푸는 버튼이 여기에만 있다. */
.filter-note {
  display:flex; flex-wrap:wrap; align-items:center; gap:12px;
  background:var(--blue-weak); color:var(--grey-800); border-radius:var(--radius);
  padding:13px 20px; margin-bottom:10px; font-size:13.5px; font-weight:600;
}

/* ---------- 테이블 ---------- */
.table-wrap { overflow-x:auto; }
table.grid { width:100%; border-collapse:collapse; font-size:13.5px; background:var(--card); }
table.grid th {
  background:var(--grey-50); border-bottom:1px solid var(--line); border-top:1px solid var(--line-soft);
  padding:13px 18px; text-align:left; font-size:12.5px; color:var(--grey-600);
  white-space:nowrap; font-weight:600; letter-spacing:-0.3px;
}
table.grid th.sortable { cursor:pointer; user-select:none; }
table.grid th.sortable:hover { color:var(--grey-900); }
table.grid th.sortable .sort-mark { margin-left:4px; font-size:10px; color:var(--grey-400); }
table.grid th.sortable.on, table.grid th.sortable.on .sort-mark { color:var(--blue); }
table.grid td {
  padding:15px 18px; border-bottom:1px solid var(--line-soft); white-space:nowrap;
  color:var(--grey-800); font-weight:500;
}
table.grid tbody tr:last-child td { border-bottom:none; }
table.grid tr.clickable { cursor:pointer; }
table.grid tr.clickable:hover td { background:var(--grey-50); }
table.grid td.num, table.grid th.num { text-align:right; font-variant-numeric:tabular-nums; }
table.grid td.num { font-weight:600; color:var(--grey-900); }
table.grid td.center, table.grid th.center { text-align:center; }

.table-foot {
  padding:16px 22px; display:flex; justify-content:space-between; align-items:center;
  font-size:13px; color:var(--grey-600); background:var(--card); font-weight:500;
  border-top:1px solid var(--line-soft);
}

/* ---------- 상태 뱃지 ---------- */
.badge {
  display:inline-block; padding:4px 10px; border-radius:8px; font-size:12px;
  font-weight:700; white-space:nowrap; letter-spacing:-0.3px; line-height:1.35;
}
.badge.ok     { background:var(--green-weak); color:#00A344; }
.badge.info   { background:var(--blue-weak);  color:var(--blue); }
.badge.warn   { background:var(--amber-weak); color:#E08600; }
.badge.danger { background:var(--red-weak);   color:var(--red); }
.badge.muted  { background:var(--grey-100);   color:var(--grey-600); }
.badge.dark   { background:var(--grey-800);   color:#fff; }

/* ---------- 경고/안내 박스 ---------- */
.alert {
  padding:16px 18px; border-radius:14px; font-size:14px; margin-bottom:14px;
  line-height:1.6; font-weight:500; letter-spacing:-0.4px;
}
.alert.red    { background:var(--red-weak);   color:#C9313C; }
.alert.yellow { background:var(--amber-weak); color:#B36B00; }
.alert.blue   { background:var(--blue-weak);  color:var(--blue-dark); }
.alert.gray   { background:var(--grey-100);   color:var(--grey-700); }
.alert b { font-weight:700; }

/* ---------- 탭 ---------- */
.tabs {
  display:flex; gap:4px; margin-bottom:18px; overflow-x:auto;
  background:var(--card); border-radius:var(--radius); padding:8px; box-shadow:var(--shadow);
}
.tabs::-webkit-scrollbar { height:0; }
.tab {
  padding:10px 16px; font-size:14px; color:var(--grey-600); cursor:pointer;
  white-space:nowrap; font-weight:600; border-radius:11px; letter-spacing:-0.4px;
  transition:background .15s var(--ease), color .15s var(--ease);
}
.tab:hover { color:var(--grey-900); background:var(--grey-100); }
.tab.active { color:var(--blue); background:var(--blue-weak); font-weight:700; }
.tab .cnt { font-size:12px; color:var(--grey-400); margin-left:4px; font-weight:600; }
.tab.active .cnt { color:var(--blue); opacity:.7; }

/* ---------- 상세 필드 표 ---------- */
.dl-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:0; }
.dl-cell { padding:14px 20px; background:var(--card); box-shadow:inset -1px -1px 0 var(--line-soft); }
.dl-cell dt { font-size:12.5px; color:var(--grey-500); margin-bottom:5px; font-weight:600; letter-spacing:-0.3px; }
.dl-cell dd { font-size:14.5px; color:var(--grey-900); font-weight:600; letter-spacing:-0.4px; }
.dl-cell dd.big { font-size:18px; font-weight:700; letter-spacing:-0.7px; }
.dl-cell.full { grid-column:1/-1; }
/* 고객상세 기본정보는 짧은 항목 5개 + 메모다 - 칸을 5개로 고정해야 메모가 등록일 옆 남은 칸을 채워 카드가 한 줄 낮아진다.
   폭이 좁아 칸 수가 달라지면 등록일이 첫 칸에 서지 않으므로 메모는 다시 한 줄을 통째로 쓴다. */
.dl-grid.cols5 { grid-template-columns:repeat(5,minmax(0,1fr)); }
.dl-grid.cols5 .dl-cell.rest { grid-column:2/-1; }
@media (max-width:1180px){
  .dl-grid.cols5 { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .dl-grid.cols5 .dl-cell.rest { grid-column:1/-1; }
}
@media (max-width:760px){ .dl-grid.cols5 { grid-template-columns:repeat(2,minmax(0,1fr)); } }
/* 대출상세 고객정보 - 항목 3개를 한 줄에 둔다. */
.dl-grid.cols3 { grid-template-columns:repeat(3,minmax(0,1fr)); }
@media (max-width:760px){ .dl-grid.cols3 { grid-template-columns:1fr; } }
.dl-cell dd.memo { font-weight:500; line-height:1.65; white-space:pre-wrap; }

/* ---------- 모달 ---------- */
#modal-backdrop {
  position:fixed; inset:0; background:rgba(0,0,0,.5); z-index:100;
  display:flex; align-items:flex-start; justify-content:center; padding:64px 16px;
  animation:fade-in .18s var(--ease);
}
#modal-box {
  background:var(--card); border-radius:var(--radius-lg); width:640px; max-width:96vw; max-height:84vh;
  display:flex; flex-direction:column; box-shadow:var(--shadow-lg);
  animation:modal-in .24s var(--ease);
}
#modal-box.wide { width:920px; }
#modal-head {
  padding:24px 26px 12px; font-size:19px; font-weight:700; color:var(--grey-900);
  display:flex; justify-content:space-between; align-items:flex-start; gap:12px; letter-spacing:-0.7px;
}
.modal-x {
  background:none; border:none; font-size:15px; color:var(--grey-400); width:32px; height:32px;
  border-radius:10px; flex-shrink:0; display:flex; align-items:center; justify-content:center;
  transition:background .15s var(--ease), color .15s var(--ease);
}
.modal-x:hover { color:var(--grey-800); background:var(--grey-100); }
#modal-body { padding:8px 26px 20px; overflow-y:auto; font-size:14px; }
#modal-foot { padding:12px 26px 24px; display:flex; justify-content:flex-end; gap:8px; }
@keyframes fade-in { from { opacity:0; } to { opacity:1; } }
@keyframes modal-in { from { opacity:0; transform:translateY(16px) scale(.98); } to { opacity:1; transform:none; } }

/* ---------- 폼 ---------- */
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px 18px; }
.form-grid .full { grid-column:1 / -1; }
.form-field label { display:block; font-size:13px; color:var(--grey-700); font-weight:600; margin-bottom:7px; padding-left:2px; }
.form-field label .req { color:var(--red); }
/* 라벨 옆 i 아이콘 - 마우스를 올리거나 포커스하면 data-tip 문구가 말풍선으로 뜬다 */
.info-tip {
  display:inline-flex; align-items:center; justify-content:center;
  width:15px; height:15px; margin-left:3px; border-radius:50%; vertical-align:middle; position:relative; top:-1.5px;
  background:var(--grey-500); color:#fff; font-size:10.5px; font-weight:700; font-style:normal;
  line-height:1; cursor:help; user-select:none;
}
.info-tip:hover,.info-tip:focus { background:var(--grey-700); outline:none; }
#info-tip-bubble {
  position:fixed; left:0; top:0; width:max-content; max-width:min(320px, calc(100vw - 16px));
  padding:8px 11px; border-radius:8px; background:var(--grey-800); color:#fff;
  font-size:12.5px; font-weight:500; line-height:1.5; letter-spacing:-0.3px;
  opacity:0; visibility:hidden; pointer-events:none; z-index:300;
  transition:opacity .15s var(--ease);
}
#info-tip-bubble.on { opacity:1; visibility:visible; }
/* 편집 가능한 칸은 흰색 + 얇은 테두리, 회색 배경은 disabled / readonly 전용 */
.form-field input,.form-field select,.form-field textarea {
  width:100%; padding:12px 14px; border:none; border-radius:12px; background-color:var(--card);
  box-shadow:inset 0 0 0 1px var(--grey-300);
  font-size:14px; transition:box-shadow .15s var(--ease), background .15s var(--ease);
}
.form-field input:hover,.form-field select:hover,.form-field textarea:hover { box-shadow:inset 0 0 0 1px var(--grey-400); }
.form-field input:focus,.form-field select:focus,.form-field textarea:focus {
  outline:none; background-color:var(--card); box-shadow:0 0 0 2px var(--blue);
}
.form-field input[readonly],.form-field input:disabled,.form-field select:disabled,.form-field textarea[readonly],.form-field textarea:disabled {
  background-color:var(--grey-100); color:var(--grey-500); box-shadow:none; cursor:not-allowed;
}
.form-field textarea { resize:none; min-height:84px; line-height:1.6; }
/* 입력칸 옆에 작은 버튼을 붙이는 줄 - 버튼은 입력칸 높이에 맞춘다 */
.input-row { display:flex; gap:8px; align-items:stretch; }
.input-row input { flex:1; min-width:0; }
.input-row .btn { flex-shrink:0; padding-top:0; padding-bottom:0; }
/* 폼 안의 표 / 묶음 위에 붙이는 작은 제목 */
.form-section-title { font-size:13px; color:var(--grey-700); font-weight:700; margin:4px 0 8px; padding-left:2px; }
.form-hint { font-size:12.5px; color:var(--grey-500); margin-top:6px; padding-left:2px; font-weight:500; }
.check-row { display:flex; align-items:center; gap:8px; font-size:14px; padding:6px 0; font-weight:500; }
input[type=checkbox],input[type=radio] { width:17px; height:17px; accent-color:var(--blue); cursor:pointer; }

/* ---------- 옵션 그룹 (select 대신 쓰는 단일 선택 칩) ---------- */
.opt-group { display:flex; flex-wrap:wrap; gap:8px; }
.form-field .opt-group label.opt {
  display:inline-flex; align-items:center; margin:0; padding:0; position:relative; cursor:pointer;
  font-size:14px; font-weight:600; color:var(--grey-700);
}
.opt-group label.opt input[type=radio] {
  position:absolute; width:1px; height:1px; margin:0; opacity:0; pointer-events:none;
}
.opt-group label.opt > span {
  display:inline-block; padding:10px 16px; border-radius:12px; background:var(--card);
  border:1.5px solid var(--grey-300); line-height:1.3; white-space:nowrap;
  transition:background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.opt-group label.opt:hover > span { background:var(--grey-100); }
.opt-group label.opt .info-tip { margin-left:4px; }
/* 선택/비활성 상태에서 글꼴 굵기/테두리 두께를 바꾸지 않는다 - 칩 너비가 달라지면 옆 칩이 밀린다 */
.opt-group label.opt input:checked + span { background:var(--blue-weak); border-color:var(--blue); color:var(--blue); }
.opt-group label.opt input:focus-visible + span { box-shadow:0 0 0 3px var(--blue-weak2); }
.opt-group label.opt input:disabled + span { color:var(--grey-400); cursor:not-allowed; background:var(--grey-100); border-color:transparent; }
.opt-group label.opt input:disabled:checked + span { color:var(--grey-500); background:var(--grey-200); border-color:var(--grey-300); }
.opt-group label.opt:hover input:disabled + span { background:var(--grey-100); }
.opt-group label.opt:hover input:disabled:checked + span { background:var(--grey-200); }

/* ---------- 토스트 ---------- */
#toast-wrap { position:fixed; bottom:32px; left:50%; transform:translateX(-50%); z-index:200; display:flex; flex-direction:column; gap:8px; align-items:center; }
.toast {
  background:var(--grey-800); color:#fff; padding:14px 22px; border-radius:14px; font-size:14px;
  font-weight:600; letter-spacing:-0.4px; box-shadow:0 8px 24px rgba(0,0,0,.2);
  animation:toast-in .28s var(--ease); max-width:min(90vw,520px); text-align:center; line-height:1.5;
}
.toast.err { background:var(--red); }
@keyframes toast-in { from { opacity:0; transform:translateY(16px) scale(.96);} to { opacity:1; transform:none; } }

/* ---------- 레이아웃 ---------- */
.two-col { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.three-col { display:grid; grid-template-columns:1fr 1fr 1fr; gap:16px; }
@media (max-width:1180px){ .two-col,.three-col { grid-template-columns:1fr; } .kpi-grid.cols4 { grid-template-columns:repeat(2,minmax(0,1fr)); } }

/* ---------- 미니 바차트 ---------- */
.bar-row { display:flex; align-items:center; gap:12px; padding:7px 0; font-size:13px; font-weight:500; }
.bar-row .bl { width:120px; color:var(--grey-600); flex-shrink:0; letter-spacing:-0.3px; }
.bar-track { flex:1; background:var(--grey-100); border-radius:99px; height:10px; overflow:hidden; }
.bar-fill { display:block; height:100%; background:var(--blue); border-radius:99px; transition:width .4s var(--ease); }
.bar-fill.red { background:var(--red); } .bar-fill.green { background:var(--green); } .bar-fill.amber { background:var(--amber); }
.bar-row .bv { width:120px; text-align:right; font-variant-numeric:tabular-nums; color:var(--grey-900); font-weight:700; flex-shrink:0; }

/* ---------- 워크플로우 스텝 ---------- */
.steps { display:flex; gap:0; margin-bottom:22px; flex-wrap:wrap; align-items:center; }
.step { display:flex; align-items:center; gap:9px; padding:8px 16px 8px 10px; font-size:13.5px; color:var(--grey-400); font-weight:600; letter-spacing:-0.4px; }
.step .no {
  width:26px; height:26px; border-radius:50%; background:var(--grey-100); color:var(--grey-500);
  display:flex; align-items:center; justify-content:center; font-size:12.5px; font-weight:700; flex-shrink:0;
}
.step.done .no { background:var(--green-weak); color:var(--green); } .step.done { color:var(--green); }
.step.cur .no { background:var(--blue); color:#fff; box-shadow:0 3px 10px rgba(49,130,246,.32); }
.step.cur { color:var(--blue); font-weight:700; }
.step:not(:last-child)::after { content:"›"; margin-left:14px; color:var(--grey-300); font-size:16px; }

/* ---------- 문서 뷰어 ---------- */
.doc-paper {
  background:var(--card); border-radius:var(--radius); padding:40px 44px; font-size:14px;
  line-height:2; max-width:680px; margin:0 auto; box-shadow:var(--shadow);
  white-space:pre-wrap; color:var(--grey-800);
}

/* ---------- 유틸 ---------- */
.muted { color:var(--grey-500); } .small { font-size:12.5px; }
.mt8{margin-top:12px;} .mt14{margin-top:18px;} .mb8{margin-bottom:12px;}
.text-r { text-align:right; } .fw7 { font-weight:700; color:var(--grey-900); }
.link { color:var(--blue); cursor:pointer; font-weight:600; }
.link:hover { text-decoration:underline; }
.pos { color:var(--green); font-weight:600; } .neg { color:var(--red); font-weight:600; }

/* ---------- 커스텀 셀렉트 ---------- */
select {
  appearance:none; -webkit-appearance:none;
  background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%238B95A1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 12px center; padding-right:38px !important;
  cursor:pointer;
}

/* ---------- 커스텀 체크박스 / 라디오 ---------- */
input[type=checkbox],input[type=radio] {
  appearance:none; -webkit-appearance:none; width:20px; height:20px; padding:0; margin:0; flex-shrink:0;
  border-radius:7px; background:var(--card); border:1.5px solid var(--grey-300);
  position:relative; cursor:pointer; transition:background .15s var(--ease), border-color .15s var(--ease);
}
input[type=radio] { border-radius:50%; }
input[type=checkbox]:hover,input[type=radio]:hover { border-color:var(--grey-400); }
input[type=checkbox]:checked,input[type=radio]:checked { background:var(--blue); border-color:var(--blue); }
input[type=checkbox]:checked::after {
  content:""; position:absolute; left:50%; top:50%; width:5px; height:10px;
  border:solid #fff; border-width:0 2.2px 2.2px 0; transform:translate(-50%,-60%) rotate(43deg);
}
input[type=radio]:checked::after {
  content:""; position:absolute; left:50%; top:50%; width:7px; height:7px;
  border-radius:50%; background:#fff; transform:translate(-50%,-50%);
}
input[type=checkbox]:focus-visible,input[type=radio]:focus-visible { outline:none; box-shadow:0 0 0 3px var(--blue-weak2); }
input[type=checkbox]:disabled,input[type=radio]:disabled { background:var(--grey-200); border-color:var(--grey-200); cursor:not-allowed; }

/* 대출번호 등 식별자 - 고정폭으로 읽기 쉽게 */
.mono { font-family: "SF Mono", Menlo, Consolas, monospace; letter-spacing: .02em; }
