/* ==========================================================================
   魁盛工作室 — 设计系统
   浅色企业 SaaS 风格。单一 token 来源，勿再追加 :root 覆盖块。
   ========================================================================== */

:root {
  /* 中性色 */
  --ink: #0f1b2d;
  --ink-soft: #26364d;
  --muted: #64748b;
  --muted-soft: #94a3b8;
  --line: #e3e8ef;
  --line-soft: #eef2f7;
  --bg: #f6f8fb;
  --bg-sunken: #f1f4f9;
  --paper: #ffffff;

  /* 品牌与语义色 */
  --blue: #0b5fff;
  --blue-hover: #0a52dd;
  --blue-wash: #eff5ff;
  --blue-line: #cfe0ff;
  --green: #0f7b57;
  --green-wash: #eaf7f1;
  --amber: #a35c00;
  --amber-wash: #fdf4e6;
  --red: #c8372d;
  --red-wash: #fdf0ef;
  --violet: #5b3fd6;

  /* 排版：系统字体栈，不依赖外部请求 */
  --font: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei UI",
    "Microsoft YaHei", "Noto Sans SC", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "DM Mono", "SF Mono", "Cascadia Mono", Consolas,
    "Liberation Mono", Menlo, monospace;

  /* 圆角 */
  --r-sm: 6px;
  --r: 8px;
  --r-lg: 10px;
  --r-xl: 14px;

  /* 阴影 */
  --shadow-sm: 0 1px 2px rgba(15, 27, 45, .05);
  --shadow: 0 1px 3px rgba(15, 27, 45, .06), 0 1px 2px rgba(15, 27, 45, .04);
  --shadow-md: 0 4px 12px rgba(15, 27, 45, .07), 0 1px 3px rgba(15, 27, 45, .05);
  --shadow-lg: 0 12px 32px rgba(15, 27, 45, .12), 0 2px 8px rgba(15, 27, 45, .06);

  /* 布局 */
  --sidebar-w: 236px;
  --header-h: 64px;
  --max-w: 1320px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.011em; color: var(--ink); line-height: 1.3; }
h1 { font-size: 26px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
p { margin: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding-left: 18px; }
li { margin: 4px 0; }
pre {
  margin: 0; padding: 12px; white-space: pre-wrap; word-break: break-word;
  font: 12px/1.65 var(--mono); background: var(--bg-sunken);
  border: 1px solid var(--line); border-radius: var(--r); color: var(--ink-soft);
}
code { font: 12px/1.6 var(--mono); }
button { font-family: inherit; font-size: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
svg { flex: 0 0 auto; }
[hidden] { display: none !important; }

.mono { font-family: var(--mono); }

.kicker {
  font: 600 10px/1.4 var(--font); letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted-soft); margin: 0 0 6px;
}

.field-help { font-size: 12px; color: var(--muted); line-height: 1.6; }

/* Lucide 图标统一尺寸 */
[data-lucide], .lucide { width: 16px; height: 16px; stroke-width: 1.75; }

/* --------------------------------------------------------------- 按钮 */

.dark-button, .admin-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 40px; padding: 0 18px; border: 1px solid var(--blue);
  border-radius: var(--r); background: var(--blue); color: #fff;
  font-weight: 600; box-shadow: var(--shadow-sm); transition: background .15s, border-color .15s;
}
.dark-button:hover:not(:disabled), .admin-primary:hover:not(:disabled) {
  background: var(--blue-hover); border-color: var(--blue-hover);
}

.outline-button, .admin-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 40px; padding: 0 18px; border: 1px solid var(--line);
  border-radius: var(--r); background: var(--paper); color: var(--ink);
  font-weight: 600; transition: background .15s, border-color .15s;
}
.outline-button:hover:not(:disabled), .admin-outline:hover:not(:disabled) {
  background: var(--bg-sunken); border-color: var(--muted-soft);
}

.danger-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 40px; padding: 0 18px; border: 1px solid #f0c9c5;
  border-radius: var(--r); background: var(--red-wash); color: var(--red);
  font-weight: 600; transition: background .15s;
}
.danger-button:hover:not(:disabled) { background: #fbe3e0; }

.text-button {
  display: inline-flex; align-items: center; gap: 6px; padding: 0;
  border: 0; background: none; color: var(--blue); font-weight: 600;
}
.text-button:hover { color: var(--blue-hover); }

.full { width: 100%; }

.is-loading { position: relative; color: transparent !important; }
.is-loading::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 15px; height: 15px; border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #fff; border-radius: 50%; animation: spin .6s linear infinite;
}
.outline-button.is-loading::after, .admin-outline.is-loading::after {
  border-color: var(--line); border-top-color: var(--blue);
}
@keyframes spin { to { transform: rotate(360deg); } }

.round-button, .cart-button {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; width: 38px; height: 38px; border: 1px solid var(--line);
  border-radius: var(--r); background: var(--paper); color: var(--ink-soft);
  transition: background .15s, border-color .15s;
}
.round-button:hover, .cart-button:hover { background: var(--bg-sunken); border-color: var(--muted-soft); }
.cart-button > span {
  position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px;
  padding: 0 5px; display: grid; place-items: center; border-radius: 9px;
  background: var(--blue); color: #fff; font: 600 10px/1 var(--font);
  border: 2px solid var(--paper);
}

/* --------------------------------------------------------------- 表单 */

.admin-form, .auth-form, .user-auth-form { display: grid; gap: 14px; }

label { display: grid; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-soft); }

input, select, textarea {
  width: 100%; min-height: 40px; padding: 9px 11px; font: 400 13px/1.55 var(--font);
  color: var(--ink); background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r); transition: border-color .15s, box-shadow .15s;
}
input:hover, select:hover, textarea:hover { border-color: var(--muted-soft); }
input:focus, select:focus, textarea:focus {
  outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-wash);
}
input:disabled, select:disabled, textarea:disabled {
  background: var(--bg-sunken); color: var(--muted); cursor: not-allowed;
}
input::placeholder, textarea::placeholder { color: var(--muted-soft); }
textarea { min-height: 88px; resize: vertical; line-height: 1.65; }
select {
  appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
}
input[type="file"] { min-height: 42px; padding: 8px 10px; background: var(--bg-sunken); }
input[type="number"] { font-family: var(--mono); }

.form-grid, .field-pair, .settings-grid-form, .payment-fields {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.form-actions { display: flex; justify-content: flex-end; gap: 10px; }

.field-action {
  min-height: 38px; display: flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--paper);
  color: var(--blue); font-weight: 600;
}
.field-action:hover { background: var(--blue-wash); border-color: var(--blue-line); }

.fixed-field {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--bg-sunken); font-size: 12px; color: var(--muted);
}
.fixed-field code { color: var(--ink); }

.password-wrap { position: relative; }
.password-wrap input { padding-right: 46px; }
.password-wrap .reveal {
  position: absolute; right: 6px; bottom: 5px; width: 30px; height: 30px;
  display: grid; place-items: center; border: 0; border-radius: var(--r-sm);
  background: none; color: var(--muted);
}
.password-wrap .reveal:hover { background: var(--bg-sunken); color: var(--ink); }

/* 开关 */
.switch-row {
  display: flex !important; align-items: center; justify-content: space-between; gap: 15px;
  min-height: 60px; padding: 11px 13px; border: 1px solid var(--line);
  border-radius: var(--r); background: var(--paper);
}
.switch-row > span:first-child b { display: block; font-size: 13px; }
.switch-row > span:first-child small { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); font-weight: 400; }
.switch-control { display: inline-flex !important; align-items: center; gap: 9px; flex: 0 0 auto; cursor: pointer; }
.switch-control input { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0; pointer-events: none; }
.switch-control > span {
  position: relative; width: 40px; height: 23px; border-radius: 12px;
  background: #cbd5e1; transition: background .18s;
}
.switch-control > span::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px;
  border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .18s;
}
.switch-control input:checked + span { background: var(--blue); }
.switch-control input:checked + span::after { transform: translateX(17px); }
.switch-control input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.switch-control > b { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* --------------------------------------------------------------- 徽标 */

.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px;
  border-radius: 20px; font: 600 11px/1.5 var(--font); font-style: normal;
  border: 1px solid transparent; white-space: nowrap;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--green-wash); color: var(--green); border-color: #bfe3d3; }
.badge.wait { background: var(--amber-wash); color: var(--amber); border-color: #f3ddb6; }
.badge.alert { background: var(--red-wash); color: var(--red); border-color: #f2ccc8; }

/* --------------------------------------------------------------- 卡片与表格 */

.admin-card, .table-card, .settings-card, .quick-actions-card, .stock-alert-card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
}
.admin-card { padding: 20px; }

.admin-card-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px; margin-bottom: 16px;
}
.admin-card-head h2 { font-size: 15px; }
.admin-card-head p { margin-top: 3px; font-size: 12px; color: var(--muted); }

.admin-table-wrap { overflow-x: auto; border-radius: var(--r-lg); }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  padding: 11px 14px; text-align: left; white-space: nowrap;
  font: 600 11px/1.5 var(--font); letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); background: var(--bg-sunken); border-bottom: 1px solid var(--line);
}
tbody td { padding: 13px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafbfd; }
tbody td b { display: block; font-weight: 600; }
tbody td small { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); }
td.mono, .mono { font-family: var(--mono); }

.table-actions { display: flex; align-items: center; gap: 12px; }
.table-link { border: 0; background: none; padding: 2px 0; color: var(--blue); font-weight: 600; font-size: 12px; }
.table-link:hover { text-decoration: underline; }
.table-link.danger { color: var(--red); }
.table-link:disabled { color: var(--muted-soft); text-decoration: none; }
.empty-table { padding: 40px 18px !important; text-align: center !important; color: var(--muted); }

/* 表格内的类目分组表头。thead th 的样式只作用于 thead，这里的 th 在 tbody 里，
   所以要单独写一份。 */
.table-group th {
  padding: 10px 14px; text-align: left;
  background: var(--bg-sunken); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.table-group:first-child th { border-top: 0; }
.table-group:hover { background: var(--bg-sunken); }
.table-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.table-group-head > span { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.table-group-head b { font-size: 13px; font-weight: 650; color: var(--ink); }
.table-group-head small { font-size: 11px; color: var(--muted); }
.table-group-flag {
  padding: 2px 7px; border-radius: 20px; font: 600 10px/1.6 var(--font);
  font-style: normal; background: var(--amber-wash); color: var(--amber);
}

/* --------------------------------------------------------------- 弹层与提示 */

.modal-layer {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center;
  padding: 18px; background: rgba(15, 27, 45, .48);
  backdrop-filter: blur(3px); animation: fade .16s ease;
}
@keyframes fade { from { opacity: 0; } }
.modal-card {
  position: relative; width: min(520px, 100%); max-height: calc(100vh - 36px);
  overflow-y: auto; padding: 26px; background: var(--paper);
  border-radius: var(--r-xl); box-shadow: var(--shadow-lg);
  animation: pop .18s cubic-bezier(.2, .8, .3, 1);
}
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.99); } }
.modal-card > h2 { margin-bottom: 6px; font-size: 19px; }
.modal-card > h2 + p { margin-bottom: 18px; font-size: 13px; color: var(--muted); }
.modal-card form { margin-top: 18px; }
.modal-x {
  position: absolute; top: 14px; right: 14px; width: 32px; height: 32px;
  display: grid; place-items: center; border: 0; border-radius: var(--r-sm);
  background: none; color: var(--muted);
}
.modal-x:hover { background: var(--bg-sunken); color: var(--ink); }
.modal-section { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.modal-help { margin-top: 9px; font-size: 11px; color: var(--muted); }

.toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 120;
  transform: translate(-50%, 14px); opacity: 0; pointer-events: none;
  max-width: min(460px, calc(100vw - 32px));
  padding: 12px 18px; border-radius: var(--r-lg);
  background: var(--ink); color: #fff; font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow-lg); transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ==========================================================================
   商城前台
   ========================================================================== */

.shop-body { padding-top: var(--header-h); }

.storefront-loading { overflow: hidden; }
.storefront-loading > .shop-header,
.storefront-loading > main,
.storefront-loading > .shop-footer,
.storefront-loading > .modal-layer,
.storefront-loading > .toast { visibility: hidden; }
.storefront-loader {
  position: fixed; inset: 0; z-index: 130; display: grid; place-items: center;
  background: var(--bg);
}
.storefront-loader > span {
  width: 30px; height: 30px; border: 3px solid var(--blue-line);
  border-top-color: var(--blue); border-radius: 50%; animation: spin .65s linear infinite;
}
.shop-body:not(.storefront-loading) .storefront-loader { display: none; }

.shop-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  height: var(--header-h); display: flex; align-items: center; gap: 22px;
  padding: 0 clamp(16px, 4vw, 40px); background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}

.shop-logo { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.logo-glyph {
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: var(--r); background: var(--blue-wash); overflow: hidden;
}
.logo-glyph img { width: 100%; height: 100%; object-fit: cover; }
.shop-logo > span:last-child { display: flex; flex-direction: column; font-weight: 700; font-size: 15px; letter-spacing: -.01em; }
.shop-logo small { font-size: 10px; font-weight: 500; color: var(--muted); letter-spacing: .04em; }

.shop-nav { display: flex; align-items: center; gap: 4px; margin-right: auto; }
.shop-nav-link {
  position: relative; padding: 8px 13px; border: 0; border-radius: var(--r);
  background: none; color: var(--muted); font-weight: 600; font-size: 13px;
  transition: color .15s, background .15s;
}
.shop-nav-link:hover { color: var(--ink); background: var(--bg-sunken); }
.shop-nav-link.active { color: var(--blue); background: var(--blue-wash); }

.header-tools { display: flex; align-items: center; gap: 9px; }
.login-link {
  display: inline-flex; align-items: center; gap: 7px; min-height: 38px;
  padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--paper); font-weight: 600; font-size: 13px;
}
.login-link span { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.login-link:hover { background: var(--bg-sunken); border-color: var(--muted-soft); }

main { max-width: var(--max-w); margin: 0 auto; padding: 28px clamp(16px, 4vw, 40px) 72px; }
.shop-page { display: none; }
.shop-page.active { display: block; }
.shop-body.storefront-ready .shop-page.active { animation: none; }

/* 公告与联系方式 */
.store-notice { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: 16px; margin-bottom: 30px; }
.notice-title, .contact-panel-head, .announcement-top { display: flex; align-items: center; gap: 12px; }
.notice-title > span, .contact-panel-head > span, .announcement-icon {
  width: 40px; height: 40px; flex: 0 0 auto; display: grid; place-items: center;
  border-radius: var(--r); background: var(--blue-wash); color: var(--blue);
}
.notice-title h2, .contact-panel-head h2, .announcement-top h2 { font-size: 16px; }
.notice-title .kicker, .contact-panel-head .kicker, .announcement-top .kicker { margin-bottom: 3px; }

.contact-panel, .announcement-panel {
  padding: 20px; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
}
.notice-content { display: grid; gap: 14px; }
.notice-content > p { font-size: 13px; color: var(--muted); }

.contact-list { display: grid; gap: 9px; margin-top: 16px; }
.telegram-button, .qq-button, .wechat-box {
  display: flex; align-items: center; gap: 11px; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--paper); transition: background .15s, border-color .15s;
}
.telegram-button:hover, .qq-button[href]:hover { background: var(--blue-wash); border-color: var(--blue-line); }
.telegram-button > span:not(.brand-logo), .qq-button > span:not(.brand-logo), .wechat-box > span:not(.brand-logo) {
  display: flex; flex-direction: column; min-width: 0; flex: 1;
}
.telegram-button b, .qq-button b, .wechat-box b { font-size: 13px; font-weight: 600; }
.telegram-button small, .qq-button small, .wechat-box small { font-size: 11px; color: var(--muted); }
.wechat-box strong { font: 500 13px/1 var(--mono); color: var(--blue); }
.qq-button[aria-disabled="true"] { opacity: .6; cursor: default; }

.brand-logo { width: 22px; height: 22px; flex: 0 0 auto; }
.brand-telegram { fill: #229ed9; }
.brand-qq { fill: #12b7f5; }
.brand-wechat { fill: #07c160; }

.announcement-highlight {
  display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; padding: 13px;
  border: 1px solid var(--blue-line); border-radius: var(--r);
  background: var(--blue-wash); color: #1c4a9e; font-size: 12.5px; line-height: 1.65;
}
.announcement-highlight i { color: var(--blue); margin-top: 2px; }
.announcement-copy { min-width: 0; overflow-wrap: anywhere; }
.announcement-copy p { margin: 0; }
.announcement-copy p + p { margin-top: 8px; }
.announcement-copy strong { font-weight: 700; }
.announcement-note { margin-top: 12px; font-size: 12px; line-height: 1.65; color: var(--muted); }
.entry-notification-modal { display: grid; gap: 0; }
.entry-notification-head {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 4px 28px 16px 0; border-bottom: 1px solid var(--line-soft);
}
.entry-notification-icon {
  width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto;
  border-radius: var(--r); background: var(--blue-wash); color: var(--blue);
}
.entry-notification-icon svg { width: 18px; height: 18px; }
.entry-notification-head .kicker { margin: 0 0 4px; }
.entry-notification-head h2 { margin: 0; font-size: 18px; }
.entry-notification-copy {
  margin-top: 16px; padding: 15px 16px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--bg-sunken); color: var(--ink-soft);
  font-size: 14px; line-height: 1.75;
}
.entry-notification-copy p { margin: 0; }
.entry-notification-copy p + p { margin-top: 9px; }
.entry-notification-copy ul, .entry-notification-copy ol { margin: 8px 0 0; padding-left: 18px; }
.entry-notification-copy li { margin: 4px 0; }
.entry-notification-copy a { color: var(--blue); text-decoration: underline; }
.entry-notification-copy strong { color: var(--ink); font-weight: 700; }
.entry-notification-actions { margin-top: 16px; }

/* 区块标题 */
.home-section { margin-bottom: 38px; }
.section-title, .catalog-head, .subpage-head, .editor-heading, .admin-heading {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px;
}
.section-title h1, .section-title h2 { font-size: 21px; }
.section-title p, .catalog-head p, .subpage-head p { margin-top: 5px; font-size: 13px; color: var(--muted); }
.subpage-head { display: block; margin-bottom: 24px; }
.subpage-head h1 { font-size: 25px; }

.category-home { margin-bottom: 34px; }
.hot-section { margin-bottom: 40px; }

/* 类目卡片 */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); gap: 14px; }
.category-grid.large { grid-template-columns: repeat(auto-fill, minmax(286px, 1fr)); gap: 16px; }
.category-grid.large .category-directory-card img { height: 152px; }
.category-grid.large .category-directory-copy { padding: 16px; }
.category-grid.large .category-directory-copy b { font-size: 16px; }
.category-directory-card {
  display: flex; flex-direction: column; padding: 0; overflow: hidden;
  text-align: left; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--paper); box-shadow: var(--shadow-sm);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.category-directory-card:hover {
  box-shadow: var(--shadow-md); border-color: var(--blue-line);
}
.category-directory-card > img { width: 100%; height: 132px; object-fit: cover; background: var(--bg-sunken); }
.category-directory-copy { display: flex; flex-direction: column; gap: 4px; padding: 14px 15px 15px; }
.category-directory-copy b { font-size: 14px; font-weight: 650; }
.category-directory-copy small {
  font-size: 12px; color: var(--muted); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.category-directory-copy em { margin-top: 3px; font-size: 11px; font-style: normal; font-weight: 600; color: var(--blue); }
.category-enter { display: none; }

/* 商品卡片 */
.store-product-grid, .hot-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.store-product-card {
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--paper); box-shadow: var(--shadow-sm);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.store-product-card:hover { box-shadow: var(--shadow-md); border-color: var(--blue-line); }
.product-visual {
  position: relative; display: block; padding: 0; border: 0;
  aspect-ratio: 1 / 1; overflow: hidden;
  background: var(--bg-sunken); line-height: 0; cursor: pointer;
}
.product-visual img { width: 100%; height: 100%; object-fit: cover; }
.delivery-badge {
  position: absolute; top: 9px; left: 9px; padding: 3px 8px; border-radius: 20px;
  font: 600 10px/1.6 var(--font); background: rgba(255, 255, 255, .94);
  color: var(--ink-soft); box-shadow: var(--shadow-sm); backdrop-filter: blur(4px);
}
.delivery-badge.code { color: var(--green); }
.delivery-badge.review { color: var(--amber); }
.delivery-badge.online { color: var(--blue); }

.store-product-info { display: flex; flex-direction: column; gap: 7px; padding: 14px 15px 15px; flex: 1; }
.store-product-name {
  padding: 0; border: 0; background: none; text-align: left;
  font-size: 14px; font-weight: 650; color: var(--ink); line-height: 1.45;
}
.store-product-name:hover { color: var(--blue); }
.store-product-info > p {
  font-size: 12px; color: var(--muted); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.store-product-stats { display: flex; gap: 18px; padding: 9px 0; margin-top: auto; border-top: 1px solid var(--line-soft); }
.store-product-stats > span { display: flex; flex-direction: column; gap: 1px; }
.store-product-stats small { font-size: 10px; color: var(--muted-soft); }
.store-product-stats b { font: 600 13px/1.3 var(--mono); color: var(--ink-soft); }
.store-product-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.store-product-footer > div { display: flex; flex-direction: column; }
.store-product-footer small { font-size: 10px; color: var(--muted-soft); }
.store-product-footer strong { font: 650 18px/1.25 var(--font); color: var(--ink); letter-spacing: -.02em; }
.product-buy-button {
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid var(--blue); border-radius: var(--r);
  background: var(--blue); color: #fff; transition: background .15s;
}
.product-buy-button:hover { background: var(--blue-hover); }

.product-icon, .detail-icon {
  width: 40px; height: 40px; flex: 0 0 auto; display: grid; place-items: center;
  border-radius: var(--r); background: var(--blue-wash); color: var(--blue);
}
.detail-icon { width: 52px; height: 52px; border-radius: var(--r-lg); margin-bottom: 14px; }
.detail-icon [data-lucide] { width: 24px; height: 24px; }
.product-icon.violet, .detail-icon.violet { background: #f1edfd; color: var(--violet); }
.product-icon.orange, .detail-icon.orange { background: var(--amber-wash); color: var(--amber); }
.product-icon.green, .detail-icon.green { background: var(--green-wash); color: var(--green); }

/* 旧版商品行（兼容保留） */
.hot-product, .product-row {
  display: flex; align-items: center; gap: 14px; padding: 15px;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--paper); box-shadow: var(--shadow-sm);
}
.hot-product > div:nth-child(2), .product-row > div:nth-child(2) { flex: 1; min-width: 0; }
.hot-product h3, .product-row h3 { font-size: 14px; }
.hot-product p, .product-row p { font-size: 12px; color: var(--muted); }
.product-meta { display: flex; gap: 14px; margin-top: 6px; font-size: 11px; color: var(--muted); }
.product-price, .hot-product > div:last-child { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.product-price strong, .hot-product strong { font-size: 17px; font-weight: 650; }
.product-price small { font-size: 11px; color: var(--muted); }
.product-price button, .hot-product button {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 5px;
  padding: 0; border: 0; background: none; color: var(--blue); font-weight: 600; font-size: 12px;
}

/* 商品列表页 */
.crumb { display: flex; align-items: center; gap: 7px; margin-bottom: 18px; font-size: 12px; color: var(--muted); }
.crumb button { padding: 0; border: 0; background: none; color: var(--blue); font-weight: 600; font-size: 12px; }
.crumb [data-lucide] { width: 13px; height: 13px; }

.catalog-utility label { flex-direction: row; align-items: center; gap: 9px; }
.catalog-utility select { min-width: 158px; }

.catalog-layout { display: grid; grid-template-columns: 226px minmax(0, 1fr); gap: 20px; align-items: start; }
.catalog-filter {
  display: grid; gap: 14px; padding: 18px; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
  position: sticky; top: calc(var(--header-h) + 20px);
}
.catalog-filter > div:first-child { display: flex; align-items: baseline; justify-content: space-between; }
.catalog-filter h3 { font-size: 14px; }
.catalog-filter #reset-filter { padding: 0; border: 0; background: none; color: var(--blue); font-weight: 600; font-size: 12px; }
.product-area { min-width: 0; }
.product-list { min-width: 0; }
.product-area { min-width: 0; display: grid; gap: 14px; }
.product-list { min-width: 0; }
.filter-note {
  display: flex; align-items: flex-start; gap: 8px; padding: 11px;
  border-radius: var(--r); background: var(--bg-sunken); font-size: 11px; color: var(--muted); line-height: 1.6;
}
.filter-note i { color: var(--muted-soft); margin-top: 1px; }

.result-line { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 13px; color: var(--muted); }
.result-line b { font: 650 15px/1 var(--mono); color: var(--ink); }
.mobile-filter { display: none; }

/* 商品详情 */
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 336px; gap: 22px; align-items: start; }
.detail-main {
  padding: 26px; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
}
.product-category { font-size: 12px; font-weight: 600; color: var(--blue); margin-bottom: 5px; }
.detail-main h1 { font-size: 24px; }
.detail-desc { margin-top: 9px; font-size: 14px; color: var(--muted); line-height: 1.7; }
.detail-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 11px; margin: 22px 0; }
.detail-info article {
  display: flex; align-items: center; gap: 10px; padding: 13px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-sunken);
}
.detail-info i { color: var(--blue); }
.detail-info span { display: block; font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.detail-info b { display: block; margin-top: 2px; font-size: 13px; }

.description-panel { padding-top: 20px; margin-top: 20px; border-top: 1px solid var(--line); }
.description-panel h2 { font-size: 16px; margin-bottom: 11px; }
.description-panel div, .description-panel li { font-size: 13px; color: var(--ink-soft); line-height: 1.75; }
.description-panel div { white-space: pre-wrap; }

.purchase-panel {
  display: grid; gap: 14px; padding: 22px; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow);
  position: sticky; top: calc(var(--header-h) + 20px);
}
.purchase-top { display: grid; gap: 3px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.purchase-top > span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.purchase-top strong { font: 650 30px/1.15 var(--font); letter-spacing: -.025em; }
.purchase-top small { font-size: 12px; color: var(--muted); }
.wholesale-tiers { display: flex; flex-wrap: wrap; gap: 5px 10px; margin-top: 7px; font-size: 12px; color: var(--blue); }
.wholesale-tiers span { white-space: nowrap; }
.quantity { display: flex; align-items: center; gap: 0; }
.quantity button {
  width: 38px; height: 40px; display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-size: 16px; font-weight: 600;
}
.quantity button:first-child { border-radius: var(--r) 0 0 var(--r); }
.quantity button:last-child { border-radius: 0 var(--r) var(--r) 0; }
.quantity button:hover { background: var(--bg-sunken); }
.quantity input {
  width: 62px; min-height: 40px; border-radius: 0; border-left: 0; border-right: 0;
  text-align: center; font-family: var(--mono); font-weight: 500;
}
.quantity input::-webkit-outer-spin-button, .quantity input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.purchase-total {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 13px 0; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted);
}
.purchase-total b { font: 650 21px/1 var(--font); color: var(--ink); letter-spacing: -.02em; }
.purchase-note {
  display: flex; align-items: flex-start; gap: 7px; padding-top: 12px;
  border-top: 1px solid var(--line-soft); font-size: 11px; color: var(--muted); line-height: 1.6;
}
.purchase-note i { color: var(--muted-soft); margin-top: 1px; }

/* 结算 */
.checkout-wrap { max-width: 1120px; margin: 0 auto; }
.checkout-title { margin-bottom: 24px; }
.checkout-title h1 { font-size: 25px; }
.checkout-title p { margin-top: 6px; font-size: 13px; color: var(--muted); }
.checkout-layout { display: grid; grid-template-columns: minmax(0, 1fr) 348px; gap: 20px; align-items: start; }
.checkout-main { display: grid; gap: 16px; }
.checkout-block {
  padding: 22px; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
}
.checkout-block h2 { font-size: 15px; margin-bottom: 15px; }

.purchase-mode { display: grid; gap: 10px; }
.payment-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mode-choice, .pay-option {
  display: flex; align-items: center; gap: 12px; padding: 14px;
  border: 1.5px solid var(--line); border-radius: var(--r); background: var(--paper);
  text-align: left; transition: border-color .15s, background .15s;
}
.mode-choice:hover, .pay-option:hover { border-color: var(--blue-line); background: var(--blue-wash); }
.mode-choice.active, .pay-option.active { border-color: var(--blue); background: var(--blue-wash); }
.mode-choice > span:not(.pay-symbol), .pay-option > span:not(.pay-symbol) { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.mode-choice b, .pay-option b { font-size: 13px; font-weight: 650; }
.mode-choice small, .pay-option small { font-size: 11px; color: var(--muted); }
.mode-choice > i:last-child, .pay-option > i:last-child { color: var(--muted-soft); }
.mode-choice.active > i:last-child, .pay-option.active > i:last-child { color: var(--blue); }
.pay-symbol {
  width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center;
  border-radius: var(--r); font-weight: 700; font-size: 17px;
}
.pay-symbol.alipay { background: #e8f3ff; color: #1677ff; }
.pay-symbol.usdt { background: #e6f6f1; color: #26a17b; }
.pay-symbol.wechat { background: #e8f8ef; color: #07c160; }
.pay-symbol img { width: 28px; height: 28px; display: block; object-fit: contain; }
.pay-symbol.wechat img { width: 28px; height: 28px; }
.pay-option .pay-symbol { overflow: hidden; }
@media (max-width: 560px) {
  .payment-options { grid-template-columns: 1fr; }
}
.payment-unavailable {
  padding: 14px; border: 1px dashed var(--line); border-radius: var(--r);
  color: var(--muted); font-size: 12px; text-align: center;
}

.checkout-summary {
  display: grid; gap: 13px; padding: 22px; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow);
  position: sticky; top: calc(var(--header-h) + 20px);
}
.checkout-summary h2 { font-size: 15px; }
.summary-item, .cart-line { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.summary-item > div, .cart-line > div { flex: 1; min-width: 0; }
.summary-item b, .cart-line b { display: block; font-size: 13px; font-weight: 600; }
.summary-item small, .cart-line small { font-size: 11px; color: var(--muted); }
.summary-item strong, .cart-line strong { font-size: 14px; font-weight: 650; }
.summary-line, .cart-total { display: flex; align-items: baseline; justify-content: space-between; font-size: 13px; color: var(--muted); }
.summary-line b, .cart-total strong { font-size: 14px; font-weight: 650; color: var(--ink); }
.summary-total {
  display: flex; align-items: baseline; justify-content: space-between;
  padding-top: 13px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted);
}
.summary-total strong { font: 650 25px/1.15 var(--font); color: var(--ink); letter-spacing: -.025em; }
.checkout-summary > p {
  display: flex; align-items: flex-start; gap: 7px; padding-top: 11px;
  border-top: 1px solid var(--line-soft); font-size: 11px; color: var(--muted); line-height: 1.6;
}
.checkout-summary > p i { color: var(--green); margin-top: 1px; }
.checkout-consent {
  display: flex; align-items: flex-start; gap: 9px; min-height: 44px; padding: 10px 0;
  border-top: 1px solid var(--line-soft); font-size: 12px; font-weight: 400; line-height: 1.65;
}
.checkout-consent input { width: 18px; height: 18px; min-height: 18px; margin: 1px 0 0; flex: 0 0 auto; accent-color: var(--blue); }
.checkout-consent a { color: var(--blue); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* 购物袋 */
.cart-empty { display: grid; justify-items: center; gap: 11px; padding: 40px 18px; text-align: center; }
.cart-empty [data-lucide] { width: 34px; height: 34px; color: var(--muted-soft); }
.cart-empty p { font-size: 13px; color: var(--muted); }
.cart-total { padding: 13px 0; }
.cart-line-qty {
  display: inline-flex; align-items: center; gap: 2px; flex: 0 0 auto;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper); overflow: hidden;
}
.cart-line-qty button {
  width: 26px; height: 26px; display: grid; place-items: center; padding: 0;
  border: 0; background: none; color: var(--muted); font-size: 15px; font-weight: 600; line-height: 1;
}
.cart-line-qty button:hover { background: var(--bg-sunken); color: var(--ink); }
.cart-line-qty > b {
  display: inline-block; min-width: 26px; text-align: center;
  font: 600 12.5px/1 var(--mono); color: var(--ink);
}
.cart-line-remove {
  flex: 0 0 auto; width: 28px; height: 28px; display: grid; place-items: center; padding: 0;
  border: 0; border-radius: var(--r-sm); background: none; color: var(--muted-soft);
}
.cart-line-remove:hover { background: var(--red-wash); color: var(--red); }
.cart-line-remove [data-lucide] { width: 15px; height: 15px; }

/* 订单查询 */
.orders-wrap { max-width: 900px; margin: 0 auto; display: grid; gap: 20px; }
.account-orders { padding: 26px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.account-orders-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.account-orders-head h1 { font-size: 22px; }
.account-orders-head p:last-child { margin-top: 6px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.order-query { max-width: 540px; margin: 0 auto; padding: 30px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow); }
.order-query h1 { font-size: 22px; }
.order-query > p { margin-top: 7px; margin-bottom: 22px; font-size: 13px; color: var(--muted); }
.order-query form { display: grid; gap: 14px; }
.query-result {
  display: grid; gap: 7px; margin-top: 20px; padding: 16px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-sunken); font-size: 13px;
}
.query-result p { line-height: 1.7; }
.query-result pre { margin-top: 5px; background: var(--paper); }
.fulfillment-notice {
  display: flex; align-items: flex-start; gap: 11px; margin-top: 8px; padding: 13px 14px;
  border: 1px solid #f3ddb6; border-radius: var(--r); background: var(--amber-wash); color: var(--ink);
}
.fulfillment-notice > svg, .fulfillment-notice > i { width: 20px; height: 20px; flex: 0 0 auto; margin-top: 1px; color: var(--amber); }
.fulfillment-notice b { display: block; font-size: 13px; }
.fulfillment-notice p { margin-top: 3px; color: var(--ink-soft); font-size: 12px; line-height: 1.55; }
.fulfillment-notice.compact { margin: 14px 0 0; }
.order-delivery { display: grid; gap: 6px; margin-top: 7px; }
.order-delivery > p { margin: 0; }
.order-delivery > small { color: var(--muted); font-size: 11px; }
.crypto-payment { display: grid; gap: 8px; margin: 16px 0; padding: 16px; border: 1px solid var(--blue-line); border-radius: var(--r); background: var(--blue-wash); }
.crypto-payment code { display: block; padding: 10px; border-radius: var(--r-sm); background: var(--paper); word-break: break-all; font-size: 12px; }
.crypto-payment small { font-size: 11px; color: var(--muted); }
/* 查询结果与账户订单都会堆叠多张卡片，改用栅格间距，避免卡片各自的 margin 叠加。 */
.query-list, #my-orders { display: grid; gap: 12px; margin-top: 20px; }
.query-list > .query-result, #my-orders > .query-result { margin-top: 0; }
.query-list > .field-help, #my-orders > .field-help { margin: 0; }
.query-result > .mono { font-size: 12px; color: var(--muted); }

/* 多件下单：每笔订单一个独立付款入口 */
.multi-order-list { display: grid; gap: 12px; margin: 16px 0; }
.multi-order-line {
  display: grid; gap: 9px; padding: 14px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-sunken); font-size: 13px;
}
.multi-order-line > p { line-height: 1.7; }
.multi-order-line .crypto-payment { margin: 0; }
.multi-order-line .field-help { margin: 0; }

/* 图片加载失败时留下容器底色占位：用 visibility 而不是 display，图片仍按既有
   高度规则占位，容器自身的底色透出来，alt 文本也不会压在交付标签下面。 */
.image-missing img { visibility: hidden; }

/* 搜索 */
.search-input { position: relative; display: block; }
.search-input [data-lucide] { position: absolute; left: 12px; top: 13px; color: var(--muted-soft); }
.search-input input { padding-left: 36px; min-height: 42px; }
.search-results { display: grid; gap: 6px; max-height: 340px; overflow-y: auto; margin-top: 14px; }
.search-results button {
  display: flex; align-items: center; gap: 11px; padding: 10px; text-align: left;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--paper);
}
.search-results button:hover { background: var(--blue-wash); border-color: var(--blue-line); }
.search-results span { display: flex; flex-direction: column; }
.search-results b { font-size: 13px; }
.search-results small { font-size: 11px; color: var(--muted); }

/* 信任条与页脚 */
.trust-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(212px, 1fr)); gap: 13px; margin-top: 34px; }
.trust-row article {
  display: flex; align-items: flex-start; gap: 11px; padding: 16px;
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--paper); box-shadow: var(--shadow-sm);
}
.trust-row i { color: var(--blue); margin-top: 2px; }
.trust-row b { display: block; font-size: 13px; }
.trust-row p { margin-top: 3px; font-size: 11.5px; color: var(--muted); line-height: 1.6; }

.shop-footer {
  display: grid; gap: 13px; justify-items: center; text-align: center;
  padding: 34px clamp(16px, 4vw, 40px); border-top: 1px solid var(--line); background: var(--paper);
}
.shop-footer p { font-size: 12px; color: var(--muted); max-width: 560px; }
.shop-footer > div:last-child { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; }
.shop-footer a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; font-size: 12px; font-weight: 600; color: var(--blue); }

/* 法律与经营信息页面 */
.legal-body { min-height: 100vh; background: var(--paper); }
.legal-header { height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 clamp(16px, 5vw, 48px); border-bottom: 1px solid var(--line); }
.legal-shell { max-width: 820px; margin: 0 auto; padding: 48px 22px 64px; }
.legal-shell > h1 { font-size: 30px; }
.legal-updated { margin-top: 7px; color: var(--muted); font-size: 12px; }
.legal-shell section { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line-soft); }
.legal-shell section h2 { margin-bottom: 10px; font-size: 17px; }
.legal-shell section p { color: var(--ink-soft); font-size: 14px; line-height: 1.85; }
.legal-shell section a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.legal-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; padding: 24px; border-top: 1px solid var(--line); background: var(--bg); }
.legal-footer a { display: inline-flex; align-items: center; min-height: 44px; color: var(--blue); font-size: 12px; font-weight: 600; }

/* 邮箱验证（兼容保留） */
.sms-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.sms-shell { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.sms-config, .sms-session { padding: 20px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.sms-config { display: grid; gap: 14px; }
.sms-cost { display: grid; gap: 3px; padding: 13px; border-radius: var(--r); background: var(--bg-sunken); }
.sms-cost b { font: 650 19px/1.2 var(--mono); }
.sms-cost span, .sms-cost small { font-size: 11px; color: var(--muted); }
.empty-panel, .empty-compact { display: grid; justify-items: center; gap: 9px; padding: 40px 18px; text-align: center; }
.empty-panel > span { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--bg-sunken); color: var(--muted-soft); }
.empty-panel p, .empty-compact span { font-size: 12px; color: var(--muted); }
.empty-compact { display: flex; align-items: center; justify-content: center; padding: 26px 18px; }
.empty-compact i { color: var(--green); }
.compliance { display: flex; align-items: flex-start; gap: 8px; margin-top: 18px; padding: 13px; border: 1px solid #f3ddb6; border-radius: var(--r); background: var(--amber-wash); font-size: 11.5px; color: var(--amber); line-height: 1.6; }

/* ==========================================================================
   运营后台
   ========================================================================== */

.admin-body { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; background: var(--bg); }

.admin-sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  gap: 6px; padding: 18px 14px; background: var(--paper);
  border-right: 1px solid var(--line); overflow-y: auto;
}
.admin-sidebar .shop-logo { padding: 0 6px 18px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.admin-sidebar .kicker { padding: 0 8px; margin: 12px 0 6px; }

.admin-nav {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 11px;
  border: 0; border-radius: var(--r); background: none; color: var(--muted);
  font-weight: 600; font-size: 13px; text-align: left; transition: background .15s, color .15s;
}
.admin-nav:hover { background: var(--bg-sunken); color: var(--ink); }
.admin-nav.active { background: var(--blue-wash); color: var(--blue); }
.admin-nav [data-lucide] { width: 17px; height: 17px; }
.admin-nav > span:last-child {
  margin-left: auto; min-width: 20px; padding: 1px 6px; border-radius: 10px;
  background: var(--red); color: #fff; font: 600 10px/1.7 var(--font); text-align: center;
}

.admin-side-bottom { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.admin-side-bottom > button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 11px;
  border: 0; border-radius: var(--r); background: none; text-align: left; color: var(--ink);
}
.admin-side-bottom > button:hover { background: var(--bg-sunken); }
.admin-side-bottom > button > span:first-child {
  width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center;
  border-radius: 50%; background: var(--blue); color: #fff; font-weight: 700; font-size: 12px;
}
.admin-side-bottom b { display: block; font-size: 12.5px; font-weight: 650; }
.admin-side-bottom small { display: block; font-size: 10.5px; color: var(--muted); }
.admin-sidebar-backdrop { display: none; }

/* 后台外壳必须自己复位 main 的商城排版：上面那条裸 `main {}` 规则会把
   max-width/margin/padding 也套到 <main class="admin-main"> 上，导致后台内容被
   压成 1320px 居中的窄列、左右各留一条死白边，粘顶头部也贴不到侧栏，看起来像
   手机端。这里显式清掉，横向间距全部交给 .admin-page 自己的 padding。 */
.admin-main { display: flex; flex-direction: column; min-width: 0; max-width: none; margin: 0; padding: 0; }

.admin-top {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 14px;
  height: var(--header-h); padding: 0 clamp(16px, 3vw, 30px);
  background: var(--paper); border-bottom: 1px solid var(--line);
}
.admin-menu { display: none; }
.admin-top .crumb { margin: 0; margin-right: auto; }
.admin-toolbar { display: flex; align-items: center; gap: 9px; }
.admin-toolbar > button:not(.dark-button):not(.admin-primary):not(.admin-outline) {
  width: 36px; height: 36px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); color: var(--ink-soft);
}
.admin-toolbar > button:hover { background: var(--bg-sunken); }
.admin-toolbar > a { font-size: 13px; font-weight: 600; color: var(--blue); }

.admin-page { display: none; width: 100%; padding: 26px clamp(16px, 3vw, 30px) 60px; }
.admin-page.active { display: block; }
.admin-page.loading::after {
  content: "加载中…"; position: fixed; top: 70px; right: 24px; z-index: 30;
  padding: 7px 11px; border: 1px solid var(--blue-line); border-radius: var(--r);
  background: var(--paper); color: var(--blue); box-shadow: var(--shadow-sm); font-size: 11.5px; font-weight: 650;
}

.admin-heading h1 { font-size: 23px; }
.admin-heading p { margin-top: 5px; font-size: 13px; color: var(--muted); }
.admin-heading > div:last-child:not(:only-child) { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }

.admin-info-band {
  display: flex; align-items: flex-start; gap: 9px; margin-bottom: 18px; padding: 12px 14px;
  border: 1px solid var(--blue-line); border-radius: var(--r); background: var(--blue-wash);
  font-size: 12px; color: #1c4a9e; line-height: 1.6;
}
.admin-info-band i { color: var(--blue); margin-top: 1px; }

/* 指标卡 */
.admin-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(216px, 1fr)); gap: 14px; margin-bottom: 20px; }
.admin-metrics > article {
  display: grid; gap: 5px; padding: 18px; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
}
.admin-metrics span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.admin-metrics b { font: 650 27px/1.2 var(--font); letter-spacing: -.025em; }
.admin-metrics small { font-size: 11px; color: var(--muted-soft); }

.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 16px; align-items: start; }

.quick-actions-card, .stock-alert-card { padding: 20px; }
.quick-actions { display: grid; gap: 9px; }
.quick-actions button {
  display: flex; align-items: center; gap: 11px; padding: 12px; text-align: left;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); color: var(--ink);
}
.quick-actions button:hover { background: var(--blue-wash); border-color: var(--blue-line); }
.quick-actions i { color: var(--blue); }
.quick-actions span { display: flex; flex-direction: column; flex: 1; }
.quick-actions b, .quick-actions span > b { font-size: 13px; font-weight: 650; }
.quick-actions small { font-size: 11px; color: var(--muted); }

.stock-alert-list { display: grid; gap: 8px; }
.stock-alert-list button {
  display: flex; align-items: center; gap: 11px; padding: 11px 12px; text-align: left;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); color: var(--ink);
}
.stock-alert-list button:hover { background: var(--bg-sunken); }
.stock-alert-list span { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.stock-alert-list b { font-size: 13px; font-weight: 600; }
.stock-alert-list small { font-size: 11px; color: var(--muted); }
.stock-alert-list strong { font: 650 13px/1 var(--mono); color: var(--amber); }
.stock-alert-list i { color: var(--muted-soft); }

/* 标签页与工具条 */
.admin-tabs { display: flex; gap: 4px; margin-bottom: 16px; padding: 4px; border-radius: var(--r); background: var(--bg-sunken); width: fit-content; }
.admin-tabs button {
  padding: 7px 14px; border: 0; border-radius: var(--r-sm); background: none;
  color: var(--muted); font-weight: 600; font-size: 12.5px;
}
.admin-tabs button:hover { color: var(--ink); }
.admin-tabs button.active { background: var(--paper); color: var(--blue); box-shadow: var(--shadow-sm); }

/* 类目标签数量随类目增长，所以允许换行，不像订单筛选那样固定四个。 */
.category-tabs { flex-wrap: wrap; width: auto; max-width: 100%; }
.category-tabs button { display: inline-flex; align-items: center; gap: 6px; }
.category-tabs button > span {
  padding: 1px 6px; border-radius: 20px; background: var(--line-soft);
  font: 600 11px/1.6 var(--mono); color: var(--muted);
}
.category-tabs button.active > span { background: var(--blue-wash); color: var(--blue); }

.table-card > .admin-toolbar { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.admin-toolbar input, .admin-toolbar select { min-width: 172px; }

.category-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.category-summary article { padding: 14px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.category-summary span { display: block; font-size: 11px; color: var(--muted); }
.category-summary b { display: block; margin-top: 3px; font: 650 21px/1.2 var(--font); }

.category-identity { display: flex; align-items: center; gap: 11px; min-width: 208px; }
.category-identity > span { min-width: 0; }
.category-thumb { width: 60px; height: 44px; flex: 0 0 auto; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--bg-sunken); object-fit: cover; }
.category-copy { min-width: 232px; max-width: 420px; line-height: 1.6; color: var(--muted); }

/* 供应商管理：高密度表格保持扫描效率，状态和操作始终在同一行。 */
.supplier-metrics { display: grid; grid-template-columns: repeat(4, minmax(132px, 1fr)); gap: 12px; margin-bottom: 12px; }
.supplier-metrics article { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); box-shadow: var(--shadow-sm); }
.supplier-metrics span { display: block; font-size: 11px; color: var(--muted); }
.supplier-metrics b { display: block; margin-top: 3px; font: 650 22px/1.2 var(--font); }
.supplier-monitor-strip { display: flex; align-items: center; gap: 8px; min-height: 42px; margin-bottom: 14px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-sunken); color: var(--muted); font-size: 12px; }
.supplier-monitor-strip.running { border-color: var(--blue-line); background: var(--blue-wash); color: #1c4a9e; }
.supplier-monitor-strip i { width: 16px; height: 16px; flex: 0 0 auto; color: var(--blue); }
.supplier-monitor-strip.running i { animation: supplier-spin .9s linear infinite; }
@keyframes supplier-spin { to { transform: rotate(360deg); } }
.supplier-list { display: grid; gap: 14px; }
.supplier-panel { overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--paper); box-shadow: var(--shadow-sm); }
.supplier-panel-head { display: flex; align-items: flex-start; gap: 14px; padding: 15px 16px; border-bottom: 1px solid var(--line); }
.supplier-panel-head > div:first-child { flex: 1; min-width: 0; }
.supplier-panel-head h2 { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.supplier-panel-head p { margin-top: 4px; color: var(--muted); font-size: 11.5px; line-height: 1.5; }
.supplier-panel-head .table-actions { flex: 0 0 auto; }
.supplier-links { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 8px; }
.supplier-links a { display: inline-flex; align-items: center; gap: 4px; color: var(--blue); font-size: 11.5px; font-weight: 600; }
.supplier-links a:hover { text-decoration: underline; }
.supplier-links i { width: 13px; height: 13px; }
.supplier-product-name { min-width: 190px; }
.supplier-product-name small { display: block; max-width: 340px; overflow: hidden; color: var(--muted-soft); text-overflow: ellipsis; white-space: nowrap; }
.supplier-price { white-space: nowrap; }
.supplier-price b { font: 650 14px/1.2 var(--mono); }
.supplier-price small { display: block; margin-top: 3px; font-size: 10.5px; color: var(--muted); }
.supplier-price-change.up { color: var(--red); }
.supplier-price-change.down { color: var(--green); }
.supplier-check-error { display: block; max-width: 280px; margin-top: 4px; color: var(--red); font-size: 10.5px; line-height: 1.45; }
.supplier-empty { padding: 34px 18px; text-align: center; color: var(--muted); }
.supplier-empty i { width: 28px; height: 28px; margin-bottom: 7px; color: var(--muted-soft); }
.supplier-empty b { display: block; color: var(--ink-soft); font-size: 13px; }
.supplier-empty p { margin-top: 4px; font-size: 11.5px; }
.supplier-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.supplier-form-grid .full-row { grid-column: 1 / -1; }

/* 商品编辑器 */
.back-link { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 14px; padding: 0; border: 0; background: none; color: var(--blue); font-weight: 600; font-size: 13px; }
.editor-heading { align-items: flex-end; }
.product-editor-form { max-width: var(--max-w); }
.editor-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(368px, .75fr); gap: 16px; align-items: start; }
.editor-side { display: grid; gap: 16px; }
.editor-panel { padding: 22px; }
.editor-panel-head { display: flex; align-items: center; gap: 11px; padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.editor-panel-head > span {
  width: 36px; height: 36px; flex: 0 0 auto; display: grid; place-items: center;
  border-radius: var(--r); background: var(--blue-wash); color: var(--blue);
}
.editor-panel-head h2 { font-size: 15px; }
.editor-panel-head p { margin-top: 2px; font-size: 11px; color: var(--muted); }

.delivery-mode-help { font-size: 11px; color: var(--muted); line-height: 1.6; }
.code-inventory-note, .inventory-notice {
  display: flex; align-items: flex-start; gap: 9px; padding: 12px;
  border: 1px solid var(--blue-line); border-radius: var(--r);
  background: var(--blue-wash); color: #1c4a9e; font-size: 11.5px; line-height: 1.65;
}
.code-inventory-note i, .inventory-notice i { color: var(--blue); flex: 0 0 auto; margin-top: 1px; }
.code-inventory-note button, .inventory-notice button {
  border: 0; background: none; padding: 0 3px; color: var(--blue); font-weight: 700; text-decoration: underline;
}

.editor-actions {
  position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center;
  justify-content: flex-end; gap: 10px; margin-top: 16px; padding: 14px 0;
  background: linear-gradient(180deg, rgba(246, 248, 251, 0), var(--bg) 18px);
}
.editor-actions .danger-button { margin-right: auto; }
.editor-actions .admin-primary { min-width: 148px; }

/* 卡密库存：固定右栏、输入区和列表高度，切换商品时不改变页面骨架。 */
.inventory-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 408px; gap: 16px;
  align-items: start; width: 100%; max-width: var(--max-w); margin: 0;
}
.inventory-import-card, .inventory-current { min-width: 0; padding: 22px; }
.inventory-import-card { min-height: 520px; }
.inventory-import-card select { min-width: 0; max-width: 100%; }
.inventory-import-card textarea {
  height: 322px; min-height: 322px; max-height: 322px; resize: none;
  overflow: auto; font: 12px/1.7 var(--mono);
}
.inventory-notice { height: 82px; min-height: 82px; max-height: 82px; overflow: auto; }
.inventory-notice[hidden] { display: flex !important; visibility: hidden; }
.inventory-notice[data-state="ready"] { border-color: #bfe3d3; background: var(--green-wash); color: #2c6b53; }
.inventory-notice[data-state="ready"] i { color: var(--green); }
.inventory-submit { width: 100%; }
.inventory-side { min-width: 0; display: grid; gap: 16px; }
.inventory-current { min-height: 492px; contain: layout paint; }
.inventory-current.is-updating .inventory-items { opacity: .58; pointer-events: none; }
.inventory-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.inventory-stats > div { min-height: 82px; padding: 13px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-sunken); }
.inventory-stats span { display: block; font-size: 11px; color: var(--muted); }
.inventory-stats b { display: block; min-height: 27px; margin-top: 4px; font: 650 22px/1.2 var(--mono); font-variant-numeric: tabular-nums; }
.inventory-list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 20px 0 9px; padding-top: 18px; border-top: 1px solid var(--line); }
.inventory-list-head h3 { font-size: 14px; }
.inventory-list-head small { font-size: 10px; color: var(--muted-soft); }
.inventory-items {
  display: grid; align-content: start; gap: 7px; height: 220px; min-height: 220px;
  overflow-y: auto; scrollbar-gutter: stable; transition: opacity .12s ease;
}
.inventory-item {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center;
  padding: 10px 11px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper);
  content-visibility: auto; contain-intrinsic-block-size: 58px;
}
.inventory-item-value { font: 11.5px/1.55 var(--mono); white-space: pre-wrap; word-break: break-word; color: var(--ink-soft); }
.inventory-item-meta { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 10px; color: var(--muted-soft); }
.inventory-item-actions { display: flex; gap: 9px; }
.inventory-item-actions button { padding: 3px; border: 0; background: none; color: var(--blue); font-size: 11px; font-weight: 600; }
.inventory-item-actions button.danger { color: var(--red); }
.inventory-item[data-status="USED"] { background: var(--bg-sunken); }
.inventory-item[data-status="USED"] .inventory-item-value { color: var(--muted); text-decoration: line-through; }
.inventory-item[data-status="RESERVED"] { border-color: #f3ddb6; background: var(--amber-wash); }
.inventory-empty { min-height: 100%; display: grid; place-items: center; padding: 28px 10px; text-align: center; font-size: 12px; color: var(--muted); }
.inventory-guide { display: flex; align-items: flex-start; gap: 11px; padding: 18px; background: var(--green-wash); border-color: #bfe3d3; }
.inventory-guide > i { color: var(--green); flex: 0 0 auto; margin-top: 2px; }
.inventory-guide h2 { font-size: 14px; }
.inventory-guide p { margin-top: 3px; font-size: 11.5px; color: #2c6b53; line-height: 1.6; }

/* 订单详情 */
.order-detail { display: grid; gap: 1px; margin: 16px 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--line-soft); }
.order-detail > div { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 13px; background: var(--paper); font-size: 12.5px; }
.order-detail span { color: var(--muted); }
.order-detail b { font-weight: 600; }
.delivery-result { display: grid; gap: 6px; margin-top: 14px; }
.delivery-result span { font-size: 12px; font-weight: 600; color: var(--muted); }

/* 接口密钥 */
.secret-key {
  display: block; padding: 12px; margin: 12px 0; border: 1px solid var(--blue-line);
  border-radius: var(--r); background: var(--blue-wash); word-break: break-all;
  font: 500 12px/1.6 var(--mono); color: #1c4a9e;
}
.security-message { display: flex; align-items: flex-start; gap: 8px; padding: 12px; border: 1px solid #f3ddb6; border-radius: var(--r); background: var(--amber-wash); font-size: 11.5px; color: var(--amber); line-height: 1.6; }

/* 支付与设置 */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(324px, 1fr)); gap: 16px; align-items: start; }
.settings-card, .payment-manager { padding: 22px; }
.payment-manager { display: grid; gap: 16px; }
.payment-config-block { display: grid; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--paper); }
.payment-config-block.attention { border-color: var(--blue-line); box-shadow: 0 0 0 3px var(--blue-wash); }
.payment-config-block[data-channel="alipay"] { border-left: 3px solid #1677ff; }
.payment-config-block[data-channel="wechat"] { border-left: 3px solid #07c160; }
.payment-config-block[data-channel="usdt"] { border-left: 3px solid #26a17b; }
.payment-note-field { grid-template-columns: minmax(0, 1fr); }
.payment-mark {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px;
  background: var(--paper); border: 1px solid var(--line); font-weight: 700; font-size: 16px; flex: 0 0 auto;
}
.payment-mark.alipay { background: #e8f3ff; color: #1677ff; border-color: #cfe4ff; }
.payment-mark.wechat { background: #e8f8ef; color: #07c160; border-color: #cfeedd; }
.payment-mark.usdt { background: #e6f6f1; color: #26a17b; border-color: #cce9de; }
.payment-status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.payment-status > article[id="alipay-status-card"] { border-top: 3px solid #1677ff; }
.payment-status > article[id="wechat-status-card"] { border-top: 3px solid #07c160; }
.payment-status > article[id="usdt-status-card"] { border-top: 3px solid #26a17b; }
.payment-status > article {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.payment-status > article > header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}
.payment-status > article h2 { font-size: 15px; }
.payment-status > article header p { margin-top: 4px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.payment-status > article dl { display: grid; gap: 8px; margin: 0; }
.payment-status > article dl > div {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 10px; border-radius: var(--r); background: var(--bg-sunken); font-size: 12px;
}
.payment-status > article dt { color: var(--muted); font-weight: 600; }
.payment-status > article dd { margin: 0; font-weight: 650; color: var(--ink); text-align: right; }
.payment-status > article .admin-outline { width: 100%; }
.channel-setting-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.channel-setting-copy { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.channel-setting-copy b { display: block; font-size: 14px; color: var(--ink); }
.channel-setting-copy small { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); line-height: 1.55; font-weight: 400; }

/* 商城公告编辑 */
.announcement-editor-form { max-width: 980px; padding: 22px; gap: 0; }
.announcement-editor-block { padding: 0 0 24px; }
.announcement-editor-block + .announcement-editor-block { padding-top: 24px; border-top: 1px solid var(--line); }
.announcement-editor-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.announcement-editor-head h2 { font-size: 15px; }
.announcement-editor-head p { margin-top: 3px; color: var(--muted); font-size: 11.5px; }
.announcement-toolbar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 7px; padding: 7px;
  border: 1px solid var(--line); border-bottom: 0; border-radius: var(--r) var(--r) 0 0;
  background: var(--bg-sunken);
}
.announcement-toolbar button, .announcement-color-control {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--paper); color: var(--ink-soft); font-size: 12px; font-weight: 600;
}
.announcement-toolbar button:hover { border-color: var(--blue-line); color: var(--blue); }
.announcement-toolbar button:focus-visible, .announcement-color-control:focus-within { outline: 2px solid var(--blue); outline-offset: 1px; }
.announcement-toolbar button i { width: 15px; height: 15px; }
.announcement-color-control { grid-template-columns: auto auto; cursor: pointer; }
.announcement-color-control input[type="color"] {
  width: 24px; min-height: 24px; height: 24px; padding: 2px; border-radius: 5px; cursor: pointer;
}
.announcement-contenteditable {
  min-height: 178px; padding: 15px 16px; border: 1px solid var(--line); border-radius: 0 0 var(--r) var(--r);
  background: var(--paper); color: var(--ink); font-size: 14px; line-height: 1.75; overflow-wrap: anywhere;
}
.announcement-contenteditable:hover { border-color: var(--muted-soft); }
.announcement-contenteditable:focus { position: relative; outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-wash); }
.announcement-contenteditable p { margin: 0; }
.announcement-contenteditable p + p { margin-top: 9px; }
.announcement-editor-actions { padding-top: 20px; border-top: 1px solid var(--line); }

/* ==========================================================================
   登录页
   ========================================================================== */

.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--bg); }
/* 后台登录页：更深的背景，和前台用户登录区分 */
.auth-body.admin-auth { background: radial-gradient(1200px 520px at 50% -10%, #eef3fb 0%, var(--bg) 62%); }
.auth-shell {
  display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  width: min(940px, 100%); overflow: hidden; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-lg);
}
.auth-aside, .user-auth-aside {
  display: flex; flex-direction: column; gap: 16px; padding: 38px 32px;
  background: linear-gradient(160deg, #0f2547, #0b1a33); color: #fff;
}
.auth-aside .shop-logo, .user-auth-aside .shop-logo { color: #fff; }
.auth-aside .logo-glyph, .user-auth-aside .logo-glyph { background: rgba(255, 255, 255, .12); }
.auth-aside small, .user-auth-aside small { color: rgba(255, 255, 255, .62); }
.auth-aside .kicker, .user-auth-aside .kicker { color: rgba(255, 255, 255, .5); }
.auth-aside h1, .user-auth-aside h1 { color: #fff; font-size: 24px; line-height: 1.4; }
.auth-copy { font-size: 13px; color: rgba(255, 255, 255, .72); line-height: 1.75; }
.auth-aside ul, .user-auth-aside ul { margin-top: auto; padding: 0; list-style: none; display: grid; gap: 9px; }
.auth-aside li, .user-auth-aside li { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: rgba(255, 255, 255, .76); }
.auth-aside li i, .user-auth-aside li i { color: #7fb2ff; margin-top: 2px; }

.auth-panel, .auth-form-wrap { padding: 38px 34px; display: flex; flex-direction: column; justify-content: center; }
.auth-panel h1, .auth-form-wrap h1 { font-size: 22px; }
.auth-panel > p, .auth-form-wrap > p { margin: 7px 0 22px; font-size: 13px; color: var(--muted); }
.auth-tabs { display: flex; gap: 4px; margin-bottom: 20px; padding: 4px; border-radius: var(--r); background: var(--bg-sunken); }
.auth-tab { flex: 1; padding: 9px; border: 0; border-radius: var(--r-sm); background: none; color: var(--muted); font-weight: 600; font-size: 13px; }
.auth-tab.active { background: var(--paper); color: var(--blue); box-shadow: var(--shadow-sm); }
.auth-status { margin-top: 14px; padding: 11px 13px; border-radius: var(--r); font-size: 12px; line-height: 1.6; }
.auth-status.ok { background: var(--green-wash); color: var(--green); border: 1px solid #bfe3d3; }
/* auth.js 用 setFormStatus(form, msg, 'error') 上报失败，但历史 CSS 只有
   .ok/.alert，错误提示因此完全没有样式。.error 与 .alert 同款。 */
.auth-status.alert, .auth-status.error { background: var(--red-wash); color: var(--red); border: 1px solid #f2ccc8; }
.auth-footer { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); text-align: center; }
.auth-footer a { color: var(--blue); font-weight: 600; }

/* 邮件服务配置页 */
.email-status { display: grid; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); gap: 14px; margin-bottom: 18px; }
.email-status > article {
  display: grid; gap: 6px; align-content: start; padding: 18px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-xl); box-shadow: var(--shadow-sm);
}
.email-status h2 { font-size: 14px; }
.email-status .badge { justify-self: start; }
.email-status p { font-size: 12px; color: var(--muted); line-height: 1.6; }
.email-status .mono { font-size: 11.5px; color: var(--ink-soft); word-break: break-all; }
.email-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(226px, 1fr)); gap: 13px; }
.email-test { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.email-test label { flex: 1 1 250px; }
/* 测试发信结果沿用 .field-help 的字号，只换颜色。 */
.field-help.ok { color: var(--green); }
.field-help.bad { color: var(--red); }

/* 注册验证码：输入框 + 发送按钮同一行 */
.code-field > div { display: flex; gap: 8px; }
.code-field input { flex: 1; min-width: 0; letter-spacing: .26em; font-family: var(--mono); }
.code-field button {
  flex: 0 0 auto; padding: 0 14px; border: 1px solid var(--blue-line); border-radius: var(--r);
  background: var(--blue-wash); color: var(--blue); font-weight: 600; font-size: 12.5px; white-space: nowrap;
}
.code-field button:hover:not(:disabled) { background: #e2edff; }
.code-field button:disabled { opacity: .55; }

/* ==========================================================================
   响应式
   ========================================================================== */

/* 宽屏：后台复位 main 之后可用宽度变宽，这里只给超宽屏一个上限，1920px 及以下
   不触发，栅格靠 auto-fit 自己铺开。上限挂在 .admin-page 上，标题/类目标签/
   卡片一起对齐；粘顶头部是它的兄弟节点，仍然满宽贴住侧栏。 */
@media (min-width: 1440px) {
  .admin-page { max-width: 1800px; margin: 0 auto; padding: 30px clamp(24px, 2.4vw, 44px) 64px; }
}

@media (max-width: 1180px) {
  .store-notice { grid-template-columns: 1fr; }
  .catalog-layout { grid-template-columns: 1fr; }
  .catalog-filter { position: static; }
  .detail-layout, .checkout-layout { grid-template-columns: 1fr; }
  .purchase-panel, .checkout-summary { position: static; }
  .editor-grid, .inventory-layout { grid-template-columns: 1fr; }
  .sms-shell { grid-template-columns: 1fr; }
  .payment-status { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .channel-setting-head { flex-wrap: wrap; }
}

@media (max-width: 960px) {
  .admin-body { grid-template-columns: 1fr; }
  .admin-sidebar {
    position: fixed; top: 0; left: 0; z-index: 80; width: 272px;
    transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--shadow-lg);
  }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 70; background: rgba(15, 27, 45, .45); }
  .admin-menu {
    display: grid; place-items: center; width: 36px; height: 36px;
    border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); color: var(--ink);
  }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-aside, .user-auth-aside { display: none; }
}

@media (max-width: 720px) {
  .payment-status { grid-template-columns: 1fr; }
  :root { --header-h: 58px; }
  .shop-header { gap: 12px; padding-left: 16px; padding-right: 16px; }
  .shop-header > .shop-logo { min-height: 44px; }
  .header-tools { margin-left: auto; gap: 6px; }
  .shop-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; margin: 0;
    justify-content: space-around; padding: 6px; background: var(--paper);
    border-top: 1px solid var(--line);
  }
  .shop-nav-link { flex: 1; min-height: 44px; font-size: 12px; padding: 9px 4px; text-align: center; }
  .round-button, .cart-button, .login-link { min-width: 44px; min-height: 44px; }
  .login-link { padding: 0; justify-content: center; }
  .login-link span { display: none; }
  .text-button, .store-product-name, .crumb button, .catalog-filter #reset-filter { min-height: 44px; align-items: center; }
  .shop-body .dark-button, .shop-body .outline-button, .auth-body .dark-button, .auth-body .outline-button { min-height: 44px; }
  .checkout-consent a { display: inline-flex; align-items: center; min-height: 44px; vertical-align: middle; }
  .product-buy-button, .quantity button, .cart-line-remove, .modal-x { min-width: 44px; min-height: 44px; }
  .quantity input { min-height: 44px; }
  .cart-line-qty button { width: 44px; height: 44px; }
  .search-results button, .mode-choice, .pay-option { min-height: 44px; }
  .auth-tab, .back-link, .password-wrap .reveal { min-height: 44px; }
  .auth-body input, .auth-body select, .shop-body input, .shop-body select { min-height: 44px; }
  .password-wrap .reveal { min-width: 44px; }
  .auth-footer a { display: inline-flex; align-items: center; min-height: 44px; }
  main { padding-bottom: 88px; }
  h1 { font-size: 21px; }
  .subpage-head h1, .checkout-title h1, .detail-main h1, .admin-heading h1 { font-size: 20px; }
  .section-title, .catalog-head, .admin-heading, .editor-heading, .sms-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .form-grid, .field-pair, .settings-grid-form, .payment-fields, .inventory-stats { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 11px; }
  .modal-card { padding: 22px 18px; }
  .detail-main, .checkout-block, .order-query, .account-orders, .admin-card, .editor-panel, .inventory-import-card { padding: 18px; }
  .account-orders-head { flex-direction: column; }
  .admin-page { padding: 20px 16px 52px; }
  .admin-body input, .admin-body select, .admin-body textarea,
  .admin-body .admin-primary, .admin-body .admin-outline, .admin-body .danger-button,
  .admin-body .table-link, .admin-body .admin-nav { min-height: 44px; }
  .purchase-top strong { font-size: 26px; }
  .detail-layout { display: flex; flex-direction: column; }
  .detail-main { display: contents; }
  .detail-icon { order: 0; }
  .product-category, .detail-main > h1, .detail-desc { order: 1; }
  .purchase-panel { order: 2; position: static; width: 100%; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 12px; padding: 16px; margin: 8px 0 12px; border-radius: 10px; box-shadow: none; }
  .purchase-top { grid-column: 1 / -1; display: grid; grid-template-columns: auto auto; align-items: baseline; gap: 5px 10px; padding-bottom: 10px; }
  .purchase-top strong { justify-self: start; }
  .purchase-top small { grid-column: 1 / -1; }
  .purchase-top .wholesale-tiers { grid-column: 1 / -1; }
  .purchase-panel > label { grid-column: 1; }
  .purchase-total { grid-column: 2; border-top: 0; padding: 0; display: grid; gap: 3px; justify-items: end; }
  .purchase-total b { font-size: 18px; }
  .purchase-panel > .dark-button, .purchase-panel > .outline-button { grid-column: span 1; }
  .purchase-note { display: none; }
  .detail-info, .description-panel { order: 3; }
  .wholesale-tiers { margin-top: 0; font-size: 11px; }
  .editor-actions { flex-wrap: wrap; }
  .editor-actions .admin-primary, .editor-actions .admin-outline { flex: 1; min-width: 128px; }
  .announcement-editor-form { padding: 18px; }
  .announcement-contenteditable { min-height: 150px; font-size: 14px; }
  .announcement-toolbar button, .announcement-color-control { min-height: 40px; }
  .announcement-editor-actions .admin-primary { width: 100%; }
  .supplier-metrics { grid-template-columns: 1fr 1fr; }
  .supplier-panel-head { flex-direction: column; }
  .supplier-panel-head .table-actions { width: 100%; flex-wrap: wrap; }
  .supplier-form-grid { grid-template-columns: 1fr; }
  .supplier-form-grid .full-row { grid-column: auto; }
  .trust-row { grid-template-columns: 1fr 1fr; }
  .admin-tabs { width: 100%; overflow-x: auto; }
  .catalog-filter { display: none; }
  .catalog-filter.mobile-open { display: grid; }
  .mobile-filter {
    display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-left: auto; padding: 7px 12px;
    border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); font-weight: 600; font-size: 12px;
  }
  .legal-header { height: auto; min-height: 64px; padding: 10px 16px; }
  .legal-header .shop-logo small { display: none; }
  .legal-header .outline-button { min-height: 44px; padding: 0 12px; }
  .legal-shell { padding: 34px 18px 52px; }
  .legal-shell > h1 { font-size: 24px; }
}

/* Cashier surface: a focused payment workspace that remains readable on mobile. */
#cashier.shop-page { background: #f4f7f8; }
.cashier-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 34px 0 70px; color: #172b2a; }
.cashier-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.cashier-brand { display: flex; align-items: center; gap: 12px; }
.cashier-brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 9px; background: #102c29; color: #a4f4d4; font-weight: 800; font-size: 20px; }
.cashier-brand b, .cashier-brand small { display: block; }
.cashier-brand b { font-size: 18px; }
.cashier-brand small { margin-top: 3px; color: #6f8583; font-size: 12px; }
.cashier-status { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border: 1px solid #f1d18a; border-radius: 999px; background: #fff8df; color: #8a5d0a; font-size: 13px; font-weight: 700; }
.cashier-status svg { width: 16px; height: 16px; }
.cashier-status.success { border-color: #8ad9bd; background: #e7faf2; color: #117a5c; }
.cashier-status.danger { border-color: #f3b2b2; background: #fff0f0; color: #a33434; }
.cashier-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.cashier-step { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 58px; border: 1px solid #d9e5e4; border-radius: 8px; background: #fff; color: #617572; font-size: 14px; font-weight: 700; }
.cashier-step b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: #b7c8c5; color: #fff; }
.cashier-step.done b, .cashier-step.active b { background: #148a6d; }
.cashier-step.active { border-color: #83c8b5; background: #eefaf6; color: #117a5c; }
.cashier-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr); gap: 18px; padding: 24px; border: 1px solid #d8e4e3; border-radius: 9px; background: rgba(255,255,255,.92); box-shadow: 0 18px 45px rgba(19, 52, 49, .08); }
.cashier-payment-card, .cashier-info-card { min-width: 0; border: 1px solid #d8e4e3; border-radius: 8px; background: #fff; }
.cashier-payment-card { display: grid; grid-template-columns: minmax(220px, .9fr) minmax(0, 1.1fr); gap: 20px; padding: 22px; align-items: center; }
.cashier-qr-wrap { display: flex; flex-direction: column; align-items: center; padding: 10px; text-align: center; }
.cashier-qr-wrap img { width: min(260px, 100%); aspect-ratio: 1; border: 1px solid #d4e2e0; border-radius: 8px; background: #fff; image-rendering: auto; }
.cashier-qr-wrap p { margin: 14px 0 2px; color: #7a8d8a; font-size: 12px; }
.cashier-qr-wrap strong { color: #172b2a; font: 700 28px/1.15 var(--mono, ui-monospace); }
.cashier-qr-wrap small { margin-top: 5px; color: #148a6d; font-weight: 700; }
.cashier-transfer { align-self: stretch; padding: 12px 0; }
.cashier-transfer .kicker { margin-bottom: 10px; color: #148a6d; }
.cashier-address { display: flex; gap: 8px; align-items: stretch; margin-bottom: 14px; }
.cashier-address code { flex: 1; min-width: 0; overflow-wrap: anywhere; padding: 12px; border: 1px solid #d8e4e3; border-radius: 7px; background: #f7fbfa; color: #284744; font-size: 13px; line-height: 1.55; }
.cashier-address .icon-button { flex: 0 0 44px; border: 1px solid #8bcab8; border-radius: 7px; background: #effaf6; color: #148a6d; cursor: pointer; }
.cashier-transfer ol { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; counter-reset: cashier-step; }
.cashier-transfer li { counter-increment: cashier-step; padding: 11px 12px 11px 42px; border: 1px solid #d8e4e3; border-radius: 7px; color: #425b57; font-size: 13px; line-height: 1.5; position: relative; }
.cashier-transfer li::before { content: counter(cashier-step, decimal-leading-zero); position: absolute; left: 12px; color: #148a6d; font-weight: 800; }
.cashier-info-card { padding: 26px; }
.cashier-info-card h1 { margin: 5px 0 10px; font-size: clamp(24px, 3vw, 34px); }
.cashier-info-card > p:not(.kicker) { color: #647875; line-height: 1.65; }
.cashier-countdown { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 22px 0; padding: 14px 16px; border: 1px solid #efd28a; border-radius: 8px; background: #fff9e9; color: #866314; }
.cashier-countdown strong { font: 700 22px/1 var(--mono, ui-monospace); }
.cashier-countdown strong.expired { color: #a33434; }
.cashier-order-meta { display: grid; gap: 11px; margin-bottom: 20px; }
.cashier-order-meta div { display: flex; justify-content: space-between; gap: 14px; padding-bottom: 10px; border-bottom: 1px solid #edf2f1; }
.cashier-order-meta span { color: #7a8d8a; }
.cashier-order-meta b { max-width: 68%; overflow-wrap: anywhere; text-align: right; }
.cashier-contact-panel { display: flex; align-items: flex-start; gap: 16px; grid-column: 1 / -1; padding: 18px; border: 1px solid #ead8a1; border-radius: 8px; background: #fffaf0; }
.cashier-contact-icon { display: grid; place-items: center; flex: 0 0 44px; height: 44px; border-radius: 10px; background: #fff0bf; color: #987014; }
.cashier-contact-panel b { font-size: 18px; }
.cashier-contact-panel p { margin: 8px 0 14px; color: #6e6851; line-height: 1.6; }
.cashier-contact-list { display: flex; flex-wrap: wrap; gap: 9px; }
.cashier-contact { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 12px; border: 1px solid #8bcab8; border-radius: 7px; background: #effaf6; color: #117a5c; font-weight: 700; text-decoration: none; }
.cashier-contact svg { width: 16px; height: 16px; }
.cashier-result { grid-column: 1 / -1; padding: 30px 20px; text-align: center; }
.cashier-result > span { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%; background: #e5faf1; color: #148a6d; }
.cashier-result > span svg { width: 30px; height: 30px; }
.cashier-result h2 { margin: 0 0 8px; }
.cashier-result p { color: #647875; }
.cashier-footnote { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 18px 0 0; color: #71827f; font-size: 12px; }
.cashier-footnote svg { width: 15px; height: 15px; color: #148a6d; }
.cashier-contact-inline { margin-bottom: 10px; padding: 12px; border: 1px solid #ead8a1; border-radius: 7px; background: #fffaf0; }
.cashier-contact-inline p { margin: 5px 0 0; color: #756b4b; font-size: 12px; }
@media (max-width: 820px) {
  .cashier-shell { width: min(100% - 22px, 680px); padding-top: 22px; }
  .cashier-head { align-items: flex-start; flex-direction: column; }
  .cashier-grid { grid-template-columns: 1fr; padding: 12px; }
  .cashier-payment-card { grid-template-columns: 1fr; padding: 15px; }
  .cashier-info-card { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .supplier-monitor-strip.running i { animation: none !important; }
}

/* ========================================================================== 
   商城前台深色主题
   仅作用于 shop-body，运营后台继续使用上面的浅色工作台设计。
   ========================================================================== */

.shop-body {
  --ink: #f5f7ff;
  --ink-soft: #c9d4e8;
  --muted: #94a4bd;
  --muted-soft: #71829d;
  --line: #223552;
  --line-soft: #182a45;
  --bg: #080d18;
  --bg-sunken: #0a1424;
  --paper: #0e192a;
  --blue: #3b82f6;
  --blue-hover: #2563eb;
  --blue-wash: #10284a;
  --blue-line: #28568e;
  --green: #34d399;
  --green-wash: #0d302b;
  --amber: #fbbf24;
  --amber-wash: #342711;
  --red: #fb7185;
  --red-wash: #351827;
  --violet: #a78bfa;
  --r-sm: 10px;
  --r: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .22);
  --shadow: 0 10px 28px rgba(0, 0, 0, .22);
  --shadow-md: 0 18px 42px rgba(0, 0, 0, .3);
  --shadow-lg: 0 26px 70px rgba(0, 0, 0, .46);
  color-scheme: dark;
  background: var(--bg);
}

.shop-body .storefront-loader { background: #080d18; }
.shop-body .storefront-loader > span {
  width: 34px;
  height: 34px;
  border-color: #1d3557;
  border-top-color: #60a5fa;
}

.shop-body .shop-header {
  background: rgba(8, 13, 24, .92);
  border-bottom-color: #1c2c46;
  box-shadow: 0 10px 34px rgba(0, 0, 0, .22);
}
.shop-body .logo-glyph {
  border-radius: 11px;
  background: #f8fbff;
  box-shadow: 0 0 0 1px rgba(96, 165, 250, .32), 0 8px 22px rgba(37, 99, 235, .2);
}
.shop-body .shop-logo > span:last-child { color: #f7f9ff; }
.shop-body .shop-logo small { color: #8293ae; }
.shop-body .shop-nav-link { color: #8ea0bb; border-radius: 11px; }
.shop-body .shop-nav-link:hover { color: #eef4ff; background: #111f34; }
.shop-body .shop-nav-link.active { color: #8bc1ff; background: #132d50; box-shadow: inset 0 0 0 1px #284f7d; }
.shop-body .round-button,
.shop-body .cart-button,
.shop-body .login-link {
  color: #cfdaeb;
  background: #0d1828;
  border-color: #263954;
}
.shop-body .round-button:hover,
.shop-body .cart-button:hover,
.shop-body .login-link:hover { background: #15243a; border-color: #3a5a82; }
.shop-body .cart-button > span { border-color: #080d18; background: #3b82f6; }

.shop-body main {
  min-height: calc(100vh - var(--header-h));
  padding-top: 32px;
}
.shop-body.storefront-ready .shop-page.active { animation: none; }
.shop-body .kicker { color: #7592bb; font-weight: 700; }
.shop-body .section-title h1,
.shop-body .section-title h2,
.shop-body .subpage-head h1,
.shop-body .catalog-head h1 { color: #f7f9ff; }
.shop-body .text-button { min-height: 40px; color: #69a8ff; }
.shop-body .text-button:hover { color: #9bc8ff; }

.shop-body .store-notice { gap: 18px; margin-bottom: 38px; }
.shop-body .contact-panel,
.shop-body .announcement-panel {
  position: relative;
  overflow: hidden;
  padding: 24px;
  background: #0d1829;
  border-color: #263a59;
  border-radius: 18px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .22);
}
.shop-body .contact-panel::before,
.shop-body .announcement-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: #27b7d8;
}
.shop-body .announcement-panel::before { background: #8b5cf6; }
.shop-body .notice-title > span,
.shop-body .contact-panel-head > span,
.shop-body .announcement-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: #142c4d;
  color: #70b7ff;
  box-shadow: inset 0 0 0 1px #29537f;
}
.shop-body .announcement-icon {
  color: #c4b5fd;
  background: #261f4c;
  box-shadow: inset 0 0 0 1px #4c3b81;
}
.shop-body .notice-title h2,
.shop-body .contact-panel-head h2,
.shop-body .announcement-top h2 { color: #f7f9ff; font-size: 17px; }
.shop-body .contact-list { gap: 10px; margin-top: 20px; }
.shop-body .telegram-button,
.shop-body .qq-button,
.shop-body .wechat-box {
  min-height: 64px;
  padding: 12px 14px;
  background: #101d30;
  border-color: #263b5a;
  border-radius: 13px;
}
.shop-body .telegram-button:hover,
.shop-body .qq-button[href]:hover { background: #142945; border-color: #37659a; }
.shop-body .telegram-button b,
.shop-body .qq-button b,
.shop-body .wechat-box b { color: #eaf0fb; }
.shop-body .wechat-box strong { color: #6ee7b7; }
.shop-body .announcement-highlight {
  margin-top: 20px;
  padding: 16px 17px;
  border-color: #385f96;
  border-radius: 14px;
  background: #112746;
  color: #d7e8ff;
}
.shop-body .announcement-highlight i { color: #70b7ff; }
.shop-body .announcement-note { color: #aab7ca; }
.shop-body .entry-notification-icon { background: var(--blue-wash); color: var(--blue); }
.shop-body .entry-notification-copy { border-color: var(--line); background: var(--bg-sunken); color: var(--ink-soft); }

.shop-body .home-section { margin-bottom: 46px; }
.shop-body .section-title { margin-bottom: 22px; }
.shop-body .section-title h1,
.shop-body .section-title h2 { font-size: 24px; }
.shop-body .category-grid,
.shop-body .store-product-grid,
.shop-body .hot-products { gap: 18px; }
.shop-body .category-directory-card,
.shop-body .store-product-card {
  background: #0e192a;
  border-color: #223754;
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .2);
}
.shop-body .category-directory-card:nth-child(3n + 2),
.shop-body .store-product-card:nth-child(3n + 2) { border-color: #34305f; }
.shop-body .category-directory-card:nth-child(3n),
.shop-body .store-product-card:nth-child(3n) { border-color: #1d4b49; }
.shop-body .category-directory-card:hover,
.shop-body .store-product-card:hover {
  border-color: #4b78ad;
  box-shadow: 0 22px 50px rgba(0, 0, 0, .34), 0 0 0 1px rgba(96, 165, 250, .12);
}
.shop-body .category-directory-card > img,
.shop-body .product-visual { background: #0a1322; }
.shop-body .category-directory-copy { padding: 16px 17px 18px; }
.shop-body .category-directory-copy b,
.shop-body .store-product-name { color: #f2f6ff; }
.shop-body .category-directory-copy em { color: #75b5ff; }
.shop-body .store-product-info { padding: 16px 17px 17px; }
.shop-body .store-product-stats { border-top-color: #1f3049; }
.shop-body .store-product-stats b { color: #c7d6ea; }
.shop-body .store-product-footer strong { color: #f8fbff; font-size: 20px; }
.shop-body .delivery-badge {
  padding: 5px 10px;
  color: #d9e8fb;
  background: rgba(8, 15, 27, .9);
  border: 1px solid #314968;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .28);
}
.shop-body .delivery-badge.code { color: #6ee7b7; border-color: #285c50; }
.shop-body .delivery-badge.review { color: #fcd34d; border-color: #6f5524; }
.shop-body .delivery-badge.online { color: #93c5fd; border-color: #345e91; }
.shop-body .product-buy-button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #2563eb;
  box-shadow: 0 9px 22px rgba(37, 99, 235, .3);
}
.shop-body .product-buy-button:hover { background: #3b82f6; }

.shop-body .catalog-filter,
.shop-body .detail-main,
.shop-body .purchase-panel,
.shop-body .checkout-block,
.shop-body .checkout-summary,
.shop-body .account-orders,
.shop-body .order-query,
.shop-body .sms-config,
.shop-body .sms-session {
  background: #0e192a;
  border-color: #243853;
  border-radius: 16px;
  box-shadow: 0 14px 38px rgba(0, 0, 0, .22);
}
.shop-body .detail-info article,
.shop-body .filter-note,
.shop-body .query-result,
.shop-body .multi-order-line,
.shop-body .sms-cost { background: #0a1526; border-color: #213550; }
.shop-body .mode-choice,
.shop-body .pay-option,
.shop-body .search-results button {
  background: #101c2e;
  border-color: #273b58;
  border-radius: 13px;
}
.shop-body .mode-choice:hover,
.shop-body .pay-option:hover,
.shop-body .search-results button:hover { background: #142a49; border-color: #3c6fa7; }
.shop-body .mode-choice.active,
.shop-body .pay-option.active { background: #11294a; border-color: #3b82f6; }
.shop-body input,
.shop-body select,
.shop-body textarea {
  background-color: #0a1423;
  border-color: #293d59;
  color: #edf3ff;
}
.shop-body input:hover,
.shop-body select:hover,
.shop-body textarea:hover { border-color: #456488; }
.shop-body input:focus,
.shop-body select:focus,
.shop-body textarea:focus { border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(59, 130, 246, .2); }
.shop-body .quantity button,
.shop-body .cart-line-qty { background: #0a1423; border-color: #293d59; }
.shop-body .quantity button { color: #fff; font-size: 20px; font-weight: 700; line-height: 1; }
.shop-body .quantity button:hover,
.shop-body .cart-line-qty button:hover { background: #15243a; }
.shop-body .dark-button {
  border-color: #2563eb;
  border-radius: 12px;
  background: #2563eb;
  box-shadow: 0 10px 24px rgba(37, 99, 235, .25);
}
.shop-body .dark-button:hover:not(:disabled) { background: #3b82f6; border-color: #3b82f6; }
.shop-body .outline-button { background: #111d2e; border-color: #2c4260; color: #d8e3f3; border-radius: 12px; }
.shop-body .outline-button:hover:not(:disabled) { background: #17263b; border-color: #46688e; }

.shop-body .trust-row { gap: 16px; margin-top: 46px; }
.shop-body .trust-row article {
  padding: 18px;
  background: #0d1828;
  border-color: #223650;
  border-radius: 15px;
  box-shadow: none;
}
.shop-body .trust-row article:nth-child(2) i { color: #34d399; }
.shop-body .trust-row article:nth-child(3) i { color: #a78bfa; }
.shop-body .trust-row article:nth-child(4) i { color: #fbbf24; }
.shop-body .shop-footer { background: #070c16; border-top-color: #1c2b42; }
.shop-body .shop-footer a { color: #8abfff; }

.shop-body .modal-layer { background: rgba(2, 6, 14, .74); backdrop-filter: blur(8px); }
.shop-body .modal-card {
  background: #0e192a;
  color: #f5f7ff;
  border: 1px solid #2a3f5d;
  border-radius: 20px;
}
.shop-body .modal-x { color: #93a4bd; }
.shop-body .modal-x:hover { background: #17263b; color: #fff; }
.shop-body .toast { background: #eaf2ff; color: #0b1424; }

@media (max-width: 720px) {
  .shop-body .shop-header { backdrop-filter: none; }
  .shop-body .shop-nav { background: rgba(8, 13, 24, .96); border-top-color: #243650; backdrop-filter: blur(12px); }
  .shop-body main { padding-top: 20px; }
  .shop-body .store-notice { gap: 12px; margin-bottom: 30px; }
  .shop-body .contact-panel,
  .shop-body .announcement-panel { padding: 18px; border-radius: 16px; }
  .shop-body .section-title h1,
  .shop-body .section-title h2 { font-size: 22px; }
  .shop-body .category-grid,
  .shop-body .store-product-grid,
  .shop-body .hot-products { gap: 12px; }
  .shop-body .category-directory-card,
  .shop-body .store-product-card { border-radius: 14px; }
  .shop-body .category-directory-copy,
  .shop-body .store-product-info { padding: 13px; }
  .shop-body .trust-row { gap: 10px; }
  .shop-body .trust-row article { padding: 14px; }
}

@media (max-width: 430px) {
  .shop-body .trust-row { grid-template-columns: 1fr; }
  .shop-body .category-grid { grid-template-columns: 1fr; }
  .shop-body .category-directory-card > img { height: 168px; }
}

/* Premium storefront refinement: unified notice, ambient gradient and denser products. */
.shop-body {
  background-color: #080d18;
  background-image: linear-gradient(118deg, #071629 0%, #080d18 48%, #140b25 100%);
  background-attachment: fixed;
  font-size: 15px;
}
.shop-body .shop-header {
  background: linear-gradient(90deg, rgba(7, 14, 26, .96), rgba(12, 13, 29, .94));
}
.shop-body main { position: relative; }
.shop-body .shop-logo > span:last-child { font-size: 16px; }
.shop-body .shop-nav-link { font-size: 14px; }
.shop-body .section-title h1,
.shop-body .section-title h2 { font-size: 26px; }
.shop-body .section-title p,
.shop-body .catalog-head p,
.shop-body .subpage-head p { font-size: 14px; }

.shop-body .store-notice {
  position: relative;
  display: block;
  overflow: hidden;
  margin-bottom: 54px;
  border: 1px solid #274368;
  border-radius: 22px;
  background: linear-gradient(132deg, rgba(15, 32, 55, .96) 0%, rgba(10, 21, 38, .97) 56%, rgba(29, 15, 49, .95) 100%);
  box-shadow: 0 28px 70px rgba(0, 0, 0, .34), inset 0 1px rgba(255, 255, 255, .025);
}
.shop-body .store-notice::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #22d3ee 0%, #3b82f6 48%, #a855f7 100%);
}
.shop-body .notice-unified { padding: 28px 30px 30px; }
.shop-body .notice-unified-head { display: flex; align-items: center; gap: 14px; }
.shop-body .notice-unified-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid #3568a5;
  border-radius: 14px;
  background: linear-gradient(145deg, #173d6d, #202255);
  color: #8ed4ff;
  box-shadow: 0 10px 26px rgba(37, 99, 235, .2);
}
.shop-body .notice-unified-icon svg { width: 21px; height: 21px; }
.shop-body .notice-unified-head h2 { color: #f8faff; font-size: 20px; }
.shop-body .notice-unified-head > div > p:last-child { margin-top: 3px; color: #91a3be; font-size: 13px; }
.shop-body .notice-contact-actions .contact-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 26px 0 24px;
  padding: 5px 0;
}
.shop-body .notice-contact-actions .telegram-button,
.shop-body .notice-contact-actions .qq-button {
  min-height: 72px;
  justify-content: center;
  padding: 10px 24px;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: left;
  transition: color .18s, background .18s;
}
.shop-body .notice-contact-actions .contact-list > * + * { border-left: 1px solid #263b59; }
.shop-body .notice-contact-actions .telegram-button:hover,
.shop-body .notice-contact-actions .qq-button[href]:hover {
  transform: none;
  border-color: #263b59;
  background: rgba(38, 77, 126, .22);
}
.shop-body .notice-contact-actions .brand-logo { width: 25px; height: 25px; }
.shop-body .notice-contact-actions b { color: #e8f1ff; font-size: 15px; }
.shop-body .notice-contact-actions small { margin-top: 2px; color: #8da1bd; font-size: 12px; }
.shop-body .notice-contact-actions a > svg:last-child { color: #6f89aa; }
.shop-body .notice-unified .announcement-highlight {
  margin: 0;
  padding: 22px 0 0;
  border: 0;
  border-top: 1px dashed #304765;
  border-radius: 0;
  background: transparent;
  color: #dce7f7;
  font-size: 14px;
}
.shop-body .notice-unified .announcement-note {
  margin-top: 18px;
  padding: 11px 14px;
  border: 1px solid rgba(236, 72, 153, .22);
  border-radius: 11px;
  background: linear-gradient(90deg, rgba(136, 19, 80, .32), rgba(88, 28, 135, .18));
  color: #f5f7ff;
}

.shop-body .category-directory-card {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  min-height: 72px;
  padding: 12px 14px;
  background: linear-gradient(155deg, #111f34 0%, #0d1728 72%);
}
.shop-body .category-grid,
.shop-body .category-grid.large { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.shop-body .category-directory-card > img,
.shop-body .category-grid.large .category-directory-card > img {
  width: 36px;
  height: 36px;
  border: 1px solid #2c4463;
  border-radius: 9px;
  background: #f8fbff;
  object-fit: contain;
}
.shop-body .category-directory-copy,
.shop-body .category-grid.large .category-directory-copy { gap: 1px; padding: 0 0 0 10px; }
.shop-body .category-directory-copy b,
.shop-body .category-grid.large .category-directory-copy b { font-size: 14.5px; line-height: 1.4; }
.shop-body .category-directory-copy small { display: none; }
.shop-body .category-directory-copy em { margin: 0; color: #8198b8; font-size: 10.5px; }
.shop-body .store-product-grid,
.shop-body .hot-products { grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 18px; }
.shop-body .store-product-card {
  min-width: 0;
  height: 100%;
  background: linear-gradient(180deg, #101c30 0%, #0b1526 100%);
  border-color: #284363;
  border-radius: 17px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, .28), inset 0 1px rgba(255, 255, 255, .025);
}
.shop-body .store-product-card:nth-child(3n + 2) { border-color: #3a3767; }
.shop-body .store-product-card:nth-child(3n) { border-color: #255451; }
.shop-body .store-product-card:hover {
  border-color: #4c7fb7;
  box-shadow: 0 26px 62px rgba(0, 0, 0, .42), 0 0 32px rgba(59, 130, 246, .09);
}
.shop-body .product-visual {
  aspect-ratio: 4 / 3;
  border-bottom: 1px solid #233955;
  background: #07101d;
}
.shop-body .product-visual::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 32%;
  background: linear-gradient(180deg, transparent, rgba(7, 15, 28, .22));
  pointer-events: none;
}
.shop-body .product-visual img { transform: none; }
.shop-body .store-product-info { gap: 10px; padding: 16px 17px 17px; }
.shop-body .store-product-category {
  color: #8da3c1;
  font-size: 12px;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shop-body .store-product-name {
  min-height: 44px;
  color: #f6f8ff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.shop-body .store-product-stats {
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  padding: 0;
  border: 0;
}
.shop-body .store-product-stats > span {
  flex-direction: row;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border: 1px solid #23647a;
  border-radius: 999px;
  background: rgba(8, 83, 105, .25);
}
.shop-body .store-product-stats > span:first-child { border-color: #26715d; background: rgba(10, 91, 70, .24); }
.shop-body .store-product-stats small { color: #82d9c0; font-size: 10px; }
.shop-body .store-product-stats > span:nth-child(2) small { color: #7dd3fc; }
.shop-body .store-product-stats b { color: #dff8f0; font: 700 11px/1.3 var(--mono); }
.shop-body .store-product-description,
.shop-body .store-product-info > p {
  min-height: 57px;
  margin: 1px 0 0;
  color: #aab8cc;
  font-size: 13px;
  line-height: 1.6;
  -webkit-line-clamp: 3;
}
.shop-body .store-product-footer {
  margin-top: auto;
  padding-top: 13px;
  border-top: 1px solid #23364f;
}
.shop-body .store-product-footer small { color: #7e91ad; }
.shop-body .store-product-footer strong { color: #82c7ff; font-size: 19px; font-family: var(--mono); }
.shop-body .product-buy-button {
  border: 1px solid #335478;
  background: linear-gradient(145deg, #172a45, #111d32);
  color: #a9cfff;
  box-shadow: none;
}
.shop-body .product-buy-button:hover {
  border-color: #4c8ad2;
  background: linear-gradient(145deg, #2563eb, #1d4ed8);
  color: #fff;
}

@media (max-width: 720px) {
  .shop-body { background-attachment: scroll; font-size: 14px; }
  .shop-body .store-notice { margin-bottom: 38px; border-radius: 18px; }
  .shop-body .notice-unified { padding: 20px 18px 22px; }
  .shop-body .notice-unified-head { align-items: flex-start; }
  .shop-body .notice-unified-head h2 { font-size: 18px; }
  .shop-body .notice-contact-actions .contact-list { grid-template-columns: 1fr; margin: 20px 0; padding: 0; }
  .shop-body .notice-contact-actions .telegram-button,
  .shop-body .notice-contact-actions .qq-button {
    min-height: 64px;
    justify-content: flex-start;
    padding: 10px 8px;
  }
  .shop-body .notice-contact-actions .contact-list > * + * { border-left: 0; border-top: 1px solid #263b59; }
  .shop-body .notice-unified .announcement-highlight { padding-top: 18px; }
  .shop-body .section-title h1,
  .shop-body .section-title h2 { font-size: 23px; }
  .shop-body .category-grid,
  .shop-body .category-grid.large { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .shop-body .category-directory-card { grid-template-columns: 30px minmax(0, 1fr); min-height: 66px; padding: 9px; }
  .shop-body .category-directory-card > img,
  .shop-body .category-grid.large .category-directory-card > img { width: 30px; height: 30px; border-radius: 8px; }
  .shop-body .category-directory-copy,
  .shop-body .category-grid.large .category-directory-copy { padding-left: 7px; }
  .shop-body .category-directory-copy b,
  .shop-body .category-grid.large .category-directory-copy b { font-size: 13px; }
  .shop-body .category-directory-copy em { font-size: 10px; }
  .shop-body .store-product-grid,
  .shop-body .hot-products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .shop-body .store-product-card { border-radius: 13px; }
  .shop-body .product-visual { aspect-ratio: 4 / 3; }
  .shop-body .delivery-badge { top: 6px; left: 6px; padding: 3px 6px; font-size: 10px; }
  .shop-body .store-product-info { gap: 6px; padding: 9px; }
  .shop-body .store-product-category { font-size: 10.5px; }
  .shop-body .store-product-name { min-height: 44px; font-size: 13.5px; line-height: 1.4; }
  .shop-body .store-product-stats { gap: 4px; }
  .shop-body .store-product-stats > span { gap: 3px; padding: 3px 6px; }
  .shop-body .store-product-stats small { font-size: 10px; }
  .shop-body .store-product-stats b { font-size: 10.5px; }
  .shop-body .store-product-description,
  .shop-body .store-product-info > p { display: none; min-height: 0; }
  .shop-body .store-product-footer { gap: 5px; padding-top: 8px; }
  .shop-body .store-product-footer small { font-size: 10px; }
  .shop-body .store-product-footer strong { font-size: 15px; }
  .shop-body .product-buy-button { border-radius: 10px; }
}


.order-delivery .reveal-secret-btn,
.order-delivery .hide-secret-btn { margin-top: 8px; }
.order-delivery .secret-content {
  margin: 10px 0 0;
  padding: 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.35);
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 13px;
  line-height: 1.55;
}


.wallet-card { margin: 0 0 18px; padding: 18px; border-radius: 18px; border: 1px solid rgba(148,163,184,.28); background: linear-gradient(180deg,#fff,#f8fafc); display:grid; gap:14px; }
.wallet-card-main h2 { margin: 4px 0 8px; font-size: 18px; }
.wallet-card-main strong { display:block; font-size: 28px; letter-spacing: -.03em; }
.wallet-card-actions { display:flex; gap:10px; flex-wrap:wrap; }
.wallet-ledger { display:grid; gap:8px; }
.wallet-ledger-item { display:flex; justify-content:space-between; gap:12px; padding:10px 12px; border-radius:12px; background:rgba(15,23,42,.03); font-size:13px; }
.wallet-ledger-item b { white-space:nowrap; }
.wallet-ledger-item.credit b { color:#059669; }
.wallet-ledger-item.debit b { color:#dc2626; }
.pay-symbol.balance { background:#0f172a; color:#fff; }
.account-orders-subhead { margin: 8px 0 10px; }
.account-orders-subhead h2 { margin:0; font-size:16px; }


.account-guest-hint { margin: 24px 0; padding: 18px; border-radius: 16px; background: #f8fafc; border: 1px solid #e2e8f0; color: #475569; }
.account-page-wrap { max-width: 920px; }
.balance-adjust-modal { display:grid; gap:14px; }
.balance-adjust-modal .field-pair { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.balance-adjust-modal .hint-box { padding:12px 14px; border-radius:12px; background:#f8fafc; color:#64748b; font-size:13px; line-height:1.6; }
.modal-card.modal-wide { width:min(620px, calc(100vw - 28px)); max-width:620px; padding:28px 26px; }


.store-product-stats .stock-ok { color: #059669; }
.store-product-stats .stock-low { color: #d97706; }
.store-product-stats .stock-soldout { color: #dc2626; }


.order-list { display:grid; gap:14px; }
.order-list-card {
  background:#fff; border:1px solid #e8edf5; border-radius:16px; padding:16px 16px 12px;
  box-shadow:0 8px 24px rgba(15,23,42,.04);
}
.order-list-row { display:flex; justify-content:space-between; gap:12px; padding:8px 0; font-size:14px; }
.order-list-row > span { color:#94a3b8; }
.order-list-amount { color:#ef4444; font-size:18px; }
.order-list-status.done { color:#16a34a; }
.order-list-actions { margin-top:8px; }
.order-list-time { margin-top:10px; color:#94a3b8; font-size:12px; }
.order-detail-panel { margin-top:12px; }
.order-detail-sheet { display:grid; gap:14px; }
.od-back { justify-content:flex-start; width:fit-content; margin-bottom:4px; }
.od-section {
  background:#fff; border:1px solid #e8edf5; border-radius:16px; padding:16px;
  box-shadow:0 8px 24px rgba(15,23,42,.04);
}
.od-section-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.od-section-head h3 { margin:0; font-size:16px; }
.od-kv { display:flex; justify-content:space-between; gap:12px; padding:9px 0; border-bottom:1px dashed #eef2f7; font-size:14px; }
.od-kv:last-child { border-bottom:none; }
.od-kv > span { color:#94a3b8; }
.od-status.done { color:#16a34a; }
.od-copy-btn {
  border:0; background:#eff6ff; color:#2563eb; border-radius:999px; padding:6px 12px;
  font-size:12px; font-weight:700; cursor:pointer;
}
.od-secret-box { display:grid; gap:10px; }
.od-reveal-btn, .od-secret-content {
  width:100%; border-radius:12px; border:1px solid #e2e8f0; background:#f8fafc;
  padding:14px; text-align:left; font-size:13px; line-height:1.7; color:#0f172a;
}
.od-reveal-btn { cursor:pointer; color:#64748b; }
.od-secret-content { white-space:pre-wrap; word-break:break-word; margin:0; font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; }
.od-tip { margin:10px 0 0; color:#f59e0b; font-size:12px; line-height:1.6; }
.od-product { display:flex; gap:12px; align-items:center; }
.od-product-icon { flex:0 0 auto; }
.od-product b { display:block; font-size:14px; }
.od-product small { display:block; color:#94a3b8; margin-top:4px; }
.od-product strong { display:block; margin-top:6px; color:#ef4444; }
.od-guide { font-size:13px; line-height:1.8; color:#334155; white-space:normal; }


/* Online pay cashier polish */
.online-pay-qr { gap: 10px; }
.online-pay-qr-frame {
  padding: 12px;
  border: 1px solid #d7e5e2;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f5fbf9 100%);
  box-shadow: 0 10px 30px rgba(20, 138, 109, 0.08);
}
.online-pay-qr-frame img {
  display: block;
  width: 220px;
  height: 220px;
  border-radius: 10px;
}
.online-pay-scan-tip {
  margin: 4px 0 0;
  color: #5b736f !important;
  font-size: 13px !important;
  font-weight: 600;
}
.online-pay-amount {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}
.online-pay-amount span {
  color: #7a8d8a;
  font-size: 12px;
}
.online-pay-amount strong {
  color: #0f766e !important;
  font: 800 30px/1.1 var(--mono, ui-monospace) !important;
}
.online-pay-order {
  margin-top: 2px;
  color: #94a3b8 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}
.online-pay-guide .online-pay-head {
  margin-bottom: 14px;
}
.online-pay-guide .online-pay-head h3 {
  margin: 4px 0 6px;
  color: #17312e;
  font-size: 20px;
  line-height: 1.3;
}
.online-pay-sub {
  margin: 0;
  color: #6b7f7b;
  font-size: 13px;
  line-height: 1.6;
}
.online-pay-guide ol {
  margin-bottom: 14px !important;
}
.online-pay-guide li {
  background: #f8fbfa;
}
.online-pay-actions {
  display: grid;
  gap: 10px;
}
.online-pay-open {
  justify-content: center;
}
.online-pay-switch {
  color: #64748b !important;
}
.online-pay-switch:hover {
  color: #0f766e !important;
}

.online-pay-fee {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 2px;
  color: #64748b;
  font-size: 12px;
}
.online-pay-fee b {
  color: #0f766e;
  font-weight: 700;
}

.subcategory-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 2px;
}
.subcategory-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.subcategory-tab span {
  color: var(--muted);
  font: 650 12px/1 var(--mono);
}
.subcategory-tab:hover {
  border-color: var(--ink);
}
.subcategory-tab.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.subcategory-tab.active span {
  color: rgba(255,255,255,.72);
}

.subcategory-editor {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg-sunken);
}
.subcategory-editor-head {
  display: grid;
  gap: 4px;
}
.subcategory-editor-head b {
  font-size: 13px;
}
.subcategory-editor-head small {
  color: var(--muted);
  line-height: 1.5;
}
.subcategory-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px auto auto;
  gap: 8px;
  align-items: center;
}
.subcategory-row input[name="subName"],
.subcategory-row input[name="subSort"] {
  min-height: 36px;
  width: 100%;
}
.subcategory-row-active {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  white-space: nowrap;
}
@media (max-width: 720px) {
  .subcategory-row {
    grid-template-columns: 1fr 1fr;
  }
}
