/* ==========================================================================
   阿拉木图仓库下单系统 · 共用样式
   设计：移动端优先，微信内打开 / 手机浏览器 / 电脑都能用
   ========================================================================== */

:root {
  --ink: #0e1726;
  --ink-2: #4a5a72;
  --ink-3: #8d9bb0;
  --line: #e8edf5;
  --line-2: #f1f5fa;
  --bg: #eef2f8;
  --card: #ffffff;
  --brand: #12376f;
  --brand-2: #1f56c4;
  --brand-soft: #e8effc;
  --accent: #ff7a1a;
  --price: #d93a1a;
  --ok: #0ea36f;
  --ok-soft: #e2f7ee;
  --warn: #e08a00;
  --warn-soft: #fff4e0;
  --danger: #e23b3b;
  --danger-soft: #fdeaea;
  --radius: 16px;
  --shadow: 0 2px 10px rgba(16, 35, 68, .06);
  --shadow-lg: 0 12px 40px rgba(12, 28, 58, .16);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei",
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.5;
  overscroll-behavior-y: none;
}
body.lock { overflow: hidden; }

button, input, select, textarea { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; padding: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon.sm { width: 17px; height: 17px; }
.icon.lg { width: 26px; height: 26px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ============================== 通用组件 ============================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 46px; padding: 0 20px; border-radius: 12px;
  font-size: 15px; font-weight: 700; letter-spacing: .2px;
  background: var(--brand); color: #fff;
  transition: transform .12s ease, opacity .12s, background .15s;
  white-space: nowrap;
}
.btn:active { transform: scale(.975); }
.btn.block { width: 100%; }
.btn.accent { background: linear-gradient(135deg, #ff9426, #f4660a); }
.btn.ghost { background: var(--line-2); color: var(--ink-2); }
.btn.ghost-line { background: #fff; border: 1.5px solid var(--line); color: var(--ink-2); }
.btn.danger { background: var(--danger); }
.btn.ok { background: var(--ok); }
.btn.sm { height: 36px; padding: 0 14px; font-size: 13.5px; border-radius: 10px; }
.btn[disabled] { opacity: .45; pointer-events: none; }

.field { margin-bottom: 14px; }
.field > label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 0 0 6px 2px; }
.field .hint { font-size: 12px; color: var(--ink-3); margin: 5px 0 0 2px; line-height: 1.4; }
.input, .select, .textarea {
  width: 100%; height: 46px; padding: 0 14px;
  background: #fff; border: 1.5px solid var(--line); border-radius: 12px;
  font-size: 15px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 84px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(31, 86, 196, .12); }
.input::placeholder, .textarea::placeholder { color: #b3bfd0; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a5a72' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 36px; }
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }

.chiprow { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.chiprow::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 34px; padding: 0 14px; border-radius: 999px;
  background: #fff; border: 1.5px solid var(--line); color: var(--ink-2);
  font-size: 13.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 5px;
  transition: all .15s;
}
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip.amber.on { background: var(--accent); border-color: var(--accent); }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.badge.gray { background: var(--line-2); color: var(--ink-3); }
.badge.blue { background: var(--brand-soft); color: var(--brand-2); }
.badge.green { background: var(--ok-soft); color: var(--ok); }
.badge.amber { background: var(--warn-soft); color: var(--warn); }
.badge.red { background: var(--danger-soft); color: var(--danger); }

/* 遮罩 + 底部弹层 */
.overlay {
  position: fixed; inset: 0; background: rgba(9, 18, 35, .48);
  opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 80;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.overlay.show { opacity: 1; pointer-events: auto; }

.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  background: #fff; border-radius: 22px 22px 0 0;
  transform: translateY(102%);
  transition: transform .26s cubic-bezier(.22, .8, .3, 1), visibility 0s linear .27s;
  max-height: 92vh; display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
  padding-bottom: var(--safe-b);
  /* 收起时必须彻底「摸不到」，否则透明的弹层会挡住下面整页的点击 */
  pointer-events: none;
  visibility: hidden;
}
.sheet.show {
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
  transition: transform .26s cubic-bezier(.22, .8, .3, 1), visibility 0s;
}
/* 确认类弹窗：居中卡片更适合短内容 */
.sheet.modal {
  left: 50%; top: 50%; bottom: auto; right: auto;
  width: calc(100% - 44px); max-width: 356px; max-height: 82vh;
  border-radius: 20px; transform: translate(-50%, -46%) scale(.97); opacity: 0;
  transition: opacity .18s ease, transform .22s cubic-bezier(.2, .9, .3, 1.05), visibility 0s linear .23s;
}
.sheet.modal.show {
  transform: translate(-50%, -50%) scale(1); opacity: 1;
  transition: opacity .18s ease, transform .22s cubic-bezier(.2, .9, .3, 1.05), visibility 0s;
}
.sheet.modal .sheet-head { padding-top: 14px; }
.sheet.modal .sheet-head .grip { display: none; }
.sheet.modal { overflow: hidden; }
.sheet-head { padding: 8px 18px 12px; border-bottom: 1px solid var(--line-2); flex: none; position: relative; }
.sheet-head .grip { width: 42px; height: 4px; border-radius: 4px; background: #e2e8f2; margin: 0 auto 10px; }
.sheet-head h3 { margin: 0; font-size: 17px; font-weight: 800; }
.sheet-head .sub { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.sheet-body { padding: 16px 18px; overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1; }
.sheet-foot { padding: 12px 18px calc(14px + var(--safe-b)); border-top: 1px solid var(--line-2); flex: none; background: #fff; }
.icon-btn { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--ink-2); background: var(--line-2); }
.sheet-close { position: absolute; right: 14px; top: 14px; }

/* Toast */
#toast-wrap { position: fixed; top: 14px; left: 0; right: 0; z-index: 200; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast {
  background: rgba(14, 23, 38, .92); color: #fff; padding: 10px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg);
  animation: toastIn .25s ease both; max-width: 92%; text-align: center;
}
.toast.ok { background: rgba(10, 140, 96, .95); }
.toast.err { background: rgba(200, 45, 45, .95); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px) scale(.96); } }

/* 空状态 / 骨架屏 */
.empty { text-align: center; padding: 54px 24px; color: var(--ink-3); }
.empty .em { font-size: 42px; margin-bottom: 10px; opacity: .9; }
.empty p { margin: 0 0 4px; font-size: 15px; font-weight: 700; color: var(--ink-2); }
.empty span { font-size: 13px; }

.skel { background: linear-gradient(100deg, #e9eef6 30%, #f5f8fd 50%, #e9eef6 70%); background-size: 300% 100%; animation: shim 1.3s infinite; border-radius: 10px; }
@keyframes shim { to { background-position: -100% 0; } }

/* 数量步进器 */
.stepper { display: inline-flex; align-items: center; gap: 0; background: var(--line-2); border-radius: 10px; overflow: hidden; }
.stepper button { width: 34px; height: 34px; display: grid; place-items: center; color: var(--ink-2); font-size: 18px; font-weight: 700; }
.stepper button:active { background: #e3eaf5; }
.stepper .num { min-width: 38px; text-align: center; font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; }
.stepper.sm button { width: 30px; height: 30px; font-size: 16px; }
.stepper.sm .num { min-width: 30px; font-size: 14px; }

/* 数量可以直接改：点数字就变输入框（大批量订货） */
.stepper .qnum {
  width: 46px; min-width: 46px; height: 34px; padding: 0 2px; border: 0; background: transparent;
  text-align: center; font: inherit; font-weight: 800; font-size: 15px; color: var(--ink);
  font-variant-numeric: tabular-nums; border-radius: 8px; -webkit-appearance: none; appearance: none;
  cursor: text;
}
.stepper.sm .qnum { width: 40px; min-width: 40px; height: 30px; font-size: 14px; }
.stepper .qnum:focus { outline: none; background: #fff; box-shadow: 0 0 0 2px var(--brand-2) inset; }
.stepper.card { background: #eef3fb; border-radius: 9px; }
.stepper.card button { width: 30px; height: 30px; font-size: 16px; }
.stepper.card .qnum { width: 40px; min-width: 40px; height: 30px; font-size: 14px; }

.spin { width: 18px; height: 18px; border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================== 客户版 ============================== */

.c-app { max-width: 540px; margin: 0 auto; min-height: 100vh; background: #f6f8fc; position: relative; }
@media (min-width: 700px) {
  .c-app { box-shadow: 0 0 0 1px rgba(16, 35, 68, .06), 0 20px 60px rgba(16, 35, 68, .12); }
}

.c-top { background: linear-gradient(150deg, #0d2b5b 0%, #17418c 55%, #1f56c4 100%); color: #fff; padding: 14px 16px 0; position: relative; overflow: hidden; }
.c-top::after {
  content: ""; position: absolute; right: -50px; top: -70px; width: 190px; height: 190px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 70%);
}
.c-brand { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 12px; row-gap: 7px; position: relative; z-index: 1; }
.c-wm { height: 24px; width: auto; grid-column: 1; grid-row: 1; justify-self: start; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .28)); }
.c-brand-txt { grid-column: 1 / -1; grid-row: 2; min-width: 0; }
.c-brand h1 { font-size: 17px; font-weight: 800; margin: 0; line-height: 1.25; letter-spacing: .1px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.c-brand .addr { font-size: 11.5px; opacity: .72; display: flex; align-items: center; gap: 4px; margin-top: 3px; max-width: 100%; }
.c-brand .addr .icon { width: 12px; height: 12px; }
.c-brand .c-lang { grid-column: 2; grid-row: 1; margin-left: 0; justify-self: end; }
.c-lang { display: flex; background: rgba(255, 255, 255, .14); border-radius: 999px; padding: 3px; flex: none; }
.c-lang button { padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; color: rgba(255, 255, 255, .8); }
.c-lang button.on { background: #fff; color: var(--brand); }

.c-search { position: relative; margin: 13px 0 14px; }
.c-search .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #93a3bb; width: 19px; height: 19px; }
.c-search input {
  width: 100%; height: 44px; border-radius: 13px; border: 0; padding: 0 40px 0 40px;
  background: rgba(255, 255, 255, .96); font-size: 14.5px; outline: none; color: var(--ink);
  -webkit-appearance: none; appearance: none;
}
.c-search input::-webkit-search-cancel-button,
.c-search input::-webkit-search-decoration { -webkit-appearance: none; display: none; }
.c-search .clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; display: grid; place-items: center; color: #93a3bb; }

.c-cats { position: sticky; top: 0; z-index: 30; background: #f6f8fc; padding: 10px 0 9px; border-bottom: 1px solid rgba(232, 237, 245, .8); }
.c-cats .inner { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 0 16px; }
.c-cats .inner::-webkit-scrollbar { display: none; }
.c-cats .chip { height: 35px; background: #fff; box-shadow: 0 1px 3px rgba(16, 35, 68, .05); }
.c-cats .chip.on { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(18, 55, 111, .28); }
.c-cats.hide { display: none; }

.c-main { padding: 12px 14px calc(150px + var(--safe-b)); }
.c-notice { display: flex; gap: 8px; align-items: flex-start; background: #fff7ea; border: 1px solid #ffe4bd; color: #8a5a00; font-size: 12.5px; line-height: 1.45; padding: 9px 12px; border-radius: 12px; margin-bottom: 12px; }
.c-notice .icon { width: 15px; height: 15px; margin-top: 1px; color: #d18a00; }

.c-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 11px; }
.c-card { background: #fff; border-radius: 15px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; position: relative; }
.c-card .thumb { position: relative; aspect-ratio: 1 / 1; background: #f0f4fa; overflow: hidden; }
.c-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.c-card:active .thumb img { transform: scale(1.04); }
.c-card .thumb .ph { width: 100%; height: 100%; display: grid; place-items: center; font-size: 40px; background: linear-gradient(140deg, #eef3fb, #e2eaf7); }
.c-card .tag { position: absolute; left: 7px; top: 7px; background: rgba(14, 23, 38, .62); color: #fff; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 6px; -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px); }
.c-card .tag.sold { background: rgba(120, 130, 145, .85); }
.c-card .tag.low { background: rgba(224, 138, 0, .92); }
.c-card .body { padding: 8px 9px 9px; display: flex; flex-direction: column; flex: 1; }
.c-card .nm { font-size: 13.5px; font-weight: 700; line-height: 1.32; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 36px; }
.c-card .nm2 { font-size: 11px; color: var(--ink-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-card .sp { font-size: 11px; color: var(--ink-3); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-card .foot { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 7px; gap: 4px; }
.c-card .pr { color: var(--price); font-weight: 800; font-size: 16px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.c-card .pr small { font-size: 10.5px; font-weight: 600; color: var(--ink-3); margin-left: 2px; }
.c-card .add {
  width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #2b6ae0, #17418c); box-shadow: 0 4px 10px rgba(23, 65, 140, .32);
}
.c-card .add:active { transform: scale(.9); }
.c-card .add .icon { width: 17px; height: 17px; stroke-width: 2.6; }
.c-card .add.off { background: #cfd8e5; box-shadow: none; }
.c-card .qty-badge {
  position: absolute; right: 8px; top: 8px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 800; display: grid; place-items: center;
  box-shadow: 0 2px 6px rgba(255, 122, 26, .5);
}

.c-empty-hint { grid-column: 1 / -1; }

/* 底部悬浮购物车 */
.c-cartbar {
  position: fixed; left: 50%; transform: translateX(-50%) translateY(20px); bottom: calc(66px + var(--safe-b));
  width: calc(100% - 28px); max-width: 512px; z-index: 40;
  background: rgba(16, 30, 56, .97); color: #fff; border-radius: 16px;
  display: flex; align-items: center; gap: 10px; padding: 9px 9px 9px 14px;
  box-shadow: 0 12px 30px rgba(12, 28, 58, .3);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.c-cartbar.show { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.c-cartbar .cico { position: relative; width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, .12); display: grid; place-items: center; flex: none; }
.c-cartbar .cnt { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--accent); font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.c-cartbar .sum { flex: 1; min-width: 0; }
.c-cartbar .sum .t { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.c-cartbar .sum .s { font-size: 11px; opacity: .6; }
.c-cartbar .go { height: 40px; padding: 0 18px; border-radius: 11px; background: linear-gradient(135deg, #ff9426, #f4660a); color: #fff; font-weight: 800; font-size: 14.5px; display: flex; align-items: center; gap: 5px; }

/* 底部导航 */
.c-nav {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 540px; z-index: 45;
  background: rgba(255, 255, 255, .96); -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); display: flex; padding-bottom: var(--safe-b);
}
.c-nav button { flex: 1; padding: 7px 0 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--ink-3); position: relative; }
.c-nav button.on { color: var(--brand-2); }
.c-nav button .icon { width: 23px; height: 23px; }
.c-nav button span { font-size: 10.5px; font-weight: 700; }
.c-nav .dot { position: absolute; top: 5px; right: 50%; margin-right: -18px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center; }

/* 商品详情 */
.pd-hero { aspect-ratio: 4 / 3; background: #f0f4fa; border-radius: 14px; overflow: hidden; margin-bottom: 14px; }
.pd-hero img { width: 100%; height: 100%; object-fit: cover; }
.pd-hero .ph { width: 100%; height: 100%; display: grid; place-items: center; font-size: 64px; background: linear-gradient(140deg, #eef3fb, #e2eaf7); }
.pd-name { font-size: 19px; font-weight: 800; line-height: 1.3; margin: 0; }
.pd-name2 { font-size: 14px; color: var(--ink-3); margin-top: 3px; }
.pd-price { color: var(--price); font-size: 26px; font-weight: 800; margin: 12px 0 4px; font-variant-numeric: tabular-nums; }
.pd-price small { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.pd-meta { list-style: none; margin: 14px 0 0; padding: 12px 14px; background: var(--line-2); border-radius: 12px; font-size: 13px; color: var(--ink-2); display: grid; gap: 7px; }
.pd-meta li { display: flex; gap: 8px; }
.pd-meta b { font-weight: 600; color: var(--ink-3); flex: none; width: 104px; }

/* 购物车 / 下单 */
.cart-line { display: flex; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.cart-line:last-child { border-bottom: 0; }
.cart-line .th { width: 62px; height: 62px; border-radius: 10px; overflow: hidden; background: #f0f4fa; flex: none; }
.cart-line .th img { width: 100%; height: 100%; object-fit: cover; }
.cart-line .th .ph { width: 100%; height: 100%; display: grid; place-items: center; font-size: 22px; }
.cart-line .in { flex: 1; min-width: 0; }
.cart-line .in .t { font-size: 13.5px; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cart-line .in .s { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.cart-line .in .b { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.cart-line .in .p { color: var(--price); font-weight: 800; font-size: 14.5px; }

.cart-total { display: flex; align-items: baseline; justify-content: space-between; padding: 12px 0 4px; }
.cart-total .l { font-size: 13px; color: var(--ink-2); }
.cart-total .v { color: var(--price); font-weight: 800; font-size: 22px; font-variant-numeric: tabular-nums; }
.cart-total .v small { font-size: 12px; color: var(--ink-3); font-weight: 600; }

.pay-list { background: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: 4px 14px; margin-bottom: 14px; }
.pay-list .li { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.pay-list .li:last-child { border-bottom: 0; }
.pay-list .li .k { font-size: 13px; color: var(--ink-3); flex: none; width: 62px; }
.pay-list .li .v { font-size: 13.5px; font-weight: 600; flex: 1; }
.pay-list .li .v.muted { color: var(--ink-3); font-weight: 400; }

.day-chips { display: flex; gap: 8px; }
.day-chips button { flex: 1; padding: 9px 4px; border-radius: 11px; border: 1.5px solid var(--line); background: #fff; font-size: 13px; font-weight: 700; color: var(--ink-2); line-height: 1.3; }
.day-chips button small { display: block; font-size: 10.5px; color: var(--ink-3); font-weight: 500; }
.day-chips button.on { border-color: var(--brand-2); background: var(--brand-soft); color: var(--brand-2); }
.day-chips button.on small { color: var(--brand-2); opacity: .8; }

.succ { text-align: center; padding: 26px 10px 8px; }
.succ .ic { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); animation: pop .4s cubic-bezier(.2, 1.4, .4, 1) both; }
.succ .ic .icon { width: 38px; height: 38px; stroke-width: 2.6; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.succ h2 { margin: 0 0 6px; font-size: 20px; }
.succ p { margin: 0; color: var(--ink-3); font-size: 13.5px; }
.succ .no { display: inline-block; margin-top: 14px; padding: 9px 18px; border-radius: 12px; background: var(--line-2); font-weight: 800; letter-spacing: 1px; font-size: 16px; font-variant-numeric: tabular-nums; }

/* 客户订单列表 */
.o-card { background: #fff; border-radius: 15px; padding: 14px; box-shadow: var(--shadow); margin-bottom: 11px; }
.o-card .hd { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.o-card .hd .no { font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .3px; }
.o-card .hd .tm { font-size: 11.5px; color: var(--ink-3); margin-left: auto; }
.o-card .thumbs { display: flex; gap: 6px; overflow: hidden; margin-bottom: 10px; }
.o-card .thumbs .t { width: 46px; height: 46px; border-radius: 9px; overflow: hidden; background: #f0f4fa; flex: none; }
.o-card .thumbs .t img { width: 100%; height: 100%; object-fit: cover; }
.o-card .thumbs .t .ph { width: 100%; height: 100%; display: grid; place-items: center; font-size: 18px; }
.o-card .thumbs .more { width: 46px; height: 46px; border-radius: 9px; background: var(--line-2); display: grid; place-items: center; font-size: 11px; color: var(--ink-3); font-weight: 700; flex: none; }
.o-card .ft { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; border-top: 1px dashed var(--line); }
.o-card .ft .q { font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 3px; }
.o-card .ft .q .ochev { width: 14px; height: 14px; transform: rotate(90deg); transition: transform .2s; }
.o-card.open .ft .ochev { transform: rotate(-90deg); }
.o-card .ft .p { color: var(--price); font-weight: 800; font-size: 16px; }
.o-card .items-detail { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); display: none; }
.o-card.open .items-detail { display: block; }
.o-card .items-detail .r { display: flex; justify-content: space-between; font-size: 12.5px; padding: 4px 0; color: var(--ink-2); gap: 10px; }
.o-card .items-detail .r .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.o-card .items-detail .r .v { flex: none; font-variant-numeric: tabular-nums; color: var(--ink-3); }

/* ============================== 内部版 ============================== */

.a-app { max-width: 720px; margin: 0 auto; min-height: 100vh; background: #f4f6fa; padding-bottom: calc(76px + var(--safe-b)); }
.a-head {
  background: #0e1e38; color: #fff; padding: 14px 16px; position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 10px;
}
.a-head h1 { font-size: 16px; font-weight: 800; margin: 0; display: flex; align-items: center; gap: 7px; }
.a-head .sp { flex: 1; }
.a-head .who { font-size: 11px; opacity: .6; }
.a-head .icon-btn { background: rgba(255, 255, 255, .12); color: #fff; width: 32px; height: 32px; }

.a-sec { padding: 14px 14px 0; }
.a-sec h2 { font-size: 13px; font-weight: 800; color: var(--ink-3); text-transform: uppercase; letter-spacing: .6px; margin: 0 0 9px 2px; }

.a-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 4px; }
.a-stat { background: #fff; border-radius: 13px; padding: 11px 10px; box-shadow: var(--shadow); }
.a-stat .k { font-size: 10.5px; color: var(--ink-3); font-weight: 600; white-space: nowrap; }
.a-stat .v { font-size: 18px; font-weight: 800; margin-top: 2px; font-variant-numeric: tabular-nums; letter-spacing: -.4px; white-space: nowrap; }
.a-stat.amber .v { color: var(--accent); }
.a-stat.blue .v { color: var(--brand-2); }
.a-stat.green .v { color: var(--ok); }
.a-stat.red .v { color: var(--danger); }

.a-toolbar { display: flex; gap: 8px; align-items: center; margin: 2px 0 10px; }
.a-search { position: relative; flex: 1; }
.a-search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); width: 18px; height: 18px; }
.a-search input { width: 100%; height: 40px; border-radius: 11px; border: 1.5px solid var(--line); background: #fff; padding: 0 12px 0 36px; font-size: 14px; outline: none; }

.a-order { background: #fff; border-radius: 14px; padding: 13px; box-shadow: var(--shadow); margin-bottom: 10px; border-left: 4px solid transparent; }
.a-order.is-pending { border-left-color: var(--accent); }
.a-order.is-confirmed { border-left-color: var(--brand-2); }
.a-order.is-done { border-left-color: var(--ok); }
.a-order.is-cancelled { border-left-color: #d3dae5; opacity: .75; }
.a-order .top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.a-order .no { font-weight: 800; font-size: 13.5px; font-variant-numeric: tabular-nums; letter-spacing: .2px; }
.a-order .tm { font-size: 11.5px; color: var(--ink-3); margin-left: auto; white-space: nowrap; }
.a-order .cli { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); margin-bottom: 8px; flex-wrap: wrap; }
.a-order .cli b { color: var(--ink); }
.a-order .cli a { color: var(--brand-2); font-weight: 700; display: inline-flex; align-items: center; gap: 3px; }
.a-order .items { background: var(--line-2); border-radius: 10px; padding: 8px 10px; margin-bottom: 9px; }
.a-order .items .r { display: flex; gap: 8px; font-size: 12.5px; padding: 3px 0; color: var(--ink-2); }
.a-order .items .r .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-order .items .r .q { flex: none; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.a-order .items .r .q.short { color: var(--danger); }
.a-order .note { font-size: 12px; color: #8a5a00; background: #fff8ec; border-radius: 8px; padding: 6px 9px; margin-bottom: 9px; }
.a-order .btm { display: flex; align-items: center; gap: 8px; }
.a-order .tot { font-weight: 800; color: var(--price); font-size: 16px; font-variant-numeric: tabular-nums; }
.a-order .tot small { color: var(--ink-3); font-weight: 600; font-size: 11px; }
.a-order .acts { margin-left: auto; display: flex; gap: 7px; }

.a-prod { display: flex; gap: 11px; background: #fff; border-radius: 13px; padding: 10px; box-shadow: var(--shadow); margin-bottom: 9px; align-items: center; }
.a-prod .th { width: 56px; height: 56px; border-radius: 10px; overflow: hidden; background: #f0f4fa; flex: none; }
.a-prod .th img { width: 100%; height: 100%; object-fit: cover; }
.a-prod .th .ph { width: 100%; height: 100%; display: grid; place-items: center; font-size: 22px; }
.a-prod .in { flex: 1; min-width: 0; }
.a-prod .in .t { font-size: 13.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-prod .in .t2 { font-size: 11.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-prod .in .m { display: flex; align-items: center; gap: 7px; margin-top: 3px; font-size: 11.5px; color: var(--ink-3); flex-wrap: wrap; }
.a-prod .in .m .p { color: var(--price); font-weight: 800; font-size: 13.5px; }
.a-prod .st { text-align: right; flex: none; }
.a-prod .st .n { font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; }
.a-prod .st .n.low { color: var(--danger); }
.a-prod .st .u { font-size: 10.5px; color: var(--ink-3); }
.a-prod.off { opacity: .78; }

.a-cat { display: flex; align-items: center; gap: 11px; background: #fff; border-radius: 13px; padding: 11px 13px; box-shadow: var(--shadow); margin-bottom: 9px; }
.a-cat .em { width: 40px; height: 40px; border-radius: 11px; background: var(--line-2); display: grid; place-items: center; font-size: 20px; flex: none; }
.a-cat .in { flex: 1; min-width: 0; }
.a-cat .in .t { font-weight: 700; font-size: 14px; }
.a-cat .in .t2 { font-size: 11.5px; color: var(--ink-3); }
.a-cat .acts { display: flex; gap: 5px; }

.a-nav {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 720px; z-index: 45;
  background: rgba(255, 255, 255, .97); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
  display: flex; padding-bottom: var(--safe-b);
}
.a-nav button { flex: 1; padding: 7px 0 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--ink-3); position: relative; }
.a-nav button.on { color: var(--brand-2); }
.a-nav button .icon { width: 22px; height: 22px; }
.a-nav button span { font-size: 10.5px; font-weight: 700; }
.a-nav .dot { position: absolute; top: 4px; right: 50%; margin-right: -17px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center; animation: pulse 1.6s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(226, 59, 59, .5); } 50% { box-shadow: 0 0 0 6px rgba(226, 59, 59, 0); } }

/* 新订单横幅 */
.a-banner {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%) translateY(-130%);
  width: 100%; max-width: 720px; z-index: 120;
  background: linear-gradient(135deg, #ff9426, #f4660a); color: #fff;
  padding: 13px 16px; display: flex; align-items: center; gap: 11px;
  box-shadow: 0 10px 26px rgba(244, 102, 10, .4);
  transition: transform .32s cubic-bezier(.2, .9, .3, 1.1); border-radius: 0 0 16px 16px;
}
.a-banner.show { transform: translateX(-50%) translateY(0); }
.a-banner .ic { width: 38px; height: 38px; border-radius: 11px; background: rgba(255, 255, 255, .2); display: grid; place-items: center; flex: none; }
.a-banner .tx { flex: 1; min-width: 0; }
.a-banner .tx b { font-size: 14.5px; display: block; }
.a-banner .tx span { font-size: 12px; opacity: .9; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-banner .see { background: #fff; color: #d4560a; font-weight: 800; font-size: 13px; padding: 7px 13px; border-radius: 9px; flex: none; }

/* 登录页 */
.login-wrap {
  position: relative; min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 34px 22px calc(34px + var(--safe-b));
  overflow: hidden;
  background:
    radial-gradient(900px 540px at 10% -12%, rgba(52, 118, 235, .55), transparent 62%),
    radial-gradient(760px 520px at 96% 112%, rgba(245, 154, 46, .14), transparent 58%),
    linear-gradient(165deg, #0e2749 0%, #0a1a2f 52%, #060e1b 100%);
}
.login-wrap::before {
  content: ""; position: absolute; inset: -10%;
  background-image:
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 68%);
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 68%);
  pointer-events: none;
}
.login-inner { position: relative; z-index: 1; width: 100%; max-width: 420px; }
.login-brand { text-align: center; }
.lg-logo {
  display: block; width: 212px; max-width: 64vw; height: auto;
  margin: 0 auto 12px;
  filter: drop-shadow(0 14px 30px rgba(0, 0, 0, .5));
  animation: lgIn .6s cubic-bezier(.2, .8, .3, 1) both;
}
.lg-title { margin: 0 0 7px; color: #fff; font-size: 20px; font-weight: 800; letter-spacing: 1.5px; }
.lg-sub { margin: 0 0 22px; color: rgba(255, 255, 255, .52); font-size: 12.5px; letter-spacing: .8px; }
.lg-card {
  width: 100%; padding: 20px 20px 18px; border-radius: 20px;
  background: linear-gradient(180deg, rgba(38, 70, 118, .58), rgba(13, 28, 50, .62));
  border: 1px solid rgba(255, 255, 255, .13);
  -webkit-backdrop-filter: blur(20px) saturate(1.2); backdrop-filter: blur(20px) saturate(1.2);
  box-shadow: 0 28px 60px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .14);
  animation: lgIn .6s cubic-bezier(.2, .8, .3, 1) .08s both;
}
@keyframes lgIn { from { opacity: 0; transform: translateY(16px); } }
.lg-card-head { display: flex; align-items: center; gap: 7px; margin-bottom: 16px; font-size: 11.5px; font-weight: 700; letter-spacing: 1.2px; color: rgba(255, 255, 255, .5); }
.lg-dot { width: 7px; height: 7px; border-radius: 50%; background: #46d18d; box-shadow: 0 0 0 3px rgba(70, 209, 141, .16); }
.lg-label { display: block; margin: 0 0 7px 3px; font-size: 11.5px; font-weight: 700; letter-spacing: .8px; color: rgba(255, 255, 255, .5); }
.lg-card .pin {
  width: 100%; height: 56px; border-radius: 13px; border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .96); color: #0d1c33; text-align: center;
  font-size: 24px; font-weight: 800; letter-spacing: 12px; outline: none;
  transition: box-shadow .15s, border-color .15s, background .15s;
}
.lg-card .pin::placeholder { font-size: 13.5px; font-weight: 500; letter-spacing: 1px; color: #9aa8bd; }
.lg-card .pin:focus { border-color: rgba(255, 255, 255, .85); box-shadow: 0 0 0 4px rgba(120, 170, 255, .22); background: #fff; }
.lg-btn {
  width: 100%; height: 52px; margin-top: 14px; font-size: 15.5px; letter-spacing: 1.5px;
  background: linear-gradient(135deg, #ff9a2b, #f2660a);
  box-shadow: 0 12px 26px rgba(242, 102, 10, .32);
}
.lg-btn:active { transform: scale(.985); }
.lg-tip { margin: 13px 0 0; color: rgba(255, 255, 255, .38); font-size: 11px; line-height: 1.65; text-align: center; letter-spacing: .2px; }
.lg-foot { position: relative; z-index: 1; margin-top: 26px; color: rgba(255, 255, 255, .24); font-size: 10.5px; letter-spacing: .8px; }

@media (min-width: 900px) {
  .login-wrap { padding: 48px; }
  .login-inner { max-width: 1000px; display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 76px; align-items: center; }
  .login-brand { text-align: left; }
  .lg-logo { width: 380px; margin: 0 0 28px; }
  .lg-title { font-size: 27px; letter-spacing: 2px; }
  .lg-sub { font-size: 14px; margin-bottom: 0; }
  .lg-card { padding: 26px 24px 22px; }
  .lg-foot { position: absolute; bottom: 22px; margin: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .lg-logo, .lg-card { animation: none; }
}

/* 导入 */
.dropzone {
  border: 2px dashed #c8d4e6; border-radius: 15px; background: #fff; padding: 26px 16px; text-align: center;
  transition: all .18s;
}
.dropzone.hot { border-color: var(--brand-2); background: var(--brand-soft); }
.dropzone .em { font-size: 34px; }
.dropzone b { display: block; margin-top: 8px; font-size: 14.5px; }
.dropzone span { font-size: 12px; color: var(--ink-3); display: block; margin-top: 4px; line-height: 1.5; }

.tbl-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; max-height: 52vh; }
table.tbl { border-collapse: collapse; font-size: 12.5px; width: 100%; white-space: nowrap; }
table.tbl th { position: sticky; top: 0; background: #f7f9fd; font-size: 11.5px; color: var(--ink-3); font-weight: 700; text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); z-index: 1; }
table.tbl td { padding: 8px 10px; border-bottom: 1px solid var(--line-2); }
table.tbl tr.bad td { background: #fff5f5; }
table.tbl tr.new td { background: #f2fbf7; }

/* 设置 */
.set-group { background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 14px; margin-bottom: 12px; }
.set-row { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.set-row:last-child { border-bottom: 0; padding-bottom: 0; }
.set-row .k { font-size: 13.5px; color: var(--ink-2); flex: 1; }
.set-row .v { font-size: 13px; color: var(--ink-3); }

.kv { display: grid; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.kv div { display: flex; gap: 8px; }
.kv span { min-width: 0; word-break: break-all; }
.kv b { color: var(--ink-3); font-weight: 600; min-width: 62px; flex: none; }

/* 图片选择 */
.img-pick { display: flex; gap: 12px; align-items: flex-start; }
.img-pick .pv { width: 92px; height: 92px; border-radius: 12px; overflow: hidden; background: var(--line-2); flex: none; display: grid; place-items: center; font-size: 30px; color: var(--ink-3); border: 1.5px solid var(--line); position: relative; }
.img-pick .pv img { width: 100%; height: 100%; object-fit: cover; }
.img-pick .ops { display: flex; flex-direction: column; gap: 7px; }
.img-pick .ops .btn { height: 34px; font-size: 13px; padding: 0 12px; }
.img-pick .ops .del { color: var(--danger); background: var(--danger-soft); }

@media (max-width: 380px) {
  .a-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .c-card .nm { font-size: 13px; min-height: 34px; }
}

/* 电脑上后台拉宽成两列，仓库用大屏也顺手 */
@media (min-width: 900px) {
  .a-app { max-width: 1080px; }
  .a-head, .a-nav, .a-banner { max-width: 1080px; }
  #orderList, #prodList { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: start; }
  #orderList > .empty, #prodList > .empty { grid-column: 1 / -1; }
  .a-order, .a-prod { margin-bottom: 0; }
  .a-sec { padding: 16px 20px 0; }
  .sheet { max-width: 560px; left: 50%; transform: translate(-50%, 102%); }
  .sheet.show { transform: translate(-50%, 0); }
  .sheet.modal { max-width: 400px; transform: translate(-50%, -46%) scale(.97); }
  .sheet.modal.show { transform: translate(-50%, -50%) scale(1); }
}
@media (min-width: 900px) {
  .a-nav { max-width: 640px; border-radius: 16px 16px 0 0; }
}

/* ---------------- 批量选择 ---------------- */
.sel-bar {
  display: flex; align-items: center; gap: 9px;
  background: #0e1e38; color: #fff; border-radius: 12px;
  padding: 8px 10px 8px 12px; margin-bottom: 11px;
  box-shadow: 0 6px 16px rgba(14, 30, 56, .18);
}
.sel-bar .n { font-size: 12.5px; opacity: .78; white-space: nowrap; }
.sel-bar .n b { color: #fff; font-size: 14px; opacity: 1; }
.sel-bar .sp { flex: 1; }
.sel-bar .btn.sm { height: 32px; padding: 0 13px; background: rgba(255, 255, 255, .16); color: #fff; }
.sel-bar .btn.sm.danger { background: var(--danger); }
.sel-check { height: 32px; padding: 0 12px; border-radius: 9px; background: rgba(255, 255, 255, .16); color: #fff; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.cbox { width: 22px; height: 22px; border-radius: 7px; border: 2px solid #c7d2e2; background: #fff; flex: none; display: grid; place-items: center; transition: background .12s, border-color .12s; }
.cbox.on { background: var(--brand-2); border-color: var(--brand-2); }
.cbox.on::after { content: ""; width: 10px; height: 6px; border-left: 2.4px solid #fff; border-bottom: 2.4px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
.a-prod.sel { box-shadow: 0 0 0 2px var(--brand-2); }
.a-order.sel { box-shadow: 0 0 0 2px var(--brand-2), 0 2px 10px rgba(16, 35, 68, .06); }

/* ---------------- 品牌字标 ---------------- */
.a-brand { margin: 0; display: flex; align-items: center; }
.a-brand-logo { height: 26px; width: auto; display: block; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .4)); }

/* ---------------- 导入方式选择 ---------------- */
.imp-modes { display: grid; gap: 8px; margin-bottom: 12px; }
.imp-mode {
  display: flex; align-items: flex-start; gap: 11px; text-align: left; width: 100%;
  padding: 12px 14px; border-radius: 13px; background: #fff;
  border: 1.5px solid var(--line); box-shadow: var(--shadow);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.imp-mode .em { font-size: 20px; line-height: 1.15; }
.imp-mode .tx { min-width: 0; }
.imp-mode .tx b { display: block; font-size: 14px; color: var(--ink); }
.imp-mode .tx i { display: block; font-style: normal; font-size: 11.5px; color: var(--ink-3); margin-top: 3px; line-height: 1.55; }
.imp-mode.on { border-color: var(--brand-2); background: var(--brand-soft); box-shadow: 0 4px 14px rgba(31, 86, 196, .12); }
.imp-mode.on .tx b { color: var(--brand-2); }
.imp-summary { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; }
.imp-summary b { font-variant-numeric: tabular-nums; }

/* ---------------- 横向滚动条（分类） ---------------- */
.chiprow { cursor: grab; }
.chiprow.dragging { cursor: grabbing; scroll-behavior: auto; }
.chipnav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 27px; height: 27px; border-radius: 50%; z-index: 4;
  display: none; place-items: center;
  background: rgba(255, 255, 255, .96); color: var(--ink-2);
  border: 1px solid var(--line); box-shadow: 0 3px 10px rgba(16, 35, 68, .18);
  font-size: 17px; line-height: 1; padding: 0 0 2px;
}
.chipnav.prev { left: 3px; }
.chipnav.next { right: 3px; }
.chipnav:active { background: var(--line-2); }
.chipnav:not([hidden]) { display: grid; }

/* 分类条两侧渐隐，箭头压在上面也不突兀 */
.c-cats::before, .c-cats::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 42px; z-index: 3;
  pointer-events: none; opacity: 0; transition: opacity .18s;
}
.c-cats::before { left: 0; background: linear-gradient(90deg, #f6f8fc 45%, rgba(246, 248, 252, 0)); }
.c-cats::after { right: 0; background: linear-gradient(270deg, #f6f8fc 45%, rgba(246, 248, 252, 0)); }
.c-cats.can-scroll::after { opacity: 1; }
.c-cats.can-scroll.can-left::before { opacity: 1; }

/* 扫码卡片 */
.qr-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.qr-item { text-align: center; }
.qr-item img {
  width: 100%; max-width: 152px; aspect-ratio: 1 / 1; display: block; margin: 0 auto 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 6px;
}
.qr-item img[src=""] { visibility: hidden; }
.qr-item b { display: block; font-size: 12.5px; }
.qr-item span { display: block; font-size: 11px; color: var(--ink-3); margin-top: 2px; line-height: 1.4; }

/* 二级分类（品牌） */
.c-cats.sub { padding: 0 0 8px; border-bottom: 1px solid var(--line); }
.c-cats.sub .inner { padding-top: 2px; }
.c-cats.sub .chip.sm { height: 30px; padding: 0 11px; font-size: 12.5px; }
.c-cats.sub .chip.sm.on { background: var(--brand); color: #fff; border-color: var(--brand); }

/* 二级分类（后台） */
.a-cat.sub-cat { margin-left: 26px; background: #fafcff; }
.a-cat.sub-cat .em { opacity: .7; font-size: 15px; }
.sub-mark { color: var(--ink-3); font-size: 12px; }
.chiprow.sub .chip.sm { height: 30px; padding: 0 11px; font-size: 12.5px; }
.chiprow.sub .chip.sm.on { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ---------- 客户登录门禁 ---------- */
body.gated { overflow: hidden; }
.gate {
  position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  padding: 22px; background: linear-gradient(160deg, #0d2b5b 0%, #17418c 55%, #1f56c4 100%);
}
.gate[hidden] { display: none; }
.gate-card {
  width: 100%; max-width: 360px; background: #fff; border-radius: 18px; padding: 26px 22px 22px;
  box-shadow: 0 24px 60px rgba(6, 20, 48, .38); text-align: center;
}
.gate-logo {
  width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 16px; display: grid; place-items: center;
  background: linear-gradient(150deg, #17418c, #2b6be0); color: #fff;
}
.gate-card h2 { font-size: 19px; margin: 0 0 6px; color: var(--ink); }
.gate-card p { font-size: 13px; color: var(--ink-3); margin: 0 0 18px; line-height: 1.55; }
.gate-label { display: block; text-align: left; font-size: 12px; font-weight: 700; color: var(--ink-3); margin: 12px 0 6px; }
.gate-input {
  width: 100%; height: 44px; border-radius: 11px; border: 1.5px solid var(--line);
  padding: 0 13px; font-size: 15px; font-weight: 600; color: var(--ink); background: #f8fafd;
}
.gate-input:focus { outline: none; border-color: var(--brand-2); background: #fff; }
.gate-err { min-height: 18px; font-size: 12.5px; color: var(--danger); margin: 10px 0 4px; font-weight: 600; }
.gate-card .btn { height: 46px; font-size: 15px; }
.gate-tip { font-size: 11.5px; color: var(--ink-3); margin-top: 14px; }

/* 头部账号 */
.c-acc { position: absolute; right: 12px; bottom: 10px; display: flex; align-items: center; gap: 6px; }
.c-acc-name {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 20px;
  background: rgba(255, 255, 255, .16); color: #fff; font-size: 12px; font-weight: 700; max-width: 130px;
}
.c-acc-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-acc-out {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .16); color: #fff;
}
.chip.mine { background: linear-gradient(135deg, #ff8a3d, #f2621b); color: #fff; border-color: #f2621b; font-weight: 800; }
.chip.mine.on { box-shadow: 0 6px 16px rgba(242, 98, 27, .38); }

.chipwrap { position: relative; }

/* 分类树：收起/展开 */
.cat-toggle { color: var(--ink-2); }
.cat-toggle svg { transition: transform .18s; }
.cat-toggle.rotated svg { transform: rotate(-90deg); }
.sub-count {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 20px;
  background: var(--line-2); color: var(--ink-3); font-size: 11px; font-weight: 700;
}
