/* ══════════════════════════════════════════════
   Mịn 3D — design tokens + shared components
   Neutral canvas, one orange accent, 1px borders, crisp radii.
══════════════════════════════════════════════ */
:root {
  --bg: #fafafa;
  --card: #ffffff;
  --ink: #171717;
  --ink-2: #404040;
  --muted: #737373;
  --line: #e5e5e5;
  --line-soft: #efefef;
  --fill: #f4f4f5;
  --brand: #f26419;
  --brand-hover: #dc5510;
  --brand-soft: #fff1e8;
  --ok: #15803d;
  --ok-soft: #ecfdf3;
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.04);
  --shadow-hover: 0 4px 16px rgba(0,0,0,.06);
  --ease: cubic-bezier(.16,1,.3,1);
}

*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { overflow-x: clip; max-width: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif; font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { text-wrap: balance; }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .wrap { padding: 0 32px; } }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ── Type ── */
.h-display { font-weight: 800; letter-spacing: -.035em; line-height: 1.04; }
.h-page { font-weight: 800; letter-spacing: -.03em; line-height: 1.1; font-size: 30px; }
@media (min-width: 768px) { .h-page { font-size: 34px; } }
.eyebrow { display: inline-flex; align-items: center; gap: .6rem; font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--brand); }
.eyebrow::before { content: ''; width: 28px; height: 1px; background: currentColor; }
.lead { color: var(--ink-2); max-width: 60ch; }
.muted { color: var(--muted); }
.accent { color: var(--brand); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  height: 40px; padding: 0 1rem; border-radius: var(--r); font-weight: 600; font-size: 14px; line-height: 1;
  border: 1px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .2s, border-color .2s, color .2s, transform .1s;
}
.btn:active { transform: scale(.98); }
.btn-brand, .btn-primary { background: var(--brand); color: #fff; }
.btn-brand:hover, .btn-primary:hover { background: var(--brand-hover); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #2b2b2b; }
.btn-ghost { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: #cfcfcf; background: #fcfcfc; }
.btn-zalo { background: #0068ff; color: #fff; }
.btn-zalo:hover { background: #0057d6; }
.btn-lg { height: 46px; padding: 0 1.25rem; font-size: 15px; }
.btn-sm { height: 32px; padding: 0 .75rem; font-size: 13px; border-radius: var(--r-sm); }
.btn-icon { width: 40px; padding: 0; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.link-accent { color: var(--brand); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: .25rem; text-decoration: none; }
.link-accent:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ── Surfaces ── */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }
.quote { background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: var(--r); padding: 14px 16px; }

/* ── Chips / tags ── */
.chip {
  display: inline-flex; align-items: center; gap: .4rem; height: 28px; padding: 0 .65rem;
  border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--card);
  font-size: 12.5px; font-weight: 500; color: var(--ink-2); cursor: pointer; white-space: nowrap; transition: all .15s;
}
.chip:hover { border-color: #cfcfcf; }
.chip.active { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 .5rem; border-radius: 6px; border: 1px solid var(--line); font-size: 11.5px; color: var(--ink-2); background: var(--card); white-space: nowrap; }
.tag-ok { border-color: #bbf7d0; background: var(--ok-soft); color: var(--ok); }
.tag-brand { border-color: #fed7aa; background: var(--brand-soft); color: var(--brand); }
.dot { width: 8px; height: 8px; border-radius: 99px; display: inline-block; flex: none; }

/* ── Header ── */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(250,250,250,.88); backdrop-filter: blur(12px); }
.site-header.scrolled { box-shadow: 0 1px 0 var(--line); }
.nav-group { display: flex; align-items: center; gap: 2px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: #f4f4f4; }
.nav-link { font-size: 13.5px; font-weight: 500; color: var(--ink-2); height: 32px; padding: 0 14px; display: inline-flex; align-items: center; border-radius: 8px; text-decoration: none; transition: background .15s, color .15s; }
.nav-link:hover { background: #fff; color: var(--ink); }
.nav-link.active { background: var(--brand); color: #fff; }
.nav-sep { width: 1px; height: 18px; background: #d9d9d9; margin: 0 4px; }
.icon-btn { position: relative; width: 38px; height: 38px; border-radius: var(--r); display: grid; place-items: center; background: transparent; border: 0; cursor: pointer; color: var(--ink); text-decoration: none; }
.icon-btn:hover { background: #efefef; }
.badge-count { position: absolute; top: 3px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--brand); color: #fff; font-size: 10.5px; font-weight: 700; display: none; align-items: center; justify-content: center; }
.mobile-menu { position: fixed; inset: 60px 0 auto 0; background: var(--bg); border-bottom: 1px solid var(--line); z-index: 49; display: none; }
.mobile-menu.open { display: block; }

/* ── Product card ── */
.p-card { display: flex; flex-direction: column; overflow: hidden; transition: box-shadow .2s, border-color .2s; }
.p-card:hover { box-shadow: var(--shadow-hover); border-color: #d9d9d9; }
.p-media { position: relative; aspect-ratio: 1 / 1; background: var(--fill); display: grid; place-items: center; overflow: hidden; }
.p-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.p-media .ball { width: 46%; transition: transform .5s var(--ease); }
.p-card:hover .p-media img, .p-card:hover .p-media .ball { transform: scale(1.04); }
.p-body { padding: 12px 14px 14px; display: flex; flex-direction: column; flex: 1; }
.p-title { font-weight: 600; font-size: 15px; margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); text-decoration: none; }
.p-desc { font-size: 13px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 12px; }
.p-price { font-weight: 700; font-size: 15px; }

/* ── Tabs (orange underline) ── */
.tabs { display: flex; border-bottom: 1px solid var(--line); }
.tab { flex: 1; height: 42px; font-size: 13.5px; font-weight: 500; color: var(--muted); background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; }
.tab.active { color: var(--ink); border-bottom-color: var(--brand); }

/* ── Drawer ── */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.35); opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 80; }
.scrim.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; height: 100%; width: min(400px, 100%); background: var(--bg); border-left: 1px solid var(--line); z-index: 90; transform: translateX(100%); transition: transform .35s var(--ease); display: flex; flex-direction: column; }
.drawer.open { transform: none; }

/* ── Progress ── */
.bar { height: 4px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--brand); border-radius: 99px; transition: width .4s var(--ease); }

/* ── Forms ── */
.field {
  width: 100%; height: 40px; padding: 0 12px; border-radius: var(--r); border: 1px solid var(--line);
  background: var(--card); font: inherit; font-size: 14px; color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea.field { height: auto; padding: 10px 12px; }
select.field { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23525252' stroke-width='2.2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; font-weight: 500; cursor: pointer; }
.field:focus { border-color: #a3a3a3; box-shadow: 0 0 0 3px rgba(0,0,0,.05); }

/* ── Toast / misc ── */
#toast-stack { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--r); font-size: 13.5px; font-weight: 500; box-shadow: 0 8px 24px rgba(0,0,0,.18); animation: toast-in .3s var(--ease); max-width: 90vw; }
.toast.error { background: #b91c1c; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.zalo-fab { position: fixed; right: 16px; bottom: 16px; z-index: 60; width: 52px; height: 52px; border-radius: 16px; background: #0068ff; color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 12px; box-shadow: 0 6px 20px rgba(0,104,255,.35); text-decoration: none; }
.fade-up { opacity: 0; transform: translateY(12px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.fade-up.in { opacity: 1; transform: none; }
.skeleton { background: linear-gradient(90deg, #efefef 25%, #f6f6f6 50%, #efefef 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--r-lg); }
@keyframes sk { to { background-position: -200% 0; } }
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { scrollbar-width: none; }
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ══ App shell: left sidebar + top bar (desktop), drawer on mobile ══ */
:root { --side-w: 240px; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--side-w); background: var(--card); border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 70; transform: translateX(-100%); transition: transform .3s var(--ease); }
.sidebar.open { transform: none; }
@media (min-width: 1024px) { .sidebar { transform: none; } body.app { padding-left: var(--side-w); } }
.side-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 65; opacity: 0; pointer-events: none; transition: opacity .25s; }
.side-scrim.open { opacity: 1; pointer-events: auto; }
@media (min-width: 1024px) { .side-scrim { display: none; } }
.side-group { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 16px 12px 6px; }
.side-link { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 12px; border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--ink-2); text-decoration: none; transition: background .15s; }
.side-link:hover { background: #f4f4f5; color: var(--ink); }
.side-link.active { background: var(--brand-soft); color: var(--brand); }
.side-link svg { flex: none; opacity: .85; }
.promo { background: var(--brand); color: #fff; font-size: 13px; font-weight: 600; text-align: center; padding: 8px 16px; }
.promo a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(250,250,250,.9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.search { position: relative; flex: 1; max-width: 460px; }
.search input { width: 100%; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); padding: 0 12px 0 38px; font: inherit; font-size: 14px; outline: none; }
.search input:focus { border-color: #a3a3a3; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }

/* ══ Product card (vault style) ══ */
.p-card { position: relative; }
.p-card::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--stripe, var(--brand)); }
.p-price-badge { position: absolute; top: 10px; right: 10px; background: rgba(255,255,255,.92); border-radius: 7px; padding: 2px 8px; font-size: 12.5px; font-weight: 700; }
.p-actions { display: flex; gap: 6px; flex: none; }
.p-act { width: 32px; height: 32px; border-radius: 8px; background: rgba(255,255,255,.95); border: 1px solid var(--line); display: grid; place-items: center; cursor: pointer; color: var(--ink-2); transition: all .15s; }
.p-act:hover { color: var(--brand); border-color: var(--brand); }
.p-act.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.p-tier { font-size: 11px; font-weight: 700; letter-spacing: .04em; }

/* ══ Floating cart bar ══ */
.cartbar { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 55; width: min(560px, calc(100% - 24px)); background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 36px rgba(0,0,0,.14); padding: 12px 14px; display: none; }
@media (min-width: 1024px) { body.app .cartbar { left: calc(50% + var(--side-w) / 2); } }
.cartbar.show { display: block; }
.steps { display: grid; gap: 6px; }
.step-bar { height: 5px; border-radius: 99px; background: var(--line); overflow: hidden; }
.step-bar > i { display: block; height: 100%; background: var(--ok); }
.step-lbl { font-size: 10.5px; text-align: center; color: var(--muted); margin-top: 4px; white-space: nowrap; }
.step-lbl.on { color: var(--ok); font-weight: 700; }
body.has-cartbar .zalo-fab { bottom: 120px; }
/* Phones: smaller round button, and room under the page so it never covers the last content or buttons. */
@media (max-width: 640px) {
  .zalo-fab { width: 44px; height: 44px; border-radius: 50%; right: 12px; bottom: 12px; font-size: 11px; }
  body.has-cartbar .zalo-fab { bottom: 112px; }
  #site-footer { padding-bottom: 64px; }
}

/* ══ Prose (policy pages) ══ */
.prose h2 { font-size: 18px; font-weight: 700; margin: 0 0 8px; }
.prose ul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 14.5px; }
.prose li { margin: 4px 0; }

/* ── Price filter checkboxes ── */
.tier-opt { cursor: pointer; background: none; border: 0; text-align: left; font: inherit; font-size: 14px; }
.cbox { width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid #c7c7c7; display: grid; place-items: center; color: transparent; flex: none; transition: all .15s; }
.cbox svg { width: 11px; height: 11px; stroke-width: 3; }
.tier-opt[aria-pressed="true"] { color: var(--ink); }
.tier-opt[aria-pressed="true"] .cbox { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ── Collapsible price filter ── */
.tier-dd > summary { list-style: none; cursor: pointer; }
.tier-dd > summary::-webkit-details-marker { display: none; }
.dd-chev { display: grid; transition: transform .2s; color: var(--muted); }
.tier-dd[open] .dd-chev { transform: rotate(180deg); }
.tier-dd[open] > div { animation: dd-in .2s var(--ease); }
@keyframes dd-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ══ Admin shell ══ */
body.adm { background: #f4f4f5; }
.adm-side { background: #141418; border-right: 0; }
.adm-group { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.35); padding: 18px 12px 6px; }
.adm-link { display: flex; align-items: center; gap: 11px; height: 40px; padding: 0 12px; border-radius: 9px; font-size: 14px; font-weight: 500; color: rgba(255,255,255,.72); text-decoration: none; background: none; border: 0; cursor: pointer; font-family: inherit; transition: background .15s, color .15s; }
.adm-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.adm-link.active { background: rgba(242,100,25,.16); color: #ffb48a; }
.adm-link.active svg { color: var(--brand); }
.adm-badge { min-width: 22px; height: 20px; padding: 0 6px; border-radius: 99px; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; background: rgba(255,255,255,.12); color: #fff; }
.adm-badge[data-tone="alert"] { background: #dc2626; }
.adm-head { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
@media (min-width: 768px) { .adm-head { padding: 14px 28px; } }
.adm-main { padding: 20px 16px 60px; max-width: 1280px; }
@media (min-width: 768px) { .adm-main { padding: 24px 28px 60px; } }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; }
.kpi-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; }
.kpi-v { font-size: 26px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.tbl { width: 100%; font-size: 14px; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 10px 14px; background: #fafafa; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: #fcfcfc; }
.seg { display: inline-flex; padding: 3px; gap: 2px; background: #f0f0f1; border-radius: 10px; }
.seg button { height: 30px; padding: 0 12px; border-radius: 8px; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 500; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.drop { border: 1.5px dashed #d4d4d8; border-radius: 12px; background: #fafafa; transition: border-color .15s, background .15s; }
.drop.over { border-color: var(--brand); background: var(--brand-soft); }
@media print { .adm-side, .adm-head, .no-print { display: none !important; } body.adm, body.app { padding: 0 !important; background: #fff; } }
.adm-badge.hidden { display: none; }

/* ── Stock states (storefront) ── */
.p-out { position: absolute; inset: auto 10px 10px 10px; width: max-content; background: rgba(23,23,23,.82); color: #fff; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 6px; }
.p-card.is-out .p-media img, .p-card.is-out .p-media .ball { filter: grayscale(.85); opacity: .7; }
.p-act:disabled { opacity: .35; cursor: not-allowed; pointer-events: none; }
.btn:disabled { opacity: .5; pointer-events: none; }
.field[aria-invalid="true"] { border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220,38,38,.08); }
.f-err { font-size: 12px; color: #b91c1c; margin-top: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 300; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; font-size: 14px; text-decoration: none; }
.skip-link:focus { top: 8px; }

/* ══ Admin: charts, drawer, dialogs ══ */
.chart .bar-col { fill: var(--brand); transition: fill .12s; }
.chart .bar-col.hl { fill: var(--brand-hover); }
.chart .bar-hit { cursor: default; outline: none; }
.chart .bar-hit:focus-visible { stroke: var(--ink); stroke-width: 1; }
.chart .grid-line { stroke: #ececec; }
.chart .axis-t { fill: var(--muted); font-size: 11px; font-family: 'Be Vietnam Pro', system-ui, sans-serif; }
#adm-tip { position: fixed; pointer-events: none; background: var(--ink); color: #fff; font-size: 12.5px; line-height: 1.45; padding: 7px 10px; border-radius: 8px; z-index: 300; display: none; white-space: nowrap; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.seg-sm button { height: 26px; padding: 0 10px; font-size: 12px; }
.tbl-sm th { padding: 7px 10px; }
.tbl-sm td { padding: 7px 10px; font-size: 13px; }
.tbl tfoot td { border-top: 1px solid var(--line); background: #fafafa; }
.tbl .num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.adm-drawer { width: min(620px, 100%); background: #f7f7f8; overflow-y: auto; display: block; }
.adm-dlg { border: 0; padding: 0; border-radius: 16px; width: min(440px, 94vw); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.adm-dlg::backdrop, dialog.adm-modal::backdrop { background: rgba(0,0,0,.4); }
dialog.adm-modal { border: 0; padding: 0; border-radius: 16px; width: min(560px, 94vw); max-height: 92vh; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.stock-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 26px; padding: 0 8px; border-radius: 7px; font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; background: var(--fill); color: var(--ink); }
.stock-pill.low { background: #fff1e8; color: #c2410c; }
.stock-pill.out { background: #fef2f2; color: #b91c1c; }
.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline li { position: relative; }
.timeline li::before { content: ''; position: absolute; left: -17px; top: 6px; width: 10px; height: 10px; border-radius: 99px; background: #fff; border: 2px solid #c7c7c7; }
.timeline li.note::before { border-color: var(--brand); }
.timeline li.status::before { border-color: var(--ok); }
.adm-empty { padding: 40px 16px; text-align: center; color: var(--muted); font-size: 14px; }
.print-only { display: none; }
@media print {
  .print-only { display: block; }
  .panel, .kpi { break-inside: avoid; border-color: #ccc; }
  .adm-main { max-width: none; padding: 0; }
  #adm-tip, .skip-link, .zalo-fab, .cartbar { display: none !important; }
  [data-pane="table"].hidden { display: block !important; max-height: none !important; }
  [data-pane="chart"] { display: none !important; }
}
.kpi { min-width: 0; }
.kpi-v { overflow-wrap: anywhere; }
@media (max-width: 640px) { .kpi { padding: 12px 14px; } .kpi-v { font-size: 20px; } }

/* ── Scheduled sale prices ── */
.price-now { font-weight: 600; }
.price-now.is-sale { color: var(--brand); font-weight: 700; }
.price-old { color: var(--muted); font-size: .88em; }
.sale-pct { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 6px; background: var(--brand); color: #fff; font-size: 11.5px; font-weight: 700; }
.p-sale-badge { position: absolute; top: 10px; left: 10px; background: var(--brand); color: #fff; border-radius: 7px; padding: 2px 8px; font-size: 12.5px; font-weight: 700; }
.adm-badge[data-tone="ok"] { background: #15803d; font-size: 10.5px; }
/* Segmented filters never widen the page on phones: they scroll sideways instead. */
.seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: none; }
.adm-main .panel, .adm-main .kpi { min-width: 0; }
/* One-click copy field (admin "Lên đơn SPX") */
.copy-btn { display: grid; grid-template-columns: 76px 1fr auto; align-items: center; gap: 8px; width: 100%; min-height: 36px; padding: 6px 10px; text-align: left; border: 1px solid var(--line); border-radius: 8px; background: var(--card); font: inherit; font-size: 13.5px; cursor: pointer; }
.copy-btn:hover { border-color: #bdbdbd; }
.copy-btn .copy-lbl { color: var(--muted); font-size: 12.5px; }
.copy-btn .copy-val { min-width: 0; overflow-wrap: anywhere; font-weight: 500; }
.copy-btn .copy-ok { font-size: 12px; font-weight: 600; color: var(--brand); }
.copy-btn.done { border-color: var(--ok); } .copy-btn.done .copy-ok { color: var(--ok); }
#trk-in::placeholder { text-transform: none; }
.chart .bar-a { fill: #8e8e96; }
/* Clearance ("Xả tồn") is exclusive: dark badge, distinct from the orange sale badge */
.sale-pct.clr, .p-sale-badge.clr { background: var(--ink); color: #fff; }
/* TikTok-style sale tag: red-coral gradient, lightning bolt, light sweep. Clearance keeps the dark badge. */
.sale-pct:not(.clr), .p-sale-badge:not(.clr) { background: linear-gradient(120deg, #fe2c55 0%, #ff4d3d 55%, #ff7a2f 100%); color: #fff; gap: 2px; font-weight: 800; box-shadow: 0 2px 8px rgba(254, 44, 85, .35); position: absolute; overflow: hidden; }
.sale-pct:not(.clr) { position: relative; border-radius: 3px 8px 3px 8px; }
.p-sale-badge:not(.clr) { display: inline-flex; align-items: center; border-radius: 4px 11px 4px 11px; padding: 3px 9px 3px 7px; font-size: 13px; }
.sale-pct:not(.clr)::after, .p-sale-badge:not(.clr)::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%); transform: translateX(-120%); animation: sale-shine 2.8s ease-in-out infinite; }
@keyframes sale-shine { 0%, 55% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
@media (prefers-reduced-motion: reduce) { .sale-pct:not(.clr)::after, .p-sale-badge:not(.clr)::after { animation: none; display: none; } }
.price-now.is-sale { color: #fe2c55; }
/* Wholesale tag: TikTok-like black pill with cyan / red offset shadow. Shown once, in the top bar. */
.si-tag { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; background: #111; color: #fff; font-size: 12.5px; font-weight: 700; white-space: nowrap; box-shadow: -2px -2px 0 #25f4ee, 2px 2px 0 #fe2c55; transition: transform .15s; }
.si-tag:hover { transform: translateY(-1px); color: #fff; }
/* Combo: photo mosaic (cart lines, product page) and the combo page cards. */
.combo-mosaic { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 1px; background: var(--line); }
.combo-mosaic.n2 { grid-template-rows: 1fr; }
.combo-mosaic > img, .combo-mosaic > span { width: 100%; height: 100%; object-fit: cover; min-width: 0; min-height: 0; background: var(--fill); }
.cb-members { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 6px; }
.cb-m { width: 78px; text-align: center; font-size: 11.5px; color: var(--ink-2); }
.cb-m img, .cb-m .ph { display: block; width: 78px; height: 78px; border-radius: 12px; object-fit: cover; background: var(--fill); border: 1px solid var(--line); transition: transform .2s; }
.cb-m:hover img { transform: translateY(-2px); }
.cb-m span { display: block; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-arrow { align-self: center; margin-top: -18px; color: var(--muted); font-size: 18px; line-height: 1; }
.cb-card:target { box-shadow: 0 0 0 2px #fe2c55; }
.cb-sm { flex-wrap: nowrap; gap: 4px; }
.cb-sm .cb-m { flex: 1 1 0; min-width: 0; max-width: 58px; width: auto; }
.cb-sm .cb-m img, .cb-sm .cb-m .ph { width: 100%; height: auto; aspect-ratio: 1; border-radius: 9px; }
.cb-sm .cb-arrow { flex: none; margin-top: 0; font-size: 13px; }
@media (max-width: 420px) { .cb-m { width: 64px; } .cb-m img, .cb-m .ph { width: 64px; height: 64px; } }
/* Admin bell */
.bell-count { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; font-size: 11px; font-weight: 700; display: grid; place-items: center; color: #fff; background: #dc2626; }
.bell-count[data-tone="yellow"] { background: #eab308; color: #422006; }
.bell-count[data-tone="dot"] { min-width: 10px; width: 10px; height: 10px; padding: 0; top: 6px; right: 6px; background: var(--brand); }
.bell-pop { position: absolute; right: 0; top: calc(100% + 6px); width: min(360px, calc(100vw - 24px)); background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px rgba(0,0,0,.16); z-index: 60; }
.adm-badge[data-tone="warn"] { background: #eab308; color: #422006; }
@media (max-width: 640px) { .bell-pop { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; } }
/* Admin tables become cards on phones: no sideways scrolling, name + total/status at the top. */
@media (max-width: 640px) {
  .tbl-cards { min-width: 0 !important; }
  .tbl-cards thead { display: none; }
  .tbl-cards, .tbl-cards tbody { display: block; }
  .tbl-cards tr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); }
  .tbl-cards td { display: block; padding: 0 !important; border: 0 !important; order: 3; text-align: left !important; }
  .tbl-cards td.c-cb { order: 0; }
  .tbl-cards td.c-head { order: 1; flex: 1 1 55%; min-width: 0; }
  .tbl-cards td.c-end { order: 2; margin-left: auto; text-align: right !important; }
  .tbl-cards td.c-full { flex-basis: 100%; min-width: 0; max-width: 100%; }
  .tbl-cards td.c-full .truncate { max-width: none; }
  .tbl-cards td[data-l]::before { content: attr(data-l) ": "; color: var(--muted); font-size: 12px; font-weight: 400; }
  .tbl-cards td[colspan] { flex-basis: 100%; text-align: center !important; }
  .tbl-cards tbody tr:hover td { background: none; }
}

/* Home shortcut and event cards: soft gradient, light to deeper, dark text on every colour. */
.g-tile { border: 1px solid rgba(23,23,23,.07); border-radius: 12px; color: var(--ink); background: linear-gradient(135deg, var(--g1), var(--g2)); box-shadow: 0 1px 3px rgba(23,23,23,.07); transition: box-shadow .15s, transform .15s; }
.g-tile:hover { box-shadow: 0 4px 12px rgba(23,23,23,.12); transform: translateY(-1px); }
.g-ico { display: grid; place-items: center; color: #fff; border-radius: 10px; background: linear-gradient(145deg, var(--g3), var(--g4)); box-shadow: 0 3px 8px -2px var(--g4), inset 0 1px 0 rgba(255,255,255,.4); }
.g-ico svg { width: 20px; height: 20px; }
.g-sub { color: rgba(23,23,23,.74); }
.g-ice { --g1: #d6efff; --g2: #86ccf5; --g3: #38bdf8; --g4: #0369a1; }
.g-sakura { --g1: #ffdfea; --g2: #f6a0c0; --g3: #f472b6; --g4: #be185d; }
.g-lilac { --g1: #eadfff; --g2: #b99ef1; --g3: #a78bfa; --g4: #6d28d9; }
.g-mandarin { --g1: #ffe3c8; --g2: #ffa95c; --g3: #fb923c; --g4: #c2410c; }
.g-apple { --g1: #e4f7c5; --g2: #9bd955; --g3: #84cc16; --g4: #4d7c0f; }
.g-lemon { --g1: #fff6b0; --g2: #f8dc3f; --g3: #facc15; --g4: #a16207; }
@media (prefers-reduced-motion: reduce) { .g-tile { transition: none; } .g-tile:hover { transform: none; } }

/* Home "Xem tất cả mẫu": scarlet button with a soft pulsing glow. */
.btn-scarlet { color: #fff !important; border-color: #b80f22 !important; background: linear-gradient(135deg, #f0303f, #c8102e) !important; animation: scarlet-pulse 1.6s ease-in-out infinite; }
.btn-scarlet:hover { background: linear-gradient(135deg, #e0202f, #a90d26) !important; animation-play-state: paused; }
@keyframes scarlet-pulse {
  0%, 100% { box-shadow: 0 2px 6px rgba(200,16,46,.35), 0 0 0 0 rgba(240,48,63,.55); filter: brightness(1); }
  50% { box-shadow: 0 4px 16px rgba(200,16,46,.6), 0 0 0 7px rgba(240,48,63,0); filter: brightness(1.12); }
}
@media (prefers-reduced-motion: reduce) { .btn-scarlet { animation: none; box-shadow: 0 3px 10px rgba(200,16,46,.45); } }

/* Phones zoom in on inputs under 16px, which also unlocks sideways scrolling. */
@media (max-width: 1023px) {
  input:not([type=checkbox]):not([type=radio]), select, textarea { font-size: 16px !important; }
}

/* Top banner: six colours, one at a time. */
.promo { animation: promo-cycle 24s linear infinite; transition: none; }
.promo a { color: inherit; }
@keyframes promo-cycle {
  0%, 15.5% { background: #7dd3fc; color: #0b2233; }
  16.67%, 32.2% { background: #0b3c7d; color: #fff; }
  33.33%, 48.8% { background: #d1007a; color: #fff; }
  50%, 65.5% { background: #6e2a6e; color: #fff; }
  66.67%, 82.2% { background: #2fdb4f; color: #06250f; }
  83.33%, 98.8% { background: #d9b95b; color: #2a2005; }
  100% { background: #7dd3fc; color: #0b2233; }
}
@media (prefers-reduced-motion: reduce) { .promo { animation: none; background: #0b3c7d; color: #fff; } }

/* Mobile search row + name suggestions */
.m-search { padding: 0 16px 10px; }
.m-search[hidden] { display: none; }
.m-search .search { max-width: none; }
@media (min-width: 640px) { .m-search { display: none !important; } }
.sg-box { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 70; max-height: min(62vh, 430px); overflow-y: auto; overscroll-behavior: contain; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 28px rgba(0,0,0,.16); }
.sg-box[hidden] { display: none; }
.sg-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; color: var(--ink); }
.sg-item + .sg-item { border-top: 1px solid var(--line); }
.sg-item:hover, .sg-item.on { background: var(--fill); }
.sg-img { width: 44px; height: 44px; flex: none; border-radius: 8px; overflow: hidden; background: var(--fill); }
.sg-img img { width: 100%; height: 100%; object-fit: cover; }
.el-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; line-height: 1.5; color: var(--ink-2); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; background: var(--card); }
a.el-tag:hover { border-color: #bdbdbd; color: var(--ink); }
.el-tag .dot { width: 7px; height: 7px; }
.tier-opt[hidden] { display: none; }

/* Home moving row: 2 cards on phones, 4 on wider screens. */
.esc-row { display: flex; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; outline-offset: 3px; }
.esc-row > * { flex: 0 0 calc((100% - 12px) / 2); min-width: 0; }
@media (min-width: 768px) { .esc-row > * { flex-basis: calc((100% - 36px) / 4); } }
