/* ───── 모바일 디자인 시스템 (폭 820px 이하) ─────
   색·글자·여백·모서리·버튼·카드·배지는 모두 아래 토큰에서 정한다. 화면별로 따로 정하지 않는다.
   스킨은 html[data-skin] 으로 토큰만 바꾼다. */
:root{
  /* 글자 6단계: 12(보조) 13(레이블) 15(값) 16(제목) 20(화면 제목) 24(큰 숫자) */
  --fs-xs:12px;--fs-s:13px;--fs-m:15px;--fs-l:16px;--fs-xl:20px;--fs-xxl:24px;
  /* 여백 4·8·12·16 / 모서리 */
  --sp-1:4px;--sp-2:8px;--sp-3:12px;--sp-4:16px;--r-card:12px;--r-btn:10px;--r-tag:6px;
  /* 정비구분 고유색 */
  --k-n:#2563eb;--k-r:#0b7480;--k-i:#6a49d1;--k-a:#b85a00;--k-x:#566079;
  /* 정비 상태 고유색(배경/글자) */
  --s-in-bg:#e2e8f0;--s-in-fg:#334155;--s-wk-bg:#fde68a;--s-wk-fg:#78350f;--s-tmp-bg:#fbcfe8;--s-tmp-fg:#9d174d;--s-wait-bg:#d9f99d;--s-wait-fg:#3f6212;--s-done-bg:#0b6b45;--s-done-fg:#fff;
  /* 카드 종류별 배경·띠 */
  --c-cust:#eef4ff;--c-cust-bd:#bcd0f7;--c-veh:#ecf7f6;--c-veh-bd:#b5dcd8;--c-wo:#fff;--c-wo-bd:#e3e8f3;--c-part:#fff7e8;--c-part-bd:#f2d9a6;--c-pay:#ecf9f1;--c-pay-bd:#b4e2c8;--c-partner:#f3effe;--c-partner-bd:#d3c8f5;--c-plain:#fff;
  --lbl:#566079;--val:#1b2437;
  /* 글자 대비 4.5:1 이상(WCAG AA) — 회색·빨강·초록 글자색을 한 단계 진하게 */
  --muted:#566079;--red:#c9302f;--green:#0e7d52;--orange:#b85a00;
}
html[data-skin=dark]{
  --bg:#10151f;--card:#1a2230;--ink:#e6ebf5;--muted:#9aa6bf;--line:#2c3547;--blue-soft:#1c2c4d;--gray-soft:#242c3b;
  --c-cust:#17243d;--c-cust-bd:#2c4272;--c-veh:#14292a;--c-veh-bd:#245052;--c-wo:#1a2230;--c-wo-bd:#2c3547;--c-part:#2a2314;--c-part-bd:#5b4a20;--c-pay:#14281d;--c-pay-bd:#25503a;--c-partner:#231d38;--c-partner-bd:#443a72;--c-plain:#1a2230;
  --lbl:#9aa6bf;--val:#e6ebf5;
  --k-n:#6ea0ff;--k-r:#4ecbd8;--k-i:#a99af5;--k-a:#ffa04d;--k-x:#9aa6bf;
  --s-in-bg:#334155;--s-in-fg:#e2e8f0;--s-wk-bg:#6b4e0a;--s-wk-fg:#fde68a;--s-tmp-bg:#6b1d44;--s-tmp-fg:#fbcfe8;--s-wait-bg:#3b5a14;--s-wait-fg:#d9f99d;--s-done-bg:#16a36a;--s-done-fg:#04281a;
}
html[data-skin=contrast]{
  --bg:#fff;--muted:#3b4458;--lbl:#2a3243;--line:#8a94a8;--c-wo-bd:#8a94a8;--c-cust-bd:#5b79c4;--c-veh-bd:#3e9a93;--c-part-bd:#c28a1c;--c-pay-bd:#2f9a63;--c-partner-bd:#7c63d1;
  --k-n:#1746c4;--k-r:#066b76;--k-i:#5a38c4;--k-a:#b55200;--k-x:#3b4458;
}
html[data-skin=dark] body,html[data-skin=dark] #content{background:var(--bg);color:var(--ink)}
html[data-skin=dark] .card,html[data-skin=dark] table.m-cards tr{color:var(--ink)}
html[data-skin=dark] .btn{background:#222b3b;color:var(--ink);border-color:#3a4560}
html[data-skin=dark] input,html[data-skin=dark] select,html[data-skin=dark] textarea{background:#141b27;color:var(--ink);border-color:#3a4560}

/* ① 배지: 정비구분은 윤곽선 태그, 상태는 채움 알약(점) — 모양까지 달라 섞이지 않는다 */
.badge{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:var(--r-tag);font-size:var(--fs-xs)!important;font-weight:700;line-height:1.5;white-space:nowrap;max-width:100%}
.badge.k-n,.badge.k-r,.badge.k-i,.badge.k-a,.badge.k-x{background:transparent;border:1.5px solid currentColor}
.badge.k-n{color:var(--k-n)}.badge.k-r{color:var(--k-r)}.badge.k-i{color:var(--k-i)}.badge.k-a{color:var(--k-a)}.badge.k-x{color:var(--k-x)}
.badge.s-in,.badge.s-wk,.badge.s-tmp,.badge.s-wait,.badge.s-done{border-radius:999px;padding:2px 10px}
.badge.s-in{background:var(--s-in-bg);color:var(--s-in-fg)}.badge.s-wk{background:var(--s-wk-bg);color:var(--s-wk-fg)}.badge.s-tmp{background:var(--s-tmp-bg);color:var(--s-tmp-fg)}.badge.s-wait{background:var(--s-wait-bg);color:var(--s-wait-fg)}.badge.s-done{background:var(--s-done-bg);color:var(--s-done-fg)}

/* ③ 카드 종류: 목적별 배경색·테두리. 정비 카드는 구분색 띠가 붙는다 */
.card,table.m-cards tr{border-radius:var(--r-card)}
body[data-page=customers] #main table.m-cards tr{background:var(--c-cust);border-color:var(--c-cust-bd)}
body[data-page=vehicles] #main table.m-cards tr{background:var(--c-veh);border-color:var(--c-veh-bd)}
body[data-page=parts] #main table.m-cards tr,body[data-page=stock] #main table.m-cards tr,body[data-page=po] #main table.m-cards tr{background:var(--c-part);border-color:var(--c-part-bd)}
body[data-page=pay] #main table.m-cards tr{background:var(--c-pay);border-color:var(--c-pay-bd)}
body[data-page=partners] #main table.m-cards tr{background:var(--c-partner);border-color:var(--c-partner-bd)}
body[data-page=orders] #main table.m-cards tr,body[data-page=dashboard] #main table.m-cards tr,body[data-page=my] .my-card{background:var(--c-wo);border-color:var(--c-wo-bd)}
#main table.m-cards tr:has(.badge.k-n){border-left:5px solid var(--k-n)}
#main table.m-cards tr:has(.badge.k-r){border-left:5px solid var(--k-r)}
#main table.m-cards tr:has(.badge.k-i){border-left:5px solid var(--k-i)}
#main table.m-cards tr:has(.badge.k-a){border-left:5px solid var(--k-a)}
#custDetail .veh{background:var(--c-veh);border-color:var(--c-veh-bd)}
#custDetail .veh.sel{border-color:var(--k-n)}
#custDetail .cust-info,#custDetail .kv{background:var(--c-cust)}
body[data-page=customers] #custDetail .card:first-child{background:var(--c-cust);border-color:var(--c-cust-bd)}

/* ④ 패널 제목 / 항목 레이블·값: 위치·크기·색을 하나로 */
.page-head h1{font-size:var(--fs-xl)!important;font-weight:800;line-height:1.3}
.card>h3,.card>.bench-h h3,.card h3:first-child{font-size:var(--fs-l)!important;font-weight:700;margin:0 0 var(--sp-2);color:var(--val)}
table.m-cards td::before{font-size:var(--fs-s)!important;font-weight:500;color:var(--lbl);white-space:nowrap}
table.m-cards td{font-size:var(--fs-m)!important;color:var(--val)}
label>span:first-child,.field>label,.fld>label,form label{font-size:var(--fs-s);color:var(--lbl)}

/* ② 짧은 값은 줄을 바꾸지 않고 자르지도 않는다 — 레이블 칸은 줄고 값 칸이 우선 */
table.m-cards td{flex-wrap:nowrap}
table.m-cards td::before{flex:0 0 auto}
table.m-cards td:not(.wrap){flex-wrap:wrap}
table.m-cards td.num,table.m-cards td .badge,table.m-cards td b,table.m-cards td a.mlink{white-space:nowrap}
table.m-cards td>*{min-width:0}
.car-cell{flex-wrap:nowrap;white-space:nowrap}
.btn,.badge,.chip-btn,.tabs button,.seg button{white-space:nowrap}

/* ⑥ 버튼 종류·크기: 종류(기본·주·위험·텍스트) × 크기(L48·M44·S36) */
.btn{min-height:44px;border-radius:var(--r-btn);font-size:var(--fs-m);font-weight:600;background:var(--card);color:var(--val);border:1px solid var(--field-bd,#d3dbe9);padding:0 14px}
.btn.sm{min-height:36px;font-size:var(--fs-s);padding:0 12px}
.btn.lg{min-height:48px;font-size:var(--fs-l)}
.btn.primary{background:var(--blue);border-color:var(--blue);color:#fff}
.btn.danger{background:#fff;color:var(--red);border-color:var(--red)}
.btn.danger.solid,.btn.danger.primary{background:var(--red);color:#fff}
.btn.ghost,.btn.link{background:transparent;border-color:transparent;color:var(--blue)}

/* ⑦ 안내 문구는 ⓘ 말풍선으로: mobile.js 가 일반 안내 문단을 ⓘ 로 바꾼다 */
.info-tip{min-width:44px;min-height:44px;margin:-10px -6px;font-size:var(--fs-l);display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;color:var(--blue)}
.page-head>p.m-tipped{display:none}
.page-head h1 .info-tip{margin-left:4px}

/* ⑤ 페이지/스크롤 기준: 같은 종류를 나란히 고르는 곳=가로 스크롤(탭·차량 카드), 카드 안 짧은 목록=세로 스크롤, 업무 목록(20건 초과)=페이지 */
.wo-tabs,.tabs,.seg{overflow-x:auto;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch}
.wo-tabs>*,.tabs>*,.seg>*{scroll-snap-align:start}

/* 스킨 선택창 */
.m-skin{position:fixed;inset:0;z-index:400;display:flex;align-items:flex-end;background:rgba(14,26,58,.5)}
.m-skin>div{width:100%;background:var(--card);color:var(--ink);border-radius:16px 16px 0 0;padding:16px 16px calc(16px + var(--safe-b,0px))}
.m-skin h3{margin:0 0 4px;font-size:var(--fs-l)}
.m-skin p{margin:0 0 12px;color:var(--muted);font-size:var(--fs-s)}
.m-skin button.opt{display:flex;align-items:center;gap:10px;width:100%;min-height:52px;margin:0 0 8px;padding:0 14px;border:2px solid var(--line);border-radius:12px;background:var(--card);color:var(--ink);font:inherit;font-size:var(--fs-m);font-weight:600;text-align:left}
.m-skin button.opt.on{border-color:var(--blue);background:var(--blue-soft)}
.m-skin .sw{width:28px;height:28px;border-radius:8px;border:1px solid rgba(0,0,0,.2);flex:none}
/* 고객 목록(한 덩어리 목록)도 고객 카드 색 */
.m-clist{background:var(--c-cust);border-color:var(--c-cust-bd)}
.m-crow{border-bottom-color:var(--c-cust-bd)}
#main table.wo-table td:nth-child(9),body.shell #main table.wo-table td:nth-child(9){text-align:right!important}
html[data-skin=dark] .wo-tabs button,html[data-skin=dark] .tabs button,html[data-skin=dark] .seg button,html[data-skin=dark] .chip-btn{background:#222b3b;color:var(--ink);border-color:#3a4560}
html[data-skin=dark] .wo-tabs button.on,html[data-skin=dark] .tabs button.on,html[data-skin=dark] .seg button.on{background:var(--blue);color:#fff}

/* 글자 6단계(12·13·15·16·20·24)에 맞춘다 — 이 밖의 크기는 쓰지 않는다 */
.vb-ic,.wo-tabs button,.m-crow .n,.muted,.my-h .muted{font-size:var(--fs-s)!important}
.cal-num,.kpi .lb,.rem-note,.rem-note b,.rem-note a,.dash-alerts a,.seal-box .muted,.btn.actions{font-size:var(--fs-xs)!important}
.kpi .v,.kpi .v b{font-size:var(--fs-xl)!important}
.my-plate{font-size:var(--fs-xl)!important}
.kpi .ic,.m-cg{font-size:var(--fs-l)!important}
.card .v{font-size:var(--fs-xl)!important}
.m-crow b,#main b{font-size:inherit}
.small,small{font-size:var(--fs-xs)!important}
.actions .btn{font-size:var(--fs-s)}
span.ic,div.ic,.ic{font-size:var(--fs-l)!important}
.actions .btn,.actions button,.actions a.btn{font-size:var(--fs-s)!important}

/* 빈 화면: 모든 목록이 같은 모양(가운데 안내 + 아이콘) */
.empty,table.m-cards td.empty,table.m-cards td[colspan].empty{display:block!important;text-align:center!important;padding:28px 12px!important;color:var(--muted);font-size:var(--fs-m)!important}
.empty::before{content:"📭";display:block;font-size:var(--fs-xxl);margin-bottom:var(--sp-1);opacity:.7}
table.m-cards tr:has(td.empty){background:transparent!important;border-style:dashed}
/* 내 작업 카드: 정비구분 띠 */
body[data-page=my] #main .my-card{border-left:5px solid var(--line)}
body[data-page=my] #main .my-card:has(.k-a){border-left-color:var(--k-a)}
body[data-page=my] #main .my-card:has(.k-i){border-left-color:var(--k-i)}
body[data-page=my] #main .my-card:has(.k-r){border-left-color:var(--k-r)}
body[data-page=my] #main .my-card:has(.k-n){border-left-color:var(--k-n)}
body[data-page=my] #main .my-card:has(.k-x){border-left-color:var(--k-x)}

/* 진행 단계 막대: 단계마다 상태 고유색. 지난·현재 단계는 색을 채우고, 앞으로 올 단계는 윤곽선만 */
.prog-step.ps{background:transparent;border:1.5px solid currentColor;box-shadow:none;font-weight:700}
.prog-step.ps.s-in{color:var(--s-in-fg)}.prog-step.ps.s-wk{color:var(--s-wk-fg)}.prog-step.ps.s-tmp{color:var(--s-tmp-fg)}.prog-step.ps.s-wait{color:var(--s-wait-fg)}.prog-step.ps.s-done{color:var(--s-done-bg)}
.prog-step.ps.s-in.done,.prog-step.ps.s-in.on,.prog-step.ps.s-in.now{background:var(--s-in-bg)}
.prog-step.ps.s-wk.done,.prog-step.ps.s-wk.on,.prog-step.ps.s-wk.now{background:var(--s-wk-bg)}
.prog-step.ps.s-tmp.done,.prog-step.ps.s-tmp.on,.prog-step.ps.s-tmp.now{background:var(--s-tmp-bg)}
.prog-step.ps.s-wait.done,.prog-step.ps.s-wait.on,.prog-step.ps.s-wait.now{background:var(--s-wait-bg)}
.prog-step.ps.s-done.done,.prog-step.ps.s-done.on,.prog-step.ps.s-done.now{background:var(--s-done-bg);color:var(--s-done-fg)}
.prog-step.ps.now{border-style:dashed}
.prog-step.ps.viewing{outline:2.5px solid var(--blue);outline-offset:2px}

/* 차종 이름은 자르지 않는다 */
table.fixed td .car-cell,table.m-cards td .car-cell{max-width:none;overflow:visible}
table.fixed td .car-cell>span:nth-child(2),table.m-cards td .car-cell>span:nth-child(2){overflow:visible;text-overflow:clip;white-space:nowrap}
.actions .btn,.actions button,.actions a.btn{padding:0 10px}
.actions .btn,.actions button,.actions a.btn{min-width:max-content}
.btn{overflow:visible}
.page-head .actions .btn{font-size:var(--fs-xs)!important;padding:0 6px;min-width:0}

/* ④ 레이블·제목 표준: 패널 제목 16/700, 하위 제목 15/700, 입력 항목 레이블 13/700(진한 남색 하나), 값은 15 */
:root{--lbl-f:#0e2a63}
html[data-skin=dark]{--lbl-f:#b8c7ee}
#main h3,#main .card h3,#main .my-h{font-size:var(--fs-l)!important;font-weight:700!important;color:var(--val)!important}
#main h4,#main .f-heading{font-size:var(--fs-m)!important;font-weight:700!important;color:var(--val)}
#main h2{font-size:var(--fs-xl)!important;font-weight:800}
#main label:not(.btn):not(.chip):not(.chk):not(.muted),.modal label:not(.btn):not(.chip):not(.chk):not(.muted){font-size:var(--fs-s);font-weight:700;color:var(--lbl-f)}
#main .field>span,.modal .field>span{font-size:var(--fs-s);font-weight:700;color:var(--lbl-f)}

/* ③ 카드 종류(진행 현황 창·작업대): 제목으로 구분한 카드에 종류별 배경 */
[data-ct=cust]{background:var(--c-cust)!important;border-color:var(--c-cust-bd)!important}
[data-ct=veh]{background:var(--c-veh)!important;border-color:var(--c-veh-bd)!important}
[data-ct=part]{background:var(--c-part)!important;border-color:var(--c-part-bd)!important}
[data-ct=pay]{background:var(--c-pay)!important;border-color:var(--c-pay-bd)!important}
[data-ct=partner]{background:var(--c-partner)!important;border-color:var(--c-partner-bd)!important}

/* 보고서의 짧은 표(4열 이하)는 카드로 풀지 않고 표 그대로 — 한 줄에 한 항목 */
table.rep-tbl{width:100%;min-width:0;table-layout:auto;border-collapse:collapse}
table.rep-tbl th{font-size:var(--fs-s);font-weight:700;color:var(--lbl);text-align:left;padding:6px 4px;background:transparent}
table.rep-tbl td{font-size:var(--fs-m);padding:9px 4px;border-top:1px solid var(--line);white-space:nowrap;color:var(--val)}
table.rep-tbl td.num,table.rep-tbl th.num{text-align:right}
table.rep-tbl td:first-child{white-space:normal}

/* 공통 로딩 표시: 화면을 바꾸는 동안 맨 위에 가는 막대가 흐른다 */
body.m-loading::after{content:"";position:fixed;top:0;left:0;right:0;height:3px;z-index:500;background:linear-gradient(90deg,transparent,var(--blue),transparent);background-size:40% 100%;background-repeat:no-repeat;animation:mload 1s linear infinite}
@keyframes mload{from{background-position:-40% 0}to{background-position:140% 0}}
@media (prefers-reduced-motion:reduce){body.m-loading::after{animation:none;background:var(--blue)}}

/* 차량 목록 카드: 버튼은 3열 격자(넘쳐서 잘리지 않게) */
#main table.veh-table td.ops-cell,body.shell #main table.veh-table td.ops-cell{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;width:100%;white-space:normal}
#main table.veh-table td.ops-cell .vb{width:100%;min-width:0;justify-content:center;min-height:44px;padding:0 4px}

/* 비어 있는 안내 줄은 간격도 차지하지 않는다(입력 창에 쓸데없는 빈 줄이 생기던 것) */
.biz-hint:empty,.modal form .muted:empty,.modal form .hint:empty,.modal form .err:empty{display:none}

/* 좁은 화면(360px 이하): 대시보드 최근 입고는 연도를 빼고, 진행 단계 막대는 한 줄에 */
.dash-recent .hy{display:none}
.prog-bar,.prog-steps{gap:2px}
@media (max-width:380px){.prog-step{padding:4px 7px;font-size:var(--fs-xs)!important}.prog-bar .sep{margin:0}}

/* 어두운 스킨: 기본 배지·쪽 이동 버튼·입력칸을 어두운 바탕에 맞춘다 */
html[data-skin=dark] .badge.b-blue{background:#1c2c4d;color:#8db4ff}
html[data-skin=dark] .badge.b-green{background:#14332a;color:#6fe0ae}
html[data-skin=dark] .badge.b-orange{background:#3a2a10;color:#ffc37a}
html[data-skin=dark] .badge.b-red{background:#3d1a1d;color:#ff9b9f}
html[data-skin=dark] .badge.b-purple{background:#2a2147;color:#c3b4ff}
html[data-skin=dark] .badge.b-gray{background:#2a3242;color:#b4bfd6}
html[data-skin=dark] .pager button,html[data-skin=dark] .btn.sm,html[data-skin=dark] .chip-btn{background:#222b3b;color:var(--ink);border-color:#3a4560}
html[data-skin=dark] .pager button.on,html[data-skin=dark] .btn.primary{background:var(--blue);color:#fff;border-color:var(--blue)}
html[data-skin=dark] .card,html[data-skin=dark] .m-clist,html[data-skin=dark] .tabs,html[data-skin=dark] .kpi{color:var(--ink)}
html[data-skin=dark] a{color:#8db4ff}
html[data-skin=dark] .cal-cell,html[data-skin=dark] .cal-cell:hover{background:var(--card)}
html[data-skin=dark] .cal-cell.dim{background:#141a26;color:#6f7b95}
html[data-skin=dark] .cal-cell.today{background:#1c2c4d}
html[data-skin=dark] .cal-head,html[data-skin=dark] .cal-dow{background:var(--card);color:var(--muted)}

/* 글자 대비 4.5:1 이상: 밝은 스킨의 기본 배지·보조 글자 */
.badge.b-blue{color:#1d4fc4}.badge.b-green{color:#0b6b45}.badge.b-orange{color:#9a5200}.badge.b-red{color:#b3232a}.badge.b-purple{color:#5f3fc4}.badge.b-gray{color:#47516a}
.btn.danger{color:#b3232a;border-color:#b3232a}
.kpi .d{color:#b3232a}.kpi .d:not(.down){color:#0b6b45}
/* (위 b-* 보정이 상태·구분 배지 색을 덮지 않도록 다시 한 번) */
.badge.s-in{color:var(--s-in-fg)}.badge.s-wk{color:var(--s-wk-fg)}.badge.s-tmp{color:var(--s-tmp-fg)}.badge.s-wait{color:var(--s-wait-fg)}.badge.s-done{color:var(--s-done-fg)}
.badge.k-n{color:var(--k-n)}.badge.k-r{color:var(--k-r)}.badge.k-i{color:var(--k-i)}.badge.k-a{color:var(--k-a)}.badge.k-x{color:var(--k-x)}
/* 달력: 일요일·지난달/다음달 날짜도 4.5:1 */
.cal-num.sun,.sun,.cal-cell:nth-child(7n+1) .cal-num{color:#c9302f}
.cal-cell.dim .cal-num,.cal-cell.dim{color:#5f6b85}
.cal-cell:nth-child(7n) .cal-num{color:#1746c4}
#main .sun{color:#c9302f!important}
.cal-cell.today .cal-num{color:#fff!important}
html[data-skin=dark] #main .sun,html[data-skin=dark] .cal-cell:nth-child(7n+1) .cal-num{color:#ff8a8e!important}
html[data-skin=dark] .cal-cell.dim .cal-num,html[data-skin=dark] .cal-cell.dim{color:#8a96b0}
html[data-skin=dark] .cal-cell:nth-child(7n) .cal-num{color:#8db4ff}
html[data-skin=dark] .info-tip{color:#8db4ff}
html[data-skin=dark] .btn.danger{color:#ff9b9f;border-color:#ff9b9f;background:transparent}
html[data-skin=dark] .kpi .d{color:#ff9b9f}html[data-skin=dark] .kpi .d:not(.down){color:#6fe0ae}

/* 눌러야 하는 곳은 44px 이상: 대시보드 알림 줄, 월/주 전환. 문장 속 링크는 위아래 눌림 영역만 넓힌다 */
.dash-alerts a.rem-note,a.rem-note{display:flex;align-items:center;min-height:44px}
.tabs button,.seg button{min-width:44px;min-height:44px}
p a,.rem-note a:not(.rem-note),.muted a,td a:not(.btn){padding:10px 3px;margin:-10px 0}

/* ── 전 화면 점검 후 보정: 글자 단계(12·13·15·16·20)·눌림 크기 ── */
#main div.v{font-size:var(--fs-xl)!important}
#main label.chk b,#main label.chk span{font-size:var(--fs-s)!important}
.modal header h3,.modal h3{font-size:var(--fs-l)!important;font-weight:700!important}
.modal footer .btn,.modal .foot .btn{min-height:44px;font-size:var(--fs-m)!important}
#custDetail .avatar{font-size:var(--fs-l)!important}
#custDetail .phone{font-size:var(--fs-m)!important}
#custDetail .kv .k{font-size:var(--fs-xs)!important}
#custDetail .kv>div,#custDetail .kv .wide,#custDetail .kv .consent-date{font-size:var(--fs-s)!important}
#custDetail .tabs button{font-size:var(--fs-s)!important}
#custDetail .vb-lb,#custDetail .veh-tools .btn,#custDetail .veh-tools .vb{font-size:var(--fs-xs)!important}   /* 차량 버튼 6개가 한 줄에 들어가도록 12px */
#custDetail .veh .s,#custDetail .veh .s span{font-size:var(--fs-xs)!important}
#custDetail .veh .t{font-size:var(--fs-m)!important}
#custDetail .veh-head .btn,#custDetail .veh-tools .btn.primary{min-height:36px}
.m-tipped:not(.page-head>p){display:none!important}
#custDetail .veh-head .btn,#custDetail .veh-head button.btn.primary,#custDetail button.btn.sm.primary{min-height:36px!important;height:auto}
#main label>.fl,.modal label>.fl,#main .fl,.modal .fl{font-size:var(--fs-s)!important;font-weight:700!important;color:var(--lbl-f)!important}
#custDetail #vehTools{margin-top:6px}

/* 위쪽 바: 버튼은 배경·테두리 없이 아이콘만, 가운데는 메뉴 제목 */
.m-bar button,.m-bar button.on{background:transparent!important;border:0!important;box-shadow:none!important}
.m-bar button{width:44px;height:44px;font-size:1.5rem;color:#fff}
.m-bar button.on{color:#9fc3ff}
#mNavBtn{font-size:1.75rem}
.m-bar .m-brand{flex:1;min-width:0;display:block;margin:0;font-size:var(--fs-xl)}
.m-bar .m-brand b{display:block;font-size:var(--fs-xl);font-weight:800;letter-spacing:0;color:#fff;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* 화면 제목은 위쪽 바에 있으므로 본문의 제목(중복)은 숨기고, 화면 안내 ⓘ 는 바의 제목 옆에 둔다 */
#main .page-head h1{display:none}
.m-bar .m-brand{display:flex;align-items:center;gap:0}
.m-bar .m-brand b{flex:0 1 auto;min-width:0}
.m-bar #mTitleTip{flex:none;margin:0 0 0 -2px;color:#cfe0ff;font-size:var(--fs-l);width:44px;height:44px;min-width:44px}
.m-bar #mTitleTip[hidden]{display:none}



/* 위쪽 바: 바 높이는 컴팩트하게 */
body.shell #topbar{padding-top:calc(2px + env(safe-area-inset-top,0px));padding-bottom:2px}

/* ⚡ 퀵 메뉴(오른쪽 서랍): 기본 퀵 메뉴 + 즐겨찾기 */
#mQuickBtn{font-size:1.5rem}
#quickDrawer{position:fixed;top:0;bottom:0;right:0;width:min(20rem,90vw);z-index:200;overflow-y:auto;overscroll-behavior:contain;background:var(--navy);color:#fff;padding:calc(10px + env(safe-area-inset-top,0px)) 12px calc(16px + var(--safe-b));transform:translateX(102%);visibility:hidden;transition:transform .22s ease,visibility 0s linear .22s}
body.quick-open #quickDrawer{transform:none;visibility:visible;transition:transform .22s ease,visibility 0s;box-shadow:-8px 0 30px rgba(10,20,50,.35)}
#qScrim{position:fixed;inset:0;z-index:190;background:rgba(14,26,58,.5)}
#qScrim[hidden]{display:none}
body.quick-open{overflow:hidden}
.q-head{display:flex;align-items:center;justify-content:space-between;min-height:44px;margin-bottom:6px}
.q-head b{font-size:var(--fs-l)}
.q-head button{width:44px;height:44px;border:0;background:transparent;color:#fff;font-size:1.25rem}
.q-sec{margin:14px 4px 6px;font-size:var(--fs-xs);font-weight:700;letter-spacing:.5px;color:#9fb4e6}
.q-sec small{font-weight:400;opacity:.8;margin-left:4px}
.q-item{display:flex;align-items:center;gap:10px;width:100%;min-height:48px;padding:0 12px;margin:0 0 6px;border:1px solid rgba(255,255,255,.2);border-radius:12px;background:rgba(255,255,255,.08);color:#fff;font:inherit;font-size:var(--fs-m);font-weight:600;text-align:left;text-decoration:none}
.q-item .ico{width:24px;text-align:center}
.q-item.q-main{background:#2f6df6;border-color:#2f6df6;font-size:var(--fs-l);font-weight:800;min-height:56px}
.q-item.q-tog{border-style:dashed;background:transparent;color:#cfe0ff}
.q-row{display:flex;align-items:stretch;gap:4px;margin:0 0 6px}
.q-row .q-item{margin:0;flex:1;min-width:0;white-space:nowrap;padding:0 8px;gap:6px}
.q-mini{flex:none;width:34px;border:1px solid rgba(255,255,255,.2);border-radius:10px;background:rgba(255,255,255,.08);color:#fff;font-size:var(--fs-s)}
.q-mini[disabled]{opacity:.3}
.q-empty{margin:4px;color:#c3d0ee;font-size:var(--fs-s);line-height:1.5}
@media (prefers-reduced-motion:reduce){#quickDrawer,body.quick-open #quickDrawer{transition:none}}
#quickDrawer{display:block}
#qScrim:not([hidden]){display:block}

/* 대시보드 최근 입고 카드: 칸이 좁아도 글자가 겹치지 않도록 줄바꿈이 되는 배치(flex-wrap). 1줄: 날짜·차량번호 … 구분·상태(오른쪽) / 2줄: 차종 … 담당자(오른쪽) */
#main table.dash-recent tr{display:flex!important;flex-wrap:wrap;align-items:center;gap:4px 8px}
#main table.dash-recent td{flex:none;min-width:0;max-width:100%}
#main table.dash-recent td:nth-child(1){order:1}
#main table.dash-recent td:nth-child(2){order:2}
#main table.dash-recent td:nth-child(4){order:3;margin-left:auto}
#main table.dash-recent td:nth-child(5){order:4}
#main table.dash-recent td:nth-child(3){order:5;flex:1 1 calc(100% - 96px)}
#main table.dash-recent td:nth-child(6){order:6;margin-left:auto}
#main .dash-recent .d-full{display:none!important}
#main .dash-recent .d-md{display:inline!important}

/* 아주 좁은 화면(340px 이하·확대 표시 포함): 카드·바를 한 단계 촘촘하게 — 한 줄에 다 들어가도록 */
@media (max-width:340px){
  #main table.dash-recent tr{padding:8px 8px;gap:4px 4px}
  #main table.dash-recent td:nth-child(1){font-size:var(--fs-xs)!important}
  #main table.dash-recent .badge{padding:2px 6px}
  #main table.dash-recent .badge.s-in,#main table.dash-recent .badge.s-wk,#main table.dash-recent .badge.s-tmp,#main table.dash-recent .badge.s-wait,#main table.dash-recent .badge.s-done{padding:2px 7px}
  .m-bar button{width:40px;height:44px}
  .m-bar #mTitleTip{width:32px;min-width:32px}
  .m-bar .m-brand b{font-size:var(--fs-l)}
}

/* ── 요청 반영: 좌우 여백 최소화 · 날짜 월/일 · 정비구분 짧게 · 차량 그림 배경 없음 · 퀵 메뉴 도구 ── */
/* 좌우 여백을 최소로(화면 가장자리 3px, 카드 안쪽 8px) */
body.shell main{padding-left:3px!important;padding-right:3px!important}
body.shell #topbar{padding-left:2px!important;padding-right:2px!important}
.card,body.shell .card{padding-left:8px!important;padding-right:8px!important}
#main table.wo-table tr,#main table.dash-recent tr,#main table.part-table tr,#main table.partner-table tr,#main table.pay-table tr,#main table.veh-table tr,table.m-cards tr{padding-left:8px!important;padding-right:8px!important}
.m-crow{padding-left:8px!important}
.kpis,.kpi{gap:4px}
/* 날짜는 모바일에서 월/일 하나만 */
.d-full{display:none!important}
.d-md{display:inline!important}
/* 정비구분 표시 줄임: 정비·일반·보험·보증 (글자는 그대로, 화면에서만) */
.badge[data-s] .bf{display:none}
.badge[data-s] .bs{display:inline}   /* 글자를 줄이는 꼼수(font-size:0) 대신 짧은 이름을 따로 두고 전환 — 처음 열 때 폭이 잘못 잡히던 문제 방지 */
/* 차량 그림 배경 없음 */
.car-thumb,.car-thumb.sm{background:transparent!important;border-radius:0}
#custDetail .veh .thumb,.veh .thumb .car-thumb{background:transparent!important}
/* ⚡ 버튼의 사내 대화 안 읽은 수 */
.m-bar #mQuickBtn .badge-n{position:absolute;top:2px;right:2px;min-width:16px;height:16px;line-height:16px;font-size:.714rem;padding:0 4px}
#qTools .badge-n{margin-left:auto}
body.quick-drag #quickDrawer{box-shadow:-8px 0 30px rgba(10,20,50,.35)}

/* 대시보드 카드 사이 간격: 위아래로 붙은 카드는 10px 띄운다 */
#main .card+.card,#main .row3>.card,#main .row2>.card{margin-top:10px}
#main .row3>.card:first-child,#main .row2>.card:first-child{margin-top:0}
body.shell main > .row3.row2.dash-row2,#main > .dash-row2{margin-top:10px!important}
#main .row3,#main .row2{gap:10px}

/* 오늘의 일정(대시보드): 한 건을 2줄 카드로 — ① 시각·차량번호 … 정비구분·상태 ② 차종 … 구분(입고·출고예정·예약 …) */
#main table.dash-sched,#main table.dash-sched tbody{display:block}
#main table.dash-sched colgroup,#main table.dash-sched thead{display:none}
#main table.dash-sched tr{display:flex!important;flex-wrap:wrap;align-items:center;gap:4px 8px;margin:0 0 6px;padding:8px;background:var(--c-wo);border:1px solid var(--c-wo-bd);border-radius:var(--r-card);box-shadow:none}
#main table.dash-sched td,body.shell #main table.dash-sched td{display:block!important;flex:none;width:auto;min-width:0;max-width:100%;padding:0;border:0;text-align:left;font-size:var(--fs-m)!important}
#main table.dash-sched td::before{display:none!important}
#main table.dash-sched td:nth-child(1){order:1;font-size:var(--fs-s)!important;color:var(--lbl);white-space:nowrap}
#main table.dash-sched td:nth-child(2){order:2;font-weight:700;white-space:nowrap}
body.shell #main table.dash-sched td:nth-child(2){flex:1 1 0;min-width:0;overflow:hidden;text-overflow:ellipsis}   /* 번호판이 길어도 상태가 아래줄로 밀리지 않게(남는 폭만 차지) */
body.shell #main table.dash-sched td:nth-child(1),body.shell #main table.dash-sched td:nth-child(4),body.shell #main table.dash-sched td:nth-child(6){flex:0 0 auto}
#main table.dash-sched td:nth-child(4){order:3;margin-left:auto}
#main table.dash-sched td:nth-child(6){order:4}
body.shell #main table.dash-sched td:nth-child(3){order:5;flex:1 1 calc(100% - 84px)}   /* 차종은 항상 2째 줄(앞 칸과 한 줄에 못 들어가게) */
#main table.dash-sched td:nth-child(5){order:6;margin-left:auto;font-size:var(--fs-s)!important;color:var(--lbl)}
#main table.dash-sched td:empty{display:none!important}
#main table.dash-sched td.empty{display:block!important;flex:1 1 100%}
#main table.dash-sched tr:has(td.empty){border-style:dashed;background:transparent}

/* 다음 정비 예정(대시보드): 한 건이 4줄 카드, 레이블 없음
   ① 예정일(경과 표시) … [안내/안내됨] ② 고객명 전화번호 … 고객구분 ③ 차량번호 … 차종 ④ 용건 */
#main table.dash-next,#main table.dash-next tbody{display:block}
#main table.dash-next colgroup,#main table.dash-next thead{display:none}
#main table.dash-next tr{display:flex!important;flex-wrap:wrap;align-items:center;gap:4px 8px;margin:0 0 6px;padding:8px;background:var(--c-cust);border:1px solid var(--c-cust-bd);border-radius:var(--r-card);box-shadow:none}
#main table.dash-next td,body.shell #main table.dash-next td{display:block!important;flex:none;width:auto;min-width:0;max-width:100%;padding:0;border:0;text-align:left;font-size:var(--fs-m)!important;white-space:normal}
#main table.dash-next td::before{display:none!important}
body.shell #main table.dash-next td.nw{order:1;display:flex!important;align-items:center;gap:6px;white-space:nowrap}
body.shell #main table.dash-next td.nw .nd-date{font-weight:700;margin:0}
body.shell #main table.dash-next td.nd-act{order:2;margin-left:auto}
body.shell #main table.dash-next td.nd-act .btn{min-width:64px}
body.shell #main table.dash-next td.nd-cust{order:3;flex:1 1 100%;display:flex!important;align-items:center;justify-content:flex-start;gap:8px}
#main table.dash-next .nd-cust .n{font-weight:700}
#main table.dash-next .nd-cust .p{display:inline;font-size:var(--fs-s)!important}
#main table.dash-next .nd-cust .nd-grade{display:inline-flex}
body.shell #main table.dash-next td.nd-veh{order:4;flex:1 1 100%;display:flex!important;align-items:center;justify-content:flex-start;gap:8px}
#main table.dash-next .nd-veh b{white-space:nowrap}
#main table.dash-next .nd-veh .m{display:inline;font-size:var(--fs-s)!important}
body.shell #main table.dash-next td.nd-item{order:5;flex:1 1 100%;color:var(--val)}
body.shell #main table.dash-next td.empty{display:block!important;flex:1 1 100%}
#main table.dash-next tr:has(td.empty){border-style:dashed;background:transparent}

/* 오늘의 일정 카드 3째 줄: 용건(예약 용건·입고 증상/작업·정비 항목) — 잘리지 않고 줄바꿈으로 모두 */
#main table.dash-sched .ds-p-pc{display:none}
#main table.dash-sched td.ds-purpose:not(:empty){display:block!important;order:7;flex:1 1 100%;font-size:var(--fs-s)!important;color:var(--val);overflow-wrap:anywhere}
#main table.dash-sched td.ds-purpose:empty{display:none!important}
body.shell #main table.dash-sched td:has(>.ds-p-pc){display:none!important}   /* 예약 줄: 정비구분 칸은 비움(용건은 3째 줄) */
body.shell #main table.dash-sched td:has(>.ds-p-pc)+td+td{margin-left:auto}   /* 정비구분 칸이 없는 예약 줄은 상태를 오른쪽 끝에 */
body.shell #main table.dash-next td.nd-act{display:flex;gap:6px}
body.shell #main .ds-pick select{min-height:44px;font-size:inherit;font-weight:inherit}

/* 상태 배지: 색과 글자로 이미 구분되므로 도트(●)·체크(✓) 기호는 두지 않는다 */
/* 카드 버튼 정리: 대표 버튼 + ⋯ 메뉴(아래에서 올라오는 시트) */
body.shell #main table.veh-table td.ops-cell{display:flex!important;gap:8px;align-items:center}
body.shell #main table.veh-table td.ops-cell>.vb{flex:1 1 0;width:auto}
body.shell #main table.veh-table td.ops-cell .ovf{flex:none}
body.shell #main td.acts{display:flex!important;gap:8px;justify-content:flex-end;align-items:center}
body.shell #main td.acts>.btn{min-width:88px}
.ovf{display:inline-flex}
.ovf-btn{min-width:72px;min-height:44px;padding:0 12px}
body.shell #main td.m-blank,body.shell #main table.m-cards td.m-blank{display:none!important}
body.shell .page-head .actions:has(.ovf){display:flex;gap:8px;align-items:stretch}
body.shell .page-head .actions:has(.ovf)>#partNew{flex:1 1 0;min-width:0}
body.shell .page-head .actions .ovf{flex:none}
.ovf-pop{position:fixed;left:8px;right:8px;bottom:calc(8px + var(--safe-b,0px));z-index:260;display:flex;flex-direction:column;gap:6px;padding:10px;background:var(--card,#fff);border-radius:var(--r-card);box-shadow:0 -6px 30px rgba(10,20,50,.3)}
.ovf-pop[hidden]{display:none}
.ovf-pop .btn,.ovf-pop .vb{width:100%;min-height:48px;justify-content:center;font-size:var(--fs-l)}
.ovf-scrim{position:fixed;inset:0;z-index:250;background:rgba(14,26,58,.45)}
.ovf-scrim[hidden]{display:none}
body.shell .page-head .actions .ovf-btn{min-height:44px}
/* 목록 카드는 화면 높이에 맞춰 늘이지 않는다(마지막 카드와 페이지 번호 사이가 비지 않게) */
body.shell main > .fill{flex:0 0 auto;min-height:0}
body.shell .card.fill > .pager{margin-top:8px}
body.shell .card.m-fill{min-height:0!important}
body.shell .card.m-fill > .pager{margin-top:8px;padding-top:0}

/* 해피콜 창: 카드 한 건 = 5줄 (출고일·전화 / 고객·결과 선택 / 차량 / 정비 항목 / 메모·저장) */
.doc-modal.hc-wide header h3{flex:0 1 auto}
.modal header .info-tip{flex:none;margin-right:auto;color:#cfe0ff;width:44px;height:44px;min-width:44px}
.doc-modal.hc-wide .body{padding-bottom:20px}
.doc-modal.hc-wide .hc-table,.doc-modal.hc-wide .hc-table tbody{display:block}
.doc-modal.hc-wide .hc-table tr{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;padding:10px;margin-bottom:10px}
.doc-modal.hc-wide .hc-table tr::after{content:"";order:3;flex:1 1 100%;height:0;margin-top:-4px}   /* 1줄(출고일·전화) 끝 */
.doc-modal.hc-wide .hc-table tr::before{content:"";order:8;flex:1 1 100%;height:0;margin-top:-4px}   /* 4줄(정비 항목) 끝 */
.doc-modal.hc-wide .hc-table td{display:block;width:auto;padding:0;min-width:0}
.doc-modal.hc-wide .hc-table td.hc-d{order:1;flex:1 1 0;min-width:0;font-size:var(--fs-m);white-space:nowrap}   /* 기준 폭 0: 전화 버튼이 첫 줄에서 밀려 내려가지 않게 */
.doc-modal.hc-wide .hc-table td.hc-d br{display:none}
.doc-modal.hc-wide .hc-table td.hc-d small{margin-left:6px}
.doc-modal.hc-wide .hc-table td.hc-c,.doc-modal.hc-wide .hc-table td.hc-a,.doc-modal.hc-wide .hc-table .hc-act{display:contents}
.doc-modal.hc-wide .hc-table td.hc-c br{display:none}
.doc-modal.hc-wide .hc-table .hc-tel{order:2;margin:0 0 0 auto;display:inline-flex;align-items:center;flex:none;box-sizing:border-box;height:44px;padding:0 10px;border:1px solid var(--line);border-radius:var(--r-btn);font-weight:700;white-space:nowrap;font-size:var(--fs-s)}
.doc-modal.hc-wide .hc-table .hc-n{order:4;flex:1 1 0;min-width:0;font-weight:700;overflow-wrap:anywhere}
.doc-modal.hc-wide .hc-table .hc-act select{order:5;flex:0 0 46%;width:auto;min-width:0}
.doc-modal.hc-wide .hc-table td.hc-v{order:6;flex:1 1 100%}
.doc-modal.hc-wide .hc-table td.hc-v br{display:none}
.doc-modal.hc-wide .hc-table td.hc-v small{margin-left:6px}
.doc-modal.hc-wide .hc-table td.hc-w{order:7;flex:1 1 100%;overflow-wrap:anywhere}
.doc-modal.hc-wide .hc-table .hc-act input{order:9;flex:1 1 0;width:auto;min-width:0}
.doc-modal.hc-wide .hc-table .hc-act button{order:10;flex:none;width:auto;min-width:64px;padding:0 12px}
.doc-modal.hc-wide .hc-table .hc-act select,.doc-modal.hc-wide .hc-table .hc-act input,.doc-modal.hc-wide .hc-table .hc-act button{min-height:44px;box-sizing:border-box}
.doc-modal.hc-wide .hc-table .hc-act select,.doc-modal.hc-wide .hc-table .hc-act input{border:1px solid var(--line);border-radius:var(--r-btn);background-color:var(--card,#fff);color:var(--ink);padding:0 10px;font-size:var(--fs-m)}
.doc-modal.hc-wide .hc-table .hc-act select{-webkit-appearance:none;appearance:none;padding-right:26px;text-overflow:ellipsis;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23566079' stroke-width='2'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center}

/* 일마감 요약표: 가로로 넘치지 않게 — 제목 칸 + 내용 칸, 내용은 줄바꿈 */
body.shell #main table.daily-rep,body.shell #main table.daily-rep tbody{display:block;width:100%}
body.shell #main table.daily-rep tr{display:grid;grid-template-columns:104px minmax(0,1fr);border-bottom:1px solid var(--line)}
body.shell #main table.daily-rep th,body.shell #main table.daily-rep td{display:block!important;width:auto!important;min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere;border-bottom:0}
/* 집계 칩(작업자·구분)도 누르기 쉬운 높이 */
body.shell #main .chip-btn{min-height:44px}

/* 한 줄 입력 + 저장 (월 공임 목표 등): 레이블이 길어도 화면 밖으로 나가지 않게 레이블 → 입력칸+저장 순으로 */
body.shell #main .filters>label:not(:has(input[type=checkbox])):not(:has(input[type=radio])){display:flex;flex-direction:column;align-items:stretch;gap:6px;flex:1 1 100%;min-width:0}
body.shell #main .filters>label:not(:has(input[type=checkbox])):not(:has(input[type=radio]))>input,body.shell #main .filters>label:not(:has(input[type=checkbox])):not(:has(input[type=radio]))>select{width:100%;min-width:0;box-sizing:border-box;flex:none;height:44px}
/* 카드로 바뀐 표는 안쪽 스크롤 없이 길게 펼친다(마지막 카드가 잘려 보이지 않게) */
body.shell #main .table-wrap:has(.m-cards){max-height:none!important;overflow:visible}
body.shell #main table.m-cards td:empty{display:none!important}   /* 값이 없는 칸은 라벨만 덩그러니 남지 않게 */
#main .cal-cell.today .cal-num,#main .cal-cell.today .cal-num.sun{color:#fff!important}   /* 오늘이 일요일이어도 파란 동그라미 안 글자는 흰색 */
/* 탭 줄: 탭이 줄어들어 글자가 서로 겹치지 않게 — 넘치면 옆으로 쓸어서 넘긴다 */
body.shell #main .tabs>*,body.shell #main .wo-tabs>*,body.shell #main .set-nav>*,body.shell #main .set-menu>*{flex:0 0 auto}

/* 예약 목록 카드: 3줄 (예약일·상태·열기 / 고객·연락처·차량 / 용건·담당·안내) */
body.shell #main table.m-cards tr:has(td.ap-dt){display:flex!important;flex-wrap:wrap;align-items:center;gap:4px 8px}
body.shell #main table.m-cards tr:has(td.ap-dt)::after{content:"";order:4;flex:1 1 100%;height:0;margin-top:-4px}
body.shell #main table.m-cards tr:has(td.ap-dt)::before{content:"";order:8;flex:1 1 100%;height:0;margin-top:-4px}
body.shell #main table.m-cards td.ap-dt,body.shell #main table.m-cards td.ap-c,body.shell #main table.m-cards td.ap-p,body.shell #main table.m-cards td.ap-v,body.shell #main table.m-cards td.ap-u,body.shell #main table.m-cards td.ap-m,body.shell #main table.m-cards td.ap-s,body.shell #main table.m-cards td.ap-sms,body.shell #main table.m-cards td.ap-r,body.shell #main table.m-cards td.ap-o{display:block!important;width:auto;min-width:0;padding:0;border:0;justify-content:flex-start}
body.shell #main table.m-cards td.ap-dt::before,body.shell #main table.m-cards td.ap-c::before,body.shell #main table.m-cards td.ap-p::before,body.shell #main table.m-cards td.ap-v::before,body.shell #main table.m-cards td.ap-u::before,body.shell #main table.m-cards td.ap-m::before,body.shell #main table.m-cards td.ap-s::before,body.shell #main table.m-cards td.ap-sms::before,body.shell #main table.m-cards td.ap-r::before,body.shell #main table.m-cards td.ap-o::before{display:none!important}
body.shell #main td.ap-dt{order:1;flex:none;font-size:var(--fs-m);white-space:nowrap}
body.shell #main td.ap-s{order:2;flex:none}
body.shell #main td.ap-m,body.shell #main td.ap-u{text-align:left}
body.shell #main td.ap-o{order:3;margin-left:auto;flex:none}
body.shell #main td.ap-c{order:5;flex:none;font-weight:700}
body.shell #main td.ap-p{order:6;flex:none;color:var(--lbl);font-size:var(--fs-s)}
body.shell #main td.ap-v{order:7;margin-left:auto;flex:none;font-weight:700}
body.shell #main td.ap-u{order:9;flex:1 1 0;overflow-wrap:anywhere}
body.shell #main td.ap-m{order:10;flex:none;color:var(--lbl);font-size:var(--fs-s)}
body.shell #main td.ap-sms{order:11;flex:none}
body.shell #main td.ap-r{order:12;flex:none}
body.shell #main table.m-cards td[class*="ap-"].m-blank{display:none!important}
body.shell #main table.m-cards td[class*="ap-"]{text-align:left}
body.shell #main table.m-cards td.ap-u{text-align:left}

/* 고객 정보 카드: 레이블 칸 없이 값만 — 날짜·동의·사업자·담당자만 앞에 짧은 말머리 */
#custDetail .kv{display:flex!important;flex-wrap:wrap;align-items:baseline;gap:2px 12px;padding:8px 10px}
#custDetail .kv>.k{display:none!important}
#custDetail .kv>div{flex:none;padding:0!important;background:transparent!important;border:0!important}
#custDetail .kv>.wide{flex:1 1 100%}
#custDetail .kv .kv-code{font-weight:700}
#custDetail .kv .kv-date::before{content:"등록 ";color:var(--lbl)}
#custDetail .kv .kv-biz::before{content:"사업자 ";color:var(--lbl)}
#custDetail .kv .kv-contact::before{content:"담당 ";color:var(--lbl)}
#custDetail .kv .consent-date{display:inline!important;margin-left:2px}

/* 상세 화면: 제목줄의 ← 와 이름 (본문의 ← 목록 카드는 숨김) */
body.shell #main .bench-top[data-mback]{display:none}
.m-bar #mBackBtn{flex:none;width:44px;min-width:44px;height:44px;margin:0 0 0 -6px;padding:0;border:0;background:transparent;color:#fff;font-size:26px;line-height:1}
.m-bar #mBackBtn[hidden]{display:none}
/* 고객 상세 '차량' 탭: 카드마다 입고 버튼 + 더보기 */
#custDetail .veh-acts{grid-column:1/-1;display:flex;gap:8px;align-items:center;margin-top:8px}
#custDetail .veh-acts>.vb{flex:1 1 0;min-height:44px;justify-content:center}
#custDetail .veh-acts .ovf{flex:none}
#custDetail .veh-chips{margin:0 0 8px;display:flex;gap:6px;flex-wrap:wrap}
#custDetail .detail-head .actions{display:flex;gap:8px;align-items:center}
#custDetail .tabs{position:sticky;top:0;z-index:5;background:var(--c-cust,#eef3ff)}
#custDetail .veh-chips .chip-btn{font-size:var(--fs-s)!important}

/* 고객 상세 머리: 등급 배지는 아이콘 아래에 겹쳐, 고객구분은 이름 옆에 */
#custDetail .detail-head .avatar{position:relative;overflow:visible}
#custDetail .detail-head .av-grade{display:block;position:absolute;left:50%;bottom:-8px;transform:translateX(-50%);white-space:nowrap}
#custDetail .detail-head .cust-type{display:inline-block;padding:2px 8px;border-radius:999px;background:#eef1f8;color:var(--lbl);font-size:var(--fs-s);font-weight:600;vertical-align:middle}
#custDetail .detail-head .h-grade{display:none}
/* 정보 카드: 등록일 · (우측) 마케팅 동의 / 최근 입고 · 입고 횟수 · 매출 — 고객번호·고객구분·주소는 두지 않는다 */
#custDetail .kv .kv-code,#custDetail .kv .kv-type,#custDetail .kv .kv-addr{display:none!important}
#custDetail .kv .kv-date{flex:1 1 auto}
#custDetail .kv .kv-consent{margin-left:auto}
#custDetail .kv .kv-consent .cv-pc{display:none}
#custDetail .kv .kv-consent .cv-m{display:inline}
#custDetail .kv .kv-total{flex:1 1 100%}
/* 보유 차량: 제목 오른쪽에 차량 추가, 카드는 한 줄에 하나 */
#custDetail .veh-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
#custDetail .veh-head h3{margin:0}
#custDetail .veh-list{display:grid!important;grid-template-columns:1fr!important}
#custDetail .detail-head .avatar{width:52px;height:52px;margin-bottom:10px;font-size:26px}
#custDetail .detail-head .av-grade{bottom:-12px}
#custDetail .detail-head .av-grade .badge{font-size:var(--fs-xs)!important;padding:0 7px;line-height:18px;min-height:0;box-shadow:0 0 0 2px #fff}

/* 차량 탭 카드 정돈: 왼쪽 차량 이미지 · 오른쪽 번호판(+대표 배지) / 차종 / 연식·주행거리, 아래에 입고(넓게) + 더보기 */
#custDetail .veh-list .veh{flex:none!important;display:grid!important;grid-template-columns:88px minmax(0,1fr)!important;grid-template-rows:auto auto!important;column-gap:12px!important;row-gap:10px!important;align-content:start!important;padding:12px!important;overflow:hidden}
#custDetail .veh-list .veh .thumb{grid-column:1!important;grid-row:1!important;align-self:center;width:88px!important;height:auto!important;display:block}
#custDetail .veh-list .veh .thumb .car-thumb{width:88px!important;height:58px!important}
#custDetail .veh-list .veh>div:not(.thumb):not(.veh-acts){display:block!important;grid-column:2!important;grid-row:1!important;min-width:0;align-self:center}
#custDetail .veh-list .veh .t{display:block;grid-column:auto!important;grid-row:auto!important;font-size:var(--fs-xl);font-weight:800;line-height:1.2;letter-spacing:.01em}
#custDetail .veh-list .veh .t .badge{display:inline-block!important;width:auto!important;margin:0 0 0 8px!important;padding:2px 8px!important;font-size:var(--fs-xs)!important;vertical-align:middle}
#custDetail .veh-list .veh>div:not(.thumb) .s:nth-of-type(2){display:block!important;grid-column:auto!important;grid-row:auto!important;margin-top:4px;font-size:var(--fs-m)!important;color:var(--ink);white-space:normal!important}
#custDetail .veh-list .veh>div:not(.thumb) .s:nth-of-type(3){display:block!important;grid-column:auto!important;grid-row:auto!important;margin-top:2px;font-size:var(--fs-s)!important;color:var(--lbl);white-space:normal!important}
#custDetail .veh-list .veh .veh-acts{grid-column:1/-1!important;grid-row:2!important;margin-top:0}
#custDetail .veh-list .veh .veh-acts>.vb.primary{flex:2 1 0}
#custDetail .veh-list .veh .veh-acts .ovf{flex:1 1 0}
#custDetail .veh-list .veh .veh-acts .ovf-btn{width:100%}
#custDetail .veh-list .veh .veh-acts>.vb{flex:2 1 0!important;width:auto!important;min-width:0}
#custDetail .veh-list .veh .veh-acts>.ovf{flex:1 1 0!important}
#custDetail .veh-list .veh>.veh-acts{display:flex!important}

/* 보유 차량은 탭 밖, 고객 정보 바로 아래에 따로. 마케팅 동의 표시는 두지 않는다(미동의면 문자발송 버튼이 꺼짐) */
#custDetail .kv .kv-consent{display:none!important}
#custDetail .veh-sec{margin:0 0 6px}
#custDetail #smsCust:disabled{opacity:.45}

/* 보유 차량: 한 번에 카드 하나(2대 이상이면 좌우로 쓸어 넘김), 오른쪽에 입고·더보기를 세로 한 줄로, 카드를 누르면 선택/해제 */
#custDetail .veh-list{display:flex!important;flex-wrap:nowrap;gap:8px;overflow-x:auto;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;scrollbar-width:none;grid-template-columns:none!important}
#custDetail .veh-list::-webkit-scrollbar{display:none}
#custDetail .veh-list .veh{flex:0 0 100%!important;scroll-snap-align:center;grid-template-columns:76px minmax(0,1fr) 96px!important;grid-template-rows:auto!important;column-gap:10px!important;row-gap:0!important;box-sizing:border-box}
#custDetail .veh-list.multi .veh{flex:0 0 92%!important}
#custDetail .veh-list .veh.sel{outline:2px solid var(--blue,#2563eb);outline-offset:-2px;background:#e8f0ff}
#custDetail .veh-list .veh .thumb{width:76px!important}
#custDetail .veh-list .veh .thumb .car-thumb{width:76px!important;height:52px!important}
#custDetail .veh-list .veh .t{font-size:var(--fs-l)!important}
#custDetail .veh-list .veh .t .badge{display:block!important;margin:4px 0 0!important;width:max-content!important}
#custDetail .veh-list .veh>.veh-acts{grid-column:3!important;grid-row:1!important;flex-direction:column!important;align-items:stretch;gap:6px}
#custDetail .veh-list .veh .veh-acts>.vb,#custDetail .veh-list .veh .veh-acts>.ovf{flex:none!important;width:100%!important}
#custDetail .veh-list .veh .veh-acts .ovf-btn{min-width:0;width:100%}
#custDetail .veh-hint{margin:0 0 6px}
#custDetail .veh-list .veh>div:not(.thumb) .s:nth-of-type(3){font-size:var(--fs-xs)!important;white-space:nowrap!important;letter-spacing:-.02em}

/* 정비 이력 카드: 정비구분·상태는 오른쪽 끝, 버튼은 수정 → 견적서(명세서) 순으로 오른쪽 정렬 */
#custDetail .cust-hist tr{grid-template-columns:auto auto minmax(0,1fr) auto auto}
#custDetail .cust-hist td:nth-child(3){grid-column:4;grid-row:1;justify-self:end}
#custDetail .cust-hist td:nth-child(7){grid-column:5;grid-row:1;justify-self:end}
#custDetail .cust-hist td:nth-child(6){grid-column:1 / 4;grid-row:3}
#custDetail .cust-hist td:nth-child(8) .btn:last-child{grid-column:4;grid-row:3;justify-self:end}
#custDetail .cust-hist td:nth-child(8) .btn:first-child:not(:last-child){grid-column:5;grid-row:3;justify-self:end}
#custDetail .cust-hist td:nth-child(8) .btn:first-child:last-child{grid-column:5}
/* 차량 카드: 오른쪽 버튼을 작게 줄여 정보 칸을 넓힌다 */
#custDetail .veh-list .veh{grid-template-columns:64px minmax(0,1fr) 72px!important;column-gap:8px!important;padding:10px!important}
#custDetail .veh-list .veh .thumb,#custDetail .veh-list .veh .thumb .car-thumb{width:64px!important}
#custDetail .veh-list .veh .thumb .car-thumb{height:44px!important}
#custDetail .veh-list .veh .veh-acts{gap:4px!important}
#custDetail .veh-list .veh .veh-acts>.vb,#custDetail .veh-list .veh .veh-acts .ovf-btn{min-height:34px!important;height:34px;padding:0 4px!important;font-size:var(--fs-s)!important}
#custDetail .veh-list .veh .veh-acts .vb-ic{display:none}

/* 정비 이력 카드: 차량번호 바로 아래 줄에 차종 */
#custDetail .cust-hist td.h-plate::after{content:attr(data-model);display:block;font-weight:400;font-size:var(--fs-s);color:var(--lbl);margin-top:1px}
#custDetail .cust-hist td:nth-child(1),#custDetail .cust-hist td:nth-child(3),#custDetail .cust-hist td:nth-child(7){align-self:start}

/* 고객 목록 행: 1줄 고객명 · (우측) 등급·구분 / 2줄 전화번호 · (우측) 최근 입고 */
.m-crow{grid-template-columns:minmax(0,1fr) auto!important;grid-template-areas:"n t" "p s"!important;gap:3px 10px!important;padding-right:30px!important}
.m-crow .m-ct{grid-area:t;display:inline-flex;align-items:center;gap:6px;justify-self:end;white-space:nowrap}
.m-crow .m-cp{justify-self:start}
.m-crow .m-cs{justify-self:end;white-space:nowrap}
main.m-t2 .m-crow .m-cs{display:none}
/* 하단 띠 없애기: 화면 맨 아래(홈 표시줄 영역)까지 본문이 이어지고, 마지막 내용이 가려지지 않게 본문 안쪽 여백으로 처리 */
body.shell #content{padding-bottom:0!important}
body.shell main{padding-bottom:calc(14px + var(--safe-b,0px))!important}

/* 전화번호 링크: 눌러서 통화 */
a.tel{color:#1746c4;text-decoration:none;font-weight:inherit;display:inline-block;min-height:44px;line-height:44px;margin:-10px 0}
html[data-skin=dark] a.tel{color:#8db4ff}
.m-crow .m-cp a.tel{display:inline-block;min-height:0;line-height:inherit;margin:0;padding:0;position:relative}
.m-crow .m-cp a.tel::after{content:"";position:absolute;left:-6px;right:-6px;top:-8px;bottom:-8px}   /* 눌러지는 영역만 넉넉하게(행 높이는 그대로) */

/* 고객 상세 머리: 위 줄 = 아이콘 + 이름·구분·전화 / 아래 줄 = 문자발송(넓게) + 더보기 — 이름이 길어도 글자가 세로로 꺾이지 않게 */
#custDetail .detail-head{display:grid!important;grid-template-columns:56px minmax(0,1fr);grid-template-areas:"a i" "x x";gap:10px 12px;align-items:center}
#custDetail .detail-head .avatar{grid-area:a}
#custDetail .detail-head>div:not(.avatar):not(.actions){grid-area:i;min-width:0}
#custDetail .detail-head h2{font-size:var(--fs-xl);line-height:1.25;margin:0;word-break:keep-all;overflow-wrap:anywhere}
#custDetail .detail-head .phone{white-space:nowrap}
#custDetail .detail-head .actions{grid-area:x;display:flex;gap:8px;width:100%}
#custDetail .detail-head .actions #smsCust{flex:1 1 auto;min-height:44px}
#custDetail .detail-head .actions .ovf{flex:none}
/* 정보 카드: 값이 없는 사업자·담당은 줄이고, 줄 안에서 어색하게 꺾이지 않게 */
#custDetail .kv .kv-empty{display:none!important}
#custDetail .kv .kv-last,#custDetail .kv .kv-total{white-space:normal}
/* 차량 카드: 연식·주행거리가 버튼에 가려지지 않게 줄바꿈 허용 */
#custDetail .veh-list .veh>div:not(.thumb) .s:nth-of-type(3){white-space:normal!important}
/* 고객 상세 본문이 화면 높이보다 길어도 잘리지 않고 아래로 스크롤되게 */

/* 고객 상세: 등급·구분 배지는 전화번호 줄 오른쪽 끝, 이름은 넘치면 … */
#custDetail .detail-head .av-grade{display:none!important}
#custDetail .detail-head .h-grade{display:none}
#custDetail .detail-head .phone{display:flex;align-items:center;justify-content:space-between;gap:8px}
#custDetail .detail-head .phone .ph-num{white-space:nowrap}
#custDetail .detail-head .dh-badges{display:inline-flex!important;align-items:center;gap:6px;flex:none;margin-left:auto}
#custDetail .detail-head .dh-badges .cust-type{display:inline-block;padding:2px 8px;border-radius:999px;background:#eef1f8;color:var(--lbl);font-size:var(--fs-xs);font-weight:600}
#custDetail .detail-head .avatar{margin-bottom:0!important}
#custDetail .detail-head h2{white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis;word-break:normal}
/* 고객 상세: 위(이름·정보·차량·탭)는 고정, 이력(탭 내용)만 스크롤 */
body.shell main:has(#custDetail){overflow-y:hidden}
body.shell #custDetail{flex:1 1 auto!important;min-height:0;display:flex;flex-direction:column;overflow:hidden!important}
body.shell #custDetail>.card{flex:1 1 auto!important;min-height:0;display:flex;flex-direction:column;overflow:hidden!important;height:auto!important}
body.shell #custDetail>.card>*{flex:none}
body.shell #custDetail>.card>.cust-tab-body{flex:1 1 auto;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
#custDetail .tabs{position:static}

/* 정비 이력 카드: 정비구분·상태는 오른쪽 끝에 붙여서(버튼과 칸을 나누지 않음), 금액은 왼쪽 / 수정 → 견적서(명세서)는 오른쪽 */
body.shell #custDetail .cust-hist td:nth-child(8){display:flex!important;grid-column:1 / -1;grid-row:3;justify-self:end;flex-direction:row-reverse;justify-content:flex-start;gap:8px}
body.shell #custDetail .cust-hist td:nth-child(8) .btn{grid-column:auto!important;grid-row:auto!important;justify-self:auto!important}
#custDetail .cust-hist td:nth-child(6){grid-column:1 / -1;grid-row:3;justify-self:start;align-self:center}

/* 차량관리 목록 카드: 왼쪽 차량 이미지 · 가운데 번호판/차종/연식·주행거리 · 오른쪽 입고·더보기, 아래에 고객·전화 / 최근 입고·정비 횟수 (고객 상세의 차량 카드와 같은 모양) */
body.shell #main table.veh-table tr{display:grid!important;grid-template-columns:64px max-content minmax(0,1fr) 72px!important;grid-auto-rows:auto;gap:3px 10px!important;align-items:center;padding:12px!important}
body.shell #main table.veh-table td{padding:0!important;min-width:0}
body.shell #main table.veh-table td:nth-child(2),body.shell #main table.veh-table td .car-cell{display:contents!important}
body.shell #main table.veh-table td .car-cell>.car-thumb{grid-column:1;grid-row:1 / 4;width:64px!important;height:44px!important;align-self:center}
body.shell #main table.veh-table td .car-cell>.car-thumb img{object-fit:contain}
body.shell #main table.veh-table td .car-cell>span:not(.car-thumb){display:none}
body.shell #main table.veh-table td .car-cell>span[title]:not(.car-thumb){display:block!important;grid-column:2 / 4;grid-row:2;font-size:var(--fs-m);color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.shell #main table.veh-table td:nth-child(1){grid-column:2 / 4;grid-row:1;font-size:var(--fs-l);font-weight:800;white-space:nowrap}
body.shell #main table.veh-table td:nth-child(1) .badge{display:none}
body.shell #main table.veh-table td:nth-child(3){grid-column:2;grid-row:3;justify-self:start;font-size:var(--fs-xs);color:var(--lbl)}
body.shell #main table.veh-table td:nth-child(3)::after{content:"년식"}
body.shell #main table.veh-table td:nth-child(5),body.shell #main table.veh-table td:nth-child(10){display:block!important}
body.shell #main table.veh-table td:nth-child(5){grid-column:3;grid-row:3;justify-self:start;font-size:var(--fs-xs);color:var(--lbl);text-align:left}
body.shell #main table.veh-table td:nth-child(5)::before{content:"·";margin-right:6px}
body.shell #main table.veh-table td:nth-child(4),body.shell #main table.veh-table td:nth-child(6){display:none!important}
body.shell #main table.veh-table td:nth-child(7){grid-column:1 / 4;grid-row:4;justify-self:start;font-weight:700;margin-top:4px}
body.shell #main table.veh-table td:nth-child(8){grid-column:2 / 5;grid-row:4;justify-self:end;margin-top:4px;color:var(--ink)}
body.shell #main table.veh-table td:nth-child(9){grid-column:1 / 4;grid-row:5;justify-self:start;font-size:var(--fs-xs);color:var(--lbl);text-align:left}
body.shell #main table.veh-table td:nth-child(9)::before{content:"최근 입고 ";display:inline!important}
body.shell #main table.veh-table td:nth-child(10){grid-column:2 / 5;grid-row:5;justify-self:end;font-size:var(--fs-xs);color:var(--lbl);text-align:right}
body.shell #main table.veh-table td:nth-child(10)::before{content:"정비 ";display:inline!important}
body.shell #main table.veh-table td:nth-child(10)::after{content:"회"}
body.shell #main table.veh-table td:nth-child(11){grid-column:4!important;grid-row:1 / 4!important;display:flex!important;flex-direction:column;gap:4px;align-self:center}
body.shell #main table.veh-table td:nth-child(11)>.vb,body.shell #main table.veh-table td:nth-child(11) .ovf-btn{min-height:34px!important;height:34px;padding:0 4px!important;font-size:var(--fs-s)!important;width:100%!important;flex:none!important}
body.shell #main table.veh-table td:nth-child(11) .ovf{width:100%}
body.shell #main table.veh-table td:nth-child(11) .vb-ic{display:none}

/* 차량관리 카드: 3장이 한 화면에, 주행거리는 한 줄로 잘리지 않게 */
body.shell #main table.veh-table tr{grid-template-columns:56px max-content minmax(0,1fr) 64px!important;gap:0 8px!important;padding:8px 10px!important;margin-bottom:6px!important}
body.shell #main table.veh-table td .car-cell>.car-thumb{width:56px!important;height:38px!important}
body.shell #main table.veh-table td{line-height:1.25}
body.shell #main table.veh-table td:nth-child(1){font-size:var(--fs-m)}
body.shell #main table.veh-table td .car-cell>span[title]:not(.car-thumb){font-size:var(--fs-s)}
body.shell #main table.veh-table td:nth-child(3),body.shell #main table.veh-table td:nth-child(5){white-space:nowrap;overflow:visible}
body.shell #main table.veh-table td:nth-child(5)::before{margin-right:4px}
body.shell #main table.veh-table td:nth-child(7),body.shell #main table.veh-table td:nth-child(8){margin-top:2px}
body.shell #main table.veh-table td:nth-child(11){gap:3px}
body.shell #main table.veh-table td:nth-child(11)>.vb,body.shell #main table.veh-table td:nth-child(11) .ovf-btn{min-height:30px!important;height:30px;font-size:var(--fs-xs)!important}
/* 차량관리 카드: 연식이 없으면 주행거리가 연식 자리에서 시작 / 입고·더보기 같은 폭 */
body.shell #main table.veh-table tr:has(td:nth-child(3).m-blank) td:nth-child(5){grid-column:2 / 4;margin-left:0}
body.shell #main table.veh-table tr:has(td:nth-child(3).m-blank) td:nth-child(5)::before{content:none}
body.shell #main table.veh-table tr{grid-template-columns:56px max-content minmax(0,1fr) 72px!important}
body.shell #main table.veh-table td:nth-child(11){justify-self:stretch;width:100%;min-width:0}
body.shell #main table.veh-table td:nth-child(11)>.vb,body.shell #main table.veh-table td:nth-child(11) .ovf-btn,body.shell #main table.veh-table td:nth-child(11) .ovf{box-sizing:border-box;width:100%!important;min-width:0!important;padding:0!important}
