/* Báo giá (quote-desk.mjs, quote-phone.mjs, quote-print.mjs; the drawings the Owner approved 29/10/2026). On top of
   intake-desk.css: the desk is the work window of Tiếp nhận xe (.intake-desk), the windows are its .intake-window. */
.qd-state{display:inline-block;border-radius:10px;padding:1px 8px;font-size:11.5px;font-weight:700;white-space:nowrap;background:#eef1ef;color:#55645b}
.qd-state[data-state=todo]{background:#fdf0d8;color:#8a5a0c}
.qd-state[data-state=waiting]{background:#efe7f6;color:#5b3d86}
.qd-state[data-state=executed]{background:#e2f1e7;color:#22613c}
.qd-state[data-state=extra]{background:#fdf0d8;color:#8a5a0c}
.qd-state[data-state=locked]{background:#e7ebe9;color:#3d4a43}
/* the desk */
#module-panel .quote-desk .qd-chips{display:flex;flex-wrap:wrap;gap:4px}
/* The chips 26 px high (they were 21 px: under the 24 px a finger or a mouse needs; review of Báo giá, Owner 07/11/2026). */
#module-panel .quote-desk .qd-chip{min-height:26px;margin:0;border:1px solid #c5d6cb;border-radius:14px;background:#fff;padding:3px 9px;font-size:11.5px;font-weight:650;color:var(--intake-green-dark);cursor:pointer}
#module-panel .quote-desk .qd-chip[aria-pressed=true]{background:var(--intake-green);border-color:var(--intake-green);color:#fff}
#module-panel .quote-desk .qd-chip b{font-weight:800;margin-left:2px}
#module-panel .quote-desk .intake-desk-row-meta{align-items:center}
#module-panel .quote-desk .qd-empty{padding:30px 16px;border:1px dashed #c7d4cb;border-radius:10px;background:#fff;text-align:center;color:var(--intake-muted)}
#module-panel .quote-desk .intake-desk-rows .qd-empty{border:0;padding:20px 8px}
#module-panel .quote-desk .qd-summary{border:1px solid var(--intake-line);border-radius:10px;background:#fff;padding:9px 12px}
#module-panel .quote-desk .qd-sum-top{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
#module-panel .quote-desk .qd-sum-top strong{font-size:16px}
#module-panel .quote-desk .qd-plate{font-weight:800;font-size:16px;letter-spacing:.3px}
#module-panel .quote-desk .qd-link{margin:0 0 0 auto;min-height:0;padding:0;border:0;background:none;color:var(--intake-green);font-weight:650;font-size:12.5px;text-decoration:underline;cursor:pointer}
#module-panel .quote-desk .qd-line{display:flex;flex-wrap:wrap;gap:2px 16px;margin-top:4px;font-size:12.5px}
#module-panel .quote-desk .qd-line i{font-style:normal;color:var(--intake-muted)}
/* The facts of the car run on (two lines instead of three) and the car's buttons are on the line of the title (quote-desk.mjs
   barInHead): the lines of the quote start 60 px higher (review of Báo giá, Owner 07/11/2026 "Sửa cả 5"). */
#module-panel .quote-desk .qd-summary>.qd-line{display:inline-flex;margin:4px 16px 0 0}
#module-panel .quote-desk .intake-desk-actions{align-items:center;flex-wrap:wrap;justify-content:flex-end}
#module-panel .quote-desk .intake-desk-actions .qd-head-bar:empty{display:none}
#module-panel .quote-desk .intake-desk-actions .intake-toolbar{margin:0;padding:0}
.qd-ok{color:#22613c;font-weight:700;font-size:11.5px}
#module-panel .quote-desk .qd-pane{border:1px solid var(--intake-line);border-radius:10px;background:#fff;padding:10px 12px;display:flex;flex-direction:column;gap:8px;min-height:0;overflow:auto}
#module-panel .quote-desk .qd-fill{flex:1}
/* The lines of the quote: no box scrolling inside the pane (at 1366×768 it held no whole line, at 1440×900 three of thirteen);
   the pane scrolls once, its head row and the totals stay in sight (review of Báo giá, Owner 07/11/2026 "Sửa cả 5"). */
#module-panel .quote-desk .qd-fill .qd-table-wrap{flex:none;overflow:visible}
#module-panel .quote-desk .qd-pane>*{flex-shrink:0}
#module-panel .quote-desk .qd-pane .qd-totals{position:sticky;bottom:-10px;z-index:2;box-shadow:0 -8px 10px #fff}
#module-panel .quote-desk .intake-desk-main{min-height:0}
:is(#module-panel .quote-desk,.intake-window) :is(.qd-meta,.qd-hint){color:var(--intake-muted);font-size:12px}
:is(#module-panel .quote-desk,.intake-window) .qd-warn{padding:8px 12px;border:1px solid #e3c98c;border-radius:8px;background:#fffaf0;color:#6b4a12;font-weight:600}
#module-panel .quote-desk .qd-note{font-size:12.5px;white-space:pre-wrap;overflow-wrap:anywhere}
#module-panel .quote-desk .qd-start h2{font-size:16px;margin-bottom:2px}
#module-panel .quote-desk .qd-start p{color:var(--intake-muted)}
#module-panel .quote-desk .qd-box{border:1px solid #cfe0d5;border-radius:9px;padding:9px 11px;background:#fbfdfc;display:flex;flex-direction:column;gap:8px}
#module-panel .quote-desk .qd-box h3{font-size:12px;letter-spacing:.5px;color:var(--intake-green-dark)}
#module-panel .quote-desk .qd-box h3 span{font-weight:600;letter-spacing:0;color:var(--intake-muted);margin-left:8px}
#module-panel .quote-desk .qd-approved{background:#e9f5ed;border:1px solid #bcdcc7;border-radius:8px;padding:7px 10px;color:#1f5a37;font-size:12.5px;line-height:1.45}
#module-panel .quote-desk .qd-extra{background:#fbf6ea;border:1px solid #e3c98c;border-radius:8px;padding:7px 10px;color:#6b4a12;font-size:12.5px;line-height:1.45}
#module-panel .quote-desk .qd-hold summary{cursor:pointer;color:#6b4a12;background:#fbf6ea;border:1px dashed #d9c391;border-radius:7px;padding:6px 10px;font-size:12.5px;font-weight:650}
#module-panel .quote-desk .qd-hold[open] summary{margin-bottom:6px}
/* tables (the desk and the windows) */
.qd-table-wrap{overflow:auto}
table.qd-table{width:100%;border-collapse:collapse;font-size:12.5px}
.qd-table th{background:#eef4f0;color:#33473c;font-size:11.5px;font-weight:750;text-align:left;padding:6px 7px;border-bottom:1px solid var(--intake-line);white-space:nowrap}
.qd-table thead th{position:sticky;top:0;z-index:1}
.qd-table td{padding:5px 7px;border-bottom:1px solid #e6ece8;vertical-align:top}
table.qd-table td:nth-child(3){font-family:inherit;max-width:none;min-width:0;overflow-wrap:normal}
.qd-table .num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.qd-table .qd-n{color:var(--intake-muted);width:22px;white-space:nowrap}
.qd-desc b{font-weight:650}.qd-desc small{display:block;color:var(--intake-muted);font-size:11.5px;line-height:1.3}
.qd-desc code{margin-left:8px;font-family:ui-monospace,Menlo,Consolas,monospace;font-size:11px;color:#6d7d73;background:#f1f5f2;border-radius:4px;padding:0 4px}
.qd-group th{background:#f6f9f7;color:var(--intake-green-dark);letter-spacing:.3px;font-size:11.5px;position:static}
.qd-group th span{float:right;font-weight:600;color:var(--intake-muted);letter-spacing:0}
.qd-find input[type=checkbox]{width:16px;height:16px;min-height:0;margin:0;padding:0}
.qd-find td:nth-child(4){min-width:170px}
.qd-history td:last-child{white-space:nowrap}
:is(#module-panel .quote-desk,.intake-window) .qd-table .intake-button{min-height:26px;padding:2px 9px;font-size:12px}
/* totals */
.qd-totals{display:grid;grid-template-columns:repeat(4,minmax(0,1fr)) minmax(150px,1.4fr);background:#f5f8f6;border:1px solid var(--intake-line);border-radius:8px;overflow:hidden}
.qd-totals>div{padding:8px 10px;text-align:right}.qd-totals span{display:block;font-size:11px;color:#6e7e74;margin-bottom:2px}
.qd-totals strong{display:block;font-size:13.5px;font-variant-numeric:tabular-nums}
.qd-totals .qd-grand{background:#e2efe6;color:#22613c}.qd-totals .qd-grand strong{font-size:17px}
.qd-totals small{grid-column:1/-1;font-size:11.5px;padding:5px 10px;border-top:1px solid var(--intake-line);color:#6e7e74}
.qd-totals small.qd-err,.qd-err{color:var(--intake-red)}
:is(#module-panel .quote-desk,.intake-window) .qd-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
:is(#module-panel .quote-desk,.intake-window) .qd-actions.end{justify-content:flex-end}
/* the windows: Lập / Sửa báo giá over the whole page; the dialogs in the middle */
.intake-window.qd-window{width:calc(100vw - 28px);height:calc(100dvh - 28px);max-width:none;max-height:none;background:#fff}
.intake-window.qd-dialog{width:min(640px,calc(100vw - 24px))}
.intake-window.qd-picker{width:min(820px,calc(100vw - 24px))}
.intake-window.qd-preview{width:min(900px,calc(100vw - 24px));height:calc(100dvh - 24px)}
.intake-window :is(.qd-pop-body,.qd-win-body){display:flex;flex-direction:column;gap:9px;background:#fff}
.intake-window .qd-pop-body{flex:1;min-height:0;overflow:auto;padding:12px 16px}
.intake-window .qd-win-body{padding:10px 14px}
/* ＋ Phụ tùng / ＋ Công / Lấy thêm từ kết quả kiểm tra stay at the foot of the lines while they scroll: a long quote hid them
   under the totals at 1366×768 (review of Báo giá, Owner 07/11/2026 "Sửa cả 5"). The phone keeps them on top (below). */
@container (min-width:601px){.intake-window .qd-win-body>.qd-actions{position:sticky;bottom:-10px;z-index:2;margin:0;padding:8px 0;background:#fff;box-shadow:0 -6px 10px #fff}}
.intake-window .qd-win-foot{border-top:1px solid var(--intake-line);padding:10px 14px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:end;background:#fbfdfc}
.intake-window .qd-win-foot .qd-err{margin-top:4px;font-weight:600}
.qd-edit td{padding:3px;vertical-align:middle}.qd-edit th{padding:5px 4px;font-size:11px}
.intake-window .qd-edit :is(input,select){min-height:28px;padding:3px 6px;font-size:12.5px}
.intake-window .qd-edit input.num{text-align:right}
/* The columns: # Loại Nhóm Phân công Mã Nội dung Triệu chứng ĐVT SL Đơn giá CK Thuế HOLD Thành tiền ✕ (Phân công hidden before
   schema/quote-teams.sql: .qd-no-teams). */
.qd-edit th:nth-child(2){width:92px}.qd-edit th:nth-child(3){width:140px}.qd-edit th:nth-child(4){width:188px}.qd-edit th:nth-child(5){width:120px}.qd-edit th:nth-child(6){width:auto}.qd-edit th:nth-child(7){width:170px}
.qd-edit th:nth-child(8){width:48px}.qd-edit th:nth-child(9){width:52px}.qd-edit th:nth-child(10){width:96px}.qd-edit th:nth-child(11),.qd-edit th:nth-child(12){width:46px}.qd-edit th:nth-child(13){width:40px}.qd-edit th:nth-child(14){width:90px}.qd-edit th:nth-child(15){width:92px}
.qd-edit.qd-no-teams :is(th,td):nth-child(4){display:none}
.qd-desc small.qd-team{color:#294c3d;font-weight:700}
/* VIN-003 (Owner 31/10/2026 "1A 2A"): the car record's VIN marked in the summary; one line to type a VIN when none. */
.qd-src{color:#5d6f64;font-weight:600;font-size:.92em}
.qd-vin-line{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;margin-top:12px;padding:10px 12px;border:1px solid #e3c98f;border-radius:10px;background:#fffaf0}
.qd-vin-line>b{color:#9a3412}
.qd-vin-line input{flex:1 1 220px;min-width:0;height:38px;border:1px solid #c5d6cb;border-radius:8px;padding:0 10px;font:inherit;text-transform:uppercase}
.qd-vin-line input::placeholder,.qp-vin input::placeholder{text-transform:none}
.qd-vin-line .qd-err{flex-basis:100%;margin:0}.qd-vin-line .qd-err:empty{display:none}
.qp-vin{display:block;margin-top:10px;font-weight:700}
.qp-vin input{display:block;width:100%;box-sizing:border-box;min-height:48px;margin-top:6px;border:1.5px solid #c5d6cb;border-radius:11px;padding:0 12px;font:inherit;font-size:16px;font-weight:600;text-transform:uppercase}
.qd-edit .qd-c{text-align:center}
.intake-window .qd-edit input[type=checkbox]{display:inline-block;width:16px;height:16px;min-height:0;padding:0}
.qd-edit select{padding-right:2px}
.qd-code-in{display:flex;gap:3px}
.intake-window .qd-dots{flex:none;width:26px;height:28px;padding:0;border:1px solid #b9c8be;border-radius:5px;background:#eef4f0;color:var(--intake-green-dark);font-weight:800;cursor:pointer}
.intake-window .qd-del{width:24px;height:24px;padding:0;border:1px solid #d9c6c1;border-radius:12px;background:#fff;color:var(--intake-red);font-size:11px;cursor:pointer}
.qd-from{display:inline-block;margin-left:3px;font-size:9.5px;font-weight:800;color:#5b3d86;background:#efe7f6;border-radius:6px;padding:0 4px;vertical-align:1px}
.qd-from.qd-ai{color:#fff;background:#7a5aa0}
.qd-pair{color:#7a8a80;margin-right:2px;font-weight:700}
.qd-legend{margin-left:auto;color:var(--intake-muted);font-size:12px}
.qd-held td{background:#fbf6ea}.qd-held .qd-lt{color:#8a5a0c;font-weight:800}
.qd-lt{font-weight:700}
.intake-window .qd-note-in{display:block}
.intake-window .qd-note-in span{display:block;font-size:12px;font-weight:700;color:var(--intake-muted);margin-bottom:3px}
.intake-window .qd-note-in textarea{min-height:46px}
/* Ghi nhận khách duyệt */
.intake-window .qd-exec-wrap{max-height:46dvh;overflow:auto}.intake-window .qd-exec{width:100%}.intake-window .qd-exec td{padding:6px 10px;font-size:13px}
.qd-exec-sum{text-align:right;font-size:13.5px}
/* Ngày giao xe in Thực hiện báo giá (Owner 07/11/2026): Hẹn giao of the RO, printed on the Lệnh sửa chữa. */
.qd-exec-due{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;margin:8px 0;padding:8px 12px;border:1px solid #d9e1dc;border-radius:8px;background:#f6f9f7}
#module-panel .qd-exec-due label,.qd-exec-due label{display:inline;margin:0;font-size:14px;font-weight:750;color:#1d2b23}
#module-panel .qd-exec-due input,.qd-exec-due input{display:inline-block;width:auto;min-height:36px;margin:0;padding:5px 9px;font-size:14px}
.qd-exec-due .qd-hint{margin:0}
#module-panel .quote-phone .qp-exec-due{display:grid;gap:4px;margin:10px 0;font-size:14px;font-weight:700}
#module-panel .quote-phone .qp-exec-due input{width:100%;min-height:44px;margin:0;font-size:16px}
/* "…" Danh mục */
.qd-pick-filters{display:grid;grid-template-columns:1fr 200px auto;gap:8px;align-items:center}
.intake-window .qd-pick-filters label{display:flex;gap:5px;align-items:center;white-space:nowrap}
.intake-window .qd-pick-filters input[type=checkbox]{width:16px;height:16px;min-height:0;padding:0}
.qd-pick tbody tr{cursor:pointer}.qd-pick tbody tr:hover td{background:#f3f8f5}
.qd-picked td,.qd-pick tbody tr.qd-picked:hover td{background:#e3efe7;font-weight:650}
/* the A4 seen on screen */
.intake-window .qd-preview-body{background:#e9eeeb;padding:16px}
.intake-window .qd-preview-body .quote-print-sheet{max-width:794px;margin:0 auto;padding:28px 34px;box-shadow:0 2px 12px #0002}
.intake-window .qd-preview-foot{padding:10px 16px;border-top:1px solid var(--intake-line);background:#fff}
@media(max-width:1100px){.qd-totals{grid-template-columns:repeat(2,minmax(0,1fr))}.qd-totals .qd-grand{grid-column:1/-1}}

/* BẢNG BÁO GIÁ (quote-print.mjs): on paper and in Xem bản in A4. The page's own header/section rules (mobile.css) do not reach it. */
:is(header,section,footer,h2,h3,p,dl,dd,div):where(.quote-print-sheet,.quote-print-sheet *){margin:0;padding:0;border:0;border-radius:0;background:none;color:inherit;box-shadow:none;letter-spacing:normal}
.quote-print-sheet{display:block;color:#111;background:#fff;font-family:Arial,sans-serif;font-size:12px;line-height:1.4}
.quote-print-masthead{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:16px}
.quote-print-masthead strong{font-size:13px}.quote-print-masthead p{margin:3px 0;font-size:10px}.quote-print-masthead img{width:170px;height:auto;object-fit:contain}
.quote-print-title{display:flex;justify-content:space-between;align-items:center;gap:15px;border-bottom:2px solid #415c4b;padding-bottom:10px;margin-bottom:12px}
.quote-print-title h2{margin:0;font-size:24px}.quote-print-title>div{text-align:right}.quote-print-title strong{display:block;font-size:16px}.quote-print-title span{font-size:10px}
.quote-print-parties{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:10px}
.quote-print-box{display:block;border:1px solid #89958e;min-width:0}
.quote-print-box h3{background:#e9edea;border-bottom:1px solid #89958e;margin:0;padding:5px 7px;font-size:11px}
.quote-print-box dl{display:grid;grid-template-columns:92px minmax(0,1fr);margin:0;padding:6px 8px;gap:4px 8px}
.quote-print-box dt{color:#5c685f;font-size:10px}.quote-print-box dd{margin:0;overflow-wrap:anywhere;font-weight:600}
.quote-print-vehicle dl{grid-template-columns:90px minmax(0,1fr) 95px minmax(0,1fr)}
.quote-print-request{margin:10px 0;white-space:pre-wrap;overflow-wrap:anywhere}
.quote-print-symptoms{margin-top:4px;font-size:.95em;white-space:pre-wrap;overflow-wrap:anywhere}
.quote-print-lines{width:100%;border-collapse:collapse;font-size:11px;margin:12px 0;table-layout:fixed}
.quote-print-lines th,.quote-print-lines td{border:1px solid #929d96;padding:7px 5px;vertical-align:top;overflow-wrap:anywhere;font-family:inherit;max-width:none;min-width:0}
.quote-print-lines th{background:#e9edea;font-size:10px;text-align:center}
.quote-print-lines th:first-child{width:5%}.quote-print-lines th:nth-child(2){width:40%}.quote-print-lines th:nth-child(3){width:6%}
.quote-print-lines th:nth-child(4),.quote-print-lines th:nth-child(5),.quote-print-lines th:nth-child(6){width:6%}.quote-print-lines th:nth-child(7){width:14%}.quote-print-lines th:nth-child(8){width:17%}
.quote-print-number{text-align:right;font-variant-numeric:tabular-nums}
.quote-print-lines .quote-print-group th{width:auto;text-align:left;letter-spacing:.03em;background:#e9edea}
.quote-print-subtotal td{background:#f5f7f5;font-weight:700}.quote-print-subtotal td:first-child{text-align:right}
.quote-print-bottom{display:block}
.quote-print-sums{display:grid;grid-template-columns:1fr auto;gap:5px 30px;max-width:350px;margin:12px 0 14px auto}
.quote-print-sums dd{text-align:right;margin:0;font-weight:700}
.quote-print-sums dt:nth-last-child(2),.quote-print-sums dd:last-child{border-top:1px solid #88978d;padding-top:6px;font-size:14px;font-weight:700}
.quote-print-note{margin-top:4px;font-size:10px;white-space:pre-wrap;overflow-wrap:anywhere}
.quote-print-signatures{display:grid;grid-template-columns:1fr 1fr;gap:30px;text-align:center;margin-top:24px;min-height:110px}
.quote-print-signatures p{font-size:11px;margin:10px 0}.quote-print-signatures>div:last-child p{font-style:italic;color:#68756d}
.quote-print-footer{display:block;border-top:1px solid #acb7b0;padding-top:8px;font-size:9px;color:#77837b}
/* QUYẾT TOÁN SỬA CHỮA printed as the quote (settlement-print.mjs): its two bold totals, the amount in words, three signatures. */
/* Điều khoản báo giá on the screen (schema/quote-terms.sql): under the note; in Sửa báo giá one box a line with ↑ ↓ ✕. */
.qd-terms{margin:10px 0;padding:8px 12px;border:1px solid var(--intake-line,#d5ddd8);border-radius:6px;background:#f6f8f7;font-size:13px}
.qd-terms>b{display:block;font-size:12px;letter-spacing:.03em;margin-bottom:4px}.qd-terms ol{margin:0;padding-left:20px}.qd-terms li{margin:2px 0;overflow-wrap:anywhere}
.qd-terms-in{display:grid;gap:6px;margin-top:10px}.qd-terms-in[hidden]{display:none}
.qd-terms-title{font-weight:600;font-size:13px}
.qd-terms-in ol{margin:0;padding-left:22px;display:grid;gap:4px}
.qd-terms-in li{display:grid;grid-template-columns:minmax(0,1fr) auto auto auto;gap:4px;align-items:center}
.qd-terms-in li input{min-width:0;width:100%;box-sizing:border-box;padding:6px 8px;font:inherit;border:1px solid var(--intake-line,#c7d1cb);border-radius:4px}
.qd-term-move{min-width:32px;min-height:32px;margin:0;padding:0 6px;border:1px solid var(--intake-line,#c7d1cb);border-radius:4px;background:#fff;color:var(--intake-ink,#1d2f26);font:inherit;font-size:14px;font-weight:600;line-height:1;cursor:pointer}
.qd-term-move:disabled{opacity:.35;cursor:default}
/* Điều khoản (schema/quote-terms.sql): bottom left beside the totals, as Carsoft prints it; the totals alone at the right. */
.quote-print-closing{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:20px;align-items:start;margin:12px 0 14px}
.quote-print-closing>.quote-print-sums{margin:0 0 0 auto;grid-column:2}
.quote-print-terms{border:1px solid #88978d;border-radius:4px;padding:7px 10px 8px;font-size:10.5px;line-height:1.4;break-inside:avoid}
.quote-print-terms h3{margin:0 0 4px;font-size:10.5px;letter-spacing:.02em}
.quote-print-terms ol{margin:0;padding-left:17px}.quote-print-terms li{margin:1px 0;overflow-wrap:anywhere}
.quote-print-sums .quote-print-strong{border-top:1px solid #88978d;padding-top:6px;font-size:14px;font-weight:700}
.quote-print-words{margin:0 0 6px;font-size:11px;font-style:italic}
.quote-print-signatures.quote-print-signatures-3{grid-template-columns:repeat(3,minmax(0,1fr))}
/* The quote: the customer first (its hint in grey italics), Phòng dịch vụ and the name of who saved on the right. */
.quote-print-signatures-customer-first>div:first-child p{font-style:italic;color:#68756d}.quote-print-signatures-customer-first>div:last-child p{font-style:normal;color:inherit}
.quote-print-signatures-3>div:nth-child(2) p{font-style:italic;color:#68756d}
.quote-print-signatures>div p.quote-print-ack{font-size:9.5px;line-height:1.35;font-style:italic;color:#1f2a24;margin:6px auto 0;max-width:62mm}
/* BÁO GIÁ SỬA CHỮA as Carsoft's (quote-print.mjs; Owner 10/11/2026, "ok in bg 1B 2A 3B"): nine columns, rows as tight as Carsoft's
   (a short quote on one A4), LƯU Ý under the lines, the amount in words at the right, the signatures with their words and the
   name of who saved at the foot of Phòng dịch vụ. */
.quote-print-quote .quote-print-masthead{margin-bottom:6px}.quote-print-quote .quote-print-masthead img{width:135px}
.quote-print-quote .quote-print-title{padding-bottom:5px;margin-bottom:7px}.quote-print-quote .quote-print-title h2{font-size:22px}
.quote-print-quote .quote-print-parties{margin-bottom:8px}
.quote-print-quote .quote-print-box h3{padding:4px 7px}
.quote-print-quote .quote-print-box dl{padding:4px 8px;gap:2px 8px}
.quote-print-quote .quote-print-request{margin:6px 0}
.quote-print-quote .quote-print-lines{margin:8px 0}
.quote-print-quote .quote-print-lines th,.quote-print-quote .quote-print-lines td{padding:2px 4px;line-height:1.25}
.quote-print-lines-quote th:first-child{width:5%;white-space:nowrap}.quote-print-lines-quote th:nth-child(2){width:32%}.quote-print-lines-quote th:nth-child(3){width:6%}
.quote-print-lines-quote th:nth-child(4){width:5%}.quote-print-lines-quote th:nth-child(5){width:11%}.quote-print-lines-quote th:nth-child(6){width:12%}
.quote-print-lines-quote th:nth-child(7){width:10%}.quote-print-lines-quote th:nth-child(8){width:13%}.quote-print-lines-quote th:nth-child(9){width:6%}
.quote-print-notes{display:block;border:1px solid #88978d;border-radius:4px;padding:5px 10px 6px;margin:0 0 8px;font-size:10.5px;line-height:1.4;break-inside:avoid}
.quote-print-notes h3{margin:0 0 3px;font-size:10.5px;letter-spacing:.02em}
.quote-print-notes ol{margin:0;padding-left:17px}.quote-print-notes li{margin:1px 0;overflow-wrap:anywhere}
.quote-print-quote .quote-print-closing{margin:6px 0 4px}.quote-print-quote .quote-print-sums{gap:3px 24px}
.quote-print-quote .quote-print-sums dt:nth-last-child(2),.quote-print-quote .quote-print-sums dd:last-child{padding-top:4px}
.quote-print-words.quote-print-words-total{text-align:right;font-weight:700;margin:0 0 4px}
.quote-print-signatures.quote-print-signatures-quote{margin-top:8px;min-height:80px}
.quote-print-signatures.quote-print-signatures-quote>div{display:flex;flex-direction:column;align-items:center}
.quote-print-signatures.quote-print-signatures-quote>div p.quote-print-sign-hint{margin:3px 0 0;font-size:9.5px;font-style:italic;color:#68756d}
.quote-print-signatures.quote-print-signatures-quote>div p.quote-print-sign-name{margin:auto 0 0;font-size:11px;font-style:normal;color:inherit;font-weight:600}
@media print{
  .intake-print-root .quote-print-quote .quote-print-bottom{break-inside:avoid}
  .intake-print-root .quote-print-sheet{padding:0;font-size:9.5pt}
  .intake-print-root .quote-print-lines th,.intake-print-root .quote-print-box h3,.intake-print-root .quote-print-subtotal td{print-color-adjust:exact;-webkit-print-color-adjust:exact}
  .intake-print-root .quote-print-lines tr,.intake-print-root .quote-print-box,.intake-print-root .quote-print-signatures,.intake-print-root .quote-print-sums{break-inside:avoid}
  .intake-print-root .quote-print-lines thead{display:table-header-group}
}

/* LỆNH SỬA CHỮA and PHIẾU YÊU CẦU PHỤ TÙNG as Carsoft's (carsoft-print.mjs, repair-print.mjs, stock-print.mjs;
   PLAN-PHIEU-IN-CARSOFT-001): Times New Roman, bordered tables, one A4. The page's own rules (mobile.css) do not reach it. */
:is(header,section,footer,h1,h2,h3,p,dl,dd,dt,div,ul,li,table,th,td):where(.cs-sheet,.cs-sheet *){margin:0;padding:0;border:0;border-radius:0;background:none;color:inherit;box-shadow:none;min-height:0;max-width:none;letter-spacing:normal}
.cs-sheet{display:block;color:#000;background:#fff;font-family:"Times New Roman",Times,serif;font-size:12.5px;line-height:1.25}
.cs-head{display:grid;grid-template-columns:170px 1fr;border:1px dotted #555;border-bottom:1.5px solid #000}
.cs-logo{display:grid;place-items:center;padding:6px;border-right:1px solid #000}.cs-logo img{width:150px;height:auto}
.cs-co{padding:4px 10px;text-align:center}.cs-co>b{font-size:16.5px}
.cs-co .cs-row{display:flex;justify-content:space-between;gap:12px;padding:0 6px}
.cs-title{display:grid;grid-template-columns:190px 1fr 190px;align-items:start;margin:6px 0 5px}
.cs-title h1{grid-column:2;margin:0;text-align:center;font-size:23px;font-weight:700;white-space:nowrap}
.cs-title dl{grid-column:3;display:grid;grid-template-columns:auto 1fr;gap:2px 8px;font-size:14px;font-weight:700}.cs-title dd{margin:0}.cs-title .cs-light{font-weight:400}
.cs-sheet table.cs-table{width:100%;border-collapse:collapse;table-layout:fixed}
.cs-sheet .cs-table :is(th,td){border:1px solid #000;padding:1px 4px;vertical-align:top;text-align:left;overflow-wrap:anywhere;font-family:inherit;font-size:inherit}
.cs-sheet .cs-table th{font-weight:700;text-align:center;vertical-align:middle}
.cs-sheet .cs-table td.cs-c{text-align:center}.cs-sheet .cs-table td.cs-k{white-space:nowrap}
.cs-sheet .cs-group td{background:#ececec;font-weight:700}
/* The columns (as the drawings): lệnh — xe / khách; I. STT Mã Tên ĐVT SL Phân công KTV Ghi chú; II.; phiếu — khách / xe; TT Mã Tên Đvt Yêu cầu Thực nhận Ghi chú Ký nhận. */
.cs-ro-info col:nth-child(1){width:29%}.cs-ro-info col:nth-child(2){width:21%}.cs-ro-info col:nth-child(3){width:50%}
.cs-ro-lines col:nth-child(1){width:5%}.cs-ro-lines col:nth-child(2){width:11%}.cs-ro-lines col:nth-child(3){width:31%}.cs-ro-lines col:nth-child(4){width:6%}
.cs-ro-lines col:nth-child(5){width:5%}.cs-ro-lines col:nth-child(6){width:12%}.cs-ro-lines col:nth-child(7){width:19%}.cs-ro-lines col:nth-child(8){width:11%}
.cs-extra col:nth-child(1){width:5%}.cs-extra col:nth-child(2){width:42%}.cs-extra col:nth-child(3){width:9%}.cs-extra col:nth-child(4),.cs-extra col:nth-child(5){width:13%}.cs-extra col:nth-child(6){width:18%}
.cs-px-info col:nth-child(1){width:13%}.cs-px-info col:nth-child(2){width:50%}.cs-px-info col:nth-child(3){width:14%}.cs-px-info col:nth-child(4){width:10%}.cs-px-info col:nth-child(5){width:13%}
.cs-px-lines col:nth-child(1){width:5%}.cs-px-lines col:nth-child(2){width:14%}.cs-px-lines col:nth-child(3){width:29%}.cs-px-lines col:nth-child(4){width:6%}
.cs-px-lines col:nth-child(5),.cs-px-lines col:nth-child(6){width:8%}.cs-px-lines col:nth-child(7),.cs-px-lines col:nth-child(8){width:15%}
.cs-sheet .cs-lines{margin-top:0}.stock-print-sheet .cs-lines{margin-top:6px}
.cs-request{border:1px solid #000;border-top:0;min-height:40px;padding:2px 5px;white-space:pre-wrap;overflow-wrap:anywhere}.cs-request u{font-weight:700}
.cs-cap{margin:8px 0 3px;font-weight:700;text-decoration:underline}
.cs-sheet .cs-blank td{height:22px}
.cs-notes{list-style:none;padding-left:8px}.cs-notes li::before{content:"- "}
.cs-star{margin:4px 0 0;font-size:13.5px}
.cs-tag{font-size:11.5px;border:1px solid #777;border-radius:3px;padding:0 3px}
.cs-sign{display:grid;grid-template-columns:repeat(3,1fr);text-align:center;margin-top:12px;min-height:130px}
.cs-sign b{display:block;font-size:14.5px}.cs-sign i{display:block;font-size:13px}.cs-sign .cs-note{display:block;font-weight:700;font-size:13.5px}
.cs-sign .cs-who{margin-top:56px;font-weight:700;font-size:14px}
@media print{
  .intake-print-root .cs-sheet{font-size:10pt}
  .intake-print-root .cs-group td{print-color-adjust:exact;-webkit-print-color-adjust:exact}
  .intake-print-root .cs-table tr,.intake-print-root .cs-sign,.intake-print-root .cs-head{break-inside:avoid}
  .intake-print-root .cs-lines thead{display:table-header-group}
}

/* the phone (quote-phone.mjs): CVDV reads the quote, records the customer's approval, prints; lập / sửa on the computer */
#module-panel .quote-phone{display:flex;flex-direction:column;gap:10px;margin:0 0 12px}
#module-panel .quote-phone button{margin:0}
#module-panel .quote-phone .qp-top{display:flex;align-items:center;gap:10px}
#module-panel .quote-phone .qp-top h2{margin:0;font-size:20px}
#module-panel .quote-phone .qp-back{min-height:38px;padding:6px 12px;border:1px solid #c5d6cb;border-radius:9px;background:#fff;color:#1e5138;font-size:14px;font-weight:700}
#module-panel .quote-phone .qp-chips{display:flex;flex-wrap:wrap;gap:6px}
#module-panel .quote-phone .qp-chip{flex:none;min-height:36px;padding:4px 11px;border:1px solid #c5d6cb;border-radius:18px;background:#fff;color:#1e5138;font-size:13.5px;font-weight:650}
#module-panel .quote-phone .qp-chip[aria-pressed=true]{background:#286548;border-color:#286548;color:#fff}
#module-panel .quote-phone .qp-search{margin:0;min-height:44px;font-size:16px}
#module-panel .quote-phone .qp-list{display:flex;flex-direction:column;gap:8px}
#module-panel .quote-phone .qp-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 8px;width:100%;min-height:0;padding:10px 12px;border:1px solid #dbe5df;border-radius:12px;background:#fff;color:#203930;text-align:left;font-weight:400}
#module-panel .quote-phone .qp-item b{font-size:17px}#module-panel .quote-phone .qp-item small{color:#5d6f64;font-size:13px}
#module-panel .quote-phone .qp-item .qd-state{justify-self:end;align-self:center}
#module-panel .quote-phone .qp-item strong{justify-self:end;font-variant-numeric:tabular-nums;font-size:14px}
#module-panel .quote-phone .qp-note{color:#5d6f64;font-size:14px;margin:4px 0}
#module-panel .quote-phone .qp-status{color:#22613c;font-weight:650;font-size:14px}
#module-panel .quote-phone .qp-status:empty{display:none}
#module-panel .quote-phone .qp-status.error{color:#a33f2c}
#module-panel .quote-phone .qp-card{background:#fff;border:1px solid #dbe5df;border-left:6px solid #7a5aa0;border-radius:14px;padding:13px}
#module-panel .quote-phone .qp-card[data-state=executed]{border-left-color:#2f7a4f}
#module-panel .quote-phone .qp-card[data-state=extra]{border-left-color:#c9962e}
#module-panel .quote-phone .qp-head{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
#module-panel .quote-phone .qp-head b{font-size:22px}#module-panel .quote-phone .qp-head small{color:#5d6f64;font-weight:600}
#module-panel .quote-phone .qp-head .qd-state{margin-left:auto;align-self:center;font-size:12px;padding:2px 9px}
#module-panel .quote-phone .qp-car{margin:4px 0 10px;color:#5d6f64;font-size:13.5px}
#module-panel .quote-phone .qp-group{font-size:11.5px;font-weight:800;letter-spacing:.5px;color:#5d6f64;margin:8px 0 4px}
#module-panel .quote-phone .qp-row{display:grid;grid-template-columns:22px minmax(0,1fr) auto;gap:8px;align-items:start;padding:7px 0;border-top:1px solid #e6ece8}
#module-panel .quote-phone .qp-n{width:22px;height:22px;border-radius:11px;background:#294c3d;color:#fff;font-size:11.5px;font-weight:800;display:grid;place-items:center;margin-top:1px}
#module-panel .quote-phone .qp-row b{display:block;font-size:14.5px;line-height:1.25}
#module-panel .quote-phone .qp-row small{display:block;color:#5d6f64;font-size:12.5px}
#module-panel .quote-phone .qp-row strong{font-variant-numeric:tabular-nums;font-size:14px}
#module-panel .quote-phone .qp-hold{margin-top:6px;border:1px dashed #d9c391;background:#fbf6ea;color:#6b4a12;border-radius:9px;padding:7px 10px;font-size:13px;font-weight:650}
#module-panel .quote-phone .qp-hold summary{cursor:pointer}
#module-panel .quote-phone .qp-extra{margin:8px 0 0;padding:8px 10px;border:1px solid #e3c98c;border-radius:9px;background:#fbf6ea;color:#6b4a12;font-size:13.5px}
#module-panel .quote-phone .qp-exec-sum{margin:0;font-weight:700;font-size:15px;text-align:right}
#module-panel .quote-phone .qp-approved{margin:8px 0 0;padding:8px 10px;border:1px solid #bcdcc7;border-radius:9px;background:#e9f5ed;color:#1f5a37;font-size:13.5px}
#module-panel .quote-phone .qp-sum{display:grid;grid-template-columns:1fr auto;gap:3px 10px;margin:12px 0 8px;font-size:14px}
#module-panel .quote-phone .qp-sum dd{margin:0;text-align:right;font-variant-numeric:tabular-nums;font-weight:650}
#module-panel .quote-phone .qp-sum .qp-total{border-top:1px solid #c5d6cb;padding-top:6px;font-size:17px;font-weight:800;color:#22613c}
#module-panel .quote-phone .qp-btn{display:block;width:100%;margin-top:8px;min-height:48px;border:1.5px solid #c5d6cb;border-radius:11px;padding:12px;font-weight:800;font-size:16px;background:#fff;color:#1e5138}
#module-panel .quote-phone .qp-btn.pri{background:#286548;border-color:#286548;color:#fff}
#module-panel .quote-phone .qp-hint{text-align:center;color:#5d6f64;font-size:12.5px;margin:8px 0 0}
/* Ghi nhận khách duyệt on the phone: a page of its own */
#module-panel .quote-phone .qp-ap{display:flex;flex-direction:column;gap:10px}
#module-panel .quote-phone .qp-pick{display:grid;grid-template-columns:24px minmax(0,1fr) auto;gap:8px;align-items:center;margin:0;padding:10px 12px;border:1px solid #dbe5df;border-radius:10px;background:#fff;font-size:14.5px;font-weight:600}
#module-panel .quote-phone .qp-pick b{font-variant-numeric:tabular-nums}
#module-panel .quote-phone fieldset{margin:0;padding:8px 12px;border:1px solid #dbe5df;border-radius:10px;background:#fff}
#module-panel .quote-phone legend{font-size:13px;font-weight:700;color:#5d6f64;padding:0 4px}

/* AI báo giá (drawings 9 and 11): the buttons, the AI mark, the panels of suggestions and fixes */
:is(#module-panel .quote-desk,.intake-window) .intake-button.qd-ai-btn{border-color:#c9b6e4;color:#5b3d86;background:#f7f2fc}
:is(#module-panel .quote-desk,.intake-window) .intake-button.qd-ai-btn:hover{background:#efe6f8}
.intake-window.qd-aipanel{width:min(1040px,calc(100vw - 24px))}
.qd-aipanel td b{font-weight:650}
.qd-aipanel td small{display:block;color:var(--intake-muted);font-size:11.5px}
.qd-aipanel td code,.qd-ai-settings code,.sl-ai-settings code{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:11px;background:#f1f5f2;border-radius:4px;padding:0 4px}
.intake-window .qd-aipanel input[type=checkbox],.intake-window.qd-aipanel input[type=checkbox]{display:inline-block;width:16px;height:16px;min-height:0;margin:0;padding:0}
.qd-ai-have td{color:#8d9992;background:#fafbfa}.qd-ai-have b{color:#8d9992}
.qd-ai-check td{background:#fffaf0}
.qd-tag-have{font-size:11px;font-weight:700;color:#55645b;background:#eef1ef;border-radius:8px;padding:1px 6px;white-space:nowrap}
.qd-tag-check{font-size:11px;font-weight:700;color:#8a5a0c;background:#fdf0d8;border-radius:8px;padding:1px 6px;white-space:nowrap}
.qd-tag-have.qd-kind{background:#efe7f6;color:#5b3d86}
.qd-muted{color:#8d9992;font-size:12px}
.intake-window .qd-sent{background:#f3f0f8;border:1px solid #ddd0ee;border-radius:8px;padding:6px 10px;font-size:12.5px;color:#3e2d5c}
.intake-window .qd-ai-note{background:#fffaf0;border:1px solid #ecd9ae;border-radius:8px;padding:6px 10px;font-size:12.5px;color:#6b4a12}
.qd-spell del{color:#a33f2c;background:#fdf0ed;text-decoration:line-through;padding:0 3px;border-radius:3px}
.qd-spell ins{color:#1f5a37;background:#e6f3ea;text-decoration:none;padding:0 3px;border-radius:3px;font-weight:650}
.qd-spell .qd-where{white-space:nowrap;color:var(--intake-muted);font-size:12px}
/* Cài đặt AI (drawing 10): AI đọc ảnh as one folding line, AI BÁO GIÁ as its own part */
#module-panel .ai-settings-part{display:flex;flex-direction:column;gap:14px}
#module-panel .ai-settings-part>summary{cursor:pointer;padding:8px 14px;border:1px dashed #b9cfc1;border-radius:8px;background:#f6f9f7;color:var(--intake-green-dark);font-weight:700;font-size:13px;letter-spacing:.02em}
#module-panel .ai-settings-part[open]>summary{margin-bottom:12px}
#module-panel .ai-settings-part[open]{display:block}
#module-panel :is(.qd-ai-settings,.sl-ai-settings){padding:14px 16px;border:1px solid var(--intake-line);border-radius:10px;background:#fff}
#module-panel :is(.qd-ai-settings,.sl-ai-settings)>h2{font-size:14px;letter-spacing:.06em;color:var(--intake-green-dark);display:flex;align-items:center;gap:8px}
#module-panel :is(.qd-ai-settings,.sl-ai-settings) .ai-settings-form{padding:0;border:0}
.qd-new{font-size:10px;font-weight:800;color:#fff;background:#7a5aa0;border-radius:6px;padding:1px 6px;letter-spacing:.3px}
#module-panel :is(.qd-ai-settings,.sl-ai-settings) .qd-set-row{display:flex;gap:10px 22px;align-items:center;flex-wrap:wrap;font-size:13px}
#module-panel :is(.qd-ai-settings,.sl-ai-settings) .qd-set-row label{display:flex;align-items:center;gap:7px;white-space:nowrap;font-weight:600}
#module-panel :is(.qd-ai-settings,.sl-ai-settings) .qd-set-row input[type=checkbox]{width:18px;height:18px;min-height:0;margin:0;padding:0}
#module-panel :is(.qd-ai-settings,.sl-ai-settings) .qd-num{width:72px;text-align:right}
#module-panel :is(.qd-ai-settings,.sl-ai-settings) .qd-actions{display:flex;gap:8px;justify-content:space-between}
/* PLAN-BAO-GIA-005: Thực hiện › / Lệnh sửa chữa › where Phiếu tiếp nhận › was; Các lần lưu; Lịch sử sửa chữa (as Carsoft's
   "Tra cứu lịch sử sửa chữa": the car's orders, Hoàn tất green, the chosen one's lines below). */
#module-panel .quote-desk .qd-go{margin-left:auto;display:flex;align-items:center;gap:12px}
#module-panel .quote-desk .qd-go .qd-link{margin:0;font-size:13px}
#module-panel .quote-desk .qd-run{min-height:32px;padding:4px 16px;font-size:13.5px}
#module-panel .quote-desk .qd-wait{font-size:12.5px;font-weight:650;color:#5b3d86;background:#efe7f6;border-radius:10px;padding:2px 9px}
#module-panel .quote-desk .qd-meta .qd-saves{margin-left:10px;font-size:12px;min-height:24px;display:inline-flex;align-items:center}
.qd-saves-window{width:min(860px,96vw)}
#module-panel :is(.quote-desk,.repair-history,.cvdv-tab-history) .qd-hfind{display:flex;flex-wrap:wrap;align-items:flex-end;gap:8px 12px}
#module-panel :is(.quote-desk,.repair-history,.cvdv-tab-history) .qd-hfind label{display:grid;gap:2px;font-size:11.5px;font-weight:650;color:var(--intake-muted)}
#module-panel :is(.quote-desk,.repair-history,.cvdv-tab-history) .qd-hfind input{min-height:30px;width:190px;padding:4px 8px;border:1px solid #c5d6cb;border-radius:7px;font:inherit;font-size:13px;color:inherit;text-transform:uppercase}
#module-panel :is(.quote-desk,.repair-history,.cvdv-tab-history) .qd-hfind .intake-button{min-height:30px}
#module-panel :is(.quote-desk,.repair-history,.cvdv-tab-history) .qd-hlegend{margin-left:auto;display:flex;gap:12px;font-size:11.5px;color:var(--intake-muted)}
#module-panel :is(.quote-desk,.repair-history,.cvdv-tab-history) .qd-hkey::before{content:'';display:inline-block;width:12px;height:12px;margin-right:5px;vertical-align:-2px;border:1px solid #b9c7be;border-radius:2px;background:#fff}
#module-panel :is(.quote-desk,.repair-history,.cvdv-tab-history) .qd-hkey.qd-done::before{background:#cfe9d2;border-color:#93c49b}
#module-panel :is(.quote-desk,.repair-history,.cvdv-tab-history) .qd-hwrap{flex:0 0 auto;max-height:38vh}
#module-panel :is(.quote-desk,.repair-history,.cvdv-tab-history) .qd-hdetail{flex:0 0 auto}
#module-panel :is(.quote-desk,.repair-history,.cvdv-tab-history) :is(table.qd-hlist,table.qd-hlines) td{font-family:inherit;font-size:12px}
#module-panel :is(.quote-desk,.repair-history,.cvdv-tab-history) :is(table.qd-hlist,table.qd-hlines) :is(td.num,td.qd-hd,th){white-space:nowrap}
#module-panel :is(.quote-desk,.repair-history,.cvdv-tab-history) table.qd-hlist td.qd-hwhy{min-width:120px}
#module-panel :is(.quote-desk,.repair-history,.cvdv-tab-history) .qd-hrow{cursor:pointer}
#module-panel :is(.quote-desk,.repair-history,.cvdv-tab-history) .qd-hrow.qd-done td{background:#e3f2e5}
#module-panel :is(.quote-desk,.repair-history,.cvdv-tab-history) .qd-hrow:hover td{background:#eef6f0}
#module-panel :is(.quote-desk,.repair-history,.cvdv-tab-history) .qd-hrow.qd-hsel td{background:#d6e8fb;box-shadow:inset 0 1px 0 #8db8e6,inset 0 -1px 0 #8db8e6}
#module-panel :is(.quote-desk,.repair-history,.cvdv-tab-history) .qd-hrow:focus-visible{outline:2px solid var(--intake-green);outline-offset:-2px}
#module-panel :is(.quote-desk,.repair-history,.cvdv-tab-history) .qd-hnow{font-size:10.5px;font-weight:700;color:#5b3d86;background:#efe7f6;border-radius:8px;padding:0 6px}
#module-panel :is(.quote-desk,.repair-history,.cvdv-tab-history) .qd-hdetail{border-top:2px solid #cfe0d5;padding-top:8px;display:flex;flex-direction:column;gap:6px}
#module-panel :is(.quote-desk,.repair-history,.cvdv-tab-history) .qd-hdetail h3{display:flex;align-items:center;gap:10px;font-size:12.5px;letter-spacing:.3px;color:var(--intake-green-dark)}
#module-panel :is(.quote-desk,.repair-history,.cvdv-tab-history) .qd-hdetail h3 span{font-weight:600;letter-spacing:0;color:var(--intake-muted)}
#module-panel :is(.quote-desk,.repair-history,.cvdv-tab-history) .qd-hdetail h3 .qd-link{margin-left:auto}
#module-panel :is(.quote-desk,.repair-history,.cvdv-tab-history) .qd-hlines .qd-hx{text-align:center;font-weight:800;color:#8a5a0c}
#module-panel :is(.quote-desk,.repair-history,.cvdv-tab-history) .qd-hlines tr.qd-hhold td{background:#fbf6ea;color:#6b4a12}
/* Quản lý dịch vụ › Lịch sử sửa chữa (repair-history.mjs, PLAN-BAO-GIA-006): Carsoft's search over the list and the lines. */
#module-panel .repair-history .rh-find{padding:10px 12px;border:1px solid var(--intake-line);border-radius:10px;background:#fff}
#module-panel .repair-history .rh-find input{width:160px}
#module-panel .repair-history .rh-find input[type=date]{width:150px;text-transform:none}
#module-panel .repair-history .rh-find input[name=customer]{width:200px;text-transform:none}
#module-panel .repair-history .rh-count{color:var(--intake-muted);font-size:12.5px;margin:0}
#module-panel .repair-history .rh-count[data-kind=error]{color:#a3261b;font-weight:650}
#module-panel .repair-history .rh-body{flex:1;min-height:0;overflow:auto;border:1px solid var(--intake-line);border-radius:10px;background:#fff;padding:10px 12px;display:flex;flex-direction:column;gap:8px}
#module-panel .repair-history .rh-body:empty{display:none}
#module-panel .repair-history .qd-hwrap{max-height:42vh}
#module-panel .repair-history .qd-link{margin:0 0 0 auto;min-height:0;padding:0;border:0;background:none;color:var(--intake-green);font-weight:650;font-size:12.5px;text-decoration:underline;cursor:pointer}
#module-panel .repair-history .qd-hint{color:var(--intake-muted);font-size:12px}
/* Lấy từ báo giá trước (PLAN-BAO-GIA-007): the lines of the car's earlier orders, ticked to copy into the quote being made. */
.intake-window.qd-prev{width:min(1100px,calc(100vw - 24px))}
.qd-prev .qd-prev-only{display:flex;gap:8px;align-items:center;justify-content:flex-start;font-size:13px;font-weight:600;color:var(--intake-ink);margin:0}
.intake-window.qd-prev input[type=checkbox]{width:17px;height:17px;min-height:0;margin:0;padding:0;flex:none;accent-color:var(--intake-green)}
.qd-prev .qd-prev-list{display:flex;flex-direction:column;gap:10px;max-height:58vh;overflow:auto}
.qd-prev .qd-prev-empty{margin:0;font-size:14px;font-weight:600;color:var(--intake-ink)}
/* Lấy từ báo giá trước: Xe này / Xe khác (Owner 08/11), the search of another car. */
.qd-prev .qd-prev-tabs{display:flex;gap:6px;flex-wrap:wrap}
.qd-prev .qd-prev-tab{min-height:30px;padding:4px 14px;border:1px solid #c5d6cb;border-radius:999px;background:#fff;font:inherit;font-size:13px;font-weight:650;color:var(--intake-ink);cursor:pointer}
.qd-prev .qd-prev-tab.on{background:var(--intake-green);border-color:var(--intake-green);color:#fff}
.qd-prev .qd-prev-search{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.qd-prev .qd-prev-search input{flex:1 1 260px;min-height:32px;padding:4px 10px;border:1px solid #c5d6cb;border-radius:7px;font:inherit;font-size:13px;color:inherit}
.qd-prev :is(.qd-prev-search,.qd-prev-only)[hidden],.qd-prev .qd-prev-note:empty{display:none}
.qd-prev .qd-prev-note{margin:0}
.qd-prev .qd-prev-ro{border:1px solid var(--intake-line);border-radius:9px;overflow:hidden;flex:0 0 auto}
.qd-prev .qd-prev-ro h3{margin:0;padding:6px 10px;background:#eef4f0;font-size:13px;color:var(--intake-green-dark);display:flex;gap:10px;align-items:center}
.qd-prev .qd-prev-ro h3 span{font-weight:600;color:var(--intake-muted)}
.qd-prev table.qd-prev-lines td{font-family:inherit;cursor:pointer}
.qd-prev table.qd-prev-lines :is(td.num,th){white-space:nowrap}
.qd-prev tr.qd-prev-had td{color:#9aa59e;cursor:default}
.qd-prev .qd-prev-tag{display:inline-block;border-radius:9px;padding:0 7px;font-size:11.5px;font-weight:700;white-space:nowrap;background:#eef1ef;color:#55645b}
.qd-prev .qd-prev-tag:is([data-state=hold],[data-state=open]){background:#fbf0d9;color:#8a5a0c}
.qd-prev .qd-prev-tag[data-state=done]{background:#e3f1e8;color:#1f5135}
.qd-prev .qd-prev-foot{align-items:center}
.qd-prev .qd-prev-foot .qd-hint{margin-right:auto}
/* Lấy từ báo giá trước on a phone (C, Owner 08/11/2026): a row a line (quote-desk.mjs slim()): the tick, what it is, the old price;
   the whole row a tap; the tabs, the search and the buttons a finger's size; Thêm stays at the foot while the list scrolls. */
.qd-prev .qd-prev-rows{display:flex;flex-direction:column}
.qd-prev .qd-prev-row{display:grid;grid-template-columns:28px minmax(0,1fr) auto;gap:4px 10px;align-items:start;margin:0;padding:10px 12px;border-top:1px solid var(--intake-line);cursor:pointer;font-weight:400}
.qd-prev .qd-prev-row:first-child{border-top:0}
.intake-window.qd-prev .qd-prev-row input[type=checkbox]{width:22px;height:22px;margin-top:1px}
.qd-prev .qd-prev-what{display:flex;flex-direction:column;gap:2px;min-width:0}
.qd-prev .qd-prev-what b{font-size:15px;font-weight:700;color:var(--intake-ink);overflow-wrap:anywhere}
.qd-prev .qd-prev-what small{font-size:12.5px;color:var(--intake-muted);overflow-wrap:anywhere}
.qd-prev .qd-prev-what .qd-prev-tag{align-self:flex-start;margin-top:2px}
.qd-prev .qd-prev-price{display:flex;flex-direction:column;align-items:flex-end;text-align:right}
.qd-prev .qd-prev-price b{font-size:15px;font-variant-numeric:tabular-nums;color:var(--intake-green-dark)}
.qd-prev .qd-prev-price small{font-size:11px;color:var(--intake-muted)}
.qd-prev .qd-prev-row.qd-prev-had{cursor:default}
.qd-prev .qd-prev-row.qd-prev-had :is(b,small){color:#9aa59e}
@media(max-width:600px){
  .qd-prev .qd-pop-body{display:flex;flex-direction:column;gap:10px;padding-bottom:0}
  .qd-prev .qd-prev-tab{min-height:40px;padding:6px 16px;font-size:14px}
  .qd-prev .qd-prev-search{flex-wrap:nowrap}
  .qd-prev .qd-prev-search input{flex:1 1 0;min-width:0;min-height:44px;font-size:16px}
  .intake-window.qd-prev .qd-prev-search .intake-button{min-height:44px!important}
  .qd-prev .qd-prev-list{max-height:none;overflow:visible}
  .qd-prev .qd-prev-ro h3{flex-wrap:wrap;gap:2px 10px;padding:8px 12px}
  .qd-prev .qd-prev-only{font-size:14px;min-height:40px}
  .qd-prev .qd-prev-foot{position:sticky;bottom:0;margin:auto -16px 0;padding:10px 16px calc(10px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid var(--intake-line);flex-wrap:wrap}
  .intake-window.qd-prev .qd-prev-foot .intake-button{min-height:46px!important;font-size:15px}
  .intake-window.qd-prev .qd-prev-foot .intake-button.primary{flex:1 1 100%}
}
/* Bản đang sửa mở lại sau khi tải lại trang (Owner 29/10/2026): a line over the table, not an error. */
.intake-window .qd-kept{margin:0 0 8px;padding:7px 10px;border:1px solid #b9d8c4;border-radius:6px;background:#eef7f1;color:#22613c;font-size:13px}
.intake-window .qd-kept.qd-kept-newer{border-color:#e7c98f;background:#fdf6e7;color:#7a5410}
/* Gợi ý AI (PLAN-BAO-GIA-008, quote-chat.mjs; Hỏi AI before PLAN-BAO-GIA-011): the chat on the right of Lập / Sửa báo giá; on a wide screen the quote keeps its
   room on the left (it scrolls), on a narrow one the chat lies over it. */
.intake-window .qc-chat{position:absolute;top:0;right:0;bottom:0;z-index:5;width:min(520px,100%);display:flex;flex-direction:column;background:#fff;border-left:1px solid #c9d6ce;box-shadow:-14px 0 30px #0b1f1422;font-size:13.5px}
@media (min-width:1280px){.intake-window.qc-on>:is(.qd-win-body,.qd-win-foot){margin-right:520px}.intake-window.qc-on .qd-edit{min-width:1120px}}
.intake-window .qc-chat>header{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;padding:12px 16px;background:#3e2d5c;color:#fff}
.intake-window .qc-chat>header h2{font-size:19px;color:#fff}
.intake-window .qc-chat>header p{margin-top:2px;font-size:12.5px;color:#ddd0ee;font-weight:600}
.intake-window .qc-x{min-width:34px;min-height:34px;padding:0 8px;border:1px solid #ffffff66;border-radius:7px;background:transparent;color:#fff;font-size:18px;line-height:1;cursor:pointer}
.intake-window .qc-chips{display:flex;flex-wrap:wrap;gap:6px;padding:10px 14px;border-bottom:1px solid #e6e1ee;background:#faf8fd}
.intake-window .qc-chip{border:1px solid #cbbde3;background:#fff;color:#3e2d5c;border-radius:14px;padding:3px 10px;font-size:12.5px;font-weight:650;cursor:pointer}
.intake-window .qc-chip:hover{background:#f3eefa}.intake-window .qc-chip:disabled{opacity:.5;cursor:not-allowed}
.intake-window .qc-log{flex:1;min-height:0;overflow:auto;padding:12px 14px;display:flex;flex-direction:column;gap:10px;background:#fbfbfc}
.intake-window .qc-me{align-self:flex-end;max-width:84%;background:#294b3c;color:#fff;border-radius:12px 12px 2px 12px;padding:7px 11px;white-space:pre-wrap;overflow-wrap:anywhere}
.intake-window .qc-ai{background:#fff;border:1px solid #e0dbe8;border-radius:12px 12px 12px 2px;padding:9px 11px;display:flex;flex-direction:column;gap:8px}
.intake-window .qc-wait{color:#6b6478;font-style:italic}
.intake-window .qc-reply{white-space:pre-wrap;line-height:1.45;overflow-wrap:anywhere}
.intake-window .qc-warn{font-size:12.5px;color:#7a5410;background:#fff8e6;border-radius:6px;padding:4px 8px}
.intake-window .qc-err{color:var(--intake-red);font-weight:600}
.intake-window .qc-adds{display:flex;flex-direction:column;gap:8px}
.intake-window .qc-card{border:1px solid #d3ddd6;border-radius:9px;overflow:hidden;background:#fff}
.intake-window .qc-card h4{margin:0;padding:5px 10px;font-size:13px}
.qc-req h4{background:#e3f1e8;color:#1f5135}.qc-rec h4{background:#eaf1fb;color:#24477a}.qc-chk h4{background:#fdf3df;color:#7a5410}.qc-fix h4{background:#f3f0f8;color:#3e2d5c}.qc-msg h4{background:#eef4f0;color:#1f3a2c}
.intake-window .qc-li{display:grid;grid-template-columns:20px minmax(0,1fr) auto;gap:6px;padding:6px 10px;border-top:1px solid #eef2ef;align-items:start;cursor:pointer;font-size:13px}
.intake-window .qc-li input[type=checkbox]{display:inline-block;width:16px;height:16px;min-height:0;margin:2px 0 0;padding:0}
.intake-window .qc-li b{font-weight:650;overflow-wrap:anywhere}.intake-window .qc-li small{display:block;color:#6b6478;font-size:12px;overflow-wrap:anywhere}
.intake-window .qc-li small.qc-code{color:#22613c}.intake-window .qc-muted{color:#8a8496}
.intake-window .qc-q{color:#5d6f64;white-space:nowrap}
.intake-window .qc-act{display:flex;justify-content:flex-end;gap:6px;padding:6px 10px;border-top:1px solid #eef2ef;background:#fafcfb}
.intake-window .qc-adds>.qc-act{border:0;background:none;padding:0}
.intake-window .qc-msg ul{margin:0;padding:6px 10px 6px 28px}.intake-window .qc-msg li{margin:2px 0}
.intake-window .qc-msg textarea{border:0;border-top:1px solid #eef2ef;border-radius:0;min-height:96px;font-size:13px}
.intake-window .qc-hint{font-size:12px;color:#6b6478}.intake-window .qc-pad{padding:4px 10px}
.intake-window .qc-meta{font-size:11.5px;color:#8a8496}
.intake-window .qc-in{border-top:1px solid #d3ddd6;padding:10px 14px;display:grid;gap:6px;background:#fff}
.intake-window .qc-in textarea{min-height:44px;max-height:140px;resize:none;border-radius:8px;font-size:13.5px}
.intake-window .qc-in-row{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:12px;color:#6b6478}
:is(.intake-window,#module-panel .intake-desk) .intake-button.qc-send{background:#3e2d5c;border-color:#3e2d5c;color:#fff}
:is(.intake-window,#module-panel .intake-desk) .intake-button.qc-send:hover{background:#2f2147}
.intake-window .qc-left{font-size:12px;color:#6b6478}
.intake-window .qd-ai-btn .qd-new{margin-left:2px}
/* Gợi ý AI › Đọc ảnh báo giá (PLAN-BAO-GIA-011): the chip first, 📎 Ảnh / PDF (and 📷 Chụp ảnh on a phone) beside the question,
   the photos chosen in a tray above it, the panel lit while a file is dragged over it, the lines read with PT / Công. */
.intake-window .qc-chip.qc-chip-read{background:#3e2d5c;border-color:#3e2d5c;color:#fff}.intake-window .qc-chip.qc-chip-read:hover{background:#2f2147}
.intake-window .qc-in-row{flex-wrap:wrap}.intake-window .qc-in-row>span{flex:1 1 180px;min-width:180px}
.intake-window .qc-clip{flex:none;border:1px solid #cbbde3;background:#fff;color:#3e2d5c;border-radius:8px;padding:5px 9px;font-size:12.5px;font-weight:700;cursor:pointer;white-space:nowrap}
.intake-window .qc-clip:hover{background:#f3eefa}.intake-window .qc-clip:disabled{opacity:.5;cursor:not-allowed}
.intake-window .qc-chat.qc-drop{outline:3px dashed #8c6bc0;outline-offset:-6px}.intake-window .qc-chat.qc-drop .qc-log{background:#f3eefa}
.intake-window .qc-tray{display:grid;gap:6px;border:1px solid #e0dbe8;border-radius:9px;padding:8px;background:#faf8fd}
.intake-window .qc-thumbs{display:flex;flex-wrap:wrap;gap:6px}
.intake-window .qc-thumb{position:relative;width:64px;height:64px;border:1px solid #cbbde3;border-radius:7px;overflow:hidden;background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center}
.intake-window .qc-thumb img{width:100%;height:100%;object-fit:cover}
.intake-window .qc-thumb small{font-size:9.5px;color:#6b6478;max-width:60px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.intake-window .qc-thumb-x{position:absolute;top:2px;right:2px;width:22px;height:22px;min-height:0;padding:0;border:0;border-radius:50%;background:#0b1f14b3;color:#fff;font-size:12px;line-height:1;cursor:pointer}
.intake-window .qc-pdf{display:inline-block;font:800 11px system-ui;color:#fff;background:#b3261e;border-radius:4px;padding:2px 5px}
.intake-window .qc-tray-note{font-size:12px;color:#6b6478;margin:0}
.intake-window .qc-tray>.qc-act{border:0;background:none;padding:0}
.intake-window .qc-me-read{display:grid;gap:6px}
.intake-window .qc-me-pics{display:flex;flex-wrap:wrap;gap:4px}.intake-window .qc-me-pics img{width:72px;height:72px;object-fit:cover;border-radius:6px;background:#fff}
.intake-window .qc-line{display:flex;gap:6px;align-items:baseline}
.intake-window .qc-kind{flex:none;font:800 10px system-ui;border-radius:5px;padding:1px 5px;background:#e6eef9;color:#244a7a}
.intake-window .qc-kind.qc-kind-labor{background:#f1e8fb;color:#5b2d86}
.intake-window .qc-li small.qc-had{color:#7a5410;font-weight:650}
.intake-window .qc-li small.qc-code{display:block;color:#33473c;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11.5px;letter-spacing:.02em}
.qc-readlist h4{background:#f3f0f8;color:#3e2d5c}
/* In song ngữ (PLAN-BAO-GIA-008 2A) */
.intake-window .qd-bilingual{display:flex;align-items:center;gap:6px;margin-right:auto;font-weight:650;cursor:pointer}
.intake-window .qd-bilingual input[type=checkbox]{display:inline-block;width:16px;height:16px;min-height:0;margin:0;padding:0}
.quote-print-bilingual .quote-print-sums{max-width:440px}
/* Đổi chỗ dòng: ▲ ▼ beside ✕, the number as a handle to drag the row */
.qd-edit td.qd-grip{cursor:grab;user-select:none;white-space:nowrap}
.qd-edit tr.qd-dragging td{opacity:.45}
.qd-edit tr.qd-drop-before td{box-shadow:inset 0 3px 0 var(--intake-green)}
.qd-edit tr.qd-drop-after td{box-shadow:inset 0 -3px 0 var(--intake-green)}
.qd-edit td.qd-row-tools{white-space:nowrap}
/* ▲▼ side by side, 26 px (they were 22×13 px with an 8 px arrow; review of Báo giá, Owner 07/11/2026 "Sửa cả 5"). */
.qd-moves{display:inline-flex;flex-direction:row;gap:4px;vertical-align:middle;margin-right:4px}
.intake-window .qd-move{width:26px;height:26px;padding:0;border:1px solid #c5d3ca;border-radius:6px;background:#f4f8f5;color:var(--intake-green-dark);font-size:12px;line-height:1;cursor:pointer}
.intake-window .qd-move:hover:not(:disabled){background:#e3efe7}
.intake-window .qd-move:disabled{opacity:.3;cursor:default}
.intake-window .qc-me .qc-vin{display:block;margin-top:2px;font-size:11.5px;color:#cfe0d6}
.intake-window .qc-li small.qc-code-out{color:#7a5410}
/* Lập / Sửa báo giá on a phone (Owner 30/10/2026, PLAN-QLDV-DIEN-THOAI-002/003, "ok 003"): the window the whole screen; a
   narrow window (a phone) its lines a short row each, a tap (or ＋ Phụ tùng / ＋ Công) opening the line's window from the
   bottom; a folding phone opened (600–1000 px) two rows a line, typed in place; the foot the total and the two buttons. */
.qd-brief{display:none;list-style:none;margin:0;padding:0}
.intake-window .qd-win-body{container-type:inline-size}
@media(max-width:1000px){
  .intake-window.qd-window{width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;border:0;border-radius:0}
  .intake-window.qd-window>.intake-window-head{padding:10px 12px 10px 16px}
  .intake-window.qd-window>.intake-window-head>div{min-width:0}
  .intake-window.qd-window .intake-window-identity{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .intake-window.qd-window .intake-window-close{flex:0 0 auto;min-width:44px;min-height:44px}
  .intake-window .qd-win-foot{grid-template-columns:1fr;gap:8px;padding:8px 12px calc(8px + env(safe-area-inset-bottom))}
  .qd-win-foot .qd-totals{grid-template-columns:1fr}
  .qd-win-foot .qd-totals>div:not(.qd-grand){display:none}
  .qd-win-foot .qd-totals .qd-grand{display:flex;justify-content:space-between;align-items:center;padding:6px 10px}
  .qd-win-foot .qd-totals .qd-grand span{font-size:14px;margin:0}
  .intake-window .qd-win-foot .qd-actions.end{display:grid;grid-template-columns:1fr 1.4fr;gap:8px}
  .intake-window .qd-win-foot .qd-actions.end .intake-button{min-height:46px;font-size:16px}
  .intake-window .qd-win-body .qd-actions .intake-button{min-height:44px;font-size:15px}
}
/* A phone: the short rows; the buttons above them, two a row. */
@container (max-width:599px){
  .qd-win-body .qd-table.qd-edit{display:none}
  .qd-win-body .qd-brief{display:grid;gap:8px}
  .intake-window .qd-win-body>.qd-actions{order:-1;display:grid!important;grid-template-columns:1fr 1fr;gap:8px}
  .qd-win-body>.qd-actions .qd-legend{display:none}
  .intake-window .qd-win-body .qd-note-in textarea{font-size:16px}
}
.intake-window .qd-brief-row{display:grid;grid-template-columns:30px minmax(0,1fr) auto 12px;align-items:center;gap:8px;width:100%;min-height:60px;margin:0;padding:8px 10px;background:#fff;border:1px solid #d6e2da;border-radius:12px;text-align:left;color:var(--intake-ink);font:inherit;cursor:pointer}
.intake-window .qd-brief-row.qd-held{background:#fbf7ee}
.intake-window .qd-brief-row.qd-bad{border-color:#d9a19a;box-shadow:inset 3px 0 0 #b2533e}
.qd-brief-n{display:grid;justify-items:center;gap:3px;font-size:15px;font-weight:800;color:#294c3d}
.qd-brief-kind{padding:1px 5px;border-radius:6px;background:#6b8f7b;color:#fff;font-size:10px;font-weight:700}
.qd-brief-kind[data-kind=labor]{background:#9a6400}
.qd-brief-what{display:grid;gap:2px;min-width:0}
.qd-brief-what b{overflow:hidden;font-size:15px;white-space:nowrap;text-overflow:ellipsis}
.qd-brief-what small{overflow:hidden;font-size:13px;color:#5d6f64;white-space:nowrap;text-overflow:ellipsis}
.qd-brief-what small.qd-err{color:var(--intake-red);font-weight:700}
.qd-brief-money{display:grid;justify-items:end;gap:2px;font-size:15px;font-weight:800;white-space:nowrap;font-variant-numeric:tabular-nums}
.qd-brief-money small{padding:1px 6px;border-radius:7px;background:#fbf0d9;color:#8a5a0c;font-size:11px;font-weight:700}
.qd-brief-go{color:#9aaaa0;font-size:20px}
/* A folding phone opened: two rows a line, every box in place. */
@container (min-width:600px) and (max-width:1000px){
  .qd-win-body .qd-edit,.qd-win-body .qd-edit tbody{display:block;width:100%}
  .qd-win-body .qd-edit thead{display:none}
  .qd-win-body .qd-edit tr{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:6px 8px;margin:0 0 10px;padding:10px;border:1.5px solid #cfdcd3;border-radius:12px;background:#fff}
  .qd-win-body .qd-edit tr.qd-held{background:#fbf7ee}
  .qd-win-body .qd-edit td{display:block;min-width:0;width:auto!important;padding:0!important;border:0!important;background:none!important}
  .qd-win-body .qd-edit td[data-label]:not([data-label=''])::before{content:attr(data-label);display:block;margin-bottom:2px;font-size:12px;font-weight:700;color:#5d6f64}
  .intake-window .qd-win-body .qd-edit :is(input,select){width:100%;min-height:40px;padding:6px 8px;font-size:16px}
  .qd-win-body .qd-edit td.qd-n{align-self:center;font-size:15px;font-weight:800;color:#294c3d}
  .qd-win-body .qd-edit td.qd-lt{align-self:end;font-size:16px;font-weight:800;text-align:right}
  .qd-win-body .qd-edit td.qd-lt::before{content:'Thành tiền ₫';display:block;font-size:12px;font-weight:700;color:#5d6f64}
  .qd-win-body .qd-edit td.qd-row-tools{display:flex;gap:6px;align-items:center}
  .qd-win-body .qd-edit .qd-moves{display:flex;flex-direction:row;gap:6px;margin:0}
  .intake-window .qd-win-body .qd-edit :is(.qd-move,.qd-del){width:40px;min-width:40px;height:40px;min-height:40px;font-size:15px}
  .intake-window .qd-win-body .qd-edit .qd-dots{height:40px;width:40px}
  .qd-win-body .qd-edit td.qd-c{display:flex;flex-direction:column;align-items:flex-start}
  .intake-window .qd-win-body .qd-edit td.qd-c input[type=checkbox]{width:26px;height:26px;margin-top:6px}
  .qd-win-body .qd-edit td:nth-child(1){grid-area:1/1/2/2}.qd-win-body .qd-edit td:nth-child(2){grid-area:1/2/2/4}
  .qd-win-body .qd-edit td:nth-child(6){grid-area:1/4/2/9}.qd-win-body .qd-edit td:nth-child(7){grid-area:1/9/2/13}
  .qd-win-body .qd-edit td:nth-child(3){grid-area:2/1/3/4}.qd-win-body .qd-edit td:nth-child(5){grid-area:2/4/3/6}
  .qd-win-body .qd-edit td:nth-child(8){grid-area:2/6/3/7}.qd-win-body .qd-edit td:nth-child(9){grid-area:2/7/3/8}
  .qd-win-body .qd-edit td:nth-child(10){grid-area:2/8/3/10}.qd-win-body .qd-edit td:nth-child(11){grid-area:2/10/3/11}
  .qd-win-body .qd-edit td:nth-child(12){grid-area:2/11/3/12}.qd-win-body .qd-edit td:nth-child(13){grid-area:2/12/3/13}
  .qd-win-body .qd-edit td:nth-child(4){grid-area:3/1/4/5}.qd-win-body .qd-edit td:nth-child(15){grid-area:3/5/4/8}.qd-win-body .qd-edit td:nth-child(14){grid-area:3/8/4/13}
  .qd-win-body .qd-edit.qd-no-teams td:nth-child(15){grid-area:3/1/4/7}.qd-win-body .qd-edit.qd-no-teams td:nth-child(14){grid-area:3/7/4/13}
}
/* The window of one line, from the bottom. */
.intake-window.qd-line-sheet{width:min(560px,100vw);max-width:100vw;max-height:92dvh;margin:auto auto 0;padding:0;border:0;border-radius:18px 18px 0 0;background:#fff;color:var(--intake-ink,#1d2b23);box-shadow:0 -8px 30px #0003;overflow:auto}
.intake-window.qd-line-sheet::backdrop{background:#14302180}
.qd-line-form{display:grid;gap:8px;padding:10px 16px calc(16px + env(safe-area-inset-bottom))}
.qd-line-head{display:flex;align-items:center;gap:10px}
.qd-line-head h3{flex:1;margin:0;font-size:19px}
.intake-window.qd-line-sheet .qd-line-x{width:40px;height:40px;min-height:40px;margin:0;padding:0;border:1px solid #c5d6cb;border-radius:20px;background:#fff;color:#203930;font-size:16px}
.qd-seg{display:grid;grid-template-columns:1fr 1fr;border:1.5px solid #284b3e;border-radius:10px;overflow:hidden}
.intake-window.qd-line-sheet .qd-seg-b{min-height:42px;margin:0;border:0;border-radius:0;background:#fff;color:#284b3e;font-size:15px;font-weight:700}
.intake-window.qd-line-sheet .qd-seg-b[aria-checked=true]{background:#284b3e;color:#fff}
.intake-window.qd-line-sheet .qd-line-field{display:grid;gap:3px;min-width:0;margin:0;font-size:13px;font-weight:650;color:#29443a}
.intake-window.qd-line-sheet input:not([type=checkbox]){width:100%;min-width:0;min-height:44px;margin:0;padding:8px 10px;border:1.5px solid #c5d6cb;border-radius:10px;background:#fff;color:#1d2b23;font:inherit;font-size:16px}
.intake-window.qd-line-sheet input.num{text-align:right}
.intake-window.qd-line-sheet input[aria-invalid=true]{border-color:#b2533e;background:#fff7f5}
.intake-window.qd-line-sheet .qd-code-in{display:flex;gap:6px}
.intake-window.qd-line-sheet .qd-dots{flex:0 0 auto;width:44px;height:44px;min-height:44px;margin:0;padding:0;border-radius:10px}
.qd-line-2{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px}
.qd-line-3{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1.3fr);gap:8px;align-items:end}
.intake-window.qd-line-sheet .qd-line-hold{display:flex;align-items:center;gap:8px;min-height:44px;margin:0;font-size:14px;font-weight:650}
.intake-window.qd-line-sheet .qd-line-hold input{width:24px;height:24px;min-height:0;margin:0}
.qd-line-total{display:flex;justify-content:space-between;align-items:center;margin:2px 0;padding:8px 10px;border-radius:10px;background:#eef5f0;font-weight:700}
.qd-line-total b{font-size:18px;color:#1f5135;font-variant-numeric:tabular-nums}
.qd-line-tools{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.qd-line-actions{display:grid;grid-template-columns:1fr 1.5fr;gap:8px}
.intake-window.qd-line-sheet :is(.qd-line-tools,.qd-line-actions) .intake-button{min-height:46px;font-size:15px;font-weight:700}
.intake-window.qd-line-sheet .qd-line-del{color:var(--intake-red,#9a2f1c);border-color:#e3b9b0}
.intake-window.qd-line-sheet .qd-err{margin:0;font-size:13px;font-weight:600}
.intake-window.qd-line-sheet .qd-err:empty{display:none}
/* The windows over it (Danh mục, Lấy từ báo giá trước, Thực hiện) on a phone: the whole screen, the tables scrolled sideways. */
@media(max-width:600px){
  .intake-window:is(.qd-picker,.qd-prev,.qd-dialog){width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0}
  .intake-window:is(.qd-picker,.qd-prev) .qd-pop-body{overflow:auto}
  .intake-window.qd-picker .qd-pick-filters{grid-template-columns:repeat(2,minmax(0,1fr))}
  .intake-window.qd-picker .qd-pick-filters input[type=search]{grid-column:1/-1;min-height:44px;font-size:16px}
}
/* Báo giá xe chưa vào xưởng (PLAN-BAO-GIA-009): the tag, the ＋ Báo giá window (desktop and phone). */
.qd-state[data-state=nocar]{background:#fff1d6;color:#8a4b00}
.qd-prequote{width:min(760px,calc(100vw - 24px))}
.qd-prequote .qd-prequote-grid{grid-template-columns:1fr 1fr}
.qd-prequote .qd-prequote-grid>.intake-group:first-child{grid-row:span 2}
.qd-prequote .intake-field textarea{min-height:72px}
.qd-prequote .qd-prequote-car:empty{display:none}
.qd-prequote .qd-prequote-car{margin:4px 0 0;font-weight:600;color:#2f5a44}
@media (max-width:720px){
  .qd-prequote{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;border-radius:0}
  .qd-prequote .qd-prequote-grid{grid-template-columns:1fr}
  .qd-prequote .qd-prequote-grid>.intake-group:first-child{grid-row:auto}
  .qd-prequote .intake-field input,.qd-prequote .intake-field textarea{font-size:16px;min-height:44px}
  .qd-prequote .intake-window-foot{flex-direction:column;align-items:stretch}
  .qd-prequote .intake-window-actions .intake-button{flex:1;min-height:46px}
}
/* the button rules of .intake-window outrank a class here (their :is() holds an id). */
dialog.qd-picker .qd-actions .qd-pick-add{margin-right:auto!important}
/* Quản trị › Mẫu điều khoản (Quản lý; schema/quote-terms.sql): a tab a print, one box a line. */
.terms-settings{max-width:860px;display:grid;gap:12px}
.terms-settings h2{margin:0;font-size:16px;letter-spacing:.02em}
.terms-tabs{display:flex;flex-wrap:wrap;gap:6px;border-bottom:1px solid var(--intake-line,#d5ddd8);padding-bottom:6px}
.terms-tab{margin:0;border:1px solid var(--intake-line,#c7d1cb);background:#fff;color:var(--intake-ink,#1d2f26);border-radius:16px;padding:6px 14px;font:inherit;font-weight:600;cursor:pointer;min-height:34px}
.terms-tab.on{background:var(--intake-green-dark,#1f5f3f);border-color:var(--intake-green-dark,#1f5f3f);color:#fff}
.terms-panel{display:grid;gap:8px}
.terms-lines{margin:0;padding-left:24px;display:grid;gap:6px}
.terms-lines li{display:grid;grid-template-columns:minmax(0,1fr) auto auto auto;gap:4px;align-items:center}
.terms-lines li input{min-width:0;width:100%;box-sizing:border-box;padding:7px 9px;font:inherit;border:1px solid var(--intake-line,#c7d1cb);border-radius:4px}
.terms-hint,.terms-meta{margin:0;color:var(--intake-muted,#68756d);font-size:12.5px}
.terms-status{margin:0;min-height:1.2em;font-size:13px}.terms-status.error{color:var(--intake-red,#b42318)}.terms-status.ok{color:var(--intake-green-dark,#1f5f3f)}
/* Bảo hiểm là đối tượng trả (insurance-desk.mjs; PLAN-KE-TOAN-008 bản 2, drawings of plan-ke-toan-008b): the blue line of an RO the
   insurer pays for, its parts under the totals, the marks Bảo hiểm and Khách trả, In báo giá ▾, the windows Bảo hiểm… and Duyệt giá
   bảo hiểm. Báo giá and Quyết toán, Desktop and phone. */
.ins-line{display:flex;flex-wrap:wrap;align-items:center;gap:3px 16px;margin-top:6px;padding:6px 10px;border:1px solid #c8d7ee;border-radius:8px;background:#f1f5fc;font-size:12.5px;color:#1f2f45;overflow-wrap:anywhere}
.ins-line i{font-style:normal;color:#5b6b80}
.ins-line b{font-weight:750}
.ins-chip{display:inline-block;border-radius:10px;padding:1px 8px;font-size:11.5px;font-weight:750;white-space:normal}
.ins-chip[data-state=waiting]{background:#fdf0d8;color:#8a5a0c}
.ins-chip[data-state=approved]{background:#e2f1e7;color:#22613c}
/* Chờ Thực hiện (schema/insurance-executed.sql): the approved save not carried out yet, its part not counted (amber, as Phát sinh) */
.ins-pending{display:inline-block;border:1px solid #e3c98c;border-radius:10px;padding:0 8px;background:#fbf6ea;color:#6b4a12;font-size:11.5px;font-weight:700;white-space:normal}
.ins-part[data-kind][data-pending=true] b,.money-part[data-kind][data-pending=true]>b{font-size:15px;color:#8a5a0c}
.ins-tag{display:inline-block;border-radius:8px;padding:0 6px;background:#e6eefb;color:#23498a;font-size:11px;font-weight:750;white-space:nowrap}
.ins-tag-customer{display:inline-block;margin-left:2px;border:1px solid #bcdcc7;border-radius:8px;padding:0 6px;background:#e9f5ed;color:#22613c;font-size:11px;font-weight:750;white-space:nowrap;vertical-align:1px}
.ins-parts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.ins-part{min-width:0;padding:8px 12px;border:1px solid var(--intake-line,#d3ddd6);border-radius:9px;background:#f5f8f6}
.ins-part small{display:block;font-size:11px;font-weight:800;letter-spacing:.05em;color:#5d6f64;overflow-wrap:anywhere}
.ins-part b{display:block;margin-top:1px;font-size:19px;font-variant-numeric:tabular-nums;color:#1d3a2c}
.ins-part span{display:block;font-size:12px;color:#5d6f64;overflow-wrap:anywhere}
.ins-part[data-kind=insurer]{background:#f1f5fc;border-color:#c8d7ee}.ins-part[data-kind=insurer] b{color:#23498a}
.ins-part[data-kind=customer]{background:#f2f8f4;border-color:#bcdcc7}.ins-part[data-kind=customer] b{color:#22613c}
.qd-table .ins-base{color:#6e7e74}
.qd-table .ins-base s{color:#8a968f}
.qd-table td.ins-approved{color:#23498a;font-weight:750}
.ins-menu{position:absolute;z-index:40;display:grid;min-width:250px;padding:5px;border:1px solid var(--intake-line,#d3ddd6);border-radius:10px;background:#fff;box-shadow:0 10px 30px #0002}
.ins-menu .ins-menu-item{display:grid;gap:1px;margin:0;padding:7px 10px;border:0;border-radius:7px;background:none;text-align:left;font:inherit;color:#1d2f26;cursor:pointer}
.ins-menu .ins-menu-item:hover,.ins-menu .ins-menu-item:focus-visible{background:#eef4f0;outline:none}
.ins-menu .ins-menu-item b{font-size:13.5px}.ins-menu .ins-menu-item small{font-size:12px;color:#5f7067}
.quote-print-sums .quote-print-part{border-top:0;padding-top:0;font-size:12.5px;font-weight:650}
.quote-print-sums dt.quote-print-part:nth-last-child(4){border-top:1px dashed #b5c0b9;padding-top:4px}.quote-print-sums dd.quote-print-part:nth-last-child(3){border-top:1px dashed #b5c0b9;padding-top:4px}
/* the windows */
.intake-window.ins-window{width:min(760px,calc(100vw - 24px))}
.intake-window.ins-approve{width:min(1180px,calc(100vw - 24px))}
.ins-form{display:grid;gap:9px}
.ins-row{display:grid;grid-template-columns:170px minmax(0,1fr);align-items:start;gap:4px 14px}
.ins-label{padding-top:6px;font-size:13px;font-weight:700;color:#29443a}
.ins-cell{display:grid;gap:4px;min-width:0}
.ins-pair{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:8px}
.ins-hint{margin:0;font-size:12px;color:var(--intake-muted,#5f7067);line-height:1.4}
.intake-window .ins-message{margin:0;font-size:13px}.intake-window .ins-message:empty{display:none}
.intake-window .ins-foot{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:10px 16px;border-top:1px solid var(--intake-line,#d3ddd6);background:#fff}
.intake-window .ins-foot .ins-gap{flex:1}
.intake-window .ins-off{color:var(--intake-red,#a33f2c);border-color:#dcb6ad}
.intake-window :is(.ins-input,.ins-price,.ins-amount)[aria-invalid=true]{border-color:#b2533e;background:#fff7f5}
.ins-approve-body{gap:10px}
.ins-lines .ins-approved-col{background:#eef3fb}
.ins-lines th.ins-approved-col{color:#23498a}
.ins-lines td{vertical-align:middle}
.intake-window .ins-lines input.ins-price{width:130px;margin-left:auto;text-align:right;font-weight:750;border:1.5px solid #6d8fc6}
.ins-lines .ins-theirs{color:#5f7067;font-size:12.5px}
.ins-lines .ins-theirs-row{background:#f6faf7}
.ins-lines .ins-c{text-align:center;width:70px}
.intake-window .ins-lines input[type=checkbox]{display:inline-block;width:18px;height:18px;min-height:0;padding:0}
.ins-under{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,440px);gap:14px;align-items:start}
.ins-under .ins-row{grid-template-columns:130px minmax(0,1fr)}
.ins-stamp{display:grid;gap:7px;padding:10px 14px;border:2px solid #c0392b;border-radius:10px;background:#fff}
.ins-stamp h3{margin:0;font-size:13px;letter-spacing:.06em;color:#a3241b}
.ins-stamp-row{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:13.5px}
.ins-stamp-row small{color:#5f7067;font-size:11.5px}
.ins-stamp-row>b{font-variant-numeric:tabular-nums;font-size:15px}
.ins-with{display:inline-flex;align-items:center;gap:5px;flex-wrap:wrap;justify-content:flex-end}
.intake-window .ins-stamp input.ins-amount{width:120px;text-align:right;font-weight:700}
.intake-window .ins-stamp input.ins-incidents{width:48px}
.ins-stamp-insurer{padding-top:7px;border-top:1px solid #e5c7c3}
.ins-stamp-insurer>span,.ins-stamp-insurer>b{color:#23498a;font-weight:800}.ins-stamp-insurer>b{font-size:20px}
.ins-stamp-customer>span{display:grid}.ins-stamp-customer>span>span{font-weight:800;color:#22613c}
.ins-stamp-customer>b{color:#22613c;font-size:18px}
.ins-stamp b.qd-err{color:var(--intake-red,#a33f2c)}
@media(max-width:900px){.ins-under{grid-template-columns:minmax(0,1fr)}.ins-parts{grid-template-columns:minmax(0,1fr)}}
@media(max-width:600px){.ins-row,.ins-under .ins-row{grid-template-columns:minmax(0,1fr)}.ins-label{padding-top:0}.ins-pair{grid-template-columns:minmax(0,1fr)}}
/* the phone (quote-phone.mjs, settlement-phone.mjs): the line and the parts read only */
.quote-phone .ins-line,.money-phone .ins-line,.money-car .ins-line{margin:6px 0 0;font-size:13px}
.qp-parts{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;margin-top:8px}
.qp-parts .ins-part b{font-size:17px}
/* Ảnh báo giá có dấu GĐV (insurance-photos.mjs; drawings 03–05 of plan-ke-toan-008b): 📎 n ảnh and ＋ Ảnh on the blue line, the row of the two windows */
.ins-clip{display:inline-flex;align-items:center;min-height:0;margin:0;padding:1px 9px;border:0;border-radius:10px;background:#dfe8f8;color:#23498a;font:750 11.5px/1.6 system-ui,sans-serif;white-space:nowrap;cursor:pointer}
.ins-clip:hover{background:#cfdcf3}.ins-clip:focus-visible,.ins-clip-add:focus-visible{outline:2px solid #23498a;outline-offset:2px}
.ins-clip-add{display:inline-flex;align-items:center;gap:2px;margin:0;padding:0 9px;border:1px dashed #6d8fc6;border-radius:10px;background:#fff;color:#23498a;font:700 11.5px/1.6 system-ui,sans-serif;white-space:nowrap;cursor:pointer}
.ins-clip-add big{font-size:12px;line-height:1}.ins-clip-add[hidden]{display:none}
.ins-photos{display:flex;align-items:center;min-width:0;min-height:40px;padding:6px 8px;border:1px solid #b9c8be;border-radius:5px;background:#fff}
.ins-photo-row .vp-thumb,.ins-photo-row .vp-add{width:64px;height:80px}
.ins-photo-row .vp-thumb i{font-size:9.5px}.ins-photo-row .vp-add{font-size:11px}
.ins-photo-row .vp-drop{width:22px;height:22px;line-height:22px}
.ins-photo-none{font-size:12.5px;color:#7a877f}
.ins-photo-note[data-kind=warn]{color:#8a5a0c}
/* Lịch sử sửa chữa: phụ trách: under a part issued (repair-history.mjs; PLAN-LAP-PHU-TUNG-001). */
.qd-hlines small.qd-hfit{display:block;margin-top:1px;font-size:11.5px;font-weight:600;color:#2f6b48;white-space:normal}
