/* Sổ tay xe 2.0 — screens-a.css · kiểu RIÊNG của Tổng quan (.s-home), Danh sách xe (.s-veh), Hồ sơ xe (.s-prof),
 * Chi tiết hạng mục (.s-plan), Chi tiết bản ghi (.s-rec) — do agent H sở hữu. © Kiên VC
 * Chỉ dùng token (tokens.css) + thành phần (components.css); KHÔNG định nghĩa lại class của bộ kit. Chỉ điện thoại dọc.
 * Mục lục: 1 Chung · 2 Tổng quan · 3 Danh sách xe · 4 Hồ sơ xe (hero, tab Tổng quan, Nhật ký, Giấy tờ, Thông tin) · 5 Hạng mục · 6 Bản ghi */

/* ============ 1. CHUNG ============ */
.s-home .pill, .s-prof .pill, .s-plan .pill { max-width: 100%; white-space: normal; }          /* pill dài (chu kỳ, tên xe) tự xuống dòng ở 320 px */
.s-home .row > .btn { flex: none; }
.s-notes { white-space: pre-wrap; }
.s-hint { font-size: 14px; color: var(--text-2); }
.s-hint .btn { margin-top: 10px; }

/* ============ 2. TỔNG QUAN ============ */
/* vòng "% đang ổn" nằm trong thẻ navy (chữ trắng vì nền navy) */
.s-home .ovc .s-pct { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .16); }
.s-home .ovc .s-pct svg { width: 40px; height: 40px; flex: none; transform: rotate(-90deg); }
.s-home .ovc .s-pct .bg { stroke: rgba(255, 255, 255, .22); }
.s-home .ovc .s-pct .fg { stroke: #fff; stroke-linecap: round; }
.s-home .ovc .s-pct-t { font-size: 13px; line-height: 1.3; color: rgba(255, 255, 255, .92); min-width: 0; }
.s-home .ovc .s-pct-t b { font-size: 18px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.s-home .ovc .s-pct-t small { display: block; font-size: 12px; color: rgba(255, 255, 255, .8); }
.s-home .ovc .ovc-sub { max-width: 21em; }

/* thẻ "Cần chú ý": khung có thanh màu bên trái; bên trong là UI.maintRow (huy hiệu chữ + icon, tiến độ, nút riêng) */
.s-att { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--sh-1); padding: 14px 14px 14px 20px; margin-bottom: 10px; overflow: hidden; cursor: pointer; }
.s-att::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--st-soon-bar); }
.s-att.st-over::before { background: var(--st-over-bar); }
.s-att.st-maybe::before { background: var(--st-maybe-bar); }
.s-att:active { transform: scale(.99); }
.s-att > .mrow { padding: 0; }
.s-att .ma { align-items: stretch; }
.s-att .ma .btn.s-quick { flex: 1 1 auto; }
.s-att .ma .btn.s-more { flex: 0 0 52px; padding: 0; }
.s-att .ma .btn.s-more svg { width: 22px; height: 22px; }

/* băng chuyền xe */
.s-vstrip { gap: 12px; padding-bottom: 10px; scroll-snap-type: x proximity; scroll-padding-left: var(--gxl); }
.s-vstrip > .vehcard, .s-vstrip > .s-addveh { scroll-snap-align: start; flex: none; width: min(272px, calc(100vw - 2 * var(--gutter) - 36px)); }
.s-addveh { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 220px; border: 2px dashed var(--border-strong); border-radius: var(--r-card); background: transparent; color: var(--accent); font-weight: 600; font-size: 15px; }
.s-addveh:active { background: var(--blue-soft); }
.s-addveh-i { width: 48px; height: 48px; border-radius: 50%; background: var(--blue-soft); display: grid; place-items: center; }
.s-addveh-i svg { width: 24px; height: 24px; }

/* nút "Cập nhật km" trên thẻ xe (chip nổi trên ảnh · icon trong thẻ gọn) */
.s-home .s-vkm, .s-veh .s-vkm { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; min-height: 44px; border: 0; border-radius: var(--r-pill); font-size: 13px; font-weight: 600; white-space: nowrap; }
.s-home .s-vkm svg, .s-veh .s-vkm svg { width: 18px; height: 18px; flex: none; }
.s-home .vehcard.featured > .s-vkm, .s-veh .vehcard.featured > .s-vkm { position: absolute; top: 10px; right: 10px; z-index: 2; padding: 0 14px 0 12px; background: rgba(20, 43, 74, .76); color: #fff; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.s-home .vehcard.compact > .s-vkm, .s-veh .vehcard.compact > .s-vkm { flex: none; width: 44px; padding: 0; background: var(--surface-3); color: var(--text); }
.s-vkm:active { transform: scale(.94); }
.s-home .vehcard .vc-top, .s-veh .vehcard .vc-top { flex-wrap: wrap; gap: 4px 8px; }               /* tên dài + biển số dài: biển số rơi xuống dòng dưới thay vì ép tên */
.s-home .vehcard .vc-name, .s-veh .vehcard .vc-name { flex: 1 1 7em; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.s-home .vehcard .plate, .s-veh .vehcard .plate { max-width: 100%; overflow-wrap: anywhere; white-space: normal; }
.s-vcost { font-size: 12px; font-weight: 600; color: var(--text-2); white-space: nowrap; }

/* chi phí tháng này */
.s-cost-lbl { font-size: var(--fs-cap); font-weight: 500; color: var(--text-2); }
.s-cost-amt { font-size: 32px; line-height: 1.1; font-weight: 700; letter-spacing: -.02em; margin-top: 2px; }
.s-cost-cmp { font-size: var(--fs-cap); color: var(--text-2); margin-top: 8px; }
.s-cbar { display: flex; gap: 2px; height: 12px; border-radius: 6px; overflow: hidden; background: var(--surface-3); margin: 14px 0 8px; }
.s-cbar > i { display: block; height: 100%; min-width: 4px; }
.s-cost .legend .li:first-child { border-top: 0; }

/* hàng "Sắp tới" */
.s-when { flex: none; display: flex; flex-direction: column; align-items: flex-end; font-size: 12px; line-height: 1.35; color: var(--text-2); text-align: right; }
.s-when b { font-size: 14px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.s-when span { white-space: nowrap; }

/* trạng thái trống */
.s-empty-acts { display: grid; gap: 10px; max-width: 320px; margin: 16px auto 0; }

/* ============ 3. DANH SÁCH XE ============ */
.s-vchips { margin-top: 12px; }
.s-vtools { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 12px; align-items: end; }
.s-vtools .field { margin: 0; }
.s-vtools .seg { min-height: 48px; }
.s-vcount { margin: 8px 2px 10px; }
.s-vlist { display: grid; gap: 12px; }
.s-sold .vehcard { opacity: .78; }

/* ============ 4. HỒ SƠ XE ============ */
/* hero: ảnh / silhouette + khối navy (tên, biển số, loại, Số km, nút Cập nhật km) */
.s-ph { margin-top: 4px; border-radius: var(--r-card); overflow: hidden; color: #fff; background: linear-gradient(145deg, var(--navy) 0%, var(--navy-2) 100%); }
.s-ph-in { padding: 14px 16px 16px; }
.s-ph-photo { position: relative; }
.s-ph-cam { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 14px; border: 0; border-radius: var(--r-pill); background: rgba(15, 23, 42, .74); color: #fff; font: inherit; font-size: var(--fs-cap); font-weight: 600; }
.s-ph-cam svg { width: 18px; height: 18px; }
.s-ph-top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 6px 10px; }
.s-ph-name { flex: 1 1 55%; min-width: 0; font-size: 20px; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; overflow-wrap: anywhere; }
.s-ph .plate { flex: none; max-width: 100%; overflow-wrap: anywhere; white-space: normal; color: #fff; border-color: rgba(255, 255, 255, .85); background: rgba(255, 255, 255, .14); }
.s-ph-sub { margin-top: 2px; font-size: var(--fs-cap); color: rgba(255, 255, 255, .84); }
.s-ph-sold { margin-top: 8px; }
.s-ph-km { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px 12px; flex-wrap: wrap; margin-top: 14px; }
.s-ph-kmv { min-width: 0; }
.s-ph-lbl { font-size: 12px; font-weight: 500; color: rgba(255, 255, 255, .8); }
.s-ph-odo { font-size: 16px; font-weight: 700; line-height: 1.15; }
.s-ph-odo .num { font-size: 32px; letter-spacing: -.03em; }
.s-ph-odo.none { font-size: 18px; margin-top: 2px; }
.s-ph-date, .s-ph-est { font-size: var(--fs-cap); color: rgba(255, 255, 255, .86); }
.s-ph-est { font-weight: 600; }
.s-ph-est span { font-weight: 400; opacity: .85; }
.s-ph .btn.s-ph-btn { flex: none; background: #fff; color: var(--navy); }
.s-ph .btn.s-ph-btn:active { background: #E4ECF9; }
.s-prof .tabs { margin-top: 14px; }
.s-prof .banner:first-of-type { margin-top: 12px; }

/* tab Tổng quan */
.s-sum { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.s-sumtile { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-height: 44px; padding: 12px; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--sh-1); }
.s-sumtile:active { transform: scale(.98); }
.s-sumtile b { font-size: 28px; line-height: 1; font-weight: 700; color: var(--text-2); }
.s-sumtile.has.st-over b { color: var(--st-over-fg); }
.s-sumtile.has.st-maybe b { color: var(--st-maybe-fg); }
.s-sumtile.has.st-soon b { color: var(--st-soon-fg); }
.s-sumtile.has.st-ok b { color: var(--st-ok-fg); }
.s-prof .sec .count { white-space: nowrap; }
.s-prof .mrow .mn { min-width: 0; }

/* tab Bảo dưỡng: nút "Đã làm" nhanh trong dòng */
.s-prof .mrow .ma .btn.s-quick { flex: 0 0 auto; }
.s-prof .mrow .ma .btn.s-more { flex: 0 0 52px; padding: 0; }
.s-prof .mrow .ma .btn.s-more svg { width: 22px; height: 22px; }

/* tab Nhật ký */
.s-logchips { margin-top: 12px; }
.s-logsum { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; margin: 8px 2px 0; }
.s-logsum .tbtn { font-size: 14px; margin-right: -10px; }
.s-mh { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 18px 2px 8px; font-size: 14px; font-weight: 700; color: var(--text); }
.s-mh .num { font-size: var(--fs-cap); font-weight: 600; color: var(--text-2); }
.s-logsum + #log-list > .s-mh:first-child { margin-top: 8px; }

/* tab Giấy tờ */
.s-doc { margin-bottom: 12px; }
.s-doc-main { display: flex; align-items: stretch; gap: 14px; }
.s-doc-days { flex: none; width: 84px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 10px 6px; border-radius: var(--r-ctl); text-align: center; background: var(--st-unk-bg); color: var(--st-unk-fg); }
.s-doc-days b { font-size: 30px; line-height: 1; font-weight: 800; }
.s-doc-days span { margin-top: 4px; font-size: 12px; font-weight: 700; line-height: 1.2; }
.s-doc-days.st-over { background: var(--st-over-bg); color: var(--st-over-fg); }
.s-doc-days.st-soon { background: var(--st-soon-bg); color: var(--st-soon-fg); }
.s-doc-days.st-ok { background: var(--st-ok-bg); color: var(--st-ok-fg); }
.s-doc-body { flex: 1 1 auto; min-width: 0; }
.s-doc-t { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 4px; }
.s-doc-n { min-width: 0; font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }

/* tab Thông tin */
.s-prof .tbl tr[data-go] { cursor: pointer; }
.s-prof .tbl td:first-child, .s-prof .tbl th:first-child { white-space: nowrap; }       /* ngày không bị bẻ giữa chừng */

/* ============ 5. CHI TIẾT HẠNG MỤC ============ */
.s-pl-head { display: flex; align-items: center; gap: 12px; }
.s-pl-ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 26px; flex: none; }
.s-pl-name { font-size: 19px; line-height: 1.25; font-weight: 700; overflow-wrap: anywhere; }
.s-pl-st { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 12px; }
.s-pl-due { margin-top: 8px; font-size: 15px; overflow-wrap: anywhere; }
.s-pl-card .progress { margin-top: 12px; height: 8px; border-radius: 4px; }
.s-pl-card .progress > i { border-radius: 4px; }

/* ============ 6. CHI TIẾT BẢN GHI ============ */
.s-rec-sum { padding: 16px; }
.s-rec-ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex: none; font-size: 26px; background: rgba(255, 255, 255, .16); }
.s-rec-t { font-size: 18px; line-height: 1.25; font-weight: 700; overflow-wrap: anywhere; }
.s-rec-v { margin-top: 2px; font-size: var(--fs-cap); color: rgba(255, 255, 255, .84); }
.s-rec-amt { margin-top: 12px; font-size: 32px; line-height: 1.1; font-weight: 800; letter-spacing: -.02em; overflow-wrap: anywhere; }
.s-rec .kv a { display: inline-block; padding: 13px 0; margin: -13px 0; }                    /* liên kết địa điểm: vùng chạm ≥ 44 px */
.s-lines .row.s-tot { min-height: 48px; background: var(--surface-2); font-weight: 700; }
.s-lines .row.s-tot .num { font-weight: 700; }
.s-photos .ph { width: 96px; height: 96px; }
.s-photo-big { display: block; width: 100%; max-height: 70vh; object-fit: contain; border-radius: var(--r-ctl); background: var(--surface-3); }   /* ảnh chứng từ trong sheet */
