/* ============================================================
   JVCeco Dealer App · giao diện iOS (iPhone 15/16 · 393×852 pt)
   Nền sáng trung tính · 1 màu nhấn rust JVC · thẻ bo 20–24 · bóng rất nhẹ
   ============================================================ */
:root {
  --bg: #f5f5f7;
  --bg2: #ececf0;
  --card: #ffffff;
  --ink: #1d1d1f;
  --ink2: #6e6e73;
  --ink3: #a1a1a6;
  --sep: rgba(60, 60, 67, .13);
  --fill: rgba(118, 118, 128, .12);
  --fill2: rgba(118, 118, 128, .08);
  --acc: #b4420f;
  --acc-ink: #9a380b;
  --acc-soft: rgba(180, 66, 15, .08);
  --acc-soft2: rgba(180, 66, 15, .14);
  --ok: #1f7a3a;
  --ok-soft: rgba(31, 122, 58, .09);
  --warn: #a35200;
  --warn-soft: rgba(196, 110, 0, .1);
  --bad: #c4001a;
  --bad-soft: rgba(215, 0, 21, .08);
  --r-card: 22px;
  --r-sm: 14px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 6px 22px rgba(0, 0, 0, .045);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .05), 0 18px 44px rgba(0, 0, 0, .08);
  --sat: 54px;
  --sab: 34px;
  --tab-h: calc(49px + var(--sab));
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(.25, .8, .25, 1);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); color: var(--ink); background: #e9e9ed; -webkit-font-smoothing: antialiased; font-size: 15px; line-height: 1.38; letter-spacing: -.01em; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
input, textarea, select { font: inherit; color: inherit; }
a { color: var(--acc); text-decoration: none; }
b, strong { font-weight: 600; }

/* ---------- sân khấu desktop + khung máy ---------- */
.stage { min-height: 100vh; display: flex; align-items: center; justify-content: center; gap: 72px; padding: 20px;
  background: radial-gradient(1200px 700px at 70% 40%, #fbfbfd 0%, #ececf0 55%, #e2e2e7 100%); }
.stage-side { width: 300px; color: var(--ink2); }
.side-brand { font-size: 34px; letter-spacing: -.03em; color: var(--ink); line-height: 1; }
.side-brand b { font-weight: 800; }
.side-brand span { font-weight: 300; color: var(--acc); }
.side-brand img { height: 52px; max-width: 260px; object-fit: contain; display: block; }
.stage-side h2 { margin: 8px 0 14px; font-size: 15px; font-weight: 500; color: var(--ink2); letter-spacing: .14em; text-transform: uppercase; }
.stage-side p { font-size: 15px; line-height: 1.55; margin: 0 0 22px; }
.stage-side ul { list-style: none; padding: 0; margin: 0 0 26px; }
.stage-side li { border-top: .5px solid var(--sep); }
.stage-side li:last-child { border-bottom: .5px solid var(--sep); }
.stage-side li a { display: block; padding: 11px 0; color: var(--ink); font-size: 14px; }
.stage-side li a::after { content: "↗"; float: right; color: var(--ink3); }
.stage-side small { font-size: 12px; color: var(--ink3); }

.device { flex: none; transform-origin: center center; }
.device-frame { position: relative; padding: 12px; border-radius: 66px; background: linear-gradient(145deg, #3a3a3d, #121214 40%, #2a2a2d);
  box-shadow: 0 0 0 1.5px #59595e inset, 0 0 0 1px #0b0b0c, 0 40px 80px rgba(0, 0, 0, .22), 0 12px 24px rgba(0, 0, 0, .12); }
.device-frame::before { content: ""; position: absolute; inset: 5px; border-radius: 61px; border: 1px solid rgba(255, 255, 255, .06); pointer-events: none; }
.hw { position: absolute; width: 4px; background: linear-gradient(90deg, #2b2b2e, #4a4a4f); border-radius: 2px; }
.hw-action { left: -3px; top: 150px; height: 32px; }
.hw-vup { left: -3px; top: 210px; height: 62px; }
.hw-vdn { left: -3px; top: 286px; height: 62px; }
.hw-power { right: -3px; top: 240px; height: 96px; }
.screen { position: relative; width: 393px; height: 852px; border-radius: 54px; overflow: hidden; overflow: clip; background: var(--bg); isolation: isolate; }

.statusbar { position: absolute; top: 0; left: 0; right: 0; height: var(--sat); z-index: 80; display: flex; align-items: center; justify-content: space-between; padding: 6px 30px 0 46px; pointer-events: none; color: var(--ink); transition: color .2s; }
.statusbar.dark { color: #fff; }
.sb-time { font-weight: 600; font-size: 17px; letter-spacing: -.02em; width: 54px; text-align: center; }
.sb-icons { display: flex; gap: 6px; align-items: center; }
.sb-icons svg { fill: currentColor; }
.island { position: absolute; left: 50%; top: 11px; width: 125px; height: 37px; margin-left: -62.5px; background: #000; border-radius: 20px; }
.home-ind { position: absolute; bottom: 8px; left: 50%; width: 136px; height: 5px; margin-left: -68px; border-radius: 3px; background: #111; z-index: 90; pointer-events: none; opacity: .9; }

/* màn hẹp (≤520px): bỏ viền máy, màn hình chiếm toàn bộ cửa sổ */
@media (max-width: 520px) {
  body { background: var(--bg); }
  .stage { padding: 0; display: block; min-height: 0; background: var(--bg); }
  .stage-side, .hw { display: none; }
  .device { zoom: 1 !important; }
  .device-frame { padding: 0; border-radius: 0; background: none; box-shadow: none; }
  .device-frame::before { display: none; }
  .screen { width: 100vw; height: 100vh; height: 100dvh; border-radius: 0; }
}
/* điện thoại thật (cảm ứng): dùng thanh trạng thái + safe-area thật của máy */
@media (max-width: 520px) and (pointer: coarse) {
  .statusbar, .home-ind { display: none; }
  :root { --sat: env(safe-area-inset-top, 20px); --sab: env(safe-area-inset-bottom, 0px); }
}
@media (max-width: 1100px) and (min-width: 521px) { .stage-side { display: none; } }

/* ---------- khung nội dung ---------- */
.view { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none; overscroll-behavior: contain; }
.view::-webkit-scrollbar { display: none; }
.page { min-height: 100%; padding-bottom: calc(var(--tab-h) + 28px); }
.page.notab { padding-bottom: calc(var(--sab) + 110px); }
.page.push { animation: pushIn .22s var(--ease); }
.page.pop { animation: popIn .22s var(--ease); }
.page.fade { animation: fadeIn .22s ease; }
@keyframes pushIn { from { transform: translateX(34%); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes popIn { from { transform: translateX(-24%); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.tap { transition: transform .16s var(--ease), opacity .16s; }
.tap:active { transform: scale(.97); opacity: .9; }
.ic { flex: none; display: block; }

/* nav bar iOS: large title co lại khi cuộn */
.nav { position: sticky; top: 0; z-index: 30; padding-top: var(--sat); transition: background .2s, box-shadow .2s; }
.nav.scrolled, .nav.solid { background: rgba(245, 245, 247, .8); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); box-shadow: 0 .5px 0 var(--sep); }
.nav.clear:not(.scrolled) { background: transparent; box-shadow: none; }
.nav-bar { height: 44px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 12px; }
.nav-l { display: flex; align-items: center; justify-self: start; min-width: 0; }
.nav-r { display: flex; align-items: center; gap: 8px; justify-self: end; }
.nav-t { font-size: 17px; font-weight: 600; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s; }
.nav.scrolled .nav-t, .nav.always .nav-t { opacity: 1; transform: none; }
.nback { display: flex; align-items: center; gap: 0; color: var(--acc); font-size: 17px; height: 44px; padding-right: 8px; margin-left: -4px; }
.nback .ic { width: 28px; height: 28px; stroke-width: 2.2; }
.nbtn { position: relative; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); background: rgba(255, 255, 255, .72); box-shadow: 0 0 0 .5px var(--sep); }
.nbtn.plain { background: none; box-shadow: none; color: var(--acc); }
.nbtn .badge { position: absolute; top: -3px; right: -4px; }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--acc); color: #fff; font-size: 11px; font-weight: 600; display: inline-grid; place-items: center; font-style: normal; box-shadow: 0 0 0 2px var(--bg); }
.ltitle { padding: 2px 20px 6px; }
.ltitle .eyebrow { font-size: 13px; color: var(--ink2); font-weight: 500; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 2px; }
.ltitle h1 { margin: 0; font-size: 34px; line-height: 41px; font-weight: 700; letter-spacing: -.025em; }
.ltitle p { margin: 4px 0 0; color: var(--ink2); font-size: 15px; }

/* ---------- khối chung ---------- */
.pad { padding-left: 20px; padding-right: 20px; }
.sec { margin-top: 30px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; padding: 0 20px; margin-bottom: 12px; }
.sec-h h2 { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: -.02em; }
.sec-h .lnk { color: var(--acc); font-size: 15px; }
.sec-h .sub { color: var(--ink2); font-size: 13px; }
.card { background: var(--card); border-radius: var(--r-card); box-shadow: var(--shadow); }
.card.p { padding: 18px; }
.mute { color: var(--ink2); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.acc { color: var(--acc); }
.okc { color: var(--ok); }
.warnc { color: var(--warn); }
.badc { color: var(--bad); }
.strike { text-decoration: line-through; color: var(--ink3); font-weight: 400; }
.hr { height: .5px; background: var(--sep); margin: 14px 0; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 12px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.note { font-size: 12px; color: var(--ink3); line-height: 1.45; }
.label-illus { position: absolute; right: 12px; bottom: 10px; font-size: 10px; color: var(--ink3); letter-spacing: .02em; }

.pill { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px; border-radius: 12px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--fill2); color: var(--ink2); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.acc { background: var(--acc-soft); color: var(--acc); }
.pill.dark { background: var(--ink); color: #fff; }
.pill .ic { width: 13px; height: 13px; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: currentColor; }

/* nút */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 52px; border-radius: 16px; background: var(--acc); color: #fff; font-size: 17px; font-weight: 600; letter-spacing: -.01em; transition: transform .16s var(--ease), opacity .16s, background .2s; }
.btn:active { transform: scale(.975); }
.btn[disabled] { opacity: .35; pointer-events: none; }
.btn.dark { background: var(--ink); }
.btn.ghost { background: var(--fill); color: var(--ink); }
.btn.line { background: transparent; color: var(--acc); box-shadow: inset 0 0 0 1px var(--acc-soft2); }
.btn.sm { height: 36px; border-radius: 18px; font-size: 15px; width: auto; padding: 0 16px; }
.btn .ic { width: 20px; height: 20px; }
.btn + .btn { margin-top: 10px; }
.linkbtn { color: var(--acc); font-size: 15px; font-weight: 500; display: inline-flex; align-items: center; gap: 2px; }
.linkbtn .ic { width: 16px; height: 16px; }

/* segmented control */
.seg { display: flex; background: var(--fill); border-radius: 10px; padding: 2px; margin: 0 20px; }
.seg button { flex: 1; height: 32px; border-radius: 8px; font-size: 13.5px; font-weight: 500; text-align: center; color: var(--ink); transition: background .2s, box-shadow .2s; white-space: nowrap; }
.seg button.on { background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .1), 0 1px 1px rgba(0, 0, 0, .05); font-weight: 600; }
.seg button i { font-style: normal; color: var(--ink2); font-weight: 500; margin-left: 3px; }

/* chip ngang */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 20px 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 36px; padding: 0 14px; border-radius: 18px; background: var(--card); box-shadow: 0 0 0 .5px var(--sep); display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 500; color: var(--ink); white-space: nowrap; }
.chip .ic { width: 17px; height: 17px; color: var(--ink2); }
.chip.on { background: var(--ink); color: #fff; box-shadow: none; }
.chip.on .ic { color: #fff; }

/* ô tìm kiếm iOS */
.searchbox { display: flex; align-items: center; gap: 8px; height: 40px; border-radius: 12px; background: var(--fill); padding: 0 6px 0 10px; margin: 0 20px; color: var(--ink2); }
.searchbox input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 17px; color: var(--ink); }
.searchbox input::placeholder { color: var(--ink3); }
.searchbox .ic { width: 18px; height: 18px; }
.searchbox .scanbtn { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--acc); }

/* danh sách nhóm iOS (inset grouped) */
.list { background: var(--card); border-radius: 18px; margin: 0 20px; overflow: hidden; box-shadow: var(--shadow); }
.lrow { display: flex; align-items: center; gap: 14px; padding: 13px 16px; min-height: 52px; position: relative; width: 100%; text-align: left; }
.lrow + .lrow::before { content: ""; position: absolute; top: 0; right: 0; left: 62px; height: .5px; background: var(--sep); }
.list.noico .lrow + .lrow::before { left: 16px; }
.lrow .lic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--fill2); color: var(--ink); flex: none; }
.lrow .lic.acc { background: var(--acc-soft); color: var(--acc); }
.lrow .lic .ic { width: 18px; height: 18px; }
.lrow .lt { flex: 1; min-width: 0; }
.lrow .lt b { display: block; font-weight: 500; font-size: 16px; }
.lrow .lt small { display: block; color: var(--ink2); font-size: 13px; margin-top: 1px; }
.lrow .lr { color: var(--ink2); font-size: 15px; display: flex; align-items: center; gap: 6px; flex: none; }
.lrow .chev { color: var(--ink3); width: 18px; height: 18px; }
.lrow.danger { color: var(--bad); justify-content: center; font-weight: 500; }
.lgroup-h { padding: 0 36px 7px; font-size: 13px; color: var(--ink2); text-transform: uppercase; letter-spacing: .04em; }
.lgroup-f { padding: 7px 36px 0; font-size: 12px; color: var(--ink3); }

/* ---------- đăng nhập ---------- */
.login { min-height: 100%; display: flex; flex-direction: column; padding: calc(var(--sat) + 18px) 24px calc(var(--sab) + 20px);
  background: radial-gradient(600px 380px at 85% 8%, rgba(180, 66, 15, .10), transparent 60%), linear-gradient(180deg, #fbfbfd 0%, #f2f2f5 100%); }
.wordmark { display: flex; align-items: baseline; gap: 0; font-size: 40px; line-height: 1; letter-spacing: -.035em; }
.wordmark b { font-weight: 800; }
.wordmark span { font-weight: 300; color: var(--acc); }
.wordmark img { height: 46px; max-width: 250px; object-fit: contain; display: block; }
.login .tagline { margin-top: 10px; font-size: 13px; color: var(--ink2); letter-spacing: .16em; text-transform: uppercase; font-weight: 500; }
.login .hero { margin: 18px -24px 4px; height: 220px; position: relative; display: grid; place-items: center; }
.login .hero .art, .login .hero img { width: 330px; height: 220px; object-fit: contain; }
.login h1 { font-size: 28px; line-height: 1.15; margin: 0; letter-spacing: -.025em; font-weight: 700; }
.login .lead { color: var(--ink2); margin: 8px 0 22px; font-size: 15px; }
.lg-field { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); }
.lg-field + .lg-field { margin-top: 12px; }
.lg-field label { display: block; font-size: 12px; color: var(--ink2); padding: 11px 16px 0; font-weight: 500; }
.lg-field input { width: 100%; border: 0; background: none; outline: none; font-size: 17px; padding: 3px 16px 12px; }
.lg-search { display: flex; align-items: center; gap: 10px; padding: 0 14px 0 16px; }
.lg-search input { padding-left: 0; padding-right: 0; }
.lg-sel { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.lg-sel .mono { width: 40px; height: 40px; border-radius: 12px; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 14px; flex: none; letter-spacing: -.02em; }
.lg-sel .grow b { display: block; font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-sel .grow small { color: var(--ink2); font-size: 13px; }
.lg-results { border-top: .5px solid var(--sep); max-height: 220px; overflow-y: auto; }
.lg-results button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 16px; font-size: 14px; }
.lg-results button + button { border-top: .5px solid var(--sep); }
.lg-results code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; color: var(--ink2); width: 52px; flex: none; }
.lg-results span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.login .btn { margin-top: 20px; }
.login .demo { margin-top: 14px; text-align: center; font-size: 12px; color: var(--ink3); line-height: 1.5; }
.login .foot { margin-top: auto; padding-top: 18px; text-align: center; font-size: 12px; color: var(--ink3); }

/* màn chào: nút Đăng nhập luôn trong màn hình đầu */
.welcome { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; background: #1c1b1f; color: #fff; }
.welcome .wl-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.welcome .wl-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.42) 0%, rgba(0,0,0,0) 22%, rgba(0,0,0,0) 42%, rgba(12,10,9,.82) 72%, rgba(12,10,9,.96) 100%); }
.welcome .wl-top { position: relative; padding: calc(var(--sat) + 14px) 24px 0; display: flex; align-items: center; gap: 10px; }
.welcome .wl-logo { background: rgba(255,255,255,.94); border-radius: 14px; padding: 8px 12px; display: inline-flex; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.welcome .wl-logo img { height: 26px; display: block; }
.welcome .wl-tag { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; font-weight: 600; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.4); }
.welcome .wl-body { position: relative; padding: 0 24px calc(var(--sab) + 34px); }
.welcome h1 { font-size: 31px; line-height: 1.12; letter-spacing: -.03em; font-weight: 700; margin: 0; }
.welcome p { margin: 10px 0 24px; font-size: 15px; line-height: 1.45; color: rgba(255,255,255,.78); }
.welcome .wl-link { display: block; width: 100%; margin-top: 14px; padding: 8px; font-size: 14px; color: rgba(255,255,255,.82); text-align: center; }
.lg-hd { display: flex; align-items: center; gap: 6px; margin: -14px 0 22px -10px; }
.lg-back { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 20px; color: var(--ink); }
.wordmark.sm img { height: 30px; }

/* ---------- trang chủ ---------- */
.home-hd { display: flex; align-items: center; justify-content: space-between; padding: 6px 20px 0; }
.brandlogo { font-size: 23px; letter-spacing: -.035em; line-height: 1; padding-left: 8px; }
.brandlogo b { font-weight: 800; }
.brandlogo span { font-weight: 300; color: var(--acc); }
.brandlogo img { height: 30px; max-width: 150px; object-fit: contain; display: block; }
.greet { padding: 18px 20px 0; }
.greet .eyebrow { font-size: 13px; color: var(--ink2); font-weight: 500; text-transform: uppercase; letter-spacing: .06em; }
.greet h1 { margin: 4px 0 0; font-size: 30px; line-height: 1.12; letter-spacing: -.028em; font-weight: 700; }
.greet .tierrow { margin-top: 12px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tierbadge { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px 0 8px; border-radius: 13px; background: linear-gradient(135deg, #2c2c2e, #1d1d1f); color: #f5e6d8; font-size: 12px; font-weight: 600; letter-spacing: .02em; }
.tierbadge .ic { width: 14px; height: 14px; color: #e0a37f; }

.credit { margin: 22px 20px 0; padding: 18px 18px 16px; }
.credit .k { font-size: 13px; color: var(--ink2); }
.credit .v { font-size: 30px; font-weight: 700; letter-spacing: -.03em; margin-top: 2px; }
.credit .v small { font-size: 15px; font-weight: 500; color: var(--ink2); margin-left: 4px; letter-spacing: -.01em; }
.bar { height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; margin-top: 12px; }
.bar i { display: block; height: 100%; border-radius: 3px; background: var(--ink); transition: width .4s var(--ease); }
.bar.acc i { background: var(--acc); }
.bar.warn i { background: #c46e00; }
.bar.bad i { background: var(--bad); }
.bar.ok i { background: var(--ok); }
.credit .meta { display: flex; justify-content: space-between; margin-top: 10px; font-size: 13px; color: var(--ink2); }
.credit .meta b { color: var(--ink); font-weight: 600; }

.hscroll { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 20px 8px; scroll-padding: 0 20px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; flex: none; }
.promo { width: 300px; height: 168px; border-radius: var(--r-card); padding: 18px; position: relative; overflow: hidden; color: #fff; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(240px 160px at 100% 0%, rgba(214, 120, 70, .55), transparent 70%), linear-gradient(150deg, #2a2a2d 0%, #141416 100%); box-shadow: var(--shadow); }
.promo.light { color: var(--ink); background: radial-gradient(260px 180px at 100% 0%, rgba(180, 66, 15, .14), transparent 70%), linear-gradient(150deg, #ffffff, #f1efec); }
.promo .tp { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; opacity: .7; font-weight: 600; }
.promo h3 { margin: 6px 0 0; font-size: 17px; line-height: 1.25; font-weight: 600; letter-spacing: -.015em; max-width: 210px; }
.promo .big { font-size: 34px; font-weight: 700; letter-spacing: -.035em; line-height: 1; }
.promo .ft { display: flex; align-items: flex-end; justify-content: space-between; }
.promo .ft small { font-size: 12px; opacity: .7; }
.promo.img { padding: 0; background: #f2f2f4; }
.promo.img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.promo.img .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 16px 12px; background: linear-gradient(transparent, rgba(0, 0, 0, .55)); font-size: 13px; font-weight: 500; }

.entries { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 20px; }
.entry { position: relative; height: 196px; border-radius: var(--r-card); overflow: hidden; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; background: linear-gradient(180deg, #ffffff 0%, #f0f0f3 100%); box-shadow: var(--shadow); }
.entry h3 { margin: 0; font-size: 19px; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; }
.entry p { margin: 4px 0 0; font-size: 12.5px; color: var(--ink2); }
.entry .media { position: absolute; left: 0; right: 0; bottom: 6px; height: 108px; }
.entry .go { position: absolute; right: 12px; top: 12px; width: 28px; height: 28px; border-radius: 50%; background: var(--fill2); display: grid; place-items: center; color: var(--ink2); }
.entry .go .ic { width: 16px; height: 16px; }

/* thẻ ngắn trong danh sách đơn/bảo hành */
.mini { display: flex; gap: 14px; align-items: center; padding: 14px 16px; width: 100%; text-align: left; }
.mini + .mini { border-top: .5px solid var(--sep); }
.mini .th { width: 56px; height: 56px; border-radius: 14px; background: linear-gradient(180deg, #fafafa, #efeff2); flex: none; overflow: hidden; display: grid; place-items: center; position: relative; }
.mini .th .media { width: 100%; height: 100%; }
.mini .grow b { display: block; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini .grow small { display: block; font-size: 13px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini .end { text-align: right; flex: none; }
.mini .end b { display: block; font-size: 15px; font-weight: 600; }
.progress-mini { height: 4px; border-radius: 2px; background: var(--fill); margin-top: 8px; overflow: hidden; }
.progress-mini i { display: block; height: 100%; background: var(--acc); border-radius: 2px; }

/* ---------- media sản phẩm (ảnh thật hoặc SVG minh hoạ) ---------- */
.media { position: relative; display: block; width: 100%; height: 100%; }
.media img { width: 100%; height: 100%; object-fit: contain; display: block; }
.media .art { width: 100%; height: 100%; display: none; }
.media.svg .art, .media.noimg .art { display: block; }
.media.noimg img { display: none; }
.media .illus { position: absolute; right: 6px; bottom: 2px; font-size: 9px; color: var(--ink3); letter-spacing: .02em; display: none; white-space: nowrap; }
.media.svg .illus, .media.noimg .illus { display: block; }
.media.nolabel .illus { display: none !important; }

/* ---------- XE ---------- */
.mgrid { display: grid; gap: 14px; padding: 0 20px; }
.mcard { position: relative; border-radius: 24px; overflow: hidden; background: var(--card); box-shadow: var(--shadow); display: block; width: 100%; text-align: left; }
.mcard .stagebg { height: 214px; position: relative; background: radial-gradient(70% 80% at 50% 60%, #ffffff 0%, #eeeef1 100%); }
.mcard .stagebg .media { position: absolute; inset: 12px 18px 6px; width: auto; height: auto; }
.mcard .line { position: absolute; left: 16px; top: 14px; }
.mcard .bd { padding: 14px 18px 18px; }
.mcard h3 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.mcard .spec { color: var(--ink2); font-size: 13px; margin-top: 3px; }
.mcard .ft { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 12px; }
.mcard .price { font-size: 17px; font-weight: 600; }
.mcard .price small { display: block; font-size: 12px; color: var(--ink2); font-weight: 400; }
/* lưới 2 sản phẩm / dòng (danh sách xe) */
.mgrid.two { grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 16px; }
.mgrid.two .mcard { border-radius: 18px; }
.mgrid.two .stagebg { height: 128px; }
.mgrid.two .stagebg .media { inset: 22px 6px 4px; }
.mgrid.two .line { left: 8px; top: 8px; transform: scale(.82); transform-origin: left top; }
.mgrid.two .bd { padding: 10px 12px 12px; }
.mgrid.two h3 { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mgrid.two .spec { font-size: 11px; line-height: 1.35; height: 2.7em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mgrid.two .ft { flex-direction: column; align-items: stretch; gap: 6px; margin-top: 8px; }
.mgrid.two .price { font-size: 15px; }
.mgrid.two .price small { font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mgrid.two .ft > div:last-child { display: flex; align-items: center; justify-content: space-between; text-align: left !important; }
.mgrid.two .ft > div:last-child .xs { margin-top: 0 !important; font-size: 10.5px; }
.mgrid.two .sw-dots i { width: 9px; height: 9px; }
.mgrid.two .apx { font-size: 9px; right: 6px; bottom: 2px; }
.sw-dots { display: flex; gap: 5px; }
.sw-dots i { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .2); }

.pd-hero { position: relative; height: 330px; margin-top: calc(-1 * (var(--sat) + 44px)); padding-top: calc(var(--sat) + 44px); background: radial-gradient(70% 70% at 50% 62%, #ffffff 0%, #ececf0 100%); overflow: hidden; }
.pd-hero .media { position: absolute; left: 18px; right: 18px; bottom: 16px; top: calc(var(--sat) + 40px); width: auto; height: auto; animation: fadeIn .3s ease; }
.pd-head { padding: 18px 20px 0; }
.pd-head .line { font-size: 13px; color: var(--acc); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.pd-head h1 { margin: 4px 0 0; font-size: 26px; line-height: 1.15; letter-spacing: -.025em; font-weight: 700; }
.pd-head .code { color: var(--ink2); font-size: 13px; margin-top: 4px; }
.swatches { display: flex; gap: 9px; padding: 0 20px; flex-wrap: wrap; }
.sw { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 50px; }
.sw i { width: 38px; height: 38px; border-radius: 50%; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .18), 0 1px 2px rgba(0, 0, 0, .08); position: relative; transition: transform .16s; }
.sw.on i { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--ink); }
.sw.zero i::after { content: ""; position: absolute; left: 50%; top: 4px; bottom: 4px; width: 1.5px; background: rgba(0, 0, 0, .35); transform: rotate(45deg); }
.sw small { font-size: 11px; color: var(--ink2); text-align: center; line-height: 1.2; }
.sw.on small { color: var(--ink); font-weight: 600; }
.colorname { padding: 0 20px 10px; font-size: 15px; }
.colorname b { font-weight: 600; }
.spts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 0 20px; }
.spt { background: var(--card); border-radius: 16px; padding: 14px 12px; box-shadow: var(--shadow); }
.spt .ic { width: 20px; height: 20px; color: var(--acc); margin-bottom: 10px; }
.spt b { display: block; font-size: 14px; font-weight: 600; line-height: 1.25; }
.spt small { color: var(--ink2); font-size: 11.5px; }
.whrow { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.whrow + .whrow { border-top: .5px solid var(--sep); }
.whrow .grow b { font-weight: 500; font-size: 15px; display: block; }
.whrow .grow small { color: var(--ink2); font-size: 12px; }
.whrow .qty { font-weight: 600; font-variant-numeric: tabular-nums; }
.whrow.sug .grow b::after { content: "Gợi ý"; margin-left: 8px; font-size: 11px; font-weight: 600; color: var(--acc); background: var(--acc-soft); padding: 2px 7px; border-radius: 6px; vertical-align: 1px; }
.pricebox { padding: 18px; }
.pricebox .lst { display: flex; justify-content: space-between; color: var(--ink2); font-size: 14px; }
.pricebox .net { display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px; }
.pricebox .net b { font-size: 26px; letter-spacing: -.03em; font-weight: 700; }
.pricebox .pols { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.polline { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.polline .ic { width: 16px; height: 16px; color: var(--acc); }
.polline span { flex: 1; color: var(--ink2); }
.polline b { font-weight: 600; font-variant-numeric: tabular-nums; }

.stepper { display: inline-flex; align-items: center; height: 36px; border-radius: 18px; background: var(--fill); }
.stepper button { width: 38px; height: 36px; display: grid; place-items: center; color: var(--ink); border-radius: 18px; }
.stepper button:active { background: rgba(0, 0, 0, .06); }
.stepper button .ic { width: 16px; height: 16px; stroke-width: 2.2; }
.stepper input { width: 40px; border: 0; background: none; text-align: center; font-weight: 600; font-size: 16px; outline: none; font-variant-numeric: tabular-nums; }

/* thanh hành động đáy (che tab bar) */
.actionbar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 40; padding: 12px 20px calc(var(--sab) + 10px); background: rgba(250, 250, 252, .86); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); box-shadow: 0 -.5px 0 var(--sep); display: flex; align-items: center; gap: 14px; }
.actionbar .tot { flex: 1; min-width: 0; }
.actionbar .tot small { display: block; font-size: 12px; color: var(--ink2); }
.actionbar .tot b { font-size: 19px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }
.actionbar .btn { width: auto; flex: none; padding: 0 22px; }

/* ---------- PHỤ KIỆN ---------- */
.tierhint { margin: 14px 20px 0; padding: 12px 14px; border-radius: 14px; background: var(--acc-soft); color: var(--acc-ink); font-size: 13px; display: flex; gap: 10px; align-items: flex-start; }
.tierhint .ic { width: 18px; height: 18px; margin-top: 1px; }
.plist { margin: 0 20px; background: var(--card); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.prow { display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 12px; width: 100%; text-align: left; }
.prow + .prow { border-top: .5px solid var(--sep); }
.prow .th { width: 72px; height: 72px; border-radius: 16px; background: linear-gradient(180deg, #fafafa, #efeff2); flex: none; position: relative; overflow: hidden; }
.prow .th .media { position: absolute; inset: 6px; width: auto; height: auto; }
.prow .grow b { display: block; font-size: 15px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prow .grow small { display: block; font-size: 12px; color: var(--ink2); margin-top: 2px; }
.prow .pr { font-size: 15px; font-weight: 600; margin-top: 4px; font-variant-numeric: tabular-nums; }
.prow .pr span { font-size: 12px; color: var(--ink2); font-weight: 400; }
.addbtn { width: 34px; height: 34px; border-radius: 50%; background: var(--fill); color: var(--acc); display: grid; place-items: center; flex: none; transition: transform .14s, background .2s; }
.addbtn:active { transform: scale(.88); background: var(--acc-soft2); }
.addbtn .ic { width: 18px; height: 18px; stroke-width: 2.2; }
.tiers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tier { border-radius: 14px; padding: 10px 8px; background: var(--fill2); text-align: center; }
.tier small { display: block; font-size: 11px; color: var(--ink2); }
.tier b { display: block; font-size: 13.5px; font-weight: 600; margin-top: 2px; font-variant-numeric: tabular-nums; }
.tier em { display: block; font-style: normal; font-size: 11px; color: var(--acc); margin-top: 1px; }
.tier.on { background: var(--ink); color: #fff; }
.tier.on small, .tier.on em { color: rgba(255, 255, 255, .7); }

/* ---------- GIỎ / THANH TOÁN ---------- */
.cline { display: flex; gap: 14px; padding: 14px 16px; }
.cline + .cline { border-top: .5px solid var(--sep); }
.cline .th { width: 76px; height: 76px; border-radius: 16px; background: linear-gradient(180deg, #fafafa, #efeff2); flex: none; position: relative; overflow: hidden; }
.cline .th .media { position: absolute; inset: 6px; width: auto; height: auto; }
.cline .grow b { display: block; font-size: 15px; font-weight: 600; line-height: 1.25; }
.cline .var { font-size: 13px; color: var(--ink2); margin-top: 2px; }
.cline .ln { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.cline .rm { color: var(--ink3); width: 28px; height: 28px; display: grid; place-items: center; }
.cline .rm .ic { width: 17px; height: 17px; }
.cline .warnl { font-size: 12px; color: var(--bad); margin-top: 6px; }
.sum { padding: 6px 18px; }
.sumrow { display: flex; justify-content: space-between; padding: 8px 0; font-size: 15px; gap: 12px; }
.sumrow span:first-child { color: var(--ink2); }
.sumrow span:last-child { font-variant-numeric: tabular-nums; text-align: right; }
.sumrow.neg span:last-child { color: var(--ok); }
.sumrow.tot { border-top: .5px solid var(--sep); margin-top: 4px; padding-top: 14px; padding-bottom: 12px; font-size: 17px; }
.sumrow.tot span { color: var(--ink) !important; font-weight: 700; }
.opt { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; width: 100%; text-align: left; }
.opt + .opt { border-top: .5px solid var(--sep); }
.opt .radio { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ink3); flex: none; margin-top: 1px; display: grid; place-items: center; }
.opt.on .radio { box-shadow: none; background: var(--acc); color: #fff; }
.opt.on .radio::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.opt .grow b { display: block; font-weight: 500; font-size: 16px; }
.opt .grow small { display: block; color: var(--ink2); font-size: 13px; margin-top: 2px; }
.opt .end { font-size: 14px; font-weight: 600; flex: none; }
.addr { padding: 16px; display: flex; gap: 14px; }
.addr .lic { width: 32px; height: 32px; border-radius: 9px; background: var(--acc-soft); color: var(--acc); display: grid; place-items: center; flex: none; }
.addr .lic .ic { width: 18px; height: 18px; }
.addr b { font-weight: 600; }
.addr small { display: block; color: var(--ink2); font-size: 13px; margin-top: 2px; }
.alert { margin: 12px 20px 0; padding: 12px 14px; border-radius: 14px; font-size: 13px; display: flex; gap: 10px; }
.alert .ic { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.alert.bad { background: var(--bad-soft); color: var(--bad); }
.alert.warn { background: var(--warn-soft); color: var(--warn); }
.alert.info { background: var(--fill2); color: var(--ink2); }
.check { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 14px; }
.check input { width: 20px; height: 20px; accent-color: var(--acc); }
.vsum { display: flex; align-items: center; gap: 14px; padding: 16px; width: 100%; text-align: left; }
.vsum .lic { width: 36px; height: 36px; border-radius: 10px; background: var(--acc-soft); color: var(--acc); display: grid; place-items: center; flex: none; }
.vsum .grow b { display: block; font-size: 16px; font-weight: 600; }
.vsum .grow small { display: block; color: var(--ink2); font-size: 13px; }
.vsum .save { color: var(--ok); font-weight: 600; font-size: 15px; }

/* ---------- VOUCHER (thẻ răng cưa) ---------- */
.tks { display: flex; flex-direction: column; gap: 12px; padding: 0 20px; }
.tk { --bgc: var(--bg); position: relative; display: flex; min-height: 112px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.sheet .tk { --bgc: #f2f2f6; }
.tk .stub { width: 96px; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 10px 6px; background: linear-gradient(160deg, #2a2a2d, #151517); color: #fff; text-align: center; position: relative; }
.tk.off .stub { background: linear-gradient(160deg, #c7c7cc, #aeaeb2); }
.tk .stub .ic { width: 18px; height: 18px; color: #e0a37f; }
.tk.off .stub .ic { color: #fff; }
.tk .stub b { font-size: 21px; font-weight: 700; letter-spacing: -.03em; line-height: 1.05; }
.tk .stub small { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; opacity: .7; font-weight: 600; }
.tk .perf { position: absolute; left: 96px; top: 0; bottom: 0; width: 0; border-left: 1.5px dashed rgba(60, 60, 67, .18); }
.tk .perf::before, .tk .perf::after { content: ""; position: absolute; left: -10px; width: 18px; height: 18px; border-radius: 50%; background: var(--bgc); }
.tk .perf::before { top: -9px; }
.tk .perf::after { bottom: -9px; }
.tk .body { flex: 1; min-width: 0; padding: 12px 14px 12px 16px; display: flex; flex-direction: column; }
.tk .body b { font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.tk .body .cond { font-size: 12px; color: var(--ink2); margin-top: 3px; line-height: 1.4; }
.tk .body .ft { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 8px; }
.tk .body .exp { font-size: 11.5px; color: var(--ink3); }
.tk .act { height: 30px; padding: 0 14px; border-radius: 15px; background: var(--acc); color: #fff; font-size: 13px; font-weight: 600; flex: none; }
.tk .act.saved { background: var(--fill); color: var(--ink2); }
.tk .sel { width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ink3); display: grid; place-items: center; flex: none; color: #fff; }
.tk .sel .ic { width: 16px; height: 16px; stroke-width: 2.6; }
.tk.picked { box-shadow: 0 0 0 1.5px var(--acc), var(--shadow); }
.tk.picked .sel { background: var(--acc); box-shadow: none; }
.tk .best { position: absolute; top: 0; right: 0; background: var(--acc); color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-bottom-left-radius: 10px; }

/* ---------- BẢO HÀNH ---------- */
.vinbox { margin: 0 20px; padding: 6px 6px 6px 16px; display: flex; align-items: center; gap: 10px; height: 56px; }
.vinbox input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font-size: 16px; font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .02em; text-transform: uppercase; }
.vinbox input::placeholder { font-family: var(--font); text-transform: none; letter-spacing: 0; color: var(--ink3); }
.vinbox .iconbtn { width: 44px; height: 44px; border-radius: 14px; background: var(--fill); display: grid; place-items: center; color: var(--ink); }
.vinbox .iconbtn.acc { background: var(--acc); color: #fff; }
.vin { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; letter-spacing: .01em; }
.cov { padding: 14px 16px; }
.cov + .cov { border-top: .5px solid var(--sep); }
.cov .between b { font-weight: 500; font-size: 15px; }
.cov .bar { margin-top: 8px; height: 5px; }
.cov small { display: block; margin-top: 6px; font-size: 12px; color: var(--ink2); }
.slaring { width: 64px; height: 64px; flex: none; position: relative; }
.slaring svg { width: 64px; height: 64px; transform: rotate(-90deg); }
.slaring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.tl { padding: 6px 16px 10px; }
.tl .st { display: flex; gap: 14px; position: relative; padding: 9px 0; }
.tl .st::before { content: ""; position: absolute; left: 10px; top: 30px; bottom: -9px; width: 1.5px; background: var(--sep); }
.tl .st:last-child::before { display: none; }
.tl .st.done::before { background: var(--ink); }
.tl .st .dt { width: 21px; height: 21px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ink3); background: var(--card); flex: none; display: grid; place-items: center; position: relative; z-index: 1; margin-top: 1px; }
.tl .st.done .dt { background: var(--ink); box-shadow: none; color: #fff; }
.tl .st.cur .dt { background: var(--acc); box-shadow: 0 0 0 5px var(--acc-soft2); color: #fff; }
.tl .st.rej .dt { background: var(--bad); box-shadow: none; color: #fff; }
.tl .st .dt .ic { width: 12px; height: 12px; stroke-width: 3; }
.tl .st .grow b { font-size: 15px; font-weight: 500; display: block; }
.tl .st.todo .grow b { color: var(--ink3); }
.tl .st .grow small { font-size: 12.5px; color: var(--ink2); }
.steps { display: flex; padding: 18px 12px 6px; }
.steps .s { flex: 1; text-align: center; font-size: 11.5px; color: var(--ink3); position: relative; }
.steps .s i { display: block; width: 12px; height: 12px; border-radius: 50%; margin: 0 auto 8px; background: var(--fill); position: relative; z-index: 1; }
.steps .s::before { content: ""; position: absolute; top: 5.5px; left: -50%; right: 50%; height: 1.5px; background: var(--fill); }
.steps .s:first-child::before { display: none; }
.steps .s.d { color: var(--ink); font-weight: 500; }
.steps .s.d i { background: var(--ink); }
.steps .s.d::before { background: var(--ink); }
.steps .s.c i { background: var(--acc); box-shadow: 0 0 0 4px var(--acc-soft2); }

.field { padding: 12px 16px; }
.field + .field { border-top: .5px solid var(--sep); }
.field label { display: block; font-size: 12px; color: var(--ink2); font-weight: 500; margin-bottom: 4px; }
.field input, .field textarea, .field select { width: 100%; border: 0; outline: none; background: none; font-size: 16px; padding: 2px 0; resize: none; -webkit-appearance: none; appearance: none; }
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a1a1a6' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right center; padding-right: 22px; }
.cchips { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 0; }
.cchip { height: 34px; padding: 0 12px; border-radius: 17px; background: var(--fill2); font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px; }
.cchip.on { background: var(--ink); color: #fff; }
.cchip small { font-size: 11px; opacity: .65; }
.photos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.photos .ph { aspect-ratio: 1; border-radius: 12px; overflow: hidden; position: relative; background: var(--fill2); }
.photos .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photos .ph button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; display: grid; place-items: center; }
.photos .ph button .ic { width: 12px; height: 12px; stroke-width: 2.6; }
.photos .add { aspect-ratio: 1; border-radius: 12px; box-shadow: inset 0 0 0 1.5px var(--sep); display: grid; place-items: center; color: var(--ink2); position: relative; cursor: pointer; }
.photos .add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photos .add .ic { width: 22px; height: 22px; }

/* ---------- TÀI KHOẢN ---------- */
.profile { margin: 8px 20px 0; padding: 20px; display: flex; gap: 16px; align-items: center; color: #fff; border-radius: 24px;
  background: radial-gradient(260px 160px at 100% 0%, rgba(214, 120, 70, .45), transparent 70%), linear-gradient(150deg, #2c2c2f, #161618); box-shadow: var(--shadow-lg); }
.profile .av { width: 60px; height: 60px; border-radius: 18px; background: rgba(255, 255, 255, .1); display: grid; place-items: center; font-size: 20px; font-weight: 600; flex: none; box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .2); }
.profile h2 { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.25; letter-spacing: -.015em; }
.profile p { margin: 3px 0 8px; font-size: 13px; opacity: .65; }
.aging { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.aging div { background: var(--fill2); border-radius: 12px; padding: 9px 8px; }
.aging small { display: block; font-size: 11px; color: var(--ink2); }
.aging b { display: block; font-size: 13.5px; font-weight: 600; margin-top: 2px; font-variant-numeric: tabular-nums; }
.aging .hot { background: var(--bad-soft); }
.aging .hot b { color: var(--bad); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 20px; }
.stat { padding: 16px; }
.stat small { display: block; font-size: 12.5px; color: var(--ink2); }
.stat b { display: block; font-size: 22px; font-weight: 700; letter-spacing: -.025em; margin-top: 4px; }
.toggle { width: 51px; height: 31px; border-radius: 16px; background: rgba(120, 120, 128, .16); position: relative; transition: background .2s; flex: none; }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .15), 0 1px 1px rgba(0, 0, 0, .06); transition: transform .22s var(--ease); }
.toggle.on { background: #34c759; }
.toggle.on::after { transform: translateX(20px); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 0; }
.kv dt, .kv dd { margin: 0; padding: 12px 16px; border-top: .5px solid var(--sep); font-size: 15px; }
.kv dt { color: var(--ink2); padding-right: 0; }
.kv dd { text-align: right; }
.kv dt:first-of-type, .kv dt:first-of-type + dd { border-top: 0; }
.vins { display: flex; flex-wrap: wrap; gap: 6px; }
.vins code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 11.5px; background: var(--fill2); padding: 4px 8px; border-radius: 7px; }
.sched { padding: 4px 16px 8px; }
.sched .r { display: flex; gap: 12px; align-items: center; padding: 10px 0; }
.sched .r + .r { border-top: .5px solid var(--sep); }
.sched .r .n { width: 26px; height: 26px; border-radius: 50%; background: var(--fill2); display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; }
.sched .r .grow b { display: block; font-size: 15px; font-weight: 500; }
.sched .r .grow small { color: var(--ink2); font-size: 12.5px; }
.sched .r .end { text-align: right; }
.sched .r .end b { display: block; font-variant-numeric: tabular-nums; font-weight: 600; }

/* ---------- tab bar ---------- */
.tabbar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 45; height: var(--tab-h); padding: 0 6px var(--sab); display: flex; align-items: flex-start;
  background: rgba(250, 250, 252, .82); -webkit-backdrop-filter: saturate(180%) blur(22px); backdrop-filter: saturate(180%) blur(22px); box-shadow: 0 -.5px 0 var(--sep); transition: transform .22s var(--ease); }
.tabbar[hidden] { display: none; }
.tabbar.away { transform: translateY(110%); }
.tabbar button { flex: 1; min-width: 0; height: 49px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #8e8e93; font-size: 10px; font-weight: 500; letter-spacing: .01em; position: relative; transition: transform .14s; }
.tabbar button:active { transform: scale(.92); }
.tabbar button .ic { width: 25px; height: 25px; }
.tabbar button.on { color: var(--acc); }
.tabbar button.on .ic { stroke-width: 2.05; }
.tabbar .badge { position: absolute; top: 3px; left: 50%; margin-left: 6px; box-shadow: none; }

/* ---------- sheet ---------- */
.sheet-wrap { position: absolute; inset: 0; z-index: 70; background: rgba(0, 0, 0, .3); animation: fadeIn .22s ease; display: flex; align-items: flex-end; }
.sheet-wrap[hidden] { display: none; }
.sheet-wrap.closing { animation: fadeOut .22s ease forwards; }
.sheet-wrap.closing .sheet { animation: sheetOut .22s var(--ease) forwards; }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes sheetOut { to { transform: translateY(100%); } }
.sheet { width: 100%; max-height: calc(100% - var(--sat) - 10px); background: #f2f2f6; border-radius: 28px 28px 0 0; display: flex; flex-direction: column; animation: sheetIn .32s cubic-bezier(.2, .9, .3, 1); box-shadow: 0 -10px 40px rgba(0, 0, 0, .12); }
@keyframes sheetIn { from { transform: translateY(100%); } to { transform: none; } }
.grab { width: 36px; height: 5px; border-radius: 3px; background: rgba(60, 60, 67, .3); margin: 7px auto 0; flex: none; }
.sh-h { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px 10px 20px; flex: none; }
.sh-h b { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.sh-h .close { width: 30px; height: 30px; border-radius: 50%; background: var(--fill); display: grid; place-items: center; color: var(--ink2); }
.sh-h .close .ic { width: 16px; height: 16px; stroke-width: 2.4; }
.sh-b { overflow-y: auto; padding: 4px 0 calc(var(--sab) + 18px); scrollbar-width: none; }
.sh-b::-webkit-scrollbar { display: none; }
.sh-b .list, .sh-b .card { box-shadow: none; }
.success { text-align: center; padding: 10px 24px 6px; }
.success .ring { width: 76px; height: 76px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; margin: 4px auto 16px; animation: pop .45s cubic-bezier(.2, 1.4, .4, 1); }
.success .ring .ic { width: 38px; height: 38px; stroke-width: 2.4; }
@keyframes pop { from { transform: scale(.5); opacity: 0; } to { transform: none; opacity: 1; } }
.success h3 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.success p { color: var(--ink2); margin: 6px 0 0; font-size: 15px; }
.success .idtag { display: inline-block; margin-top: 12px; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 14px; background: var(--card); padding: 6px 12px; border-radius: 10px; }

/* quét mã giả lập */
.scanner { margin: 4px 20px 0; height: 300px; border-radius: 24px; overflow: hidden; position: relative; background: radial-gradient(80% 80% at 50% 45%, #3a3a3e, #0d0d0f); }
.scanner .vf { position: absolute; left: 50%; top: 50%; width: 230px; height: 130px; margin: -65px 0 0 -115px; }
.scanner .vf i { position: absolute; width: 28px; height: 28px; border: 3px solid #fff; }
.scanner .vf i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 12px; }
.scanner .vf i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 12px; }
.scanner .vf i:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 12px; }
.scanner .vf i:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 12px; }
.scanner .line { position: absolute; left: 12px; right: 12px; height: 2px; background: #ff8a4c; box-shadow: 0 0 12px #ff8a4c; animation: scanl 1.2s ease-in-out infinite alternate; }
@keyframes scanl { from { top: 12px; } to { top: 116px; } }
.scanner .code { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-family: ui-monospace, "SF Mono", Menlo, monospace; color: rgba(255, 255, 255, .5); font-size: 13px; letter-spacing: .12em; }
.scanner .cap { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; color: rgba(255, 255, 255, .8); font-size: 14px; }
.scanner.done .line { display: none; }
.scanner.done .vf i { border-color: #30d158; }
.scanner.done .code { color: #fff; }

/* toast kiểu thông báo iOS */
.toast { pointer-events: none; position: absolute; left: 16px; right: 16px; top: calc(var(--sat) + 6px); z-index: 95; padding: 13px 16px; border-radius: 20px; background: rgba(250, 250, 252, .9); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .16), 0 0 0 .5px var(--sep); font-size: 14px; display: flex; gap: 12px; align-items: center; animation: toastIn .34s cubic-bezier(.2, .9, .3, 1); }
.toast[hidden] { display: none; }
.toast .ti { width: 32px; height: 32px; border-radius: 9px; background: var(--acc); color: #fff; display: grid; place-items: center; flex: none; }
.toast .ti .ic { width: 18px; height: 18px; }
@keyframes toastIn { from { transform: translateY(-140%); } to { transform: none; } }

.empty { text-align: center; padding: 40px 30px; color: var(--ink2); }
.empty .ei { width: 64px; height: 64px; border-radius: 20px; background: var(--fill2); display: grid; place-items: center; margin: 0 auto 14px; color: var(--ink3); }
.empty .ei .ic { width: 30px; height: 30px; }
.empty b { display: block; color: var(--ink); font-size: 17px; margin-bottom: 4px; }
.empty .btn { margin: 18px auto 0; max-width: 220px; }

.media.svc { display: grid; place-items: center; color: var(--ink2); }
.entry h3 { padding-right: 30px; }
.profile h2 { font-size: 20px; }
.banner { width: 353px; aspect-ratio: 1200 / 444; border-radius: 20px; overflow: hidden; background: #f1f1f3; box-shadow: var(--shadow); }
.banner img { width: 100%; height: 100%; object-fit: cover; display: block; }

.media .apx { position: absolute; right: 6px; bottom: 2px; font-size: 9px; color: var(--ink3); display: none; white-space: nowrap; font-style: normal; }
.media.approx .apx { display: block; }
.media.approx.noimg .apx, .media.nolabel .apx { display: none; }
.media .illus { font-style: normal; }
.media.real img { filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .10)); }
.gthumbs { display: flex; gap: 8px; overflow-x: auto; padding: 12px 20px 2px; scrollbar-width: none; }
.gthumbs::-webkit-scrollbar { display: none; }
.gth { flex: none; width: 58px; height: 58px; border-radius: 14px; background: var(--card); box-shadow: 0 0 0 .5px var(--sep); padding: 5px; }
.gth.on { box-shadow: 0 0 0 2px var(--ink); }
.app-icon { width: 64px; height: 64px; border-radius: 15px; box-shadow: 0 6px 18px rgba(0,0,0,.12), 0 0 0 .5px var(--sep); display: block; margin-bottom: 18px; background: #fff; }
