/* K프리미엄 쇼링 화면 공통 디자인 (색·글꼴·용어 규칙은 CLAUDE.md "디자인 규칙") */

@font-face {
  font-family: "Pretendard Variable";
  font-weight: 45 920;
  font-style: normal;
  font-display: swap;
  src: url("/static/fonts/PretendardVariable.woff2") format("woff2-variations");
}

:root {
  --navy: #10213F;
  --blue: #0061D5;
  --blue-light: #2B7BF0;
  --yellow: #F6B400;
  --bg: #EEF2F7;
  --line: #D9E0EC;
  --danger: #C62828;
  --text: #10213F;
  --muted: #5B6578;
  --card: #FFFFFF;
  --st-문의: #0061D5;   /* 상태 배지 (2026-11-20): 문의 파랑 · 진행 노랑 · 완료 초록 · 불가·취소 회색 */
  --st-진행: #F6B400;
  --st-완료: #1E8E5A;
  --st-불가: #8A94A6;
  --st-취소: #E4E7EC;   /* 취소: 연회색 바탕 + 회색 글자 (불가의 진한 회색과 구분) */
  --header-h: 60px;
  --tabbar-h: 0px;
  font-family: "Pretendard Variable", Pretendard, "Malgun Gothic", "맑은 고딕", "Apple SD Gothic Neo", sans-serif;
  font-size: 16px;
  color: var(--text);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); line-height: 1.5; padding-bottom: var(--tabbar-h); }
a { color: var(--blue); }
h2 { font-size: 24px; margin: 0 0 24px; }          /* 제목 → 첫 카드 24px */
h3 { font-size: 18px; margin: 0 0 16px; }          /* 카드 제목 → 내용 16px */
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h2 { margin: 0; }
.small-label { font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 6px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.nowrap { white-space: nowrap; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.c { text-align: center; }
[hidden] { display: none !important; }

/* ───── 헤더 ───── */
.topbar { position: sticky; top: 0; z-index: 50; height: var(--header-h); background: var(--navy); color: #fff;
          display: flex; align-items: center; gap: 28px; padding: 0 32px; }
.topbar .logo img { height: 28px; display: block; }
.topbar nav { display: flex; gap: 4px; flex: 1; }
.topbar nav a { color: #C9D3E6; text-decoration: none; padding: 8px 14px; border-radius: 8px; font-weight: 600; }
.topbar nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.topbar nav a.on { color: #fff; background: rgba(255,255,255,.14); }
.topbar .right { display: flex; gap: 10px; align-items: center; }
.topbar .m-only { color: #C9D3E6; text-decoration: none; font-weight: 600; }

/* 페이지 좌우 여백 PC 32px / 폰 16px. 거래내역만 본문 최대 1600px */
main { max-width: 1304px; margin: 24px auto 0; padding: 0 32px 32px; }
main.wide { max-width: 1664px; }

/* ───── 버튼 ───── */
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px;
               padding: 0 20px; font: inherit; font-size: 15px; font-weight: 600; border-radius: 8px; cursor: pointer;
               border: 1px solid var(--navy); background: var(--navy); color: #fff; text-decoration: none; white-space: nowrap; }
button:hover, .btn:hover { filter: brightness(1.12); }
.btn-yellow { background: var(--yellow); border-color: var(--yellow); color: var(--navy); }
.btn-blue { background: var(--blue); border-color: var(--blue); color: #fff; }
/* 주요 버튼(노랑·네이비·파랑) 높이 44px·좌우 20px / 보조 버튼(흰 바탕 테두리) 높이 40px. 같은 줄에 주요 버튼은 하나만 */
.btn-outline, button.plain { background: #fff; color: var(--navy); border-color: var(--line); min-height: 40px; padding: 0 16px; }
.btn-outline:hover, button.plain:hover { border-color: var(--navy); filter: none; }
.btn-danger { background: #fff; color: var(--danger); border-color: var(--danger); min-height: 40px; padding: 0 16px; }
.btn-big { min-height: 44px; font-size: 16px; padding: 0 24px; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn-main { min-width: 140px; }   /* 접수 등록·저장: PC는 내용 폭, 폰은 가로 꽉 */
button:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; filter: none; }

/* ───── 카드·폼 ───── */
/* 카드 안쪽 24px(폰 16px), 카드와 카드 사이 24px */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 24px; margin-bottom: 24px; }
.form-group + .form-group { margin-top: 24px; }
.form-group h4 { font-size: 15px; margin: 0 0 12px; color: var(--blue); }
/* 입력칸 묶음: 칸 사이 가로 16px · 줄 20px · 라벨과 칸 6px */
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px 16px; }
.fields + .actions, .form-group + .actions { margin-top: 24px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); font-weight: 600; }
.field.wide { grid-column: 1 / -1; }
input, select, textarea { font: inherit; font-size: 16px; color: var(--text); min-height: 44px; padding: 8px 12px;
                          border: 1px solid var(--line); border-radius: 8px; background: #fff; width: 100%; }
textarea { min-height: 72px; resize: vertical; }
textarea.two-lines { min-height: 0; height: 68px; }  /* 2줄 높이 */
/* 입력칸 안내 문구(placeholder): 모든 화면 연한 회색 · 굵기 보통 (입력칸은 라벨의 굵은 글자를 물려받으므로 따로 정함) */
::placeholder { color: #8A94A6; font-weight: 400; opacity: 1; }
/* 비고 구역 칸 안 안내 문구(data-hint)는 13px */
textarea[data-hint]::placeholder { font-size: 13px; }
/* 체크박스: 모든 화면 18px, 라벨 글자와 같은 줄 세로 가운데 */
/* 표·접수정보 칸의 입력칸 규칙보다 앞서도록 크기는 !important */
input[type=checkbox] { width: 18px !important; height: 18px !important; min-height: 0 !important; min-width: 0 !important; padding: 0 !important;
                       margin: 0; flex: none; vertical-align: middle; accent-color: var(--navy); cursor: pointer; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue-light); outline-offset: -1px; border-color: var(--blue-light); }
.invalid { border-color: var(--danger) !important; outline-color: var(--danger) !important; }
.field-msg { color: var(--danger); font-size: 13px; font-weight: 500; }
.error { background: #FDECEA; color: var(--danger); border: 1px solid #F5C2BD; border-radius: 8px; padding: 12px 16px; margin-bottom: 16px; }
details.more > summary { cursor: pointer; color: var(--blue); font-weight: 600; margin: 4px 0 14px; list-style: none; }
details.more > summary::before { content: "＋ "; }
details.more[open] > summary::before { content: "－ "; }
.inline-row { display: flex; gap: 8px; align-items: center; }
.inline-row > select, .inline-row > input { flex: 1; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }   /* 나란한 버튼 사이 12px */
.spacer { flex: 1; }

/* ───── 표 ───── */
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; background: #fff; }
/* 표: 행 높이 48px(폰 56px), 셀 좌우 12px, 머리글 연회색, 숫자 열 오른쪽 정렬(.num) */
th, td { border-bottom: 1px solid var(--line); padding: 0 12px; height: 48px; text-align: left; vertical-align: middle; }
th { background: #F5F7FB; font-size: 14px; color: var(--muted); font-weight: 700; white-space: nowrap; }
/* 행 전체가 상세로 가는 표(tr[data-href]): 손가락 커서, 올리거나 Tab·누르는 순간 연한 파랑 #EEF4FF + 왼쪽 3px 파란 세로선 (static/app.js) */
tbody tr[data-href] { cursor: pointer; }
tbody tr[data-href]:focus { outline: none; }
tbody tr.row-hot > td { background: #EEF4FF !important; }
tbody tr.row-hot-first > td:first-child { box-shadow: inset 3px 0 0 #0061D5; }
.m-card:active, .m-card:focus-visible { background: #EEF4FF; box-shadow: inset 3px 0 0 #0061D5; outline: none; }   /* 폰 카드: 누르는 순간 */
tfoot td { background: #F5F7FB; font-weight: 700; }
tr.editing td { background: #FFFBEA; }
tr.editing input { min-height: 40px; padding: 6px 8px; min-width: 80px; }
.warn { color: var(--danger); font-size: 13px; }
.unpaid { color: var(--danger); font-weight: 700; }
.tag { font-size: 12px; padding: 1px 6px; border-radius: 6px; background: #FFF3D6; color: #8A5A00; }

/* ───── 상태 배지 ───── */
.status { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; color: #fff; background: var(--st-불가); white-space: nowrap; }
.s-문의 { background: var(--st-문의); }
.s-진행 { background: var(--st-진행); color: var(--navy); }
.s-완료 { background: var(--st-완료); }
.s-불가 { background: var(--st-불가); }
.s-취소 { background: var(--st-취소); color: var(--muted); }

/* ───── 안내(토스트) ───── */
#toast { position: fixed; top: calc(var(--header-h) + 12px); left: 50%; transform: translate(-50%, -12px); z-index: 200;
         background: var(--navy); color: #fff; padding: 12px 22px; border-radius: 10px; font-weight: 600;
         box-shadow: 0 6px 20px rgba(16,33,63,.25); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: 92vw; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ───── 빈 목록 ───── */
.empty { text-align: center; color: var(--muted); padding: 36px 16px; }
.empty .actions { justify-content: center; margin-top: 12px; }

/* ───── 오늘 ───── */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-bottom: 32px; }   /* 새 문의 · 오늘 작업 · 사진 없는 완료 · 미입금 */
.stat-card.inquiry { border-top-color: var(--blue); }
.month-closed { margin: -16px 0 24px; font-size: 14px; color: var(--muted); }   /* 할 일: 이번 달 불가·취소 건수 */
.month-closed a { color: var(--muted); }
.month-closed a:hover { color: var(--blue); }
.stat-card { display: block; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 24px;
             text-decoration: none; color: var(--text); border-top: 5px solid var(--blue); }
.stat-card:hover { box-shadow: 0 4px 16px rgba(16,33,63,.10); }
.stat-card .label { font-weight: 700; color: var(--muted); }
.stat-card .count { font-size: 44px; font-weight: 800; line-height: 1.2; margin: 6px 0 2px; }
.stat-card .count small { font-size: 18px; font-weight: 700; }
.stat-card.warn { border-top-color: #E07B00; }
.stat-card.danger { border-top-color: var(--danger); }

/* ───── 컨테이너 검색 ───── */
.search-box { position: relative; }
.search-box input[type=search] { font-size: 18px; min-height: 52px; padding-left: 44px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%235B6578' stroke-width='2'%3E%3Ccircle cx='8.5' cy='8.5' r='6'/%3E%3Cpath d='M13 13l5 5'/%3E%3C/svg%3E") no-repeat 14px center; }
/* 검색창 → 빠른 조건 12px, 빠른 조건 사이 8px, → 상세 조건 16px (상세 조건은 항상 펼침) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line);
        background: #fff; color: var(--navy); font-weight: 600; font-size: 15px; cursor: pointer; user-select: none; text-decoration: none; }
.chip input { display: none; }
.chip:has(input:checked) { background: var(--navy); border-color: var(--navy); color: #fff; }
/* 검색 조건 칸: PC는 가로로 1~2줄(컨테이너 5칸×2줄, 거래내역 6칸×1줄), 폰은 세로 한 줄씩 */
.filters { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px 16px; margin-top: 16px; }
.filters.f6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.filters.f4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.filters input, .filters select { min-height: 40px; height: 40px; padding: 4px 10px; font-size: 15px; }
/* 거래내역 날짜 줄(2026-11-19): ‹ 2026년 11월 › 과 시작일 ~ 종료일 한 줄, 사이 16px (폰은 월 이동이 위) */
.date-row { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; }
.date-row + .filters { margin-top: 16px; }
.month-label { min-width: 108px; text-align: center; font-weight: 700; color: var(--navy); white-space: nowrap; }
.date-range { display: flex; align-items: center; gap: 8px; }
.date-range input { width: 160px; min-height: 40px; height: 40px; padding: 4px 10px; font-size: 15px; }
.date-range .tilde { color: var(--muted); }
.month-nav .btn-outline { min-width: 44px; padding: 0 12px; }
.ledger-name { font-size: 18px; }
.result-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 16px; }
.result-head .count { font-weight: 800; font-size: 18px; }
.cond { display: inline-flex; align-items: center; gap: 4px; background: #E3EDFB; color: var(--navy); border-radius: 999px; padding: 2px 4px 2px 12px; font-weight: 600; font-size: 14px; }
.cond a { color: var(--navy); text-decoration: none; font-size: 18px; line-height: 1; padding: 2px 8px; border-radius: 999px; }
.cond a:hover { background: rgba(16,33,63,.1); }
.m-cards { display: none; }
.m-card { display: block; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; text-decoration: none; color: var(--text); }
.m-card .row1 { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; font-weight: 700; font-size: 17px; }
.m-card .row1 > span:first-child { min-width: 0; overflow-wrap: anywhere; }   /* 긴 업체 이름은 두 줄로 */
.m-card .row1 > :last-child { flex-shrink: 0; }
.m-card .row2 { color: var(--muted); margin-top: 4px; font-size: 15px; }
.m-card .no { color: var(--blue); font-weight: 700; margin-right: 6px; }

/* ───── 컨테이너 상세 ───── */
.summary { position: sticky; top: var(--header-h); z-index: 40; background: #fff; border: 1px solid var(--line); border-radius: 12px;
           padding: 16px 24px; margin-bottom: 16px; display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; box-shadow: 0 2px 8px rgba(16,33,63,.06); }
.summary .no { background: var(--navy); color: #fff; border-radius: 8px; padding: 4px 10px; font-weight: 800; }
.summary .cno { font-size: 20px; font-weight: 800; }
.summary .meta { color: var(--muted); font-weight: 600; }
.summary .meta b { color: var(--text); }
.summary .status-actions { margin-left: auto; display: flex; gap: 12px; align-items: center; }
.summary .status-actions select { width: auto; min-width: 120px; }
/* 탭 글자 사이 28px, 탭과 내용 사이 24px */
.tabs { display: flex; gap: 28px; border-bottom: 2px solid var(--line); margin-bottom: 24px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; padding: 0 4px; }
.tabs::-webkit-scrollbar { display: none; }   /* 탭 줄 오른쪽 작은 스크롤바 없앰 (2026-11-23) */
.tabs a { padding: 12px 0; text-decoration: none; color: var(--muted); font-weight: 700; border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.tabs a.on { color: var(--navy); border-bottom-color: var(--blue); }
.tabs a .cnt { font-size: 13px; background: var(--bg); border-radius: 999px; padding: 1px 8px; margin-left: 4px; color: var(--muted); }
.tab-panel { display: none; }
.tab-panel.on { display: block; }
.doc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.doc-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.doc-card .who { color: var(--blue); font-weight: 700; font-size: 14px; }
.doc-card h4 { margin: 0; font-size: 18px; }
.doc-card .when { color: var(--muted); font-size: 13px; }
.danger-zone { margin-top: 32px; padding-top: 24px; border-top: 1px dashed var(--line); }

/* ───── 상세: 접수정보 구역 (제목 줄 + 얇은 구분선, 구역 사이 24px, PC 2열 / 폰 1열) ───── */
.sec { scroll-margin-top: calc(var(--header-h) + 150px); }
.sec + .sec, form + .sec { margin-top: 24px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 16px; }
.sec-head h3 { margin: 0; font-size: 17px; }
.fields.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.req { color: var(--danger); font-weight: 700; margin-left: 2px; }
.sec-actions { margin-top: 24px; }
.field > span:first-child { display: inline-flex; align-items: center; gap: 4px; }
.vehicle-table .w-idx { width: 44px; } .vehicle-table .w-vin { width: 220px; } .vehicle-table .w-year { width: 90px; }
.vehicle-table .w-fee { width: 130px; } .w-act { width: 1%; white-space: nowrap; }
.vehicle-table tr.add-row td { background: #FAFBFD; }
.vehicle-table input { min-height: 40px; padding: 6px 10px; min-width: 70px; }
.money-sum { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 20px; color: var(--muted); }
.money-sum b { color: var(--text); font-variant-numeric: tabular-nums; }

/* 금액 영역(2026-11-19 세로 한 줄): 차량 표 아래 24px, 구역 제목 "금액·입금" + 박스 하나(차량 표와 같은 폭, 연한 배경 #EEF2F7, 둥근 모서리, 안쪽 20px).
   위 영수증(항목 왼쪽 · 금액 오른쪽 끝, 점선 없음, 줄 28px · 14px, 합계 줄 위 얇은 구분선, 미수금 15px 굵게)
   → 얇은 구분선(상하 16px) → 입금 입력 한 줄(입금일 / 입금액 / 입금확인 / 계산서, 칸 사이 12px, 라벨은 칸 위) */
.money { font-weight: 400; }
.sec + .sec.money-sec, .compact .sec + .sec.money-sec { margin-top: 24px; }   /* 차량 표가 끝난 뒤 24px 띄운 별도 구역 "금액·입금" */
.mbox { min-width: 0; padding: 20px; border-radius: 10px; background: #EEF2F7; }
.rline { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; height: 28px; font-size: 14px; line-height: 28px; white-space: nowrap; }
.rline b { font-weight: 600; font-variant-numeric: tabular-nums; }
.rline.sum { border-top: 1px solid var(--line); }
.rline.unpaid-line { font-size: 15px; font-weight: 700; }
.rline.unpaid-line b { font-weight: 700; }
#m-unpaid.unpaid { color: var(--danger); }
#m-unpaid.done { color: var(--muted); }
.mbox .pay { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.mbox .mi { display: flex; flex-direction: column; gap: 6px; min-width: 0; white-space: nowrap; }
.mbox em { font-style: normal; color: var(--muted); font-size: 12px; font-weight: 600; line-height: 16px; }
.money .mbox input { min-height: 0; min-width: 0; width: 100%; height: 36px; padding: 4px 10px; font-size: 14px; background: #fff; }
.receipt { max-width: 400px; }
/* 공급가 기준 정산 (2026-11-23): 합계(부가세 포함) 아래, 입금·미수금은 공급가끼리 비교한다는 게 보이게 흰 바탕 묶음 */
.receipt .settle { margin-top: 8px; padding: 2px 10px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.rline.over, .rline b.over, td.num.over, b.over { color: #D9730D; }   /* 초과 입금: 주황 */
.mbox.not-billable { font-size: 15px; font-weight: 700; color: var(--muted); }   /* 영수증은 최대 400px, 박스 왼쪽에 (합계 줄 위 구분선도 이 폭 안) */
/* 입금확인: 다른 칸처럼 위 라벨 + 입력칸 높이(36px)의 테두리 상자 안에 체크박스와 "확인" (세로 가운데) */
.mbox .check-box { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px;
                   background: #fff; color: var(--text); font-size: 14px; font-weight: 600; cursor: pointer; }
.vehicle-table tfoot td { height: auto; }

/* ── 접수정보 압축 배치 (PC): 짧은 칸 3열, 라벨 왼쪽, 입력칸 36px, 칸 사이 세로 12px, 구역 사이 16px ── */
@media (min-width: 721px) {
  .compact .sec + .sec, .compact form + .sec { margin-top: 16px; }
  .compact .sec-head { padding-bottom: 6px; margin-bottom: 12px; }
  .compact .sec-actions { margin-top: 12px; }
  .compact .fields.two { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 24px; }
  /* 접수정보(상세·새 접수) 라벨 칸 112px, 라벨은 줄바꿈 없이 한 줄 */
  .compact .field { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; column-gap: 8px; row-gap: 4px; white-space: nowrap; }
  .compact .field > .field-msg, .compact .field > div { white-space: normal; }   /* 오류 안내 등 아래 줄은 줄바꿈 허용 */
  .compact .field:has(textarea) { align-items: start; }
  .compact .field:has(textarea) > :first-child, .compact label.field:has(textarea) { padding-top: 0; }
  .compact .field .field-msg { grid-column: 2; }
  .compact .field.wide { grid-column: 1 / -1; }
  .compact .field.w2 { grid-column: span 2; }
  .compact input, .compact select, .compact .vehicle-table input { min-height: 36px; height: 36px; padding: 4px 10px; font-size: 15px; }
  .compact textarea.two-lines { min-height: 0; height: 58px; padding: 6px 10px; font-size: 15px; overflow: hidden; }
  .compact .btn-sm, .compact .inline-row .btn-sm { min-height: 36px; }
  .compact button.btn-main { min-height: 40px; }
  .compact .vehicle-table th, .compact .vehicle-table td { height: 44px; }
}

/* ───── 상세: 서류 줄 (요약 아래, 어느 탭에서도 보임). PC 가로 3칸, 폰 세로 ───── */
.doc-bar.doc-off { display: block; font-size: 14px; }
.doc-bar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }
.doc-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff; border: 1px solid var(--line);
            border-radius: 12px; padding: 8px 12px 8px 16px; min-height: 56px; }
.doc-name { font-weight: 700; font-size: 16px; white-space: nowrap; }
.doc-item .actions { flex-wrap: nowrap; gap: 8px; }
.doc-item .btn-sm { padding: 0 12px; }

/* ───── 사진 ───── */
.photo-drop { position: relative; }
.photo-drop.dragging { outline: 3px dashed var(--blue-light); outline-offset: -8px; background: #F2F7FF; }
.photo-drop.dragging::after { content: "여기에 놓으면 올라갑니다"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: var(--blue); background: rgba(242,247,255,.85); border-radius: 12px; pointer-events: none; }
/* 사진 탭 위 버튼 모음: 왼쪽 올리기 / 오른쪽 전체 다운로드·공유하기 */
/* 할 일 · 최근 접수: 제목 옆 작은 건수, 5건 넘으면 아래 "전체 보기 (N건)" */
.recent-title { margin: 0 0 16px; display: flex; align-items: baseline; gap: 8px; }
.recent-count { font-size: 14px; font-weight: 600; color: var(--muted); }
.recent-more { display: inline-block; margin-top: 12px; font-size: 14px; font-weight: 600; }
.recent-empty { margin: 0; color: var(--muted); font-size: 15px; }
/* 사진 탭 버튼: 오른쪽 끝에 한 묶음(사진 등록 / 전체 다운로드 / 공유하기, 사이 8px). 한 줄에 안 들어가면 오른쪽 정렬로 다음 줄 */
.photo-toolbar { display: flex; justify-content: flex-end; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
label.btn input { display: none; }
.upload-status { padding: 12px 14px; background: #EAF2FD; border: 1px solid #C6DAF6; border-radius: 10px; margin-bottom: 14px; font-size: 15px; }
.upload-status progress { width: 100%; height: 10px; margin-top: 6px; accent-color: var(--blue); }
.upload-status ul.failed { color: var(--danger); margin: 8px 0 4px; padding-left: 20px; }
.photo-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ph { position: relative; margin: 0; aspect-ratio: 1; background: var(--bg); overflow: hidden; border-radius: 8px; }
.ph img { display: block; width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.ph-del { position: absolute; top: 4px; right: 4px; width: 32px; min-height: 32px; height: 32px; padding: 0; border: none; border-radius: 50%; background: rgba(16,33,63,.6); color: #fff; font-size: 18px; }
.lightbox { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; background: rgba(8,16,32,.94); }
.lightbox img { max-width: 96vw; max-height: 84vh; object-fit: contain; }
.lightbox button { position: absolute; border: none; background: rgba(255,255,255,.15); color: #fff; padding: 0; min-height: 0; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); width: 52px; height: 76px; font-size: 34px; }
.lb-prev { left: 8px; } .lb-next { right: 8px; }
.lb-close { top: 12px; right: 12px; width: 46px; height: 46px; font-size: 26px; border-radius: 50%; }
.lb-caption { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: #E4E9F2; font-size: 15px; }
/* 영상(2026-11-20): 격자 칸 = 첫 장면 미리보기 + 가운데 재생 표시 + 오른쪽 아래 길이, 왼쪽 위 ↓ 하나씩 받기 */
.photo-head.vid-head { margin-top: 20px; }
.ph.vid .vid-open { display: block; width: 100%; height: 100%; min-height: 0; padding: 0; border: 0; border-radius: 0; background: #1B2A44; cursor: pointer; position: relative; }
.ph.vid .vid-open img { cursor: pointer; }
.vid-noimg { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, #24365A, #10213F); }
.vid-play { position: absolute; left: 50%; top: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%; background: rgba(16,33,63,.65); }
.vid-play::after { content: ""; position: absolute; left: 19px; top: 14px; border-style: solid; border-width: 10px 0 10px 16px; border-color: transparent transparent transparent #fff; }
.vid-len { position: absolute; right: 6px; bottom: 6px; padding: 1px 6px; border-radius: 4px; background: rgba(0,0,0,.7); color: #fff; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.vid-dl { position: absolute; top: 4px; left: 4px; width: 32px; height: 32px; border-radius: 50%; background: rgba(16,33,63,.6); color: #fff; display: flex; align-items: center; justify-content: center; text-decoration: none; font-size: 17px; font-weight: 700; }
.videobox video { max-width: 96vw; max-height: 80vh; background: #000; }
.videobox .vb-msg { color: #fff; text-align: center; font-size: 16px; }
.videobox .vb-msg p { margin: 0 0 16px; }
.videobox .lb-caption a { color: #9CC2FF; }
.video-status { display: grid; gap: 8px; }
.vrow-up .vline { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.vrow-up .vname { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vrow-up .vtxt { flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }
.vrow-up.done .vtxt { color: var(--st-완료); font-weight: 700; }
.vrow-up.fail .vtxt { color: var(--danger); white-space: normal; text-align: right; }
.vrow-up.retry .vtxt { color: #B26A00; }
.vrow-up progress { width: 100%; height: 8px; margin-top: 4px; accent-color: var(--blue); }
.share-videos { margin-top: 20px; text-align: left; }
.share-vhead { font-weight: 700; margin-bottom: 8px; }
.share-video { display: flex; justify-content: space-between; gap: 12px; align-items: center; min-height: 48px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; text-decoration: none; color: var(--text); }
.share-video .sv-name { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.share-video .sv-meta { flex: none; font-size: 13px; color: var(--blue); font-weight: 700; }

/* ───── 거래내역 ───── */
.month-nav { display: flex; gap: 8px; align-items: center; }
.month-nav input { width: auto; }
.ledger-title { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 0 0 16px; }
.ledger-title .spacer { flex: 1; }
.ledger-scroll { overflow: auto; max-height: calc(100vh - 300px); background: #fff; border: 1px solid var(--line); border-radius: 12px; }
/* 기본: 보이는 14개 열을 고정 폭으로 화면 폭에 맞춤 (1280px 화면에서 가로 스크롤 없음). 차종·차대번호만 줄바꿈 */
table.ledger { font-size: 14px; border-collapse: separate; border-spacing: 0; table-layout: fixed; width: 100%; }
table.ledger th, table.ledger td { padding: 4px 12px; height: 48px; border-right: 1px solid var(--line); background: #fff;
                                   white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.ledger td.wrap { white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }  /* 띄어쓰기에서 먼저 줄바꿈 */
table.ledger td.num { padding: 4px 6px; }  /* 금액 칸 좌우 6px: 1280 화면 약 85px 칸에 1,250,000 같은 7자리 금액(굵은 글씨 포함)이 잘리지 않게 */
table.ledger td.d { padding: 4px 6px; }    /* 날짜 칸(날짜·입금일·계산서) 좌우 6px: 74px 칸에 25-11-17 */
table.ledger td.cs { padding: 4px 8px; }   /* 컨테이너·씰 좌우 8px */
table.ledger .opt { display: none; }  /* 포워딩·국가/도시·연식·컨규격·운송사·비고: "열 더 보기"로 펼침 */
table.ledger.show-all { table-layout: auto; width: max-content; min-width: 100%; }
table.ledger.show-all .opt { display: table-cell; }
table.ledger.show-all td.wrap { white-space: nowrap; }
/* 열 폭(2026-11-20): 고정 3열(번호·날짜·업체)은 px 그대로(가로 고정 위치가 안 흔들리게).
   차대번호는 실제 17자 글자 폭 + 좌우 여백(화면에 보이는 차대번호를 그 글꼴로 재서 맞춤, ledger.html 의 fitVin). 줄바꿈·말줄임 없음.
   수량·금액·날짜·컨테이너·씰 열은 표 폭의 %, 남는 폭은 차종이 가져감(차대번호가 넓어지면 차종이 줄어듦).
   1280 화면(표 1214px)에서 컨테이너·씰 약 129px · 차종 약 90px, 1600 화면에서 차종 220px 이하 */
table.ledger .w-no { width: 44px; } table.ledger .w-date { width: 74px; } table.ledger .w-co { width: 96px; }
table.ledger .w-vin { width: calc(17 * .66em + 18px); }   /* 스크립트가 재기 전 기본값(약 17자 폭) */
table.ledger .w-cs { width: 10.6%; }
table.ledger .w-qty { width: 3.46%; } table.ledger .w-money { width: 7%; } table.ledger .w-vat { width: 6.1%; } table.ledger .w-inv { width: 5.77%; }
table.ledger thead th.w-date:not(.fx) { width: 5.77%; }   /* 입금일 (고정 열 날짜는 74px 그대로) */
table.ledger .w-opt { width: 110px; }
table.ledger td.vin { white-space: nowrap; text-overflow: clip; overflow: visible; padding: 4px 8px; }   /* 17자리 한 줄, "열 더 보기"에서도 */
table.ledger td.car { white-space: normal; line-height: 1.35; }
table.ledger td.car .clamp2 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }   /* 긴 차종명은 두 줄까지 */
/* "열 더 보기"(표가 옆으로 길어짐): 열은 예전처럼 px, 차종 220px(두 줄까지), 차대번호는 그대로 한 줄 */
table.ledger.show-all .w-car { width: 220px; } table.ledger.show-all .w-cs { width: 124px; } table.ledger.show-all .w-qty { width: 48px; }
table.ledger.show-all .w-money { width: 92px; } table.ledger.show-all .w-vat { width: 84px; } table.ledger.show-all .w-inv,
table.ledger.show-all thead th.w-date:not(.fx) { width: 74px; }
table.ledger thead th { position: sticky; top: 0; z-index: 3; background: #F5F7FB; text-align: center; white-space: normal; line-height: 1.25; padding: 4px 6px; }
table.ledger tfoot td { position: sticky; bottom: 0; z-index: 3; background: #EEF3FA; border-top: 2px solid var(--navy); font-size: 13px; overflow: visible; }
table.ledger .fx { position: sticky; z-index: 2; }
table.ledger thead .fx, table.ledger tfoot .fx { z-index: 4; }
table.ledger .fx1 { left: 0; }
table.ledger .fx2 { left: 44px; }
table.ledger .fx3 { left: 118px; box-shadow: 2px 0 0 var(--line); }
table.ledger.multi .w-no { width: 76px; } table.ledger.multi .fx2 { left: 76px; } table.ledger.multi .fx3 { left: 150px; }
table.ledger tr.group-start td { border-top: 2px solid #AAB6C8; }
.ledger-cards { display: none; }
/* 마우스 올리기가 안 되는 기기(폰·태블릿): 업체 이름을 "…"으로 줄이지 않고 줄바꿈해 전체가 보이게 */
@media (hover: none) {
  table.ledger td.fx3 { white-space: normal; text-overflow: clip; overflow-wrap: anywhere; line-height: 1.35; }
}

/* ───── 업체 ───── */
details.new-company > summary { list-style: none; display: inline-flex; }
details.new-company > summary::-webkit-details-marker { display: none; }

/* ───── 로그인·계정 ───── */
.topbar .who { color: #C9D3E6; font-size: 14px; font-weight: 600; white-space: nowrap; }
.topbar .logout { min-height: 36px; padding: 0 12px; background: transparent; border-color: rgba(255,255,255,.3); color: #C9D3E6; font-size: 14px; }
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: var(--navy); padding: 16px; }
.login-box { width: 100%; max-width: 380px; }
.login-logo { text-align: center; margin-bottom: 24px; }
.login-logo img { height: 36px; }


/* ───── 상태 말풍선 (보조 문구 제거 규칙의 예외): 12px 한 줄, 네이비 바탕 흰 글씨 ───── */
#tip { position: fixed; z-index: 400; background: var(--navy); color: #fff; font-size: 12px; line-height: 1.4; font-weight: 500;
       padding: 5px 10px; border-radius: 6px; white-space: nowrap; pointer-events: none; box-shadow: 0 4px 12px rgba(16,33,63,.25); }
.status[data-tip] { cursor: default; }

/* ───── 작은 안내 창 (appDialog): 네이비 제목, 본문 14px, 버튼은 기존 규칙 ───── */
dialog.app-dialog { border: none; border-radius: 12px; padding: 24px; width: min(420px, calc(100vw - 32px)); box-shadow: 0 12px 40px rgba(16,33,63,.3); }
dialog.app-dialog::backdrop { background: rgba(16,33,63,.45); }
dialog.app-dialog h3 { margin: 0 0 12px; color: var(--navy); font-size: 17px; }
dialog.app-dialog p { margin: 0 0 24px; font-size: 14px; line-height: 1.6; color: var(--text); white-space: pre-line; }
dialog.app-dialog .actions { justify-content: flex-end; }
dialog.app-dialog p:has(+ .dialog-input) { margin-bottom: 12px; }
dialog.app-dialog .dialog-input { width: 100%; margin: 0 0 24px; }

/* ───── 상세: 차량 표 (평소엔 글자, "수정"을 누른 줄만 입력칸) ───── */
.vehicle-table tr.vrow:not(.editing) td > input, .vehicle-table tr.vrow:not(.editing) td > select, .vehicle-table tr.vrow:not(.editing) .vmsg { display: none; }
.vehicle-table tr.vrow.editing .vt { display: none; }
.vehicle-table tr.vrow:not(.deleted) [data-v="undo"],
.vehicle-table tr.vrow.editing [data-v="edit"], .vehicle-table tr.vrow.deleted [data-v="edit"],
.vehicle-table tr.vrow.deleted [data-v="del"] { display: none; }
.vehicle-table td.v-acts { text-align: right; }
.vehicle-table .v-del { margin-left: 12px; color: var(--danger); vertical-align: middle; }   /* 줄 맨 오른쪽 끝 휴지통 */
.vehicle-table tr.vrow.deleted td { color: var(--muted); text-decoration: line-through; background: #F7F8FA; }
.vehicle-table tr.vrow.deleted td:last-child { text-decoration: none; }
/* 판정 불가 줄: 회색으로 남김 (금액·서류·장부에서 빠짐). 판정 칸은 그대로 읽히게 */
.vehicle-table tr.vrow.rejected:not(.deleted) td { color: #9AA3B2; background: #F5F6F8; }
.vehicle-table tr.vrow.rejected:not(.deleted) td.w-verdict { color: var(--text); }
/* 안내 문구: 입력칸과 4px, 12px. 추가 줄·수정 줄은 문구 자리를 미리 비워 둬서 문구가 떠도 줄 높이가 변하지 않게 */
.vehicle-table .vmsg { font-size: 12px; line-height: 16px; color: var(--danger); margin-top: 4px; white-space: nowrap; }
.vehicle-table tr.add-row td, .vehicle-table tr.vrow.editing td { vertical-align: top; padding-top: 6px; padding-bottom: 2px; height: auto; }
.vehicle-table tr.add-row .vmsg, .vehicle-table tr.vrow.editing .vmsg { height: 16px; }
.vehicle-table tr.add-row td:first-child, .vehicle-table tr.vrow.editing td:first-child { padding-top: 14px; }
.no-company { font-size: 15px; color: var(--text); min-height: 36px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }

/* ───── 상세: 접수정보 "저장" 줄 — 화면 아래에 고정 (폰은 하단 탭바 위) ───── */
.save-bar { position: sticky; bottom: 0; z-index: 30; display: flex; justify-content: flex-end; gap: 12px;
            margin: 24px -24px -24px; padding: 12px 24px; background: rgba(255,255,255,.97);
            border-top: 1px solid var(--line); border-radius: 0 0 12px 12px; box-shadow: 0 -4px 12px rgba(16,33,63,.06); }
.save-bar .btn-main { min-width: 140px; }

/* ───── 업체: 고정 단가 4칸, 선택 목록 세 구역(칩) ───── */
.fields.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.price-group { margin-top: 20px; }
.price-group > .label { font-size: 14px; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
/* 포워딩 / 운송사 / 국가·도시 탭: 위 "+ 추가" 줄, 목록 한 줄 40px(이름 14px + 수정·삭제 아이콘, 얇은 구분선).
   PC(1024px 이상) 3열·가로 간격 24px, 그보다 좁으면 1열. 사용 안 함은 맨 아래 회색 글자 */
.cadd { display: flex; gap: 12px; max-width: 480px; }
.cadd .cadd-input { flex: 1; min-width: 0; }
.cmsg { margin-top: 6px; }
.cmsg:empty { display: none; }
.clist { list-style: none; margin: 20px 0 0; padding: 0; }
@media (min-width: 1024px) { .clist { columns: 3; column-gap: 24px; } }
.crow { display: flex; align-items: center; gap: 8px; min-height: 40px; height: 40px; padding: 0 0 0 8px; border-bottom: 1px solid var(--line);
        break-inside: avoid; }
.crow-name { flex: 1; min-width: 0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clist.off .crow-name { color: #9AA3B2; }
.clist-head { margin: 0; font-size: 13px; color: var(--muted); }
/* 사용 안 함 항목: 아래 회색 영역 (제목 "사용 안 함 n개") */
.clist-offbox { margin-top: 24px; padding: 10px 14px 4px; border-radius: 10px; background: #F5F7FB; }
.clist-offbox .clist { margin-top: 6px; }
.crow-acts { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
/* 줄 버튼(28px): 사용 안 함·다시 사용·취소는 테두리형, 저장은 네이비 */
.crow-btn { min-height: 0; height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff;
            color: var(--navy); font-size: 12px; font-weight: 600; white-space: nowrap; }
.crow-btn:hover { filter: none; border-color: var(--navy); }
.crow-acts .crow-btn { margin-right: 4px; }
.crow-btn.crow-save { background: var(--navy); border-color: var(--navy); color: #fff; }
.crow-editbtns { display: flex; gap: 6px; flex-shrink: 0; margin-left: auto; }
.icon-btn { min-height: 0; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--muted); }
.icon-btn:hover { filter: none; background: var(--bg); color: var(--navy); }
.icon-btn.crow-del:hover { color: var(--danger); }
.crow.editing { height: auto; flex-wrap: wrap; padding: 0; gap: 4px 8px; align-content: center; }
.crow.editing:has(.crow-msg) { padding: 4px 0; }   /* 안내 문구가 붙을 때만 줄이 늘어남 */
.crow.editing .crow-acts { display: none; }
.crow .crow-input { flex: 1; min-width: 0; min-height: 0; height: 32px; padding: 0 8px; font-size: 14px; }
/* 국가/도시(2026-11-19): [국기 16px] 국가(진한 글씨) · 도시(회색). 국기와 국가명 사이 6px */
.flag { height: 16px; width: auto; margin-right: 6px; vertical-align: -3px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(16, 33, 63, .12); }
.flag[hidden] { display: none; }
.dest-country { font-weight: 700; color: var(--text); }
.dest-city { color: var(--muted); font-weight: 400; }
.clist.off .dest-country, .clist.off .dest-city { color: #9AA3B2; }
.cadd.two { max-width: 600px; }
.crow-editor { display: flex; flex: 1; gap: 6px; min-width: 0; }
.crow-editor .crow-input { flex: 1; }
.choice-card[data-kind="destination"] .crow-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); flex-basis: 100%; }
.crow-flag { grid-column: 1 / -1; min-height: 0; height: 32px; padding: 0 8px; font-size: 13px; }
/* 새 접수·상세의 국가/도시 칸: 고른 항목의 국기를 선택칸 왼쪽 안에, "+ 목록에 없음"이면 국가·도시 두 칸 */
.dest-pick { min-width: 0; }
.dest-select { position: relative; }
.dest-select .flag { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); margin: 0; pointer-events: none; }
.dest-select select.has-flag { padding-left: 38px; }
.dest-new { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin-top: 8px; }
.dest-new[hidden] { display: none; }

.crow-msg { flex-basis: 100%; color: var(--danger); font-size: 12px; }
.w-btn { width: 96px; text-align: center; }

/* ───── 공유하기 선택 창 · 공유 임시 주소 화면 ───── */
.share-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-bottom: 16px; }   /* 가로 한 줄 같은 폭, 좁으면 두 줄 */
.share-options button { width: 100%; justify-content: center; padding: 0 10px; font-size: 14px; }
dialog.app-dialog.share-dialog { width: min(600px, calc(100vw - 32px)); }
.share-options button.done { border-color: var(--st-완료); color: var(--st-완료); }
.share-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 16px; }
.share-box { width: 100%; max-width: 420px; text-align: center; margin: 0; }
.share-file { font-size: 17px; font-weight: 700; word-break: break-all; margin-bottom: 20px; }
.share-box .btn-main { width: 100%; }
.share-box .btn[aria-disabled="true"] { pointer-events: none; }
.share-msg { margin: 8px 0; font-size: 16px; color: var(--text); }

/* ───── 접수 링크 (2026-11-19) ───── */
/* 표시: 링크 접수 / 업체 확인 필요 / 희망일·미확정 / 인식값·확인 필요 */
.flag-tag { display: inline-block; padding: 1px 7px; border-radius: 6px; font-size: 12px; font-weight: 700; white-space: nowrap; vertical-align: 1px; }
.flag-tag.link { background: #E6F0FC; color: var(--blue); }
.flag-tag.warn { background: #FDECEA; color: var(--danger); }
.flag-tag.wish { background: #FFF3D6; color: #8A5A00; }
.flag-tag.ocr { background: #FFE58A; color: #6B4A00; }
.flag-tag.dup { background: #FFF0E0; color: #C25E00; margin-left: 4px; cursor: help; }   /* 차대번호 중복 (2026-11-23) */
.flag-tag.nocountry { background: #FDECEA; color: var(--danger); margin-left: 4px; }   /* 국가/도시 목록: 국가 없음 */
.vehicle-table .vdup { font-size: 12px; line-height: 16px; color: #C25E00; margin-top: 2px; white-space: normal; max-width: 260px; }
.vehicle-table .vdup:empty { display: none; }
.vehicle-table tr.ocr-pending td { background: #FFF8D6; }   /* 인식값 · 확인 필요: 노란 배경 */
/* 차량별 판정 */
.w-verdict { width: 150px; }
.vehicle-table .w-verdict select { min-height: 0; height: 36px; padding: 2px 6px; font-size: 14px; }
.vehicle-table .w-verdict .v-reason { margin-top: 4px; min-width: 0; }
.verdict { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.verdict.ok { background: #E3F4EB; color: var(--st-완료); }
.verdict.no { background: #FDECEA; color: var(--danger); }
.verdict.wait { background: var(--bg); color: var(--muted); }
/* 회신 문구 */
.reply-box { margin-top: 16px; padding: 12px 16px; border-radius: 10px; background: #EEF2F7; }
.reply-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.reply-head h4 { margin: 0; font-size: 14px; color: var(--navy); }
.reply-box textarea { min-height: 0; font-size: 14px; line-height: 1.6; background: #fff; resize: vertical; }
/* 작업일 희망일·미확정 */
.date-pick { display: flex; align-items: center; gap: 8px; min-width: 0; }
.date-pick input { flex: 1; min-width: 0; }
/* 상세 화면 링크 접수 정보 */
.intake-info .intake-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 24px; margin: 0; }
.intake-grid > div { min-width: 0; }
.intake-grid .wide { grid-column: 1 / -1; }
.intake-grid dt { color: var(--muted); font-size: 12px; font-weight: 600; }
.intake-grid dd { margin: 2px 0 0; font-size: 14px; }
.intake-grid .pre { white-space: pre-line; }
/* 업체 메뉴 맨 위 접수 주소 */
.intake-card { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 14px 18px; }
.intake-card .intake-label { font-weight: 700; color: var(--navy); font-size: 14px; }
.intake-card input { flex: 1; min-width: 220px; min-height: 0; height: 40px; font-size: 14px; background: #F5F7FB; }
.intake-state { font-size: 13px; font-weight: 700; }
.intake-state.on { color: var(--st-완료); }
.intake-state.off { color: var(--danger); }
.contact-rows { display: grid; gap: 8px; }
.contact-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 8px; }
/* 업체용 문의 화면 (2026-11-19): 위 로고 + 회사 이름, 제목 + 안내 한 줄, 아래 홍보 카드.
   PC·태블릿(768px 이상) 번호 달린 카드 4장(사이 24px) / 폰(768px 미만) 단계형(1 / 4, 이전·다음 고정, 입력칸 44px) */
.intake-page { background: #EEF2F7; }
.intake-head { padding: 18px 16px 14px; background: var(--navy); text-align: center; }
.intake-logo { height: 32px; width: auto; display: inline-block; }
.intake-company { margin-top: 6px; color: #fff; font-size: 15px; font-weight: 700; opacity: .92; }
.intake-main { max-width: 992px; margin: 0 auto; padding: 24px 16px 40px; }   /* 카드 폭 960px + 좌우 여백 16px */
.intake-main.narrow { max-width: 592px; }
.iq-heading { margin: 0; }
.iq-lead { margin: 6px 0 20px; font-size: 14px; color: var(--muted); }
/* 번호 달린 카드: 흰 배경·둥근 모서리·약한 그림자, 사이 24px */
.intake-form .iq-step { margin: 0 0 24px; border: 1px solid #E3E8F0; border-radius: 14px; box-shadow: 0 1px 2px rgba(16, 33, 63, .04), 0 4px 14px rgba(16, 33, 63, .05); }
.iq-card-title { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 17px; color: var(--navy); }
.iq-num { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%;
          background: var(--navy); color: #fff; font-size: 14px; font-weight: 700; }
.iq-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px 16px; }
.iq-line { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }   /* 폰: 칸마다 한 줄 꽉 */
.iq-gap { margin-top: 16px; }
/* 쇼링 작업 희망일: 라벨 아래 1·2·3지망 */
.iq-wish { margin-top: 16px; display: grid; gap: 8px; }
.wish-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.wish-label { font-size: 14px; font-weight: 600; color: var(--muted); display: inline-flex; gap: 4px; }
/* 국가 선택 목록(검색, 국기) */
.cbox { position: relative; }
.cbox-flag { position: absolute; left: 12px; top: 22px; transform: translateY(-50%); margin: 0; pointer-events: none; z-index: 1; }
.cbox.has-flag .cbox-input { padding-left: 42px; }
.cbox-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; max-height: 260px; overflow-y: auto; margin: 0; padding: 4px 0; list-style: none;
             background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(16, 33, 63, .12); }
.cbox-list[hidden] { display: none; }
.cbox-head { padding: 6px 12px 2px; font-size: 12px; font-weight: 700; color: var(--muted); }
.cbox-opt { display: flex; align-items: center; gap: 0; padding: 8px 12px; font-size: 15px; cursor: pointer; }
.cbox-opt:hover { background: var(--bg); }
.flag-blank { display: inline-block; width: 21px; margin-right: 6px; }
/* 차량: 차명 / 연식 / 차대번호 + 등록증 사진 버튼 (차대번호나 사진 중 하나) */
.intake-car { margin: 0 0 12px; padding: 10px 12px 12px; border: 1px solid var(--line); border-radius: 10px; }
.intake-car[hidden] { display: none; }
.intake-car legend { padding: 0 6px; font-size: 13px; font-weight: 700; color: var(--navy); }
.car-msg:empty { display: none; }
.car-msg { margin-top: 6px; }
.vin-count { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--muted); }
.vin-count.full { color: var(--st-완료); }
.car-line .w220 > span:first-child { display: flex; width: 100%; }
.vin-input { text-transform: uppercase; }
/* 등록증 사진: 본 화면 "사진 등록"과 같은 버튼, 고르면 미리보기 + 파일 이름 */
.photo-pick { position: relative; }
.pick-input { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; border: 0; opacity: 0; pointer-events: none; }
.pick-btns { display: flex; gap: 8px; }
.pick-btns[hidden] { display: none; }
.pick-btns .btn { flex: 1; min-height: 44px; padding: 0 10px; }
.pick-preview { display: flex; align-items: center; gap: 8px; height: 44px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.pick-preview[hidden] { display: none; }
.pick-preview img { width: 36px; height: 36px; object-fit: cover; border-radius: 4px; flex: none; }
.pick-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--text); font-weight: 500; }
.pick-clear { flex: none; min-height: 0; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 6px; background: var(--bg); color: var(--muted); font-size: 16px; }
.intake-addcar { width: 100%; }
.intake-addcar[hidden] { display: none; }
/* 4단계 입력 내용 확인 (폰만) · 완료 화면 요약 */
.iq-review { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 14px; margin: 0 0 16px; padding: 12px 14px; border-radius: 10px; background: #F5F7FB; font-size: 14px; }
.iq-review:empty { display: none; }
.iq-review dt { color: var(--muted); font-weight: 600; }
.iq-review dd { margin: 0; overflow-wrap: anywhere; }
.done-summary { text-align: left; margin: 16px 0 12px; }
/* 버튼: 기본(PC·스크립트 없음)은 문의하기만 오른쪽 아래 */
.iq-progress { display: none; }
.iq-nav { display: flex; justify-content: flex-end; gap: 12px; }
.iq-nav .iq-prev, .iq-nav .iq-next { display: none; }
.iq-nav .intake-submit { min-width: 200px; min-height: 52px; font-size: 17px; }
.intake-thanks { margin: 4px 0 8px; font-size: 16px; }
/* 아래 홍보 카드 */
.intake-promo { display: flex; align-items: center; gap: 14px; margin-top: 28px; padding: 14px 16px; border-radius: 14px; background: var(--navy); color: #fff; }
.promo-logo { height: 26px; width: auto; flex: none; }
.promo-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.promo-text b { font-size: 14px; }
.promo-text span { opacity: .8; }
.promo-btn { flex: none; min-height: 36px; padding: 0 14px; background: #fff; border-color: #fff; color: var(--navy); font-size: 13px; }
@media (min-width: 768px) {
  .iq-row.c2, .iq-row.c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .intake-form .iq-review { display: none; }   /* PC 는 카드에 다 보이므로 확인 칸 없음 (완료 화면 요약은 그대로) */
}
/* 태블릿·PC(768px 이상): 입력칸은 내용에 맞는 폭(연식 80 · 연락처·날짜 160 · 이름류 200~240 · 차대번호 220), 남는 곳은 여백 */
@media (min-width: 768px) {
  .iq-line { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; }
  .iq-line > .field { flex: none; }
  .iq-line > .w80 { width: 80px; } .iq-line > .w160 { width: 160px; } .iq-line > .w200 { width: 200px; }
  .iq-line > .w220 { width: 220px; } .iq-line > .w240 { width: 240px; }
  .iq-line input[type=date] { padding: 8px 10px; }
  .vin-input { padding-left: 10px; padding-right: 10px; }
  .pick-field .pick-btns .btn { flex: none; padding: 0 16px; }
  .pick-field .pick-preview { width: 220px; }
}
/* PC(1024px 이상, 2026-11-19): 가운데 폭 680px 흰 카드 하나 + 네 구역 세로(구역 사이 얇은 구분선·상하 20px, 번호 배지 유지).
   카드 안쪽 32px, 입력칸 40px, 라벨 12px(칸과 6px), 같은 줄 칸 사이 12px, 줄 사이 16px.
   ① 업체명/담당자/연락처 균등 ② 포워딩/국가/도시 균등 → 희망일 라벨 → 1·2·3지망 균등 ③ 차명 1.2 / 연식 0.6 / 차대번호 1.6 / 등록증 사진 110px
   ④ 메모 전체 폭 2줄. 문의하기는 카드 안 맨 아래 전체 폭 48px. 제목·홍보 카드도 같은 680px 폭 */
@media (min-width: 1024px) {
  .intake-main:not(.narrow) { max-width: 744px; padding-left: 32px; padding-right: 32px; }
  .intake-form { background: #fff; border: 1px solid #E3E8F0; border-radius: 14px; padding: 32px;
                 box-shadow: 0 1px 2px rgba(16, 33, 63, .04), 0 4px 14px rgba(16, 33, 63, .05); }
  .intake-form .iq-step { margin: 0; padding: 20px 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; background: none; }
  .intake-form .iq-step:first-of-type { padding-top: 0; border-top: 0; }
  .iq-card-title { margin-bottom: 12px; font-size: 16px; }
  .intake-form .field { gap: 6px; font-size: 12px; }
  .intake-form .wish-label { font-size: 12px; }
  .intake-form input:not(.pick-input), .intake-form select { min-height: 40px; height: 40px; padding-top: 6px; padding-bottom: 6px; }
  .iq-line { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .iq-line > .field { width: auto; }
  .iq-gap { margin-top: 16px; }
  .iq-wish { margin-top: 16px; gap: 8px; }
  /* 차량: 차량마다 한 줄 (상자·차량 번호 없이 표처럼) */
  .intake-car { margin: 0; padding: 0; border: 0; }
  .intake-car + .intake-car { margin-top: 16px; }
  .intake-car legend { display: none; }
  .car-line { position: relative; grid-template-columns: minmax(0, 1.2fr) minmax(0, .6fr) minmax(0, 1.6fr) 110px; }
  .intake-car:has(.pick-preview:not([hidden])) .car-line { padding-bottom: 56px; }   /* 사진을 고르면 그 줄 아래 48px 미리보기 */
  .pick-field .photo-pick { position: static; }
  .pick-field .pick-btns .btn { flex: 1; min-height: 40px; height: 40px; padding: 0 8px; font-size: 14px; }
  .pick-field .pick-preview { position: absolute; left: 0; right: 0; bottom: 0; width: auto; height: 48px; }
  .pick-field .pick-preview img { width: 40px; height: 40px; }
  .intake-addcar { margin-top: 16px; min-height: 0; height: 36px; font-size: 14px; }
  /* 메모: 구역 제목이 "메모"라 칸 위 라벨은 화면에서만 숨김 */
  .memo-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .intake-form .iq-memo { min-height: 0; height: 64px; resize: none; overflow: hidden; }   /* 2줄 */
  .iq-nav { padding-top: 0; }   /* ④ 구역 아래 20px 뒤 바로 버튼 (구분선 없음) */
  .iq-nav .intake-submit { flex: 1; min-width: 0; min-height: 48px; height: 48px; }
}
/* 폰 단계형 (스크립트가 .stepper 를 붙임) */
@media (max-width: 767px) {
  .intake-main:has(.stepper) { padding-bottom: 104px; }
  .stepper .iq-progress { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 12px; }
  .iq-count { font-weight: 800; color: var(--blue); }
  .iq-title { color: var(--navy); font-size: 17px; }
  .iq-bar { flex-basis: 100%; height: 4px; border-radius: 4px; background: #D9E0EC; overflow: hidden; }
  .iq-bar span { display: block; height: 100%; width: 25%; background: var(--blue); transition: width .2s; }
  .stepper .iq-step { display: none; margin-bottom: 0; }
  .stepper .iq-step.on { display: block; }
  .stepper .iq-card-title { display: none; }   /* 단계 이름은 위 진행 표시에 */
  .stepper .iq-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: 1fr 2fr; gap: 10px;
                     padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); }
  .stepper .iq-nav .iq-prev, .stepper .iq-nav .iq-next { display: inline-flex; min-height: 52px; font-size: 17px; }
  .stepper .iq-nav .intake-submit { display: none; min-width: 0; }
  .stepper.first .iq-nav { grid-template-columns: 1fr; }
  .stepper.first .iq-nav .iq-prev { display: none; }
  .stepper.last .iq-nav .iq-next { display: none; }
  .stepper.last .iq-nav .intake-submit { display: inline-flex; }
  .intake-page .intake-form input:not(.pick-input), .intake-page .intake-form select { min-height: 44px; height: 44px; }
  .intake-promo { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 14px; }
  .promo-btn { grid-column: 1 / -1; }
}
.intake-closed { text-align: center; padding: 40px 16px; font-size: 17px; font-weight: 600; }
.intake-done { text-align: center; }
.intake-number { font-size: 18px; margin: 8px 0 16px; }
.intake-number b { font-size: 22px; color: var(--navy); }
.intake-link { display: flex; gap: 8px; margin: 16px 0; }
.intake-link input { flex: 1; min-width: 0; font-size: 14px; background: #F5F7FB; }
.intake-done .btn-main { width: 100%; }
.intake-track .track-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.intake-track h3 { margin: 20px 0 8px; font-size: 15px; }
.track-cars { list-style: none; margin: 0; padding: 0; }
.track-cars li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }

/* ───── 폰 하단 탭바 ───── */
.tabbar { display: none; }

/* ───── 폰 너비 ───── */
@media (max-width: 720px) {
  :root { font-size: 17px; --header-h: 56px; --tabbar-h: 64px; }
  .topbar { padding: 0 16px; gap: 10px; justify-content: space-between; }
  .topbar nav { display: none; }
  .topbar .logo img { height: 24px; }
  .topbar .btn { min-height: 40px; padding: 0 14px; }
  main { margin: 16px auto 0; padding: 0 16px 16px; }
  body { padding-bottom: 80px; }   /* 하단 탭바(64px)에 가려지지 않게 */
  h2 { font-size: 21px; }
  .card { padding: 16px; border-radius: 10px; }
  .stat-card, .doc-card { padding: 16px; }
  .doc-cards { gap: 16px; }
  .fields { grid-template-columns: 1fr; }
  .actions > button, .actions > .btn, .actions > a > button, form > button[type=submit] { width: 100%; }
  .page-head { flex-direction: column; align-items: stretch; }   /* 폰: 제목 아래에 버튼을 나란히 */
  .page-head .actions { flex-wrap: nowrap; }
  .page-head .actions > .btn { width: auto; flex: 1; }
  .stat-cards { grid-template-columns: 1fr; gap: 16px; margin-bottom: 24px; }
  .stat-card .count { font-size: 38px; }
  .table-wrap.desktop, .desktop-only { display: none; }
  /* 표: 칸을 억지로 좁혀 글자가 세로로 쌓이지 않게, 넓으면 옆으로 밀어서 본다 */
  .table-wrap > table { width: max-content; min-width: 100%; }
  .table-wrap th, .table-wrap td { white-space: nowrap; }
  th, td { height: 56px; }
  .m-cards, .ledger-cards { display: block; }
  .ledger-scroll { display: none; }
  .summary { position: static; padding: 12px 16px; gap: 6px 12px; }   /* 폰: 화면을 너무 가려서 고정하지 않음 */
  .summary .meta { font-size: 14px; }
  .fields.two { grid-template-columns: 1fr; }
  /* 차량 표: 옆으로 밀어 보는 표 안 칸은 줄바꿈 */
  .vehicle-table tfoot td { white-space: normal; }
  /* 폰: 박스는 화면 폭에 맞춰 제자리, 입금 입력은 두 줄(입금일·입금액 / 입금확인·계산서) */
  .mbox { padding: 16px; }
  .mbox .pay { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .money .mbox input { height: 40px; font-size: 16px; }   /* 아이폰 확대 방지 */
  .mbox .check-box { height: 40px; }   /* 폰 입력칸 높이와 같게 */
  .doc-bar { grid-template-columns: 1fr; gap: 8px; margin-bottom: 16px; }
  .doc-item { padding: 8px 8px 8px 14px; }
  .doc-item .actions > .btn, .doc-item .actions > button { width: auto; }
  .filters, .filters.f6, .filters.f4 { grid-template-columns: 1fr; }
  .date-row { flex-direction: column; align-items: stretch; }
  .month-nav { justify-content: space-between; }
  .date-range input { flex: 1; width: auto; min-width: 0; height: 44px; font-size: 16px; }
  .filters input, .filters select { min-height: 44px; height: 44px; font-size: 16px; }
  .summary .cno { font-size: 17px; }
  .summary .status-actions { margin-left: 0; width: 100%; }
  .summary .status-actions > * { flex: 1; }
  .tabs { gap: 20px; }
  .tabs a { padding: 10px 0; }
  .photo-grid { grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .photo-toolbar > .btn, .photo-toolbar > button { width: auto; flex: none; }   /* 폰도 꽉 채우지 않고 오른쪽 정렬, 넘치면 두 줄 */
  .save-bar { bottom: var(--tabbar-h); margin: 16px -16px -16px; padding: 10px 16px; border-radius: 0; }
  .save-bar .btn-main { width: 100%; }
  .fields.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .crow .crow-input, .crow-flag { font-size: 16px; }
  .intake-info .intake-grid { grid-template-columns: 1fr; }
  .intake-card input { min-width: 0; flex-basis: 100%; }   /* 아이폰은 16px 보다 작은 입력칸을 누르면 화면을 확대해 버림 */
  .tabbar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
            height: var(--tabbar-h); background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .topbar .who { display: none; }
  .topbar .logout { min-height: 34px; padding: 0 10px; }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--muted); font-size: 13px; font-weight: 700; }
  .tabbar a .ico { font-size: 20px; line-height: 1; }
  .tabbar a.on { color: var(--blue); }
  .tabbar a.camera { color: var(--navy); }
  .tabbar a.camera .ico { background: var(--yellow); border-radius: 999px; padding: 4px 12px; }
  #toast { top: calc(var(--header-h) + 8px); }
}
@media (min-width: 721px) { .m-only { display: none !important; } }

/* ───── 폰 세로 길이 줄이기 (2026-11-20, 390px 기준 · PC 는 그대로) ─────
   공통: 카드·구역 안쪽 12px, 구역 사이 16px, 라벨과 칸 사이 4px, 입력칸 44px 유지(손가락 크기), 짧은 칸은 2열 */
@media (max-width: 720px) {
  main { margin-top: 12px; }
  h2 { font-size: 20px; margin-bottom: 12px; }
  .page-head { margin-bottom: 12px; gap: 8px; }
  .card { padding: 12px; }
  .field { gap: 4px; font-size: 13px; }
  .fields { gap: 12px; }
  .sec + .sec, form + .sec, .sec + .sec.money-sec, .compact .sec + .sec.money-sec { margin-top: 16px; }
  .sec-head { padding-bottom: 6px; margin-bottom: 12px; }
  .tabs { margin-bottom: 16px; }
  .mbox { padding: 12px; }
  /* 상세·새 접수: 짧은 칸 2열 (업체·국가/도시·여러 줄 칸·희망일 표시가 있는 작업일은 폭 전체) */
  .compact .fields.two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .compact .fields.two > .m-wide, .compact .fields.two > .field:has(textarea),
  .compact .fields.two > .field:has(#company-select), .compact .fields.two > .field:has(.no-company) { grid-column: 1 / -1; }
  .compact .fields.two select { padding-left: 10px; padding-right: 6px; text-overflow: ellipsis; }
  /* 검색 조건: 2열 */
  .filters, .filters.f6, .filters.f4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; margin-top: 12px; }
  .filters input[type=date] { padding-left: 8px; padding-right: 4px; }
  /* 빠른 조건: 한 줄, 넘치면 옆으로 밀어서 */
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 12px -12px 0; padding: 0 12px 2px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chips .chip { flex: none; }
  /* 상세 요약·서류 줄 */
  .summary { padding: 10px 12px; }
  .doc-bar { gap: 6px; margin-bottom: 12px; }
  .doc-item { padding: 4px 6px 4px 12px; }

  /* 할 일: 숫자 카드 2×2 (높이 약 80px) */
  .stat-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
  .stat-card { padding: 12px; border-top-width: 3px; border-radius: 10px; min-height: 80px; }
  .stat-card .label { font-size: 13px; line-height: 1.3; }
  .stat-card .count { font-size: 24px; line-height: 1.15; margin: 2px 0 0; }
  .stat-card .count small { font-size: 14px; }
  .stat-card .small { font-size: 12px; line-height: 1.35; margin-top: 2px; }
  .stat-card .flag-tag { font-size: 11px; padding: 0 6px; }
  .month-closed { margin: 0 0 16px; font-size: 13px; }
  .recent-title { margin-bottom: 8px; font-size: 17px; }
  .recent-more { margin-top: 4px; }

  /* 폰 카드(컨테이너 목록·최근 접수·거래내역): 한 건 두 줄, 약 56px */
  .m-card { padding: 8px 12px; margin-bottom: 8px; border-radius: 10px; }
  .m-card .row1 { font-size: 15px; line-height: 1.35; align-items: center; }
  .m-card .row2 { font-size: 13px; line-height: 1.35; margin-top: 2px; }
  .m-card .status { font-size: 12px; padding: 1px 8px; }

  /* 거래내역 폰: 맨 위 합계 요약 줄 + 카드(누르면 차량 목록) */
  .lc-total { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin-bottom: 8px; font-size: 14px; line-height: 1.45; }
  .lcard summary { list-style: none; cursor: pointer; }
  .lcard summary::-webkit-details-marker { display: none; }
  .lcard .lc-date { font-size: 13px; font-weight: 600; color: var(--muted); }
  .lcard .row2 b { color: var(--text); }
  .lcard .row2 b.unpaid { color: var(--danger); }
  .lcard .row2::after { content: " ▾"; color: var(--muted); }
  .lcard[open] .row2::after { content: " ▴"; }
  .lc-cars { list-style: none; margin: 8px 0 0; padding: 6px 0 0; border-top: 1px solid var(--line); font-size: 13px; }
  .lc-cars li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 0; }
  .lc-vin { font-size: 12px; color: var(--muted); letter-spacing: .02em; }
  .lc-open { display: block; padding: 8px 0 2px; font-size: 13px; font-weight: 700; text-decoration: none; }

  /* 상단: 로고 + 새 접수만. 하단 탭바 다섯 칸(더보기 = 업체·로그아웃) */
  .topbar .pc-only { display: none; }
  .tabbar { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .tabbar .more-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 0; padding: 0;
                      background: none; border: 0; border-radius: 0; color: var(--muted); font-size: 13px; font-weight: 700; }
  .tabbar .more-btn .ico { font-size: 20px; line-height: 1; }
  .tabbar .more-btn.on, .tabbar .more-btn[aria-expanded="true"] { color: var(--blue); }
  .more-menu { position: fixed; right: 8px; bottom: calc(var(--tabbar-h) + 8px + env(safe-area-inset-bottom)); z-index: 61; min-width: 200px;
               background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(16,33,63,.18); padding: 6px; }
  .more-menu a, .more-menu button { display: flex; align-items: center; justify-content: flex-start; width: 100%; min-height: 44px; padding: 0 12px;
                                    background: none; border: 0; border-radius: 8px; color: var(--text); font-size: 16px; font-weight: 600; text-decoration: none; }
  .more-menu a.on { color: var(--blue); }
  .more-menu .more-logout { color: var(--danger); }
  .more-who { font-size: 12px; color: var(--muted); padding: 6px 12px 4px; }
}
@media (min-width: 721px) { .more-menu { display: none !important; } }

/* ───── 흐름·사용성 개선 1차 (2026-11-23) ───── */
/* 할 일: 새 문의 아래 나눠 보기, 오늘 작업 예정 아래 빨간 "작업일 지남" */
.inquiry-split { margin-top: 4px; color: var(--muted); }
.inquiry-split .warn-text { color: var(--danger); font-weight: 700; }
.stat-card a.card-main { display: block; color: inherit; text-decoration: none; }
.stat-card a.overdue { display: inline-block; margin-top: 4px; color: var(--danger); font-size: 14px; font-weight: 700; text-decoration: none; }
.stat-card a.overdue:hover { text-decoration: underline; }
.wish-mark { font-size: 12px; color: var(--muted); font-weight: 600; }
/* 상세 판정 버튼: 고른 쪽만 색 */
.vd-btns { display: inline-flex; gap: 4px; }
.vd-btn { min-height: 30px; height: 30px; padding: 0 12px; font-size: 13px; font-weight: 700; border-radius: 999px; background: #fff; color: var(--muted); border: 1px solid var(--line); }
.vd-btn.on.ok { background: var(--st-완료); color: #fff; border-color: var(--st-완료); }   /* 고른 판정은 배경까지 (2026-11-24) */
.vd-btn.on.no { background: var(--danger); color: #fff; border-color: var(--danger); }
.vehicle-table tr.vrow td > input.v-reason:not([hidden]) { display: block; margin-top: 4px; }   /* 불가면 사유 칸 바로 (수정 안 눌러도) */
.vehicle-table tr.vrow.rejected:not(.deleted) .vd-btn.on.no { color: #fff; }
.vt.noname { color: #9AA3B2; font-style: italic; }   /* 차명 미입력 (링크 문의) */
/* 상세: 작업일 칸의 희망일·확정 표시는 날짜 아래 줄로 (날짜가 잘리지 않게) */
.date-pick { flex-wrap: wrap; row-gap: 4px; }
.date-pick > input { flex: 1 0 100%; min-width: 0; }
/* 컨테이너번호 형식 안내(노란색, 저장은 막지 않음) */
.field-hint { font-size: 12px; font-weight: 600; color: #8A5A00; background: #FFF6D6; border-radius: 6px; padding: 2px 8px; white-space: normal; }
.compact .field .field-hint { grid-column: 2; }
/* 업체 추천 */
.intake-grid .suggest-list { display: flex; flex-direction: column; gap: 4px; }
.intake-grid .suggest { font-size: 13px; color: #8A5A00; }
.intake-grid .suggest .cand { display: inline-flex; align-items: center; gap: 4px; color: var(--text); font-weight: 600; }
/* 사진·영상: 0개면 zip 버튼 흐리게·못 누르게 */
.photo-toolbar a[aria-disabled="true"] { opacity: .45; pointer-events: none; }
/* 크게 보기 [이 사진 저장] */
.lightbox .lb-save { position: absolute; top: 14px; right: 70px; min-height: 40px; padding: 0 16px; }
/* 문의 화면 폰: 홍보 카드는 마지막 단계에서만 */
@media (max-width: 767px) { body.iq-stepper:not(.iq-last) .intake-promo { display: none; } }

/* ───── 흐름·사용성 개선 2차 (2026-11-24) ───── */
.vehicle-table .v-reason { min-width: 120px; }
/* 새 업체 등록 창 */
dialog.new-company-dlg { width: min(560px, calc(100vw - 32px)); }
dialog.new-company-dlg form { display: grid; gap: 12px; }
dialog.new-company-dlg .fields.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
dialog.new-company-dlg .fields.four-col { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
dialog.new-company-dlg .nc-msg { margin: 0; color: var(--danger); font-size: 14px; font-weight: 600; }
/* 업체용 진행 확인: 쇼링장 연락처 + 전화하기 */
.track-call { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.track-call b { white-space: nowrap; }   /* 전화번호가 줄에서 잘리지 않게 */
/* 서류 줄: PC 는 탭 위, 폰은 탭 내용 아래 */
@media (min-width: 721px) { .docs-bottom { display: none; } }
@media (max-width: 720px) {
  .docs-top { display: none; }
  .docs-bottom { margin-top: 16px; }
  dialog.new-company-dlg .fields.four-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* 상세 차량 표 → 차량 한 대씩 카드 (보기와 판정만, 수정·삭제·추가는 PC) */
  .table-wrap > table.vehicle-table.m-cardify { width: 100%; min-width: 0; }
  .vehicle-table.m-cardify, .vehicle-table.m-cardify tbody { display: block; }
  .vehicle-table.m-cardify thead, .vehicle-table.m-cardify tr.add-row,
  .vehicle-table.m-cardify tr.vrow td.v-acts, .vehicle-table.m-cardify tr.vrow td.v-note { display: none; }   /* 수정·삭제·비고는 PC 에서 */
  .vehicle-table.m-cardify tr.vrow { display: block; padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .vehicle-table.m-cardify tr.vrow td { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; height: auto; padding: 3px 0;
                                        border: 0; white-space: normal; text-align: left; font-size: 15px; }
  .vehicle-table.m-cardify tr.vrow td::before { content: attr(data-label); flex: 0 0 64px; font-size: 13px; color: var(--muted); font-weight: 600; }
  .vehicle-table.m-cardify tr.vrow td:first-child::before { content: "번호"; }
  .vehicle-table.m-cardify tr.vrow td:first-child .vidx { font-weight: 800; }
  .vehicle-table.m-cardify tr.vrow td.w-verdict .v-reason { flex: 1 1 100%; margin-left: 72px; margin-top: 2px; font-size: 16px; }
  .vehicle-table.m-cardify .vd-btn { min-height: 36px; height: 36px; padding: 0 16px; font-size: 14px; }
  .vcard-note { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
  .vehicle-table.m-cardify tr.vrow.rejected:not(.deleted) { background: #F5F6F8; }   /* 불가 카드는 카드 전체 회색 */
  .vehicle-table.m-cardify tr.vrow.rejected:not(.deleted) td { background: transparent; }
  /* 카드 3줄 (2026-11-24): ① 번호 · 차명 · 연식 ② 차대번호 + 중복 ③ 쇼링비(왼쪽) · [가능][불가](오른쪽), 불가면 아래 사유. 빈 값은 줄에서 뺌 */
  .vehicle-table.m-cardify tr.vrow { display: flex; flex-wrap: wrap; align-items: center; column-gap: 0; row-gap: 4px; }
  .vehicle-table.m-cardify tr.vrow td { padding: 0; }
  .vehicle-table.m-cardify tr.vrow td::before { content: none; }
  .vehicle-table.m-cardify tr.vrow td:first-child { flex: 0 0 28px; }
  .vehicle-table.m-cardify tr.vrow td:first-child::before { content: none; }
  .vehicle-table.m-cardify tr.vrow td[data-label="차명"] { flex: 0 1 auto; font-weight: 700; min-width: 0; }
  .vehicle-table.m-cardify tr.vrow td[data-label="연식"] { flex: 1 1 auto; }
  .vehicle-table.m-cardify tr.vrow td[data-label="연식"] { gap: 0; }
  .vehicle-table.m-cardify tr.vrow td[data-label="연식"]::before { content: "·"; flex: none; color: var(--muted); margin: 0 6px; }
  .vehicle-table.m-cardify tr.vrow td[data-label="연식"]:has(> .vt:empty) { display: none; }
  .vehicle-table.m-cardify tr.vrow td[data-label="차명"]:has(~ td[data-label="연식"] > .vt:empty) { flex: 1 1 auto; }
  .vehicle-table.m-cardify tr.vrow td[data-label="차대번호"] { flex: 1 0 100%; padding-left: 28px; font-size: 14px; color: var(--muted); }
  .vehicle-table.m-cardify tr.vrow td[data-label="차대번호"]:has(> .vt[data-of="vin"]:empty):not(:has(.flag-tag)) { display: none; }
  .vehicle-table.m-cardify tr.vrow td[data-label="쇼링비"] { flex: 1 1 auto; padding-left: 28px; font-weight: 700; }
  .vehicle-table.m-cardify tr.vrow td[data-label="연식"] { order: 1; }   /* 표에서는 차대번호 뒤 칸이라 순서를 따로 정함 */
  .vehicle-table.m-cardify tr.vrow td[data-label="차대번호"] { order: 2; }
  .vehicle-table.m-cardify tr.vrow td[data-label="쇼링비"], .vehicle-table.m-cardify tr.vrow td.w-verdict .vd-btns { order: 3; }
  .vehicle-table.m-cardify tr.vrow td.w-verdict .v-reason { order: 4; }
  .vehicle-table.m-cardify tr.vrow td.w-verdict { display: contents; }
  .vehicle-table.m-cardify tr.vrow td.w-verdict .vd-btns { margin-left: auto; }
  .vehicle-table.m-cardify tr.vrow td.w-verdict .v-reason { flex: 1 0 calc(100% - 28px); margin: 4px 0 0 28px; }
  .vehicle-table.m-cardify tr.vrow:not(.editing) .vmsg, .vehicle-table.m-cardify tr.vrow .vdup:empty { display: none; }
  /* 4차(2026-11-24): 인식 표시·[등록증 보기]는 차대번호 아래 따로 한 줄(있는 차량만) → 첫 줄 "번호 · 차명 · 연식"이 흩어지지 않게.
     차명 칸을 풀어(display: contents) 차명 글자는 첫 줄, 표시·버튼은 order 3 + 뒤에 줄바꿈(::after) */
  .vehicle-table.m-cardify tr.vrow td[data-label="차명"] { display: contents; }
  .vehicle-table.m-cardify tr.vrow td[data-label="차명"] > .vt { flex: 0 1 auto; min-width: 0; font-weight: 700; }
  .vehicle-table.m-cardify tr.vrow td[data-label="차명"] > .flag-tag,
  .vehicle-table.m-cardify tr.vrow td[data-label="차명"] > .reg-open { order: 3; margin: 0 8px 0 0; }
  .vehicle-table.m-cardify tr.vrow td[data-label="차명"] > :is(.flag-tag, .reg-open):first-of-type { margin-left: 28px; }
  .vehicle-table.m-cardify tr.vrow td[data-label="차명"] > .flag-tag ~ .reg-open { margin-left: 0; }
  .vehicle-table.m-cardify tr.vrow:has(td[data-label="차명"] > :is(.flag-tag, .reg-open))::after { content: ""; order: 3; flex: 0 0 100%; height: 0; }
  .vehicle-table.m-cardify tr.vrow td[data-label="쇼링비"], .vehicle-table.m-cardify tr.vrow td.w-verdict .vd-btns { order: 4; }
  .vehicle-table.m-cardify tr.vrow td.w-verdict .v-reason { order: 5; }
  .vehicle-table.m-cardify tr.vrow.ocr-pending:not(.deleted) { background: #FFF8D6; }   /* 인식값 · 확인 필요: 카드 전체 노랑 */
  .vehicle-table.m-cardify tr.vrow.ocr-pending td { background: transparent; }
}
/* ───── 사진·영상 공유 화면 (2026-11-24, app/pages/share.html): 폰 3열 · PC 5열 정사각형, 크게 보기 1600px ───── */
.share-gallery { background: #EEF2F7; min-height: 100vh; }
.share-gallery.sg-locked { overflow: hidden; }
.sg-main { max-width: 960px; margin: 0 auto; padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); }
.sg-card { margin: 0 0 16px; padding: 16px; }
.sg-who { margin: 0; font-size: 22px; font-weight: 800; color: var(--navy); letter-spacing: .02em; overflow-wrap: anywhere; }
.sg-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 6px; font-size: 15px; color: var(--text); }
.sg-meta span + span::before { content: "·"; margin-right: 12px; color: var(--muted); }
.sg-counts { margin-top: 8px; font-size: 14px; font-weight: 700; color: var(--blue); }
.sg-section { margin: 0 0 16px; }
.sg-h2 { margin: 0 0 8px; font-size: 16px; font-weight: 700; color: var(--navy); }
.sg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.sg-thumb { display: block; aspect-ratio: 1 / 1; padding: 0; min-height: 0; border: 0; border-radius: 4px; overflow: hidden; background: #D9E0EC; cursor: zoom-in; }
.sg-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sg-vgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sg-video { display: flex; flex-direction: column; align-items: stretch; gap: 2px; padding: 0; min-height: 0; border: 0; background: none; color: var(--text); text-align: left; cursor: pointer; }
.sg-vthumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: #1C2B47; }
.sg-vthumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sg-play { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: rgba(0,0,0,.55); }
.sg-play::after { content: ""; position: absolute; left: 17px; top: 13px; border-style: solid; border-width: 9px 0 9px 14px; border-color: transparent transparent transparent #fff; }
.sg-dur { position: absolute; right: 6px; bottom: 6px; padding: 1px 6px; border-radius: 4px; background: rgba(0,0,0,.7); color: #fff; font-size: 12px; font-weight: 700; }
.sg-vname { margin-top: 4px; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-vsize { font-size: 12px; color: var(--muted); }
.sg-bottom .btn-main { width: 100%; justify-content: center; }
.sg-bottom .btn[aria-disabled="true"] { pointer-events: none; opacity: .6; }
.sg-expire { margin: 12px 0 0; font-size: 14px; color: var(--muted); text-align: center; }
.sg-bottom .track-call { margin-top: 12px; }
.sg-expired { margin-top: 24px; }
.sg-expired-msg { margin: 4px 0 0; font-size: 16px; font-weight: 600; line-height: 1.5; word-break: keep-all; }
@media (min-width: 768px) {
  .sg-main { padding: 24px 32px 40px; }
  .sg-card { padding: 24px; }
  .sg-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
  .sg-vgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sg-bottom .btn-main { width: auto; min-width: 240px; }
  .sg-bottom { text-align: center; }
  .sg-bottom .track-call { max-width: 420px; margin-left: auto; margin-right: auto; }
}
/* 크게 보기 · 영상 재생 */
.sg-lb { position: fixed; inset: 0; z-index: 400; display: flex; flex-direction: column; background: rgba(8,16,32,.96); color: #fff; }
.sg-lb[hidden] { display: none; }
.sg-lb-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 56px 8px 8px; position: relative; }
.sg-lb-stage img, .sg-lb-stage video { max-width: 100%; max-height: 100%; object-fit: contain; }
.sg-lb-stage video { width: 100%; background: #000; }
.sg-lb-wait, .sg-vp-msg { position: absolute; left: 0; right: 0; text-align: center; font-size: 15px; color: #C9D3E6; }
.sg-lb-close { position: absolute; top: calc(8px + env(safe-area-inset-top)); right: 8px; z-index: 2; width: 44px; height: 44px; min-height: 0; padding: 0;
               border: 0; border-radius: 50%; background: rgba(255,255,255,.15); color: #fff; font-size: 28px; line-height: 1; }
.sg-lb-nav { position: absolute; top: 50%; z-index: 2; width: 44px; height: 64px; margin-top: -32px; min-height: 0; padding: 0;
             border: 0; border-radius: 8px; background: rgba(255,255,255,.12); color: #fff; font-size: 34px; line-height: 1; }
.sg-lb-nav.prev { left: 8px; } .sg-lb-nav.next { right: 8px; }
.sg-lb-nav[hidden] { display: none; }
.sg-lb-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
.sg-lb-count, .sg-vp-name { font-size: 15px; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-lb-bar .btn { flex: none; }
@media (hover: none) and (pointer: coarse) { .sg-lb-nav { background: rgba(255,255,255,.08); } }

/* ───── 등록증 보기 (2026-11-24 4차): 차량 줄 버튼 + 창(사진 전체·확대 + 차대번호 저장), 사진 탭 등록증은 자르지 않고 차량 표시 ───── */
.btn-xs { min-height: 28px; height: 28px; padding: 0 10px; font-size: 12px; border-radius: 6px; vertical-align: 1px; }
.vehicle-table .reg-open { margin-left: 4px; }
dialog.reg-dlg { border: none; border-radius: 12px; padding: 0; width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 32px);
  box-shadow: 0 12px 40px rgba(16,33,63,.3); overflow: hidden; }
dialog.reg-dlg[open] { display: flex; flex-direction: column; }
dialog.reg-dlg::backdrop { background: rgba(16,33,63,.55); }
.reg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px 12px 20px; border-bottom: 1px solid var(--line); }
.reg-head h3 { margin: 0; color: var(--navy); font-size: 17px; }
.reg-x { min-height: 36px; width: 36px; padding: 0; background: transparent; color: var(--navy); font-size: 24px; border: none; }
.reg-stage { position: relative; flex: 1 1 auto; min-height: 160px; overflow: auto; background: #1B2433; display: flex; }   /* 사진은 가운데(margin: auto — 확대해도 왼쪽·위가 잘리지 않음) */
.reg-stage img { display: block; margin: auto; flex: none; max-width: 100%; max-height: calc(100vh - 260px); object-fit: contain; cursor: zoom-in; }
.reg-stage img.zoomed { max-width: none; max-height: none; cursor: zoom-out; }
.reg-wait { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 14px; }
.reg-wait[hidden] { display: none; }
.reg-zoom { display: flex; justify-content: center; gap: 8px; padding: 8px 16px 0; }
.reg-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 12px; padding: 12px 20px 20px; }
.reg-form .field { flex: 1 1 240px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); margin: 0; }
.reg-form input { font-family: inherit; font-size: 16px; letter-spacing: .5px; height: 44px; }
.reg-form button { min-width: 96px; }
.reg-msg { flex: 1 1 100%; font-size: 13px; color: var(--danger); min-height: 0; }
.reg-msg:empty { display: none; }
.photo-grid.reg .ph { aspect-ratio: auto; background: #fff; border: 1px solid var(--line); display: flex; flex-direction: column; }
.photo-grid.reg .ph img { height: auto; aspect-ratio: auto; object-fit: contain; background: #fff; }
.photo-grid.reg figcaption { padding: 6px 8px; font-size: 13px; font-weight: 700; color: var(--navy); border-top: 1px solid var(--line); }
@media (max-width: 720px) {
  dialog.reg-dlg { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .reg-stage img { max-height: none; }
  .reg-form { padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); }
  .reg-form button { flex: 1 1 100%; }
  .photo-grid.reg { grid-template-columns: repeat(2, 1fr); }
}
