/* vietnamshop – shared design system. Mobile first; storefront (.sf) and admin (.ad) layers. */
:root {
  --accent: #1f2430;
  --accent-ink: #fff;
  --accent-soft: color-mix(in srgb, var(--accent) 10%, #fff);
  --accent-softer: color-mix(in srgb, var(--accent) 5%, #fff);
  --accent-strong: color-mix(in srgb, var(--accent) 82%, #000);
  --bg: #f5f4f1;
  --surface: #ffffff;
  --surface-2: #faf9f7;
  --ink: #1b1d22;
  --ink-2: #4a4f59;
  --ink-3: #8a8f99;
  --line: #e9e6e0;
  --line-2: #f0eeea;
  --ok: #138a5e;
  --ok-soft: #e6f5ee;
  --warn: #b26b00;
  --warn-soft: #fdf3e2;
  --err: #c8372d;
  --err-soft: #fdecea;
  --info: #2f6fde;
  --info-soft: #eaf1fd;
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --shadow-1: 0 1px 2px rgba(20, 20, 30, .04), 0 1px 1px rgba(20, 20, 30, .03);
  --shadow-2: 0 6px 24px -8px rgba(20, 20, 30, .18), 0 2px 6px rgba(20, 20, 30, .05);
  --shadow-3: 0 18px 40px -12px rgba(20, 20, 30, .32);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--ink);
  background: var(--bg); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.stack > * + * { margin-top: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px;
  border-radius: 999px; border: 1px solid transparent; background: var(--accent); color: var(--accent-ink);
  font-weight: 600; font-size: 15px; cursor: pointer; transition: transform .12s ease, background .2s, box-shadow .2s;
  white-space: nowrap; text-align: center;
}
.btn:hover { background: var(--accent-strong); }
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.block { width: 100%; }
.btn.lg { height: 52px; font-size: 16px; padding: 0 24px; }
.btn.sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.soft { background: var(--accent-soft); color: var(--accent-strong); }
.btn.soft:hover { background: color-mix(in srgb, var(--accent) 16%, #fff); }
.btn.danger { background: transparent; color: var(--err); border-color: color-mix(in srgb, var(--err) 30%, #fff); }
.btn.danger:hover { background: var(--err-soft); }
.btn.ok { background: var(--ok); color: #fff; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 999px; border: 0; background: transparent; display: inline-grid;
  place-items: center; cursor: pointer; position: relative; color: var(--ink);
}
.icon-btn:hover { background: rgba(0, 0, 0, .05); }
.icon { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- forms ---------- */
.field { display: block; }
.field + .field { margin-top: 14px; }
.field > .label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field > .label .opt { font-weight: 400; color: var(--ink-3); }
.input, .select, .textarea {
  width: 100%; height: 46px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--line);
  background: var(--surface); transition: border-color .15s, box-shadow .15s; font-size: 16px;
}
.textarea { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}
.field.has-error .input, .field.has-error .textarea { border-color: var(--err); }
.field .err { color: var(--err); font-size: 13px; margin-top: 6px; }
.field .help { color: var(--ink-3); font-size: 12.5px; margin-top: 6px; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 14px; }
.grid-2 .field + .field { margin-top: 0; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 14px; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); margin: 1px 0 0; flex: none; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--line-2); gap: 2px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }

/* ---------- alerts, badges ---------- */
.alert { border-radius: var(--r-sm); padding: 12px 14px; font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
.alert.ok { background: var(--ok-soft); color: #0c5e40; }
.alert.error { background: var(--err-soft); color: #8f241c; }
.alert.warn { background: var(--warn-soft); color: #7a4a00; }
.alert.info { background: var(--info-soft); color: #1c4ea8; }
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; background: var(--line-2); color: var(--ink-2); white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.plain::before { display: none; }
.badge.ok, .badge.st-paid, .badge.st-active { background: var(--ok-soft); color: var(--ok); }
.badge.warn, .badge.st-pending_payment, .badge.st-waiting_dns { background: var(--warn-soft); color: var(--warn); }
.badge.err, .badge.st-failed { background: var(--err-soft); color: var(--err); }
.badge.info, .badge.st-provisioning { background: var(--info-soft); color: var(--info); }
.badge.st-completed { background: #eef0f3; color: #4a5160; }
.badge.st-cancelled { background: #f3f1ef; color: #8a8f99; }

.card { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-1); border: 1px solid var(--line-2); }
.card.pad { padding: 18px; }
.card + .card { margin-top: 14px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px 0; }
.card-h h2, .card-h h3 { font-size: 16px; }
.card-b { padding: 16px 18px 18px; }
.divider { height: 1px; background: var(--line-2); margin: 14px 0; }

.toast {
  position: fixed; left: 50%; bottom: calc(96px + var(--safe-b)); transform: translate(-50%, 20px); z-index: 80;
  background: rgba(24, 26, 31, .92); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: all .25s ease; backdrop-filter: blur(8px); white-space: nowrap;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* =====================================================================
   Storefront
   ===================================================================== */
.sf { background: var(--bg); min-height: 100vh; }
.sf-wrap { max-width: 640px; margin: 0 auto; min-height: 100vh; background: var(--bg); position: relative; padding-bottom: calc(100px + var(--safe-b)); }
@media (min-width: 700px) { .sf { background: #eceae5; } .sf-wrap { box-shadow: 0 0 0 1px var(--line), 0 30px 60px -30px rgba(0,0,0,.25); } }

.sf-top {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s;
}
.sf-top.scrolled { border-bottom-color: var(--line); }
.sf-brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.sf-brand .name { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px; flex: none; display: grid; place-items: center; overflow: hidden;
  background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 15px;
}
.logo-mark img { width: 100%; height: 100%; object-fit: cover; }
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface); }
.lang-switch a { padding: 4px 10px; font-size: 12px; font-weight: 700; color: var(--ink-3); }
.lang-switch a.on { background: var(--ink); color: #fff; }
.cart-dot {
  position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px;
  background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; display: grid; place-items: center;
  border: 2px solid var(--bg);
}
.cart-dot:empty, .cart-dot[data-n="0"] { display: none; }

.sf-hero { padding: 6px 16px 0; }
.hero-card {
  position: relative; border-radius: var(--r-lg); overflow: hidden; min-height: 200px; display: flex; align-items: flex-end;
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--accent) 55%, #fff) 0%, var(--accent) 55%, var(--accent-strong) 100%);
  color: #fff; box-shadow: var(--shadow-2);
}
.hero-card.has-cover { min-height: 236px; }
.hero-card img.cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,.62) 100%); }
.hero-card:not(.has-cover)::before {
  content: ""; position: absolute; width: 260px; height: 260px; right: -70px; top: -90px; border-radius: 50%;
  background: rgba(255,255,255,.12);
}
.hero-in { position: relative; z-index: 2; padding: 22px 20px 20px; width: 100%; }
.hero-in h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; text-shadow: 0 1px 12px rgba(0,0,0,.18); }
.hero-in p { margin-top: 6px; font-size: 14.5px; opacity: .92; max-width: 34em; }
.hero-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.hero-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px;
  background: rgba(255,255,255,.18); backdrop-filter: blur(6px); font-size: 13px; font-weight: 600; color: #fff;
}
.hero-chip .icon { width: 16px; height: 16px; }

.notice {
  margin: 12px 16px 0; padding: 10px 14px; border-radius: var(--r-sm); background: var(--accent-soft);
  color: var(--accent-strong); font-size: 13.5px; display: flex; gap: 8px; align-items: flex-start;
}
.notice .icon { width: 18px; height: 18px; flex: none; margin-top: 1px; }

.chips {
  position: sticky; top: 56px; z-index: 20; display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px;
  scrollbar-width: none; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 34px; padding: 0 14px; border-radius: 999px; display: inline-flex; align-items: center;
  background: var(--surface); border: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--ink-2);
}
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }

.sec { padding: 8px 16px 0; scroll-margin-top: 110px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; margin: 14px 2px 12px; }
.sec-h h2 { font-size: 19px; font-weight: 800; }
.sec-h .count { color: var(--ink-3); font-size: 13px; }

.p-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 560px) { .p-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.p-card {
  background: var(--surface); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column;
  box-shadow: var(--shadow-1); border: 1px solid var(--line-2); transition: transform .15s ease, box-shadow .2s;
}
.p-card:active { transform: scale(.985); }
.p-img { position: relative; aspect-ratio: 1 / 1; background: var(--accent-softer); overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.p-card:hover .p-img img { transform: scale(1.03); }
.p-ph {
  width: 100%; height: 100%; display: grid; place-items: center; font-size: 34px; font-weight: 800;
  color: color-mix(in srgb, var(--accent) 55%, #fff);
  background: linear-gradient(135deg, var(--accent-softer), color-mix(in srgb, var(--accent) 14%, #fff));
}
.p-tag {
  position: absolute; left: 8px; top: 8px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11px;
  font-weight: 700; background: rgba(255,255,255,.92); color: var(--ink); display: inline-flex; align-items: center;
  box-shadow: var(--shadow-1);
}
.p-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.p-name { font-size: 14.5px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.p-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; }
.price { font-weight: 800; color: var(--ink); font-size: 15.5px; letter-spacing: -.01em; }
.price .unit { font-weight: 500; font-size: 12px; color: var(--ink-3); letter-spacing: 0; }
.p-foot .price { white-space: nowrap; min-width: 0; line-height: 1.25; }
.p-foot .price .unit { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.p-foot .qty-pill { height: 32px; }
.p-foot .qty-pill button { width: 28px; height: 32px; }
.p-foot .qty-pill span { min-width: 16px; }
.add-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; cursor: pointer; flex: none; box-shadow: 0 4px 10px -4px color-mix(in srgb, var(--accent) 70%, transparent);
  transition: transform .12s;
}
.add-btn:active { transform: scale(.88); }
.add-btn .icon { width: 18px; height: 18px; stroke-width: 2.4; }
.qty-pill { display: inline-flex; align-items: center; background: var(--accent-soft); border-radius: 999px; height: 34px; }
.qty-pill button { width: 32px; height: 34px; border: 0; background: transparent; cursor: pointer; color: var(--accent-strong); display: grid; place-items: center; }
.qty-pill button .icon { width: 16px; height: 16px; stroke-width: 2.4; }
.qty-pill span { min-width: 20px; text-align: center; font-weight: 700; font-size: 14px; color: var(--accent-strong); }

.info-card { margin: 22px 16px 0; }
.info-card .card-b { display: grid; gap: 14px; }
.info-line { display: flex; gap: 12px; align-items: flex-start; }
.info-line .ic { width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-strong); display: grid; place-items: center; flex: none; }
.info-line .ic .icon { width: 18px; height: 18px; }
.info-line .k { font-size: 12px; color: var(--ink-3); }
.info-line .v { font-size: 14.5px; font-weight: 500; word-break: break-word; }
.about { font-size: 14.5px; color: var(--ink-2); line-height: 1.7; }
.sf-foot { text-align: center; color: var(--ink-3); font-size: 12px; padding: 28px 16px 8px; }

.cart-bar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(14px + var(--safe-b)); z-index: 40;
  width: min(608px, calc(100% - 24px)); height: 60px; border-radius: 999px; padding: 0 8px 0 20px;
  background: #17181c; color: #fff; display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow-3);
  transition: transform .3s cubic-bezier(.2,.9,.3,1.2), opacity .2s;
}
.cart-bar.empty { transform: translate(-50%, 140%); opacity: 0; pointer-events: none; }
.cart-bar .sum { flex: 1; min-width: 0; line-height: 1.2; }
.cart-bar .sum b { font-size: 17px; display: block; }
.cart-bar .sum span { font-size: 12px; opacity: .65; }
.cart-bar .btn { background: var(--accent); color: var(--accent-ink); height: 46px; }
.cart-bar .btn:hover { background: var(--accent-strong); }
.cart-bar.bump { animation: bump .35s ease; }
@keyframes bump { 40% { transform: translate(-50%, -4px) scale(1.02); } }

/* product page */
.pd-img { margin: 4px 16px 0; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 1 / 1; background: var(--accent-softer); box-shadow: var(--shadow-1); }
.pd-img img { width: 100%; height: 100%; object-fit: cover; }
.pd-img .p-ph { font-size: 72px; }
.pd-body { padding: 18px 18px 0; }
.pd-body h1 { font-size: 22px; font-weight: 800; }
.pd-price { margin-top: 10px; font-size: 24px; font-weight: 800; }
.pd-price .unit { font-size: 14px; font-weight: 500; color: var(--ink-3); }
.pd-desc { margin-top: 16px; color: var(--ink-2); line-height: 1.75; font-size: 15px; }
.pd-buy {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; z-index: 41; width: min(640px, 100%);
  padding: 12px 16px calc(12px + var(--safe-b)); background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(14px); border-top: 1px solid var(--line); display: flex; gap: 12px; align-items: center;
}
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; height: 48px; background: var(--surface); }
.stepper button { width: 44px; height: 46px; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.stepper button .icon { width: 18px; height: 18px; stroke-width: 2.2; }
.stepper output, .stepper span { min-width: 28px; text-align: center; font-weight: 700; }

/* cart */
.page-h { display: flex; align-items: center; gap: 6px; padding: 8px 10px 4px 6px; }
.page-h h1 { font-size: 20px; font-weight: 800; }
.c-list { display: grid; gap: 10px; }
.c-item { display: flex; gap: 12px; padding: 12px; background: var(--surface); border-radius: var(--r); border: 1px solid var(--line-2); box-shadow: var(--shadow-1); }
.c-item .thumb { width: 72px; height: 72px; border-radius: 12px; overflow: hidden; flex: none; background: var(--accent-softer); }
.c-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.c-item .thumb .p-ph { font-size: 22px; }
.c-item .nm { font-weight: 600; font-size: 14.5px; line-height: 1.35; }
.c-item .meta { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.c-item .bot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.c-item.off { opacity: .55; }
.c-item .rm { border: 0; background: none; color: var(--ink-3); font-size: 12.5px; cursor: pointer; padding: 4px 0; }
.sum-card .line { display: flex; justify-content: space-between; font-size: 14px; color: var(--ink-2); }
.sum-card .line + .line { margin-top: 8px; }
.sum-card .total { font-size: 18px; color: var(--ink); font-weight: 800; }
.empty-state { text-align: center; padding: 56px 24px; }
.empty-state .art { width: 88px; height: 88px; margin: 0 auto 18px; border-radius: 28px; background: var(--accent-soft); color: var(--accent-strong); display: grid; place-items: center; }
.empty-state .art .icon { width: 40px; height: 40px; stroke-width: 1.5; }
.empty-state h2 { font-size: 18px; }
.empty-state p { color: var(--ink-3); margin-top: 6px; }
.sticky-submit {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; z-index: 41; width: min(640px, 100%);
  padding: 12px 16px calc(12px + var(--safe-b)); background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(14px); border-top: 1px solid var(--line); display: flex; gap: 14px; align-items: center;
}
.sticky-submit .sum { flex: 1; line-height: 1.2; }
.sticky-submit .sum span { font-size: 12px; color: var(--ink-3); }
.sticky-submit .sum b { display: block; font-size: 19px; }

/* order / payment */
.ord-hero { text-align: center; padding: 22px 20px 8px; }
.ord-hero .ok-ic { width: 60px; height: 60px; border-radius: 50%; margin: 0 auto 12px; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; }
.ord-hero .ok-ic .icon { width: 30px; height: 30px; stroke-width: 2.4; }
.ord-hero h1 { font-size: 20px; font-weight: 800; }
.pay-card { overflow: hidden; }
.pay-head { padding: 18px; background: linear-gradient(135deg, var(--accent), var(--accent-strong)); color: var(--accent-ink); }
.pay-head .lbl { font-size: 13px; opacity: .85; }
.pay-head .amt { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; }
.pay-head .no { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; background: rgba(255,255,255,.16); border-radius: 999px; padding: 4px 6px 4px 12px; font-size: 13px; }
.pay-head .no b { font-family: ui-monospace, Menlo, monospace; letter-spacing: .04em; font-size: 14px; }
.copy-btn { border: 0; height: 26px; padding: 0 10px; border-radius: 999px; background: rgba(255,255,255,.92); color: var(--ink); font-size: 12px; font-weight: 700; cursor: pointer; }
.qr-box { padding: 20px 18px 6px; display: grid; place-items: center; }
.qr-box img { width: min(280px, 78vw); border-radius: 14px; border: 1px solid var(--line); background: #fff; padding: 8px; }
.steps { counter-reset: s; list-style: none; padding: 6px 18px 18px; margin: 0; display: grid; gap: 10px; }
.steps li { counter-increment: s; display: flex; gap: 10px; font-size: 14px; color: var(--ink-2); }
.steps li::before { content: counter(s); flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-strong); font-weight: 800; font-size: 12px; display: grid; place-items: center; margin-top: 1px; }
.status-strip { display: flex; gap: 12px; align-items: center; padding: 14px 18px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; text-align: right; font-weight: 500; word-break: break-word; }
.items-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.items-table td { padding: 8px 0; border-bottom: 1px dashed var(--line); vertical-align: top; }
.items-table tr:last-child td { border-bottom: 0; }
.items-table .r { text-align: right; white-space: nowrap; }
.items-table .sub { color: var(--ink-3); font-size: 12.5px; }

/* preparing */
.prep { min-height: 100vh; display: grid; place-items: center; padding: 32px 24px; text-align: center; background:
  radial-gradient(80% 60% at 50% 0%, var(--accent-soft) 0%, transparent 70%), var(--bg); }
.prep .mark { width: 84px; height: 84px; border-radius: 26px; margin: 0 auto 22px; display: grid; place-items: center; overflow: hidden; background: var(--surface); box-shadow: var(--shadow-2); color: var(--accent); }
.prep .mark img { width: 100%; height: 100%; object-fit: cover; }
.prep .mark .icon { width: 38px; height: 38px; stroke-width: 1.5; }
.prep h1 { font-size: 24px; font-weight: 800; }
.prep p { color: var(--ink-2); margin-top: 10px; max-width: 26em; margin-inline: auto; }
.prep .dots { display: inline-flex; gap: 6px; margin-top: 26px; }
.prep .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); opacity: .25; animation: dot 1.4s infinite ease-in-out; }
.prep .dots i:nth-child(2) { animation-delay: .2s; } .prep .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes dot { 40% { opacity: 1; transform: translateY(-3px); } }
.prep .lang-switch { margin-top: 30px; }

/* =====================================================================
   Admin (shop admin + platform admin)
   ===================================================================== */
.ad { background: #f4f5f7; --bg: #f4f5f7; }
.ad-top {
  position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.9); backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid #e7e8ec;
}
.ad-top-in { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
.ad-title { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.ad-title .t1 { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-title .t2 { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-nav { max-width: 1120px; margin: 0 auto; display: flex; gap: 4px; padding: 0 10px; overflow-x: auto; scrollbar-width: none; }
.ad-nav::-webkit-scrollbar { display: none; }
.ad-nav a {
  flex: none; padding: 10px 12px; font-size: 14px; font-weight: 600; color: var(--ink-3); border-bottom: 2px solid transparent;
  display: inline-flex; align-items: center; gap: 6px;
}
.ad-nav a.on { color: var(--ink); border-bottom-color: var(--accent); }
.ad-nav .n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--warn); color: #fff; font-size: 11px; display: grid; place-items: center; }
.ad-main { max-width: 1120px; margin: 0 auto; padding: 18px 16px 60px; }
.ad-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 16px; flex-wrap: wrap; }
.ad-h h1 { font-size: 22px; font-weight: 800; }
.ad-h .sub { color: var(--ink-3); font-size: 13.5px; margin-top: 2px; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 820px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { padding: 16px; }
.stat .k { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.stat .v { font-size: 28px; font-weight: 800; margin-top: 4px; letter-spacing: -.02em; }
.stat.hl { background: linear-gradient(135deg, var(--accent), var(--accent-strong)); color: var(--accent-ink); border: 0; }
.stat.hl .k { color: inherit; opacity: .8; }
.cols { display: grid; gap: 14px; }
@media (min-width: 900px) { .cols { grid-template-columns: 1.15fr 1fr; align-items: start; } .cols.r { grid-template-columns: 1fr 340px; } }
.cols > .card + .card { margin-top: 0; }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li a { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line-2); }
.checklist li:first-child a { border-top: 0; }
.checklist .tick { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex: none; color: transparent; }
.checklist .done .tick { background: var(--ok); border-color: var(--ok); color: #fff; }
.checklist .done .lbl { color: var(--ink-3); text-decoration: line-through; text-decoration-color: rgba(0,0,0,.2); }
.checklist .tick .icon { width: 14px; height: 14px; stroke-width: 3; }
.checklist .lbl { flex: 1; font-weight: 600; font-size: 14.5px; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li > a, .list > li > .li { display: flex; gap: 12px; align-items: center; padding: 13px 18px; border-top: 1px solid var(--line-2); }
.list > li:first-child > a, .list > li:first-child > .li { border-top: 0; }
.list > li > a:hover { background: var(--surface-2); }
.list .thumb { width: 52px; height: 52px; border-radius: 12px; overflow: hidden; flex: none; background: var(--accent-softer); }
.list .thumb img { width: 100%; height: 100%; object-fit: cover; }
.list .thumb .p-ph { font-size: 18px; }
.list .t { font-weight: 600; font-size: 14.5px; }
.list .s { font-size: 12.5px; color: var(--ink-3); margin-top: 1px; }
.list .amt { font-weight: 700; white-space: nowrap; }
.tabs { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 14px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: none; height: 34px; padding: 0 14px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); }
.tabs a.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.tabs a .c { font-size: 12px; opacity: .7; }
.form-card { max-width: 760px; }
.form-sec { padding: 18px; border-top: 1px solid var(--line-2); }
.form-sec:first-child { border-top: 0; }
.form-sec h3 { font-size: 15px; margin-bottom: 14px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 18px; border-top: 1px solid var(--line-2); background: var(--surface-2); border-radius: 0 0 var(--r) var(--r); position: sticky; bottom: 0; }
.img-field { display: flex; gap: 14px; align-items: center; }
.img-prev { width: 84px; height: 84px; border-radius: 14px; overflow: hidden; background: var(--surface-2); border: 1px dashed var(--line); display: grid; place-items: center; flex: none; color: var(--ink-3); }
.img-prev img { width: 100%; height: 100%; object-fit: cover; }
.img-prev.wide { width: 150px; }
.img-prev.qr { width: 150px; height: 150px; }
.img-prev.qr img { object-fit: contain; background: #fff; }
.file-in { font-size: 13px; max-width: 100%; }
.file-in::file-selector-button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 14px; margin-right: 10px; font-weight: 600; cursor: pointer; }
.themes { display: flex; gap: 10px; flex-wrap: wrap; }
.themes label { position: relative; cursor: pointer; }
.themes input { position: absolute; opacity: 0; }
.themes span { display: block; width: 38px; height: 38px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.themes input:checked + span { box-shadow: 0 0 0 2px var(--ink); }
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background:
  radial-gradient(70% 50% at 50% 0%, var(--accent-soft), transparent 70%), #f4f5f7; }
.auth .card { width: min(400px, 100%); padding: 28px 24px; }
.auth h1 { font-size: 21px; font-weight: 800; margin-top: 14px; }
.auth .sub { color: var(--ink-3); font-size: 13.5px; margin-top: 4px; margin-bottom: 20px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-3); padding: 10px 18px; border-bottom: 1px solid var(--line-2); background: var(--surface-2); white-space: nowrap; }
.tbl td { padding: 13px 18px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.link:hover td { background: var(--surface-2); cursor: pointer; }
.tbl-wrap { overflow-x: auto; }
.inline-form { display: inline; }

/* provisioning */
.pv-steps { display: grid; gap: 0; list-style: none; margin: 0; padding: 0; }
.pv-steps li { display: flex; gap: 12px; position: relative; padding-bottom: 18px; }
.pv-steps li:last-child { padding-bottom: 0; }
.pv-steps li::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--line); }
.pv-steps li:last-child::before { display: none; }
.pv-steps li.done::before { background: var(--ok); }
.pv-dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface); border: 2px solid var(--line); color: var(--ink-3); font-size: 12px; font-weight: 800; z-index: 1; }
.pv-dot .icon { width: 15px; height: 15px; stroke-width: 3; }
.pv-steps .done .pv-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.pv-steps .current .pv-dot { border-color: var(--info); color: var(--info); box-shadow: 0 0 0 5px var(--info-soft); }
.pv-steps .current .pv-dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--info); animation: pulse 1.2s infinite; }
.pv-steps .waiting .pv-dot { border-color: var(--warn); color: var(--warn); box-shadow: 0 0 0 5px var(--warn-soft); }
.pv-steps .failed .pv-dot { background: var(--err); border-color: var(--err); color: #fff; }
@keyframes pulse { 50% { transform: scale(.6); opacity: .5; } }
.pv-steps .lbl { font-weight: 600; font-size: 14.5px; padding-top: 3px; }
.pv-steps .todo .lbl { color: var(--ink-3); }
.dns-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.dns-table th { background: var(--surface-2); text-align: left; font-size: 12px; color: var(--ink-3); padding: 9px 12px; font-weight: 600; }
.dns-table td { padding: 11px 12px; border-top: 1px solid var(--line-2); font-family: ui-monospace, Menlo, monospace; font-size: 13.5px; word-break: break-all; }
.copyable { cursor: pointer; border-bottom: 1px dashed var(--ink-3); }
.events { list-style: none; margin: 0; padding: 0; font-size: 13.5px; }
.events li { display: flex; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line-2); }
.events li:first-child { border-top: 0; }
.events .tm { color: var(--ink-3); white-space: nowrap; font-size: 12.5px; padding-top: 1px; min-width: 88px; }
.events .warn { color: var(--warn); }
.events .error { color: var(--err); }
pre.detail { background: #15171c; color: #d7dae0; border-radius: var(--r-sm); padding: 12px 14px; font-size: 12px; overflow: auto; max-height: 260px; white-space: pre-wrap; word-break: break-all; }
.url-box { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line); }
.url-box a { font-weight: 600; color: var(--accent-strong); word-break: break-all; flex: 1; }
.secret { font-family: ui-monospace, Menlo, monospace; background: var(--warn-soft); padding: 2px 8px; border-radius: 6px; }
details.more summary { cursor: pointer; color: var(--ink-2); font-size: 13.5px; font-weight: 600; list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: "▸ "; }
details.more[open] summary::before { content: "▾ "; }
.stats > .card + .card { margin-top: 0; }
