/* Giặt Thơm — nền tảng: token màu, chữ, nút, thẻ treo, phiếu, hộp thoại */
:root {
  /* bảng màu lấy từ ảnh tiệm: bông trắng, xanh xám nhãn chai, hổ phách thuỷ tinh */
  --bong: #F4F1EA;        /* nền vải bông */
  --giay: #FBFAF6;        /* mặt phiếu */
  --vai: #EAE5DA;         /* vải lanh, lớp chìm */
  --muc: #1C2427;         /* mực in */
  --muc-2: #4B575C;       /* chữ phụ */
  --xam: #55686F;         /* xanh xám thương hiệu */
  --xam-dam: #2C3A40;     /* xanh xám đậm (khối tối) */
  --ho-phach: #C27A2C;    /* hổ phách: màu hành động duy nhất */
  --ho-phach-dam: #8E5316;/* chữ hổ phách trên nền sáng (AA) */
  --ho-phach-nhat: #F3E2CB;
  --la: #6E8B78;          /* xanh lá xô: trạng thái xong */
  --la-nhat: #DFE8DF;
  --xam-nhat: #DCE3E5;
  --do: #A8432E;
  --line: rgba(28, 36, 39, .09);
  --shadow: 0 1px 0 rgba(28, 36, 39, .04), 0 12px 32px -18px rgba(28, 36, 39, .28);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --f-d: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --f-b: 'Be Vietnam Pro', system-ui, sans-serif;
  --f-m: 'JetBrains Mono', ui-monospace, monospace;
  --r: 10px;
  --r-s: 6px;
  --linen: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9 .06' numOctaves='2' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .3 0 0 0 0 .28 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: light;
}
[data-theme="dark"] {
  --bong: #121718;
  --giay: #1A2124;
  --vai: #222B2E;
  --muc: #EEE9DF;
  --muc-2: #A9B4B6;
  --xam: #9DB2BA;
  --xam-dam: #0D1214;
  --ho-phach: #E09A4F;
  --ho-phach-dam: #EBB073;
  --ho-phach-nhat: #3A2B1B;
  --la: #93B29D;
  --la-nhat: #1F2E25;
  --xam-nhat: #24343A;
  --do: #E5826C;
  --line: rgba(238, 233, 223, .08);
  --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 16px 36px -20px rgba(0, 0, 0, .7);
  --linen: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9 .06' numOctaves='2' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .03 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
body { margin: 0; background: var(--bong) var(--linen); color: var(--muc); font: 400 16px/1.6 var(--f-b); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -.01em; line-height: 1.15; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.mono { font-family: var(--f-m); font-feature-settings: "zero" 0; letter-spacing: -.01em; }
.muted { color: var(--muc-2); }
.sm { font-size: 14px; }
.center { text-align: center; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--muc); color: var(--bong); padding: 10px 16px; border-radius: var(--r-s); transition: top .2s var(--ease); }
.skip:focus { top: 12px; }
:focus-visible { outline: 2.5px solid var(--ho-phach); outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.wrap { width: min(1240px, 100% - 48px); margin-inline: auto; }

/* logo */
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--muc); text-decoration: none; }
.logo svg { width: 30px; height: 30px; color: currentColor; }
.logo b { font: 500 21px/1 var(--f-d); letter-spacing: -.02em; }
.logo.lg svg { width: 38px; height: 38px; }
.logo.lg b { font-size: 27px; }

/* nút */
.btn { --bg: var(--vai); --fg: var(--muc); display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px; border: 0; background: var(--bg); color: var(--fg); font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; transition: transform .18s var(--ease), background-color .2s var(--ease), box-shadow .2s var(--ease), opacity .2s; }
.btn:hover { --bg: color-mix(in srgb, var(--vai) 80%, var(--muc) 8%); }
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn.primary { --bg: var(--ho-phach); --fg: #1E1408; }
.btn.primary:hover { --bg: color-mix(in srgb, var(--ho-phach) 88%, #fff 12%); box-shadow: 0 8px 22px -12px var(--ho-phach); }
[data-theme="dark"] .btn.primary:hover { --bg: color-mix(in srgb, var(--ho-phach) 88%, #000 12%); }
.btn.ghost { --bg: transparent; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--muc) 22%, transparent); }
.btn.ghost:hover { --bg: color-mix(in srgb, var(--muc) 6%, transparent); }
.btn.danger { --bg: var(--do); --fg: #fff; }
.btn.danger-ghost { --bg: transparent; --fg: var(--do); }
.btn.danger-ghost:hover { --bg: color-mix(in srgb, var(--do) 10%, transparent); }
.btn.sm { min-height: 44px; padding: 0 16px; font-size: 14px; }
.btn.lg { min-height: 56px; padding: 0 28px; font-size: 16px; }
.btn.block { width: 100%; }
.btn .ic { width: 18px; height: 18px; }
.btn.loading { pointer-events: none; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: inherit; text-decoration: none; transition: background-color .2s, transform .18s var(--ease); }
.icon-btn:hover { background: color-mix(in srgb, var(--muc) 8%, transparent); }
.icon-btn:active { transform: scale(.94); }
.txt-link { color: var(--ho-phach-dam); font-weight: 600; text-decoration: none; font-size: 15px; }
.txt-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.txt-link.light { color: #F6EBDD; }

/* chip trạng thái */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--vai); color: var(--muc-2); white-space: nowrap; }
.chip.amber { background: var(--ho-phach-nhat); color: var(--ho-phach-dam); }
.chip.sage { background: var(--la-nhat); color: color-mix(in srgb, var(--la) 70%, var(--muc) 30%); }
.chip.slate { background: var(--xam-nhat); color: var(--xam); }
[data-theme="dark"] .chip.sage { color: var(--la); }

/* nhóm tuỳ chọn */
.prefs { display: inline-flex; gap: 4px; }
.pf { width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: inherit; font: 600 13px var(--f-m); display: grid; place-items: center; transition: background-color .2s, transform .18s var(--ease); }
.pf:hover { background: color-mix(in srgb, currentColor 10%, transparent); }
.pf:active { transform: scale(.94); }
.pf[aria-pressed="true"] { background: var(--ho-phach-nhat); color: var(--ho-phach-dam); }

/* thẻ treo giặt ủi */
.hangtag { position: relative; background: var(--giay) var(--linen); color: var(--muc); padding: 30px 24px 22px; border-radius: 6px 6px 10px 10px; clip-path: polygon(18% 0, 82% 0, 100% 9%, 100% 100%, 0 100%, 0 9%); box-shadow: var(--shadow); }
.hangtag .hole, .plan .hole, .rev .hole { position: absolute; top: 12px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--bong); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--ho-phach) 70%, transparent); }
.ht-k { font: 600 12.5px/1 var(--f-b); letter-spacing: .14em; text-transform: uppercase; color: var(--muc-2); text-align: center; margin-top: 6px; }
.ht-code { font-size: 22px; font-weight: 600; text-align: center; margin: 8px 0 14px; letter-spacing: .02em; }
.hangtag dl { margin: 0; display: grid; gap: 0; border-top: 1.5px dashed color-mix(in srgb, var(--muc) 25%, transparent); }
.hangtag dl div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px dashed color-mix(in srgb, var(--muc) 14%, transparent); font-size: 14px; }
.hangtag dt { color: var(--muc-2); }
.hangtag dd { margin: 0; font-weight: 600; text-align: right; }
.barcode { display: block; width: 100%; height: 30px; margin-top: 14px; fill: var(--muc); }

/* phiếu tạm tính */
.receipt { position: relative; background: var(--giay); padding: 20px 20px 22px; border-radius: 6px 6px 0 0; margin-bottom: 26px; }
.receipt::after { content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 10px; background: linear-gradient(-45deg, transparent 6px, var(--giay) 0) 0 0/12px 10px repeat-x, linear-gradient(45deg, transparent 6px, var(--giay) 0) 0 0/12px 10px repeat-x; }
.rc-h { font-size: 13px; letter-spacing: .18em; text-align: center; color: var(--muc-2); margin-bottom: 12px; }
.rc-l { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 15px; }
.rc-l small { color: var(--muc-2); }
.rc-t { display: flex; justify-content: space-between; align-items: baseline; border-top: 1.5px dashed color-mix(in srgb, var(--muc) 25%, transparent); margin-top: 8px; padding-top: 12px; }
.rc-t b { font-size: 22px; }
.amber-t { color: var(--ho-phach-dam); }

/* form */
.fld { display: grid; gap: 8px; margin: 0 0 18px; border: 0; padding: 0; min-width: 0; }
.fld > span, .fld legend { font-size: 14px; font-weight: 600; color: var(--muc-2); padding: 0; }
.fld input, .fld select, .fld textarea, .search-in input { width: 100%; min-height: 48px; padding: 12px 14px; border-radius: var(--r); border: 0; background: var(--vai); box-shadow: inset 0 0 0 1.5px transparent; transition: box-shadow .2s, background-color .2s; font-size: 16px; }
.fld textarea { resize: vertical; min-height: 88px; }
.fld input:focus, .fld select:focus, .fld textarea:focus, .search-in input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--ho-phach); background: var(--giay); }
.err { color: var(--do); font-size: 14px; font-weight: 500; margin: 6px 0 14px; }
.seg { display: inline-flex; gap: 4px; padding: 4px; background: var(--vai); border-radius: 999px; flex-wrap: wrap; margin-bottom: 18px; }
.seg label, .seg button { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span, .seg button { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muc-2); border: 0; background: transparent; transition: background-color .2s, color .2s; }
.seg input:checked + span, .seg button[aria-selected="true"] { background: var(--giay); color: var(--muc); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.seg input:focus-visible + span { outline: 2.5px solid var(--ho-phach); }
.tgl { display: flex; gap: 12px; align-items: center; min-height: 48px; margin-bottom: 14px; cursor: pointer; font-size: 15px; }
.tgl input { position: absolute; opacity: 0; }
.tg { flex: none; width: 44px; height: 26px; border-radius: 999px; background: var(--vai); position: relative; transition: background-color .2s; box-shadow: inset 0 0 0 1.5px var(--line); }
.tg::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--giay); box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .25s var(--ease); }
.tgl input:checked + .tg { background: var(--ho-phach); }
.tgl input:checked + .tg::after { transform: translateX(18px); }
.tgl input:focus-visible + .tg { outline: 2.5px solid var(--ho-phach); outline-offset: 2px; }
.radios { display: grid; gap: 10px; margin-bottom: 18px; }
.rcard { position: relative; display: block; cursor: pointer; }
.rcard input { position: absolute; opacity: 0; }
.rcard > span { display: grid; grid-template-columns: 24px 1fr; column-gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--r); background: var(--vai); box-shadow: inset 0 0 0 1.5px transparent; transition: box-shadow .2s, background-color .2s; }
.rcard > span .ic { grid-row: span 2; color: var(--xam); }
.rcard b { font-size: 15px; font-weight: 600; }
.rcard small { grid-column: 2; font-size: 13.5px; color: var(--muc-2); }
.rcard > span > small:only-of-type { grid-column: 2; }
.rcard > span > b:first-child { grid-column: 1 / -1; }
.rcard input:checked + span { background: var(--ho-phach-nhat); box-shadow: inset 0 0 0 2px var(--ho-phach); }
.rcard input:focus-visible + span { outline: 2.5px solid var(--ho-phach); outline-offset: 2px; }
.search-in { position: relative; display: block; }
.search-in .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muc-2); }
.search-in input { padding-left: 44px; }

/* hộp thoại */
#layer { position: fixed; inset: 0; z-index: 80; display: none; }
#layer.open { display: grid; place-items: center; padding: 20px; }
.scrim { position: absolute; inset: 0; background: rgba(16, 22, 24, .48); opacity: 0; transition: opacity .26s var(--ease); }
#layer.in .scrim { opacity: 1; }
.dlg { position: relative; width: min(560px, 100%); max-height: calc(100dvh - 40px); overflow: auto; background: var(--giay); border-radius: 14px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .5); transform: translateY(18px) scale(.98); opacity: 0; transition: transform .32s var(--ease), opacity .26s var(--ease); }
#layer.in .dlg { transform: none; opacity: 1; }
.dlg.small { width: min(440px, 100%); }
.dlg-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 20px 20px 4px 28px; }
.dlg-h h2 { font: 500 24px/1.2 var(--f-d); }
.dlg-b { padding: 12px 28px 8px; }
.dlg-b > p { margin-bottom: 16px; }
.dlg-f { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 28px 24px; flex-wrap: wrap; }
.cmdk { align-self: start; margin-top: 10vh; }
.ck-in { display: flex; align-items: center; gap: 10px; background: var(--vai); border-radius: var(--r); padding: 0 14px; }
.ck-in input { flex: 1; border: 0; background: transparent; min-height: 52px; font-size: 17px; outline: none; }
.ck-list { margin: 12px 0 8px; }
.ck-list a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 12px; border-radius: var(--r-s); text-decoration: none; font-size: 15px; }
.ck-list [aria-selected="true"] a, .ck-list a:hover { background: var(--ho-phach-nhat); }
.ck-list .ic { color: var(--muc-2); }
.ck-empty { padding: 16px 12px; color: var(--muc-2); }
.more-list a, .more-list button { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 0 8px; border: 0; background: none; text-decoration: none; font-size: 16px; font-weight: 500; border-radius: var(--r-s); }
.more-list a:hover, .more-list button:hover { background: var(--vai); }
@media (max-width: 640px) {
  #layer.open { place-items: end center; padding: 0; }
  .dlg { width: 100%; border-radius: 18px 18px 0 0; max-height: 92dvh; transform: translateY(40px); }
  .cmdk { align-self: end; margin: 0; }
}

/* toast */
#toasts { position: fixed; z-index: 90; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; width: min(440px, calc(100% - 32px)); pointer-events: none; }
.toast { display: flex; gap: 10px; align-items: center; padding: 14px 18px; border-radius: 12px; background: var(--muc); color: var(--bong); font-size: 15px; box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .5); transform: translateY(14px); opacity: 0; transition: transform .32s var(--ease), opacity .26s; }
.toast .ic { color: var(--ho-phach); }
.toast.on { transform: none; opacity: 1; }
body.r-app #toasts, body.r-tiem #toasts { bottom: 96px; }
@media (min-width: 900px) { body.r-tiem #toasts { bottom: 24px; } }

/* hiện dần, vén màn */
[data-rv] { opacity: 0; transform: translateY(18px); transition: opacity .55s var(--ease), transform .6s var(--ease), clip-path .8s var(--ease); }
[data-rv].in { opacity: 1; transform: none; }
.rv-img { overflow: hidden; clip-path: inset(0 0 100% 0); transition: clip-path .9s var(--ease); }
.in .rv-img, .rv-img.in { clip-path: inset(0 0 0 0); }
.flyer { position: fixed; z-index: 95; pointer-events: none; object-fit: cover; border-radius: 10px; }

/* nghiêng thẻ + vệt sáng */
[data-tilt] { transform: perspective(900px) rotateX(var(--rx, 0)) rotateY(var(--ry, 0)); transition: transform .4s var(--ease), opacity .55s var(--ease); position: relative; }
[data-tilt].tilting { transition: transform .08s linear; }
[data-tilt] .sheen { position: absolute; inset: 0; pointer-events: none; border-radius: inherit; background: linear-gradient(105deg, transparent calc(var(--mx, 0%) - 18%), rgba(255, 255, 255, .28) var(--mx, 0%), transparent calc(var(--mx, 0%) + 18%)); opacity: 0; transition: opacity .3s; mix-blend-mode: soft-light; }
[data-tilt].tilting .sheen { opacity: 1; }

/* skeleton */
.sk { display: block; background: linear-gradient(100deg, var(--vai) 30%, color-mix(in srgb, var(--vai) 60%, var(--giay)) 50%, var(--vai) 70%) 0 0/300% 100%; border-radius: 6px; animation: sk 1.3s linear infinite; height: 14px; }
@keyframes sk { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ghi chú concept */
.concept-note { font-size: 13.5px; line-height: 1.55; color: var(--muc-2); }
.concept-note a { color: var(--ho-phach-dam); text-underline-offset: 3px; }

/* giảm chuyển động */
.calm *, .calm *::before, .calm *::after { animation-duration: 0s !important; animation-iteration-count: 1 !important; transition-duration: 0s !important; scroll-behavior: auto !important; }
.calm [data-rv] { opacity: 1; transform: none; }
.calm .rv-img { clip-path: none; }

/* in mã túi */
#print-root { display: none; }
@media print {
  body > *:not(#print-root) { display: none !important; }
  #print-root { display: block !important; width: 70mm; margin: 0 auto; }
  #print-root .hangtag { box-shadow: none; border: 1px solid #000; clip-path: none; }
}
