/* 남도마켓 회수정산 — 라이트 테마 */
:root {
  --ink: #1b1f24;
  --ink-2: #4b5563;
  --muted: #8a919c;
  --line: #e3e6ea;
  --bg: #f4f6f8;
  --card: #ffffff;
  --accent: #2456c4;        /* 주 색상 (버튼/진행률) */
  --accent-soft: #e8eefc;
  --bill: #b3261e;          /* 청구(+) — 경고성 적색 */
  --bill-soft: #fdecea;
  --pay: #1d4ed8;           /* 입금(−) — 청색 */
  --pay-soft: #e8effd;
  --warn-bg: #fff7e6;
  --warn-line: #f2c063;
  --danger: #b3261e;
  --ok: #1a7f37;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20, 30, 50, .06), 0 2px 8px rgba(20, 30, 50, .05);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Pretendard", "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
  background: var(--bg); color: var(--ink); font-size: 14.5px; line-height: 1.55;
}
main { max-width: 1180px; margin: 0 auto; padding: 16px 20px 60px; }

/* 헤더 */
.app-header {
  background: var(--card); border-bottom: 1px solid var(--line);
  padding: 14px 20px 0; position: sticky; top: 0; z-index: 20;
}
.app-title { font-size: 18px; font-weight: 700; }
.app-sub { font-size: 12.5px; color: var(--muted); font-weight: 400; margin-left: 8px; }
.tabs { display: flex; gap: 4px; margin-top: 10px; }
.tab-btn {
  border: none; background: none; padding: 9px 14px; font-size: 14.5px; cursor: pointer;
  color: var(--ink-2); border-bottom: 2.5px solid transparent; font-weight: 600;
}
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-btn:hover { color: var(--ink); }
.app-footer { text-align: center; color: var(--muted); font-size: 12px; padding: 18px; }

/* 한국시각 시계 (#view > div) */
.kst-clock {
  display: flex; align-items: center; gap: 8px;
  width: fit-content; margin: 2px 0 6px auto;
  padding: 6px 14px; background: var(--card);
  border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow);
}
.kst-clock-icon { font-size: 14px; line-height: 1; }
.kst-clock-label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.kst-clock-time {
  font-size: 14px; color: var(--accent); font-weight: 700;
  font-variant-numeric: tabular-nums; letter-spacing: .2px;
}

/* 카드/툴바 */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 18px; margin: 14px 0;
}
.card-slim {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 8px 14px; margin: 10px 0; font-size: 13px;
}
.toolbar { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; }
.tb-field label { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 3px; font-weight: 600; }
.tb-spacer { flex: 1; }
.period-inputs { display: inline-flex; align-items: center; gap: 6px; }
.cal-title { font-size: 17px; min-width: 110px; text-align: center; }

input[type="date"], input[type="text"], input:not([type]), select {
  border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px; font-size: 14px;
  font-family: inherit; background: #fff; color: var(--ink);
}
input:focus, select:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }

/* 버튼 */
.btn {
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 8px; padding: 8px 14px; font-size: 13.5px; cursor: pointer; font-weight: 600;
  font-family: inherit;
}
.btn:hover { border-color: #c8ced6; background: #fafbfc; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #1c47a6; }
.btn.confirm { background: var(--ok); border-color: var(--ok); color: #fff; font-size: 14.5px; padding: 10px 18px; }
.btn.confirm:hover { background: #146a2d; }
.btn.danger { color: var(--danger); border-color: #ecc8c5; background: #fff; }
.btn.danger:hover { background: var(--bill-soft); }
.btn.seg { border-radius: 999px; padding: 6px 14px; }
.btn.seg.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.seg:disabled { opacity: .4; cursor: not-allowed; background: #f0f2f5; color: var(--muted); border-color: var(--line); }
.btn.seg:disabled.active { background: #c3ccdb; border-color: #c3ccdb; color: #fff; opacity: .55; }
.seg-group { display: flex; gap: 6px; }
.mini-btn {
  border: 1px solid var(--line); background: #fff; border-radius: 6px; cursor: pointer;
  font-size: 12px; padding: 2px 7px; color: var(--ink-2);
}
.mini-btn:hover { color: var(--danger); }
.btn-row { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
label.btn input { display: none; }

/* 거래처 카드 */
.vendor-card { padding: 0; overflow: hidden; }
.vc-head {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 13px 18px; border-bottom: 1px solid var(--line); background: #fafbfd;
}
.vc-title { font-size: 16.5px; }
.badge {
  font-size: 11.5px; padding: 2px 8px; border-radius: 999px; font-weight: 700;
  background: var(--accent-soft); color: var(--accent); margin-right: 6px; vertical-align: 2px;
}
.badge.type-ratio { background: #eef7ee; color: var(--ok); }
.fmt-badge {
  font-size: 12.5px; font-weight: 700; color: var(--accent);
  background: var(--accent-soft); border-radius: 8px; padding: 5px 10px; cursor: help;
}
.muted { color: var(--muted); font-weight: 400; }
.warn {
  background: var(--warn-bg); border: 1px solid var(--warn-line); color: #7a5300;
  border-radius: 8px; padding: 8px 12px; margin: 10px 18px 0; font-size: 13px;
}
.vc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; padding: 14px 18px; }
@media (max-width: 900px) { .vc-grid { grid-template-columns: 1fr; } }
.vc-left h4, .vc-right h4, .email-block h4 { margin: 4px 0 8px; font-size: 13.5px; }

/* 입금 목록/추가 */
.mini-table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.mini-table td, .mini-table th {
  border-bottom: 1px solid var(--line); padding: 5px 8px; text-align: left;
}
.mini-table th { color: var(--ink-2); font-size: 12px; background: #fafbfd; }
.mini-table .num, td.num, span.num, b.num { text-align: right; font-variant-numeric: tabular-nums; }
.mini-table tr.dim { color: var(--muted); background: #fafafa; }
.add-pay { display: flex; gap: 6px; margin-top: 8px; align-items: center; flex-wrap: wrap; }
.add-pay input[type="text"] { width: 120px; }

/* 원장 추가 폼: 날짜 텍스트 입력 + 캘린더 아이콘 버튼 + 숨은 네이티브 date picker */
.date-input-group { position: relative; display: inline-flex; align-items: center; }
.date-text-input { width: 108px; font-variant-numeric: tabular-nums; padding-right: 22px !important; }
.date-text-input.invalid { border-color: var(--danger) !important; background: var(--bill-soft); }
.date-pick-btn {
  position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  border: none; background: none; cursor: pointer; color: var(--ink-2); font-size: 11px;
  padding: 4px 4px; line-height: 1;
}
.date-pick-btn:hover { color: var(--accent); }
.date-native-hidden {
  position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: none; padding: 0;
}
/* 작성중(아직 입력 완료 전) 금액 입력칸 — 확정된 원장 행과 다른 스타일로 구분 */
.draft-amt {
  background: #fffbe8 !important; border-color: #f0d879 !important;
}
.draft-amt:focus { background: #fff !important; }

/* 원장 표: 생략 안내 병합행 — 일자·금액·메모 3칸을 하나로 합쳐진 셀처럼 표시 */
.led-grid-table td.led-merged-cell { background: #fafbfd; padding: 0 10px !important; }
.btn-link {
  border: none; background: none; color: var(--accent); font-size: 12.5px; font-weight: 600;
  cursor: pointer; padding: 4px 2px; text-decoration: underline; font-family: inherit;
}
.btn-link:hover { color: #1c47a6; }

/* 원장 전체 보기 모달 */
.lfv-wrap { border: 1px solid var(--line); border-radius: 8px; }

/* 드롭존 */
.dropzone {
  margin-top: 14px; border: 1.6px dashed #c3cbd6; border-radius: var(--radius);
  padding: 14px; text-align: center; color: var(--ink-2); background: #fbfcfe; font-size: 13.5px;
}
.dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.filelink { color: var(--accent); text-decoration: underline; cursor: pointer; }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.uncle-preview { margin-top: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.uncle-preview .mini-table { margin-top: 6px; max-height: 220px; display: block; overflow: auto; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; margin-top: 8px; color: var(--ink-2); }
.chk.exclude { margin: 0 18px 14px; }

/* 집계 패널 */
.agg-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 6px 2px; border-bottom: 1px dashed var(--line);
}
.agg-label { color: var(--ink-2); font-size: 13.5px; }
.arrears-basis { margin: -4px 0 6px; font-size: 11px; }
.agg-input-wrap { display: inline-flex; align-items: center; gap: 6px; }
.agg-input {
  width: 140px; text-align: right; font-variant-numeric: tabular-nums;
  border: 1px solid transparent; background: transparent; font-weight: 600;
}
.agg-input:hover, .agg-input:focus { border-color: var(--line); background: #fff; }
.agg-row.overridden .agg-input { color: #9a4b00; background: #fff7ef; border-color: #edcaa4; }
.auto-tag, .ov-tag {
  font-size: 10.5px; padding: 1px 6px; border-radius: 999px; font-weight: 700;
}
.auto-tag { background: #eef2f6; color: var(--muted); }
.ov-tag { background: #fff0e0; color: #9a4b00; }
.agg-row.total { border-bottom: none; border-top: 2px solid var(--ink); margin-top: 4px; padding-top: 9px; }
.agg-row.total b { font-size: 17px; }
.progress { height: 8px; background: #edf0f3; border-radius: 999px; margin-top: 8px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 999px; }

/* 적용 범위 선택 모달 */
.modal-ov {
  position: fixed; inset: 0; background: rgba(20, 30, 50, .38);
  display: flex; align-items: center; justify-content: center; z-index: 100;
}
.modal {
  background: #fff; border-radius: 12px; padding: 20px 22px; max-width: 440px; width: 90%;
  box-shadow: 0 8px 30px rgba(20, 30, 50, .25);
}
.modal h4 { margin: 0 0 6px; font-size: 15.5px; }
.modal p { margin: 0 0 14px; font-size: 13px; }
.modal-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.modal-btns .btn { flex: 1; min-width: 90px; }

/* 청구 규칙 변경 검토 팝업(범위 선택 + 전후 달력 비교) */
.modal.modal-wide { max-width: 900px; max-height: 88vh; overflow-y: auto; }
.scope-picker { display: flex; gap: 8px; margin: 10px 0; }
.scope-picker .btn.seg { flex: 1; }
.scope-date-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.scope-date-row label { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.rbc-nav { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 8px; font-size: 13.5px; }
.rbc-grids { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rbc-grids h5 { margin: 0 0 6px; font-size: 12.5px; color: var(--ink-2); text-align: center; }
.rbc-grids .cal-card { padding: 6px; margin: 0; box-shadow: none; }
.rbc-grids .cal-grid { gap: 2px; }
.rbc-grids .cal-cell { min-height: 44px; padding: 2px 3px; pointer-events: none; }
.rbc-grids .cal-day { font-size: 10.5px; }
.rbc-grids .ev { font-size: 9px; padding: 0 3px; }
.rbc-grids .cal-vendor { display: none; }
.rbc-info { display: flex; flex-direction: column; gap: 3px; font-size: 12px; margin: 10px 0; color: var(--ink-2); }
.rbc-info div:nth-child(2) { color: var(--ink); font-weight: 600; }

/* 수정 로그 */
.log-table col { width: auto; }
.log-table td { height: auto; white-space: normal; padding: 6px 8px; font-size: 12.5px; }
.log-ts { font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.log-old { color: var(--muted); text-decoration: line-through; }
.log-new { color: var(--ink); font-weight: 600; }

/* 원장 탭 */
.ledger-summary { font-size: 13px; }
.ledger-summary b { color: var(--ink); }
.stage-warn { color: var(--danger); font-size: 12px; font-weight: 700; margin-top: 6px; }
.ledger-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 900px) { .ledger-grid { grid-template-columns: 1fr; } }
.led-title { margin: 0 0 10px; font-size: 15px; }
/* 스크롤은 wrapper가 담당 — table 자체는 display:table을 유지해야 colgroup 너비가 먹는다 (display:block으로 두면 열 정렬이 행마다 어긋남) */
.led-table-wrap { max-height: 460px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.led-table { display: table; width: 100%; table-layout: fixed; border-collapse: collapse; }
.led-table th { position: sticky; top: 0; background: #fafbfd; z-index: 1; }
.led-table col.c-num { width: 30px; }
.led-table col.c-date { width: 128px; }
.led-table col.c-amt { width: 104px; }
.led-table col.c-memo { width: auto; }
.led-table col.c-del { width: 30px; }
.led-table td { height: 34px; overflow: hidden; vertical-align: middle; }

/* 그리드 스타일 원장 표 — jexcel처럼 셀 경계가 이어진 하나의 그리드로 보이게 함.
   (둥근 모서리 인풋 박스가 셀마다 따로 떠 보이던 문제 → 테두리/라운딩 없는 flat 셀로 통일) */
.led-grid-table { border: 1px solid var(--line); }
.led-grid-table th, .led-grid-table td { border-right: 1px solid var(--line); padding: 0; }
.led-grid-table th:last-child, .led-grid-table td:last-child { border-right: none; }
.led-grid-table th { padding: 5px 8px; }
.led-grid-table input,
.led-grid-table .date-input-group { border-radius: 0 !important; }
.led-grid-table input[type="text"],
.led-grid-table input[type="date"],
.led-grid-table input:not([type]) {
  border: none; background: transparent; padding: 8px; width: 100%; height: 100%;
  box-sizing: border-box; font-size: 13.5px;
}
.led-grid-table input:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--accent); background: #fff; }
.led-grid-table input:hover:not(:focus) { background: #f4f7fb; }
.led-grid-table .date-text-input.invalid { border: 1.5px solid var(--danger) !important; background: var(--bill-soft) !important; }
.led-grid-table td.led-rownum, .led-grid-table td.led-date { padding: 8px; }
.led-grid-table td:last-child { text-align: center; }

/* 스프레드시트식 행 번호 열 (jexcel 왼쪽 열 참고) */
.led-rownum {
  text-align: center; color: var(--muted); font-size: 11px; background: #fafbfd;
  font-variant-numeric: tabular-nums;
}
.led-rownum-new { color: var(--accent); font-weight: 700; }
/* 그리드 맨 아래 "작성중" 빈 행 — jexcel처럼 항상 그리드에 붙어있는 입력용 행 */
.led-draft-row td { background: #fffbe8; }
.led-draft-row td.led-date { padding: 0; } /* 날짜 텍스트 입력이 자체 패딩을 가지므로 td 패딩과 겹쳐 글자가 잘리지 않게 함 */
.led-draft-row input { background: #fffbe8 !important; }
.led-draft-row input:focus { background: #fff !important; }
.led-draft-row .date-text-input, .led-draft-row .draft-amt { width: 100%; }
.led-grid-table .date-text-input { padding-left: 6px !important; padding-right: 20px !important; }
.led-amt-cell-multi { display: flex; }
.led-amt-cell-multi input:first-child { border-right: 1px solid var(--line) !important; }
.mini-btn-wide { padding: 4px 10px; font-size: 12px; border-radius: 4px; }
.led-hidden-hint { color: var(--muted); font-size: 12px; margin-right: 8px; }
.led-date { white-space: nowrap; font-variant-numeric: tabular-nums; }
.led-date.hol { color: var(--bill); font-weight: 700; cursor: help; }
.led-amt {
  width: 100%; text-align: right; font-variant-numeric: tabular-nums;
}
.led-memo-cell { display: flex; align-items: center; gap: 5px; height: 100%; width: 100%; box-sizing: border-box; }
.led-memo {
  flex: 1; min-width: 0; font: inherit; color: var(--ink-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.led-memo:hover, .led-memo:focus { color: var(--ink); }
.led-gross-note {
  flex: 0 0 auto; width: 17px; height: 17px; line-height: 17px; text-align: center;
  border-radius: 999px; background: var(--accent-soft); color: var(--accent);
  font-size: 10.5px; font-weight: 700; cursor: help; margin-right: 6px;
}
/* 구분선 행: mini-table의 기본 테두리를 없애 빨간 선이 이중으로 겹쳐 끊겨 보이지 않게 함 */
.led-reach-row td { padding: 8px 8px 10px; border-bottom: none; height: auto; }
.led-reach-line {
  display: flex; align-items: center; gap: 10px; color: var(--danger);
  font-size: 12px; font-weight: 700; white-space: nowrap;
}
.led-reach-line::before, .led-reach-line::after { content: ''; flex: 1; border-top: 1.5px solid var(--danger); }
.mini-tag { font-size: 10px; padding: 0 5px; border-radius: 999px; background: #eef2f6; color: var(--muted); }
.mini-tag.hol { background: var(--bill-soft); color: var(--bill); }

/* 메일·보고 출력 2단 */
.output-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 900px) { .output-grid { grid-template-columns: 1fr; } }
/* 메일 블록 */
.email-block { padding: 0 18px 6px; }
.email-head { display: flex; justify-content: space-between; align-items: center; }
.email-pre {
  white-space: pre-wrap; background: #fafbfd; border: 1px solid var(--line); border-radius: 8px;
  padding: 14px 16px; font-family: inherit; font-size: 13.8px; margin: 8px 0 12px; line-height: 1.65;
}
.email-pre.report-error {
  color: var(--danger); font-weight: 700; background: var(--bill-soft); border-color: #ecc8c5;
}

/* 달력 */
.cal-wrap { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-start; }
.cal-card { flex: 1 1 460px; min-width: 420px; }
.cal-vendor { margin: 0 0 10px; font-size: 15.5px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-head { text-align: center; font-size: 12px; font-weight: 700; color: var(--ink-2); padding: 4px 0; }
.cal-head.sun, .cal-day.sun { color: var(--bill); }
.cal-head.sat, .cal-day.sat { color: var(--pay); }
.cal-cell {
  min-height: 74px; border: 1px solid var(--line); border-radius: 7px; padding: 4px 5px;
  background: #fff; cursor: pointer; overflow: hidden;
}
.cal-cell:hover { border-color: var(--accent); }
.cal-cell.blank { background: transparent; border: none; cursor: default; }
.cal-cell.today { outline: 2px solid var(--accent); outline-offset: -2px; }
.cal-cell.today .cal-day {
  background: var(--accent); color: #fff; border-radius: 999px;
  display: inline-block; min-width: 20px; text-align: center;
}
.cal-cell.guide-day { background: #fffdf5; }
.cal-day { font-size: 12.5px; font-weight: 700; padding: 0 3px; }
.cal-evs { display: flex; flex-direction: column; gap: 2px; margin-top: 3px; }
.ev {
  font-size: 11px; font-variant-numeric: tabular-nums; border-radius: 5px; padding: 0 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; width: fit-content; max-width: 100%;
}
.ev.bill { background: var(--bill-soft); color: var(--bill); }
.ev.bill.paid { text-decoration: line-through; opacity: .5; font-weight: 500; }
.ev.bill.pending { background: #fff; border: 1px dashed var(--bill); }
.ev.pay { background: var(--pay-soft); color: var(--pay); }
.ev.run { background: #eef2f6; color: var(--ink-2); }
.ev.guide { background: #7a1f1a; color: #fff; }
.cal-legend { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* 거래처 설정 폼 */
.vc-head-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fmt-toggles {
  display: flex; gap: 20px; align-items: center; flex-wrap: wrap;
  padding: 10px 12px; margin-top: 10px; background: #fafbfd;
  border: 1px solid var(--line); border-radius: 8px;
}
.fmt-group { display: inline-flex; align-items: center; gap: 6px; }
.fmt-label { font-size: 12.5px; color: var(--ink-2); font-weight: 700; margin-right: 4px; }
.fmt-toggles .hint { flex-basis: 100%; margin-top: 0; }

/* 2단: 좌측 세로 입력 / 우측 라이브 출력 예시 */
.vform-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(330px, 400px); gap: 20px; margin-top: 12px; }
@media (max-width: 920px) { .vform-body { grid-template-columns: 1fr; } }
.vform-left { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.vfield { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.vfield .vf-label { font-size: 12.5px; }
.vfield input { font-weight: 400; color: var(--ink); }
.vfield.off { opacity: .5; }
.vf-readonly { font-weight: 400; color: var(--ink); font-variant-numeric: tabular-nums; padding: 7px 0; }
input:disabled { background: #f0f2f5; color: var(--muted); cursor: not-allowed; }

/* 우측 출력 예시 */
.vform-right {
  position: sticky; top: 88px; align-self: start;
  background: #fafbfd; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px;
}
.vp-head { font-size: 13px; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fmt-badge.sm { font-size: 11px; padding: 1px 7px; }
.vp-agg { display: flex; flex-wrap: wrap; gap: 6px 8px; margin-bottom: 12px; }
.vp-agg-item {
  display: flex; flex-direction: column; gap: 1px; background: #fff; border: 1px solid var(--line);
  border-radius: 7px; padding: 5px 9px; min-width: 82px;
}
.vp-agg-label { font-size: 10.5px; color: var(--muted); font-weight: 600; }
.vp-agg-item b { font-size: 13px; font-variant-numeric: tabular-nums; }
.vp-agg-item.capped { border-color: var(--warn-line); background: var(--warn-bg); }
.vp-agg-item[title] { cursor: help; }
.vp-email {
  white-space: pre-wrap; background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 12px 14px; font-size: 12.8px; line-height: 1.62; color: var(--ink); overflow-x: auto;
}
.tok { border-radius: 3px; padding: 0 1px; transition: background .12s, box-shadow .12s; }
.tok.hl { background: #ffe14d; box-shadow: 0 0 0 3px #ffe14d; font-weight: 700; color: #4a3500; }
textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px;
  font: inherit; margin-top: 8px; resize: vertical;
}
textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.vendor-form.flash { outline: 2.5px solid var(--accent); }
.help ul { margin: 8px 0 0; padding-left: 18px; }
.help li { margin: 4px 0; font-size: 13px; color: var(--ink-2); }
.help code { background: #f0f2f5; border-radius: 4px; padding: 0 4px; }

/* 기록 */
.sec-title { margin: 22px 0 6px; font-size: 15px; }
.run-card { padding: 10px 14px; }
.run-head { display: flex; align-items: center; gap: 12px; cursor: pointer; flex-wrap: wrap; }
.run-totals { font-size: 13px; color: var(--ink-2); }
.run-email { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 8px; }
.empty-hint { text-align: center; color: var(--ink-2); padding: 34px 20px; }
