/* Dự toán nhanh — bố cục concept 05 (cậu chốt 13/11/2026): thẻ lớn chữ trái + ảnh công trình phải có khấc nút, 4 bước, phiếu, đường nối.
   27/11/2026 — lớp da Lucian UX/UI kiểu minimal như Valor dashboard (57-lucian) + web mẫu B (mau-b/nguon/b.css):
   token nền #f1f1ef / thẻ trắng, logo thật, icon nét mảnh 1.6; bỏ chấm pastel 4 bước, logo chữ «V» (lớp «đất sét» cũ).
   Chuyển động chỉ dùng transform/opacity; tắt hết khi prefers-reduced-motion. Lexend. */

/* Lucian UX/UI Prompt theme tokens · MIT License (c) 2026 Seokwoooo · https://lucianlabs.dev/uxui-prompt/ — map --ux-* sang token trang */
:root {
  color-scheme: light dark;
  --bg:#f1f1ef; --surface:#fff; --soft:#f4f4f3; --line:#ebebe9; --line2:#dadad7; --ink:#141414; --ink2:#4a4a48; --muted:#6b6b68;
  --pri:#1a70e8; --link:#155fc9; --warn:#b45309; --r-btn:12px;
  --sh-card:0 1px 2px rgba(20,24,36,.04),0 8px 24px -14px rgba(20,24,36,.12);
  --ease:cubic-bezier(.22,1,.36,1);
  --font:"Lexend",system-ui,-apple-system,"Segoe UI",sans-serif;
  --ux-page:var(--bg); --ux-surface:var(--surface); --ux-surface-2:var(--soft); --ux-surface-3:var(--line2);
  --ux-ink:var(--ink); --ux-ink-2:var(--ink2); --ux-ink-3:var(--muted); --ux-line:var(--line); --ux-line-2:var(--line2);
  --ux-accent:var(--pri); --ux-accent-ink:#fff; --ux-mint:#17a06a;
  --ux-shadow:rgba(20,24,36,.14); --ux-shadow-strong:rgba(20,24,36,.3);
  --ux-ease:cubic-bezier(.2,.8,.2,1); --ux-spring:cubic-bezier(.34,1.45,.64,1);
}
@media (prefers-color-scheme: dark) {
  :root { --bg:#0f0f0f; --surface:#181818; --soft:#232323; --line:#262626; --line2:#383838; --ink:#f0f0ee; --ink2:#c2c2be; --muted:#9a9a96;
    --pri:#256ee0; --link:#6aa8ff; --warn:#f0a35a;
    --sh-card:0 1px 2px rgba(0,0,0,.3),0 8px 24px -14px rgba(0,0,0,.6);
    --ux-shadow:rgba(0,0,0,.45); --ux-shadow-strong:rgba(0,0,0,.72); }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font: 400 15px/1.5 var(--font); font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased; letter-spacing: -.005em; -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--pri); outline-offset: 3px; }
.ic { flex: none; display: block; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---- đầu trang: một thẻ trắng lớn — trái chữ + nút + tiến độ, phải ảnh công trình (đổi theo loại) ---- */
.khung { max-width: 1240px; margin: 0 auto; padding: clamp(12px, 3vw, 28px) clamp(12px, 3vw, 32px) 0; }
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(16px, 3vw, 44px); padding: 12px;
  background: var(--surface); border-radius: 24px; box-shadow: var(--sh-card); min-height: min(640px, calc(100vh - 64px)); animation: len .7s var(--ease) both; }
.hero__trai { display: flex; flex-direction: column; min-width: 0; padding: clamp(20px, 3.2vw, 40px) 0 clamp(20px, 3vw, 34px) clamp(18px, 4vw, 56px); }
/* logo ngang chuẩn (27/11/2026): dấu phẳng cùng màu chữ, cao 2,2em, cách .8em, chữ 600 — không khối nền */
.logo { display: inline-flex; align-items: center; gap: .8em; align-self: flex-start; min-height: 44px; text-decoration: none; font-weight: 600; font-size: 12px; letter-spacing: -.01em; color: var(--ink); white-space: nowrap; margin-bottom: 20px; }
.logo svg { height: 2.2em; width: auto; flex: none; fill: currentColor; display: block; }
.hero__thanh i { flex: none; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--ink); color: var(--surface); }
.hero__thanh svg { width: 20px; height: 20px; fill: currentColor; display: block; }
.hero__txt { margin: auto 0; padding: 28px 0; }
.hero__nhan { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px !important; padding: 6px 12px 6px 9px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line2);
  font-size: 12.5px !important; font-weight: 500; color: var(--ink2) !important; }
.hero__nhan .ic { width: 16px; height: 16px; }
.hero h1 { font-size: clamp(34px, 4.6vw, 60px); font-weight: 500; letter-spacing: -.035em; line-height: 1.05; margin: 0 0 20px; max-width: 11.5ch; }
.hero p { margin: 0; font-size: clamp(14.5px, 1.2vw, 16.5px); line-height: 1.6; color: var(--ink2); max-width: 40ch; text-wrap: pretty; }
.nut-xanh { display: inline-flex; align-items: center; gap: 10px; margin-top: 28px; min-height: 48px; padding: 0 22px; border-radius: var(--r-btn); background: var(--ink); color: var(--surface);
  font-weight: 500; font-size: 14.5px; text-decoration: none; transform: scale(var(--k, 1)); transition: transform .4s var(--ux-spring), opacity .15s; }
.nut-xanh .ic { transition: transform .4s var(--ux-spring); }
@media (hover: hover) { .nut-xanh:hover { opacity: .9; } .nut-xanh:hover .ic { transform: translateX(3px); } }
.nut-xanh:active { --k: .96; transition-duration: .1s; }
.tien { max-width: 430px; }
.tien__so { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tien__so b { display: block; font-size: 15.5px; font-weight: 500; }
.tien__so small { display: block; font-size: 12.5px; color: var(--muted); }
.tien__thanh { height: 4px; border-radius: 4px; background: var(--soft); margin-top: 14px; overflow: hidden; }
.tien__thanh i { display: block; height: 100%; border-radius: 4px; background: var(--ink); transform-origin: 0 0; transform: scaleX(var(--t, .25)); transition: transform .6s var(--ease); }
.hero__phai { position: relative; isolation: isolate; border-radius: 16px; overflow: hidden; min-height: 320px; background: #1a1a1a; color: var(--ink); }
.hero__img { position: absolute; inset: -6% 0; transform: translate3d(0, calc(var(--p, 0) * 6%), 0); will-change: transform; }
.hero__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.04); transition: opacity .7s var(--ease), transform 1.6s var(--ease); }
.hero__img img.on { opacity: 1; transform: scale(1); }
/* khấc góc trên phải: nền trắng của thẻ ăn vào ảnh, chứa nút */
.hero__nav { position: absolute; top: 0; right: 0; z-index: 3; display: flex; align-items: center; gap: 4px; padding: 0 0 10px 10px; background: var(--surface); border-bottom-left-radius: 16px; font-size: 13.5px; font-weight: 500; }
.hero__nav::before, .hero__nav::after { content: ""; position: absolute; width: 16px; height: 16px; background: radial-gradient(circle at 0 100%, transparent 15.5px, var(--surface) 16px); }
.hero__nav::before { left: -16px; top: 0; }
.hero__nav::after { right: 0; bottom: -16px; }
.hero__nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; padding: 0 16px; border-radius: var(--r-btn); color: var(--ink2); white-space: nowrap; }
.hero__nav a.dam { padding: 0 22px; background: var(--ink); color: var(--surface); }
@media (hover: hover) { .hero__nav a.dam:hover { opacity: .9; } .hero__nav a:not(.dam):hover { color: var(--ink); background: var(--soft); } }
/* thanh nổi đáy ảnh: tên bộ ảnh + loại công trình đang chọn */
.hero__thanh { position: absolute; z-index: 3; left: 14px; right: 14px; bottom: 14px; display: flex; align-items: center; gap: 12px; padding: 7px 7px 7px 8px; border-radius: 14px;
  background: var(--surface); color: var(--ink); font-size: 14px; box-shadow: 0 10px 24px -14px rgba(0,0,0,.5); }
.hero__thanh i { width: 30px; height: 30px; border-radius: 9px; }
.hero__thanh svg { width: 16px; height: 16px; }
.hero__thanh span { flex: 1; min-width: 0; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero__thanh b { flex: none; padding: 7px 12px; border-radius: 9px; background: var(--soft); font-size: 13px; font-weight: 500; }
@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; gap: 0; padding: 10px; border-radius: 20px; min-height: 0; }
  .hero__trai { padding: 14px 12px 18px; }
  .hero__txt { padding: 24px 0; }
  .logo { font-size: 11.5px; margin-bottom: 12px; }
  .hero__phai { height: clamp(240px, 62vw, 380px); border-radius: 14px; }
  .hero__nav { border-bottom-left-radius: 14px; padding: 0 0 8px 8px; }
  .hero__nav a { padding: 0 12px; } .hero__nav a.dam { padding: 0 18px; }
  .hero__thanh { left: 10px; right: 10px; bottom: 10px; }
}

/* ---- tờ dự toán: hai thẻ ---- */
.sheet { position: relative; z-index: 3; max-width: 1240px; margin: 16px auto 0; padding: 0 clamp(12px, 3vw, 32px) 48px; }
.tren { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
@media (max-width: 880px) { .tren { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border-radius: 24px; box-shadow: var(--sh-card); padding: clamp(18px, 2.2vw, 28px); min-width: 0; }
h2 { font-size: 14px; font-weight: 500; margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
h2 span { font-weight: 400; font-size: 12px; color: var(--muted); }
.p__h em { flex: none; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--soft); color: var(--ink); }
.p__h em .ic { width: 17px; height: 17px; }
.bang > .p__h { margin-bottom: 8px; }

/* ---- 4 bước đánh số: bước xong thu thành 1 dòng, bấm mở lại ---- */
.buoc { list-style: none; margin: 0; padding: 0; }
.b { position: relative; border-bottom: 1px solid var(--line); }
.b:last-child { border-bottom: 0; }
.b:not(:last-child)::after { content: ""; position: absolute; left: 13.5px; top: 44px; bottom: -12px; width: 1px; background: var(--line2); }
.b__dau { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 10px 0; cursor: pointer; position: relative; z-index: 1; }
.b__dau:focus-visible { outline: 2px solid var(--pri); outline-offset: 2px; border-radius: 8px; }
.b__dau i { flex: none; width: 28px; height: 28px; border-radius: 99px; display: grid; place-items: center; font-style: normal; font-size: 12.5px; font-weight: 500;
  background: var(--surface); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line2); transition: background-color .25s var(--ux-ease), color .25s, box-shadow .25s; }
.b__dau i svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.b__dau i path { stroke-dasharray: 22; stroke-dashoffset: 0; animation: ve-dau .36s var(--ux-ease) both; }
@keyframes ve-dau { from { stroke-dashoffset: 22; } }
.b[data-tt="dang"] .b__dau i { background: var(--ink); color: var(--surface); box-shadow: none; }
.b[data-tt="xong"] .b__dau i { background: var(--soft); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line2); animation: bat .5s cubic-bezier(.3,1.6,.5,1); }
.b__ten { font-weight: 500; font-size: 15px; white-space: nowrap; }
.b[data-tt="cho"] .b__ten { color: var(--ink2); font-weight: 400; }
.b__tt { margin-left: auto; min-width: 0; font-size: 13px; color: var(--ink2); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b[data-tt="cho"] .b__tt { color: var(--muted); }
.b[data-tt="dang"] .b__tt { visibility: hidden; }
.b__sua { flex: none; font-size: 12px; font-weight: 500; color: var(--link); padding: 4px 8px; border-radius: 8px; transition: background-color .15s; }
.b[data-tt="dang"] .b__sua { display: none; }
@media (hover: hover) { .b__dau:hover .b__sua { background: var(--soft); } }
.b__than { padding: 0 0 18px 40px; animation: mo .4s var(--ease); }
.b__than[hidden] { display: none; }
.b__vi { margin: 0 0 12px; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.b__vi b { font-weight: 500; color: var(--ink2); }
.b .b__tiep { width: auto; margin-top: 16px; }
@media (max-width: 560px) { .b__than { padding-left: 0; } .b__sua { display: none; } .b::after { display: none; } }

/* máy tính: đường nối bước đang chọn → dòng trên phiếu */
.noi { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 6; color: var(--muted); }
.noi path { fill: none; stroke: currentColor; stroke-width: 1; stroke-dasharray: 3 4; animation: chay 1.2s linear infinite; }
.noi circle { fill: var(--surface); stroke: currentColor; stroke-width: 1.2; }
@keyframes chay { to { stroke-dashoffset: -14; } }
@media (max-width: 880px) { .noi { display: none; } }

/* ---- thẻ chọn radio — Lucian UX/UI Prompt #015 · MIT License (c) 2026 Seokwoooo · https://lucianlabs.dev/uxui-prompt/#015
   khung viền trượt sang thẻ được chọn (lò xo), chấm trong vòng tròn bật ra; ô radio gốc giữ nguyên cho du-toan.js ---- */
.seg { position: relative; display: grid; gap: 8px; }
.seg--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.seg--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 720px) { .seg--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .seg--3 { grid-template-columns: 1fr; } }
.o { position: relative; display: block; cursor: pointer; }
.o input { position: absolute; opacity: 0; pointer-events: none; }
.o > span { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 11px; align-items: center; height: 100%; padding: 12px 13px; border-radius: 16px;
  background: var(--surface); box-shadow: 0 0 0 1px var(--line2); transition: transform .4s var(--ux-spring), box-shadow .3s var(--ux-ease), background-color .3s var(--ux-ease); }
.o > span > em { grid-row: 1 / span 2; }
.o b { display: block; font-weight: 500; font-size: 14px; letter-spacing: -.01em; min-width: 0; }
.o small { display: block; grid-column: 2; font-size: 11.5px; color: var(--muted); line-height: 1.35; margin-top: 1px; }
@media (hover: hover) { .o > span:hover { box-shadow: 0 0 0 1px var(--muted); } }
.o:active > span { transform: scale(.98); }
.o input:focus-visible + span { outline: 2px solid var(--pri); outline-offset: 4px; }
.o input:checked + span { box-shadow: 0 0 0 2px var(--pri); }
.seg.co-khung .o input:checked + span { box-shadow: 0 0 0 1px transparent; background: transparent; }
.o__dot { position: relative; width: 20px; height: 20px; flex: none; border-radius: 50%; box-shadow: inset 0 0 0 1.75px var(--line2); transition: box-shadow .3s var(--ux-ease); }
.o__dot::after { content: ""; position: absolute; inset: 4.5px; border-radius: 50%; background: var(--pri); transform: scale(0); transition: transform .45s var(--ux-spring); }
.o input:checked + span .o__dot { box-shadow: inset 0 0 0 1.75px var(--pri); }
.o input:checked + span .o__dot::after { transform: scale(1); }
.o__ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--soft); color: var(--ink2); transition: background-color .3s var(--ux-ease), color .3s var(--ux-ease); }
.o__ic .ic { width: 19px; height: 19px; }
.o input:checked + span .o__ic { background: var(--ink); color: var(--surface); }
.lx-fr { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 0; border-radius: 16px; pointer-events: none;
  box-shadow: 0 0 0 2px var(--pri), 0 18px 36px -22px color-mix(in srgb, var(--pri) 70%, transparent);
  background: color-mix(in srgb, var(--pri) 6%, var(--surface));
  transition: transform .55s var(--ux-spring), width .55s var(--ux-spring), height .55s var(--ux-spring); }
.seg .o { z-index: 1; }
.seg--the .o small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- bước 4: công tắc — Lucian UX/UI Prompt #433 · MIT License (c) 2026 Seokwoooo · https://lucianlabs.dev/uxui-prompt/#433
   núm giãn ra khi nhấn rồi bật về (lò xo) ---- */
.seg--sw { gap: 0; }
.sw { display: flex; align-items: center; gap: 12px; padding: 12px 0; cursor: pointer; border-bottom: 1px solid var(--line); -webkit-user-select: none; user-select: none; }
.sw:last-child { border-bottom: 0; }
.sw input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.sw__ic { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--soft); color: var(--ink2); transition: background-color .3s var(--ux-ease), color .3s var(--ux-ease); }
.sw__tx { flex: 1; min-width: 0; }
.sw b { display: block; font-weight: 500; font-size: 14px; }
.sw small { display: block; font-size: 12px; color: var(--muted); line-height: 1.35; }
.sw input:checked ~ .sw__ic { background: var(--ink); color: var(--surface); }
.u433-sw { position: relative; flex: none; width: 54px; height: 32px; margin-left: auto; border-radius: 999px; background: var(--ux-surface-3); box-shadow: inset 0 0 0 1px var(--ux-line); transition: background-color .3s var(--ux-ease); }
.u433-sw::after { content: ""; position: absolute; left: 3px; top: 3px; width: 26px; height: 26px; border-radius: 13px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2), 0 3px 8px -2px rgba(0,0,0,.25);
  transition: transform .55s cubic-bezier(.3,1.5,.5,1), width .3s cubic-bezier(.3,1.5,.5,1); }
.sw input:checked ~ .u433-sw { background: var(--ux-accent); }
.sw input:checked ~ .u433-sw::after { transform: translateX(22px); }
.sw.is-press .u433-sw::after { width: 33px; }
.sw.is-press input:checked ~ .u433-sw::after { transform: translateX(15px); }
.sw input:focus-visible ~ .u433-sw { outline: 2px solid var(--ux-accent); outline-offset: 3px; }

/* ---- bước 3: ô số ảnh — Lucian UX/UI Prompt #018 · MIT License (c) 2026 Seokwoooo · https://lucianlabs.dev/uxui-prompt/#018
   nút −/+ tròn, chạm biên 1 / 999 thì lắc đầu; số đổi thì lăn một nấc ---- */
.o2--so { margin-top: 14px; }
.u018-step { justify-self: start; display: inline-flex; align-items: center; gap: 4px; height: 60px; padding: 6px; border-radius: 999px; background: var(--ux-surface); box-shadow: 0 0 0 1px var(--ux-line-2), 0 16px 30px -22px var(--ux-shadow-strong); }
.u018-step.is-shake { animation: u018-no .42s var(--ux-ease); }
@keyframes u018-no { 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
.u018-b { width: 48px; height: 48px; flex: none; border: 0; padding: 0; border-radius: 50%; background: var(--ux-surface-2); color: var(--ux-ink); display: grid; place-items: center; cursor: pointer;
  transition: transform .4s var(--ux-spring), background-color .25s var(--ux-ease), opacity .3s var(--ux-ease); }
@media (hover: hover) { .u018-b:hover { background: var(--ux-surface-3); } .u018-b.pl:hover { background: var(--ux-ink); } }
.u018-b:active { transform: scale(.86); }
.u018-b:focus-visible { outline: 2px solid var(--ux-accent); outline-offset: 2px; }
.u018-b[aria-disabled="true"] { opacity: .35; }
.u018-b svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.u018-b.pl { background: var(--ux-ink); color: var(--ux-page); }
.o2 .u018-step input { width: 96px; height: 48px; padding: 0; border: 0; border-radius: 12px; background: transparent; text-align: center; font: 500 24px/48px var(--font); letter-spacing: -.02em;
  font-variant-numeric: tabular-nums; color: var(--ink); -moz-appearance: textfield; appearance: textfield; }
.u018-step input::-webkit-outer-spin-button, .u018-step input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.o2 .u018-step input:focus { outline: 2px solid var(--pri); outline-offset: 0; }
.o2 .u018-step input[aria-invalid="true"] { outline: 2px solid var(--warn); outline-offset: 0; }
.u018-step input.lan-len { animation: lan-len .55s var(--ux-spring); }
.u018-step input.lan-xuong { animation: lan-xuong .55s var(--ux-spring); }
@keyframes lan-len { from { transform: translateY(14px); opacity: .2; } }
@keyframes lan-xuong { from { transform: translateY(-14px); opacity: .2; } }

/* ---- phiếu dự toán ---- */
.kq { position: sticky; top: 16px; }
.kq__dong { display: none; }
.phieu { list-style: none; margin: 12px 0 0; padding: 0; }
.phieu li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 8px; margin: 0 -8px; border-bottom: 1px solid var(--line); border-radius: 10px; font-size: 13.5px; transition: background-color .3s; }
.phieu li i { width: 22px; height: 22px; border-radius: 99px; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 500;
  background: var(--surface); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line2); transition: background-color .25s, color .25s; }
.phieu li span { line-height: 1.3; }
.phieu li small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.phieu li b { font-weight: 500; white-space: nowrap; }
.phieu li.dang { background: var(--soft); }
.phieu li.dang i { background: var(--ink); color: var(--surface); box-shadow: none; }
.phieu li.moi { animation: moi 1.1s var(--ease); }
@keyframes moi { 0% { background: color-mix(in srgb, var(--pri) 12%, var(--surface)); transform: translateX(-8px); } 30% { transform: none; } }
.kq__tong { margin: 16px 0 0; font-size: 13px; font-weight: 500; color: var(--ink2); }
.kq__tong small { font-weight: 400; color: var(--muted); margin-left: 4px; }
#mo-gui.nhay { animation: nhay 1.1s var(--ease); }
@keyframes nhay { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 40% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--pri) 28%, transparent); } }
.kq__so { font-size: clamp(30px, 4vw, 36px); font-weight: 500; letter-spacing: -.03em; line-height: 1.1; margin: 4px 0 14px; color: var(--ink); min-height: 1.1em; }
.kq__so span { display: inline-block; }

/* thước giá: dải giá trượt theo lựa chọn */
.thuoc { position: relative; height: 32px; margin: 0 0 12px; border-top: 4px solid var(--soft); border-radius: 3px; display: grid; grid-template-columns: repeat(3, 1fr) 0; font-size: 10.5px; color: var(--muted); }
.thuoc span { padding-top: 6px; border-left: 1px solid var(--line2); padding-left: 4px; height: 22px; }
.thuoc span:last-child { width: 0; padding-left: 0; border-left: 0; text-indent: -40px; white-space: nowrap; }
.thuoc__dai { position: absolute; top: -4px; left: 0; height: 4px; width: 100%; border-radius: 3px; background: var(--ink);
  transform-origin: 0 0; transform: translateX(var(--x, 0%)) scaleX(var(--w, 0)); transition: transform .7s var(--ease); }
.kq__loi { margin: 0 0 12px; text-wrap: pretty; font-size: 13px; color: var(--ink2); min-height: 1.5em; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; padding-top: 12px; font-size: 13px; }
.kv:empty { display: none; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-weight: 500; }
.kq__nho { margin: 10px 0 0; font-size: 12px; color: var(--muted); text-align: center; }

/* ---- nút ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; font: inherit; font-size: 14px; font-weight: 500; border: 0; box-shadow: inset 0 0 0 1px var(--line2);
  background: var(--surface); color: var(--ink); border-radius: var(--r-btn); padding: 0 20px; cursor: pointer; width: 100%;
  transform: scale(var(--k, 1)); transition: transform .4s var(--ux-spring), box-shadow .15s, background-color .15s, opacity .15s; }
.btn .ic { width: 17px; height: 17px; transition: transform .4s var(--ux-spring); }
@media (hover: hover) { .btn:not(.pri):not(:disabled):hover { box-shadow: inset 0 0 0 1px var(--ink); } .btn.pri:not(:disabled):hover { opacity: .9; } .btn:not(:disabled):hover .ic { transform: translateX(3px); } }
.btn:not(:disabled):active { --k: .96; transition-duration: .1s; }
.btn.pri { background: var(--pri); box-shadow: none; color: #fff; }
.btn:disabled { opacity: .55; cursor: wait; }
.btn:focus-visible { outline: 2px solid var(--pri); outline-offset: 3px; }

/* ---- nút Gửi — Lucian UX/UI Prompt #005 · MIT License (c) 2026 Seokwoooo · https://lucianlabs.dev/uxui-prompt/#005
   máy bay giấy bay khỏi nút (mã chạy /a/u005.js dùng chung với trang Contact) ---- */
.gui { position: relative; }
.u005 { gap: 10px; }
.u005 .pw { position: relative; display: grid; place-items: center; width: 22px; height: 20px; }
.u005 .pl { width: 22px; height: 20px; transform: translate(-1px, 1px) rotate(-18deg); transition: transform .45s var(--ease), opacity .2s; }
.u005.fly .pl { opacity: 0; transform: translate(10px, -10px) rotate(-30deg) scale(.6); transition: none; }
.u005.back .pl { animation: u005b .6s cubic-bezier(.2,1.2,.4,1) both; }
@keyframes u005b { from { opacity: 0; transform: translate(-26px, 14px) rotate(10deg) scale(.7); } }
.u005 .ck { position: absolute; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; opacity: 0; }
.u005.done { background: linear-gradient(140deg, #37B24D, #20C997); color: #fff; }
.u005.done .ck { opacity: 1; stroke-dashoffset: 0; transition: stroke-dashoffset .35s .05s; }
.u005.done .pl { opacity: 0; }
.u005-sky { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 2; }
.u005-tr { fill: none; stroke: var(--pri); stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 1.5 6; opacity: .7; transition: opacity .6s; }
.u005-fp { position: absolute; left: 0; top: 0; width: 34px; height: 30px; pointer-events: none; z-index: 3; color: var(--pri); filter: drop-shadow(0 6px 6px rgba(20,60,160,.25)); }
.u005-fp svg { width: 100%; height: 100%; }

/* ---- form gửi báo giá ---- */
.gui { margin-top: 16px; animation: mo .45s var(--ease); scroll-margin-top: 16px; }
.gui[hidden] { display: none; }
@keyframes mo { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.gui__luoi { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 32px; margin-top: 6px; }
@media (max-width: 720px) { .gui__luoi { grid-template-columns: 1fr; } }
.cot { min-width: 0; }
.nhom { margin: 14px 0 4px; font-size: 11.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.o2 { display: grid; gap: 5px; font-size: 12.5px; color: var(--ink2); margin: 12px 0 0; }
.o2 small { color: var(--muted); }
.o2 input, .o2 textarea { font: 14px var(--font); color: var(--ink); border: 0; box-shadow: inset 0 0 0 1px var(--line2); border-radius: var(--r-btn); padding: 12px 14px; width: 100%; background: var(--surface); resize: vertical;
  transition: box-shadow .2s var(--ux-ease); }
.o2 ::placeholder { color: var(--muted); opacity: 1; }
.o2 input:focus, .o2 textarea:focus { outline: 0; box-shadow: inset 0 0 0 2px var(--pri); }
.hang { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; }
.hang .nhan { margin-top: 12px; }
.can { color: var(--warn); font-weight: 500; }
#ts { margin: 14px 0 10px; min-height: 0; }
#nut-gui { margin-top: 4px; }

/* nhãn nhỏ */
.nhan { margin: 14px 0 7px; font-size: 12.5px; color: var(--ink2); font-weight: 500; }
.nhan small { font-weight: 400; color: var(--muted); margin-left: 6px; }
.nhan#khu-ten { margin-top: 2px; }
.khu-ds { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--ink); }
.o2--nho textarea { min-height: 0; }
.uoc { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
.uoc.loi { color: var(--warn); }

/* ---- chip — Lucian UX/UI Prompt #019 · MIT License (c) 2026 Seokwoooo · https://lucianlabs.dev/uxui-prompt/#019
   chọn thì dấu tích trượt ra từ trái, chip đổ màu mực ---- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ch { position: relative; cursor: pointer; }
.ch input { position: absolute; opacity: 0; pointer-events: none; }
.ch span { display: inline-flex; align-items: center; height: 44px; padding: 0 16px; border-radius: 999px; background: var(--ux-surface); color: var(--ux-ink-2); font-size: 13.5px; font-weight: 500;
  box-shadow: inset 0 0 0 1px var(--ux-line-2);
  transition: background-color .35s var(--ux-ease), color .3s var(--ux-ease), box-shadow .3s var(--ux-ease), padding .45s var(--ux-spring), transform .4s var(--ux-spring); }
@media (hover: hover) { .ch span:hover { color: var(--ux-ink); box-shadow: inset 0 0 0 1px var(--ux-ink-3); } }
.ch:active span { transform: scale(.94); }
.ch input:focus-visible + span { outline: 2px solid var(--ux-accent); outline-offset: 3px; }
.ch i { display: grid; place-items: center; width: 0; height: 18px; margin-right: 0; overflow: hidden; opacity: 0;
  transition: width .45s var(--ux-spring), margin .45s var(--ux-spring), opacity .25s var(--ux-ease); }
.ch svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.ch input:checked + span { background: var(--ux-ink); color: var(--ux-page); box-shadow: 0 10px 18px -12px var(--ux-shadow-strong); padding-left: 12px; }
.ch input:checked + span i { width: 18px; margin-right: 6px; opacity: 1; }

/* ---- bộ ảnh tham khảo ---- */
.tk { margin-top: 14px; }
.tk:empty { display: none; }
.tk__h { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink2); font-weight: 500; margin: 0 0 8px; }
.tk__lk { display: flex; gap: 12px; }
.tk__h a { color: var(--link); text-decoration: none; white-space: nowrap; }
.tk__h a:hover { text-decoration: underline; }
.tk__ds { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, calc((100% - 24px) / 4)); gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.tk__ds::-webkit-scrollbar { display: none; }
.tk__the { position: relative; display: block; background: var(--soft); border-radius: 14px; overflow: hidden; cursor: pointer; aspect-ratio: 3 / 2; color: #fff; animation: len .5s var(--ease) both; }
.tk__the img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
@media (hover: hover) { .tk__the:hover img { transform: scale(1.05); } }
.tk__the::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(to top, rgba(10,10,10,.72), rgba(10,10,10,0)); }
.tk__the span { position: absolute; z-index: 1; left: 9px; right: 9px; bottom: 7px; font-size: 12.5px; font-weight: 500; line-height: 1.25; }
.tk__the small { display: block; font-size: 10.5px; font-weight: 400; opacity: .8; }
.tk__the em { position: absolute; z-index: 1; top: 7px; left: 7px; font-style: normal; font-size: 10.5px; font-weight: 500; background: var(--surface); color: var(--ink); padding: 2px 7px; border-radius: 6px; }

.bao { margin-top: 12px; border-radius: 12px; padding: 12px 15px; background: var(--soft); color: var(--ink); font-size: 13px; line-height: 1.5; }
.bao[hidden] { display: none; }
.bao.loi { box-shadow: inset 3px 0 0 var(--warn); }
.bao a { color: var(--link); }
.bao pre { white-space: pre-wrap; font: 11.5px/1.5 ui-monospace, monospace; background: var(--surface); padding: 10px; border-radius: 8px; margin: 8px 0 0; color: var(--ink); }

.chu { max-width: 70ch; margin: 20px 12px 0; font-size: 12px; color: var(--muted); }

/* hai thẻ hiện dần lúc mở trang */
.panel { animation: len .7s var(--ease) both; }
.kq { animation-delay: .12s; }
@keyframes len { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes bat { 0% { transform: scale(.8); } 45% { transform: scale(1.12); } 100% { transform: none; } }

/* ---- điện thoại: thanh tổng ở đáy, bấm thì phiếu kéo lên thành tấm ---- */
.dinh, .man { display: none; }
@media (max-width: 880px) {
  .dinh { position: fixed; z-index: 9; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: space-between; gap: 12px;
    min-height: 56px; padding: 9px 18px; border: 0; border-radius: 16px; background: var(--ink); color: var(--surface); font: inherit; text-align: left; cursor: pointer;
    box-shadow: 0 14px 30px -12px var(--ux-shadow-strong), 0 2px 6px -2px var(--ux-shadow); transition: transform .35s var(--ease), opacity .35s; }
  .dinh span { font-size: 13.5px; font-weight: 500; line-height: 1.25; }
  .dinh small { display: block; font-size: 11px; font-weight: 400; opacity: .65; }
  .dinh__mui { width: 14px; height: 14px; vertical-align: -2px; margin-left: 2px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: .7; }
  .dinh b { font-size: 17px; font-weight: 500; letter-spacing: -.02em; }
  .dinh.nay { animation: bat .45s var(--ease); }
  .xem-phieu .dinh { transform: translateY(140%); opacity: 0; pointer-events: none; }
  .sheet { padding-bottom: 96px; }
  .kq { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; top: auto; max-height: 84vh; overflow-y: auto; overscroll-behavior: contain;
    border-radius: 22px 22px 0 0; padding: 26px 18px calc(18px + env(safe-area-inset-bottom));
    animation: none; transform: translateY(105%); visibility: hidden; transition: transform .45s var(--ux-spring), visibility 0s .45s; }
  .kq::before { content: ""; position: absolute; top: 8px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: var(--line2); }
  .xem-phieu .kq { transform: none; visibility: visible; transition: transform .45s var(--ux-spring); }
  .kq__dong { display: grid; place-items: center; position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border: 0; border-radius: 11px; background: var(--soft); color: var(--ink2); cursor: pointer; }
  .kq__dong svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
  .kq__h { padding-right: 44px; }
  .man { display: block; position: fixed; inset: 0; z-index: 19; background: rgba(10,10,10,.45); opacity: 0; pointer-events: none; transition: opacity .3s; }
  .xem-phieu .man { opacity: 1; pointer-events: auto; }
  body.xem-phieu { overflow: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__img { transform: none !important; }
  .hero__img img { transition: opacity .2s; transform: none !important; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
