/* ============================================================
   首伽供应链 · 视觉体系
   毛玻璃质感 / 自适应 / 近黑墨色 + 靛蓝点缀
   ============================================================ */
:root {
  --bg1: #e9eef7;
  --bg2: #f6f8fc;
  --ink: #0e121b;
  --ink-2: #39425a;
  --ink-3: #6b7488;
  --ink-4: #9aa2b4;

  --glass: rgba(255, 255, 255, 0.58);
  --glass-2: rgba(255, 255, 255, 0.74);
  --glass-solid: rgba(255, 255, 255, 0.94);
  --glass-brd: rgba(255, 255, 255, 0.7);
  --line: rgba(14, 18, 27, 0.08);
  --line-2: rgba(14, 18, 27, 0.14);

  --brand: #4f46e5;
  --brand-2: #7c6cf6;
  --brand-soft: rgba(79, 70, 229, 0.1);
  --ok: #0e9b6b;
  --ok-soft: rgba(14, 155, 107, 0.12);
  --warn: #b8791a;
  --warn-soft: rgba(184, 121, 26, 0.13);
  --danger: #cf4436;
  --danger-soft: rgba(207, 68, 54, 0.12);
  --gold: #a8804a;
  --gold-soft: rgba(168, 128, 74, 0.13);

  --r-xl: 28px;
  --r-lg: 22px;
  --r-md: 15px;
  --r-sm: 11px;

  --shadow: 0 12px 38px rgba(18, 26, 50, 0.09), 0 2px 8px rgba(18, 26, 50, 0.045);
  --shadow-sm: 0 4px 16px rgba(18, 26, 50, 0.07);
  --shadow-lg: 0 28px 70px rgba(18, 26, 50, 0.18);
  --blur: blur(20px) saturate(175%);
  --topbar-h: 64px;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg2);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-wrap: break-word;
}

/* 背景色斑（毛玻璃的底色来源，克制：低饱和、大范围） */
.orbs { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: linear-gradient(170deg, var(--bg1), var(--bg2) 55%, #eef1f8); }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.7; }
.orb-a { width: 46vw; height: 46vw; left: -12vw; top: -14vw; background: #c3cffb; }
.orb-b { width: 38vw; height: 38vw; right: -10vw; top: 4vw; background: #ffd8e6; opacity: 0.55; }
.orb-c { width: 42vw; height: 42vw; left: 22vw; bottom: -20vw; background: #c2eee4; opacity: 0.5; }

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -0.025em; line-height: 1.25; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ---------------- 玻璃基元 ---------------- */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-brd);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}
.glass-2 { background: var(--glass-2); }
.glass-flat { box-shadow: var(--shadow-sm); }

/* ---------------- 顶栏 ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 40; height: var(--topbar-h);
  display: flex; align-items: center; gap: 18px;
  padding: 0 22px;
  background: rgba(255, 255, 255, 0.62);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 1px 0 rgba(14, 18, 27, 0.04), 0 8px 26px rgba(18, 26, 50, 0.05);
}
.brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(145deg, #1b2136, #0d1120);
  color: #fff; box-shadow: 0 6px 16px rgba(13, 17, 32, 0.3);
}
.brand-txt { display: flex; flex-direction: column; line-height: 1.15; }
.brand-txt b { font-size: 16px; letter-spacing: 0.06em; font-weight: 650; }
.brand-txt span { font-size: 10px; color: var(--ink-4); letter-spacing: 0.22em; }

.nav { display: flex; align-items: center; gap: 4px; flex: 1 1 auto; min-width: 0; }
.nav a {
  padding: 8px 14px; border-radius: 999px; font-size: 13.5px; color: var(--ink-2);
  white-space: nowrap; transition: 0.18s;
}
.nav a:hover { background: rgba(255, 255, 255, 0.7); color: var(--ink); }
.nav a.on { background: rgba(14, 18, 27, 0.9); color: #fff; }

.topbar-right { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 17px; border-radius: 999px; border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.72); color: var(--ink);
  font-size: 13.5px; cursor: pointer; white-space: nowrap;
  transition: transform 0.14s, background 0.18s, box-shadow 0.18s, border-color 0.18s;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: #12162a; color: #fff; box-shadow: 0 8px 20px rgba(18, 22, 42, 0.26); }
.btn-primary:hover { background: #1c2140; }
.btn-ghost { background: rgba(255, 255, 255, 0.5); border-color: rgba(255, 255, 255, 0.85); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.85); }
.btn-line { background: transparent; border-color: var(--line-2); }
.btn-line:hover { background: rgba(255, 255, 255, 0.6); }
.btn-brand { background: var(--brand); color: #fff; box-shadow: 0 8px 20px rgba(79, 70, 229, 0.28); }
.btn-brand:hover { background: #423ac9; }
.btn-danger { background: var(--danger-soft); color: var(--danger); border-color: rgba(207, 68, 54, 0.2); }
.btn-danger:hover { background: rgba(207, 68, 54, 0.18); }
.btn-sm { height: 31px; padding: 0 12px; font-size: 12.5px; }
.btn-xs { height: 26px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn-icon { width: 38px; padding: 0; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }

/* ---------------- 布局 ---------------- */
/* ⚠️ .wrap 负责横向留白；.page 只能设置纵向 padding。
   两者都作用在 <main class="wrap page"> 上，且 .page 定义在后——
   一旦 .page 写了 padding 简写，横向 22px 会被冲成 0，>860px 时内容整体贴边被裁。 */
.wrap { max-width: 1440px; margin: 0 auto; padding: 0 22px; }
.page { padding-top: 26px; padding-bottom: 70px; }

/* ---------------- Hero ---------------- */
/* 页头：只保留标题，搜索框与统计数字已移到商品列表下方（不占首屏） */
.hero { padding: 24px 0 18px; }
.hero h1 { font-size: clamp(23px, 2.8vw, 36px); letter-spacing: -0.035em; font-weight: 660; }
.hero h1 em { font-style: normal; color: var(--brand); }

.searchbar {
  display: flex; align-items: center; gap: 10px; padding: 9px 9px 9px 18px;
  border-radius: 999px; background: var(--glass-2);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--glass-brd); box-shadow: var(--shadow); max-width: 760px;
}
.searchbar input { flex: 1; border: 0; background: transparent; outline: none; height: 40px; font-size: 15px; }
.searchbar input::placeholder { color: var(--ink-4); }

/* ---------------- 底部检索 + 平台概览 ---------------- */
.page-foot { padding: 24px 26px; margin-top: 34px; }
.pf-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 30px; align-items: center; }
.pf-search h2 { font-size: 19px; }
.pf-search p.sub { margin: 9px 0 16px; color: var(--ink-3); font-size: 13.5px; max-width: 580px; }
.pf-search .searchbar { max-width: 100%; }
.pf-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pf-stats > div {
  padding: 14px 16px; border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.68); border: 1px solid rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-sm);
}
.pf-stats em { font-style: normal; display: block; font-size: 11.5px; color: var(--ink-4); letter-spacing: 0.06em; }
.pf-stats b { display: block; margin-top: 2px; font-size: 25px; font-weight: 640; letter-spacing: -0.035em; line-height: 1.15; }

/* ---------------- 筛选 ---------------- */
.filters { padding: 15px 18px; margin-bottom: 20px; display: grid; gap: 13px; }
/* 类目胶囊：手机/小屏单行横滑（右侧渐隐提示还有更多），
   ≥768px 换行全部铺开——此前 1024~1440 会无提示地藏掉 1~5 个类目。 */
.chips {
  display: flex; flex-wrap: nowrap; gap: 8px;
  overflow-x: auto; padding-bottom: 3px; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 30px), transparent 100%);
  mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 30px), transparent 100%);
}
.chips::-webkit-scrollbar { display: none; }
@media (min-width: 768px) {
  .chips {
    flex-wrap: wrap; overflow-x: visible;
    -webkit-mask-image: none; mask-image: none;
  }
}
.chip {
  flex: 0 0 auto; height: 33px; padding: 0 15px; border-radius: 999px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255, 255, 255, 0.55); border: 1px solid rgba(255, 255, 255, 0.8);
  color: var(--ink-2); font-size: 13px; transition: 0.16s;
}
.chip:hover { background: rgba(255, 255, 255, 0.92); }
.chip.on { background: #12162a; color: #fff; border-color: #12162a; }
.chip i { font-style: normal; font-size: 11px; opacity: 0.55; }

.filter-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filter-row .grow { flex: 1 1 auto; }

select, input[type="text"], input[type="number"], input[type="password"], input[type="search"], textarea {
  height: 38px; padding: 0 13px; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.8);
  outline: none; transition: 0.16s; width: 100%;
}
textarea { height: auto; padding: 10px 13px; resize: vertical; line-height: 1.6; }
select { cursor: pointer; appearance: none; padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4.5 6 8.5 10 4.5' fill='none' stroke='%236b7488' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; }
select:focus, input:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); background: #fff; }

/* ---------------- 商品网格 ---------------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 18px; }

.card {
  background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--glass-brd); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm); overflow: hidden; cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 0.22s, border-color 0.22s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #fff; }

.card-img { position: relative; aspect-ratio: 4 / 3; background: rgba(255, 255, 255, 0.5); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s; }
.card:hover .card-img img { transform: scale(1.045); }
.card-img .ph { width: 100%; height: 100%; display: grid; place-items: center; color: var(--ink-4); font-size: 12px; letter-spacing: 0.1em; }
.card-badges { position: absolute; left: 10px; top: 10px; display: flex; gap: 6px; flex-wrap: wrap; max-width: calc(100% - 20px); }

.card-body { padding: 13px 15px 15px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.card-title { font-size: 14px; font-weight: 600; line-height: 1.42; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 40px; }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 11.5px; color: var(--ink-4); }
.card-meta b { font-weight: 500; color: var(--ink-3); }

.price-row { display: flex; align-items: flex-end; gap: 12px; margin-top: auto; }
.price-row .p-main { display: flex; flex-direction: column; }
.price-row .p-main em { font-style: normal; font-size: 10.5px; color: var(--ink-4); letter-spacing: 0.08em; }
.price-row .p-main b { font-size: 21px; font-weight: 640; letter-spacing: -0.03em; color: var(--brand); line-height: 1.15; }
.price-row .p-sub { margin-left: auto; text-align: right; display: flex; flex-direction: column; gap: 1px; }
.price-row .p-sub span { font-size: 11.5px; color: var(--ink-3); }

.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding-top: 10px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--ink-4); }
.card-foot .sup { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-2); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 标签 */
.tag { display: inline-flex; align-items: center; height: 21px; padding: 0 9px; border-radius: 999px;
  font-size: 11px; letter-spacing: 0.02em; background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.9); color: var(--ink-2); box-shadow: 0 1px 4px rgba(18, 26, 50, 0.06); }
.tag-brand { background: var(--brand-soft); color: var(--brand); border-color: rgba(79, 70, 229, 0.18); }
.tag-ok { background: var(--ok-soft); color: var(--ok); border-color: rgba(14, 155, 107, 0.2); }
.tag-warn { background: var(--warn-soft); color: var(--warn); border-color: rgba(184, 121, 26, 0.2); }
.tag-danger { background: var(--danger-soft); color: var(--danger); border-color: rgba(207, 68, 54, 0.2); }
.tag-gold { background: var(--gold-soft); color: var(--gold); border-color: rgba(168, 128, 74, 0.22); }
.tag-ghost { background: rgba(255, 255, 255, 0.55); color: var(--ink-3); }
.tag-lg { height: 25px; padding: 0 11px; font-size: 12px; }

/* ---------------- 分页 / 空状态 ---------------- */
.pager { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 32px; flex-wrap: wrap; }
.pager button { min-width: 36px; height: 36px; padding: 0 11px; border-radius: 10px; border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.7); cursor: pointer; transition: 0.16s; }
.pager button:hover:not([disabled]) { background: #fff; }
.pager button.on { background: #12162a; color: #fff; border-color: #12162a; }
.pager button[disabled] { opacity: 0.4; }

.empty { text-align: center; padding: 76px 20px; color: var(--ink-3); }
.empty .ico { font-size: 34px; opacity: 0.35; margin-bottom: 12px; }
.empty b { display: block; font-size: 15px; color: var(--ink-2); margin-bottom: 6px; }

/* ---------------- 模态 ---------------- */
.mask {
  position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center;
  background: rgba(16, 22, 40, 0.34); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  padding: 22px; animation: fade 0.2s ease;
}
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(0.985) } to { opacity: 1; transform: none } }
.modal {
  width: 100%; max-width: 900px; max-height: 90vh; overflow: auto;
  background: rgba(255, 255, 255, 0.9); -webkit-backdrop-filter: blur(30px) saturate(180%);
  backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.9); border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg); animation: pop 0.26s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.modal-head { position: sticky; top: 0; display: flex; align-items: center; gap: 12px;
  padding: 18px 22px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); z-index: 2; }
.modal-head h3 { font-size: 16px; flex: 1; min-width: 0; }
.modal-body { padding: 22px; }
.modal-foot { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 10px;
  padding: 15px 22px; border-top: 1px solid var(--line); background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.x-btn { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.6); cursor: pointer; display: grid; place-items: center; flex: 0 0 auto; }
.x-btn:hover { background: #fff; }

/* ---------------- 表单 ---------------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 15px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label { font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.field > label .req { color: var(--danger); margin-left: 2px; }
.field .hint { font-size: 11.5px; color: var(--ink-4); }
.field.span2 { grid-column: span 2; }
.field.span-all { grid-column: 1 / -1; }
@media (max-width: 640px) { .field.span2 { grid-column: span 1; } }

.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.switch input { display: none; }
.switch .tr { width: 40px; height: 23px; border-radius: 999px; background: rgba(14, 18, 27, 0.16); position: relative; transition: 0.2s; }
.switch .tr::after { content: ""; position: absolute; width: 17px; height: 17px; border-radius: 50%; background: #fff;
  top: 3px; left: 3px; transition: 0.2s; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); }
.switch input:checked + .tr { background: var(--brand); }
.switch input:checked + .tr::after { transform: translateX(17px); }

/* 图片上传 */
.drop {
  border: 1.5px dashed var(--line-2); border-radius: var(--r-md); padding: 22px; text-align: center;
  cursor: pointer; background: rgba(255, 255, 255, 0.5); transition: 0.18s; color: var(--ink-3); font-size: 13px;
}
.drop:hover, .drop.over { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.thumbs { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 11px; }
.thumb { position: relative; width: 84px; height: 84px; border-radius: var(--r-sm); overflow: hidden;
  border: 1px solid var(--line-2); background: #fff; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .del { position: absolute; right: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(14, 18, 27, 0.72); color: #fff; border: 0; cursor: pointer; font-size: 12px; line-height: 1; display: grid; place-items: center; }
.thumb .main { position: absolute; left: 3px; bottom: 3px; font-size: 10px; background: rgba(79, 70, 229, 0.9); color: #fff; padding: 1px 5px; border-radius: 4px; }
.thumb .setmain { position: absolute; left: 3px; bottom: 3px; font-size: 10px; background: rgba(14, 18, 27, 0.6); color: #fff; padding: 1px 5px; border-radius: 4px; border: 0; cursor: pointer; }

/* ---------------- 表格 ---------------- */
.tbl-wrap { overflow-x: auto; border-radius: var(--r-md); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th {
  text-align: left; padding: 11px 13px; font-weight: 550; font-size: 12px; color: var(--ink-3);
  background: rgba(255, 255, 255, 0.6); border-bottom: 1px solid var(--line); white-space: nowrap;
  position: sticky; top: 0; z-index: 1; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
table.tbl td { padding: 11px 13px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.tbl tbody tr { transition: background 0.15s; }
table.tbl tbody tr:hover { background: rgba(255, 255, 255, 0.62); }
table.tbl .t-title { max-width: 290px; font-weight: 550; }
table.tbl .t-title small { display: block; font-weight: 400; color: var(--ink-4); font-size: 11.5px; }
.t-cellimg { width: 42px; height: 42px; border-radius: 9px; object-fit: cover; border: 1px solid var(--line); background: #fff; display: block; }
.nowrap { white-space: nowrap; }
.t-actions { display: flex; gap: 6px; flex-wrap: nowrap; }

/* 表格内嵌输入（批量录入）：压缩内边距，保证价格/库存列数字看得全 */
table.tbl td input, table.tbl td select { height: 34px; padding: 0 9px; font-size: 12.5px; border-radius: 9px; }
table.tbl td input[type="number"] { padding-right: 4px; }
#bTbl { min-width: 1380px; }
#bTbl td { padding: 9px 8px; }

/* ---------------- 徽章 / 状态 ---------------- */
.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; margin-right: 5px; vertical-align: 1px; }
.dot-on { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.dot-off { background: var(--ink-4); }

/* ---------------- Tabs ---------------- */
.tabs { display: flex; gap: 3px; padding: 4px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.55); border: 1px solid rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: 0 0 auto; height: 32px; padding: 0 16px; border-radius: 999px; border: 0; background: transparent;
  font-size: 13px; color: var(--ink-2); cursor: pointer; transition: 0.18s; white-space: nowrap; }
.tabs button:hover { background: rgba(255, 255, 255, 0.75); }
.tabs button.on { background: #12162a; color: #fff; }

/* ---------------- 侧栏（后台） ---------------- */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px;
  padding: 18px 14px; border-right: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.5); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  overflow-y: auto;
}
.side .brand { padding: 4px 8px 16px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav .grp { font-size: 10.5px; letter-spacing: 0.16em; color: var(--ink-4); padding: 14px 12px 6px; text-transform: uppercase; }
.side-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--r-sm);
  font-size: 13.5px; color: var(--ink-2); cursor: pointer; transition: 0.16s; }
.side-nav a:hover { background: rgba(255, 255, 255, 0.78); color: var(--ink); }
.side-nav a.on { background: #12162a; color: #fff; box-shadow: 0 6px 16px rgba(18, 22, 42, 0.22); }
.side-nav a i { font-style: normal; width: 18px; text-align: center; opacity: 0.85; }
.side-foot { margin-top: auto; padding: 12px; border-radius: var(--r-md); background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.8); font-size: 12px; color: var(--ink-3); }
.main { min-width: 0; display: flex; flex-direction: column; }
.main-head { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 22px; background: rgba(255, 255, 255, 0.62); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border-bottom: 1px solid rgba(255, 255, 255, 0.7); }
.main-head h2 { font-size: 18px; }
.main-head .sub { font-size: 12.5px; color: var(--ink-4); }
.main-body { padding: 20px 22px 60px; flex: 1; }

/* ---------------- 卡片块 ---------------- */
.panel { padding: 18px; margin-bottom: 18px; }
.panel-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.panel-head h3 { font-size: 15px; flex: 1; min-width: 0; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 14px; }
.stat { padding: 16px 17px; border-radius: var(--r-md); background: var(--glass-2);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--glass-brd); box-shadow: var(--shadow-sm); }
.stat em { font-style: normal; font-size: 11.5px; color: var(--ink-4); letter-spacing: 0.06em; display: block; }
.stat b { font-size: 27px; font-weight: 620; letter-spacing: -0.035em; display: block; margin-top: 3px; }
.stat u { text-decoration: none; font-size: 11.5px; color: var(--ink-4); }

/* ---------------- 登录页 ---------------- */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 22px; }
.login-card { width: 100%; max-width: 404px; padding: 34px 30px; border-radius: var(--r-xl);
  background: rgba(255, 255, 255, 0.68); -webkit-backdrop-filter: blur(28px) saturate(180%);
  backdrop-filter: blur(28px) saturate(180%); border: 1px solid rgba(255, 255, 255, 0.85); box-shadow: var(--shadow-lg); }
.login-card .brand { justify-content: center; flex-direction: column; gap: 12px; margin-bottom: 22px; }
.login-card h2 { text-align: center; font-size: 20px; }
.login-card .lead { text-align: center; color: var(--ink-4); font-size: 12.5px; margin: 6px 0 22px; }

/* ---------------- 提示 ---------------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 9px; max-width: 340px; }
.toast { padding: 12px 16px; border-radius: var(--r-md); font-size: 13px; color: #fff; background: rgba(18, 22, 42, 0.92);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: var(--shadow); animation: pop 0.24s; }
.toast.ok { background: rgba(14, 155, 107, 0.94); }
.toast.err { background: rgba(207, 68, 54, 0.94); }
.toast.warn { background: rgba(184, 121, 26, 0.94); }

.banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 15px; border-radius: var(--r-md);
  font-size: 13px; background: var(--warn-soft); color: #8a5a11; border: 1px solid rgba(184, 121, 26, 0.2); margin-bottom: 14px; }
.banner.ok { background: var(--ok-soft); color: #076e4c; border-color: rgba(14, 155, 107, 0.2); }
.banner.err { background: var(--danger-soft); color: #9c2f24; border-color: rgba(207, 68, 54, 0.2); }
.banner .bl { flex: 1; min-width: 0; }
.banner ul { margin: 6px 0 0; padding-left: 18px; }

/* ---------------- 详情弹窗 ---------------- */
.detail { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 22px; }
@media (max-width: 780px) { .detail { grid-template-columns: 1fr; } }
.gallery .big { width: 100%; aspect-ratio: 4 / 3; border-radius: var(--r-md); overflow: hidden; background: rgba(255, 255, 255, 0.7); border: 1px solid var(--line); }
.gallery .big img { width: 100%; height: 100%; object-fit: contain; display: block; background: #fff; }
.gallery .strip { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.gallery .strip::-webkit-scrollbar { display: none; }
.gallery .strip img { width: 62px; height: 62px; object-fit: cover; border-radius: 9px; border: 1px solid var(--line);
  cursor: pointer; background: #fff; flex: 0 0 auto; transition: 0.16s; }
.gallery .strip img.on, .gallery .strip img:hover { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 9px 16px; font-size: 13px; }
.kv dt { color: var(--ink-4); white-space: nowrap; font-size: 12.5px; }
.kv dd { margin: 0; color: var(--ink); word-break: break-all; }
.price-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 4px 0 16px; }
.price-cards > div { padding: 12px; border-radius: var(--r-md); background: rgba(255, 255, 255, 0.72); border: 1px solid rgba(255, 255, 255, 0.85); text-align: center; }
.price-cards em { font-style: normal; display: block; font-size: 11px; color: var(--ink-4); margin-bottom: 3px; }
.price-cards b { font-size: 19px; letter-spacing: -0.03em; font-weight: 640; }
.price-cards .hl b { color: var(--brand); }

/* ---------------- 工具 ---------------- */
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.tight { gap: 6px; }
.spacer { flex: 1 1 auto; }
.muted { color: var(--ink-4); }
.muted-2 { color: var(--ink-3); }
.small { font-size: 12px; }
.center { text-align: center; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.mt-0 { margin-top: 0 } .mt-1 { margin-top: 8px } .mt-2 { margin-top: 16px } .mt-3 { margin-top: 24px }
.mb-0 { margin-bottom: 0 } .mb-1 { margin-bottom: 8px } .mb-2 { margin-bottom: 16px }
.hide { display: none !important; }

/* ============================================================
   响应式适配（全部断点集中在此，务必放在文件末尾）
   覆盖：13" 笔记本 1280×800 / 1440×900、短屏笔记本 1366×768、
        2K/4K 大屏、平板、手机
   ============================================================ */

/* ---- 大屏：容器加宽 + 网格加密，保证「屏幕越大列越多」，不回退 ---- */
@media (min-width: 1600px) {
  .wrap { max-width: 1560px; padding: 0 32px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(256px, 1fr)); gap: 20px; }
}
@media (min-width: 2048px) {
  .wrap { max-width: 1800px; padding: 0 40px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(256px, 1fr)); gap: 22px; }
}

/* ---- 短屏笔记本（1366×768 / 1280×720 这类 13" 常见高度）：页头与筛选再收紧，首屏多露商品 ---- */
@media (min-width: 861px) and (max-height: 860px) {
  .hero { padding: 14px 0 12px; }
  .hero h1 { font-size: clamp(21px, 2.4vw, 30px); }
  .page { padding-top: 14px; }
  .filters { padding: 12px 15px; margin-bottom: 15px; gap: 10px; }
  .page-foot { padding: 20px 22px; margin-top: 26px; }
}

/* ---- 窄一点儿的笔记本 1024~1279：网格 3 列，筛选条收紧 ---- */
@media (max-width: 1279px) and (min-width: 861px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); gap: 15px; }
}

/* ---- 平板 / 折叠屏 ---- */
@media (max-width: 1024px) {
  .shell { grid-template-columns: 1fr; }
  .side {
    position: fixed; left: 0; top: 0; width: 250px; z-index: 80; transform: translateX(-102%);
    transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.3, 1); box-shadow: var(--shadow-lg);
    background: rgba(255, 255, 255, 0.9);
  }
  .side.open { transform: none; }
  .side-mask { position: fixed; inset: 0; z-index: 70; background: rgba(16, 22, 40, 0.3); backdrop-filter: blur(4px); }
  .burger { display: inline-flex !important; }
}
@media (min-width: 1025px) { .burger { display: none !important; } }

/* ---- 小屏横向压缩 ---- */
@media (max-width: 860px) {
  .wrap { padding: 0 15px; }
  .main-body { padding: 16px 15px 60px; }
  .main-head { padding: 12px 15px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 14px; }
  .hero { padding: 18px 0 14px; }
  .page-foot { padding: 20px 18px; margin-top: 26px; }
  .pf-grid { grid-template-columns: 1fr; gap: 20px; }
  .pf-search p.sub { margin: 8px 0 14px; font-size: 13px; }
  .pf-stats { gap: 10px; }
  .pf-stats b { font-size: 22px; }
  .topbar { gap: 12px; padding: 0 14px; }
  .modal { max-width: 100%; border-radius: var(--r-lg); max-height: 94vh; }
  .modal-body { padding: 16px; }
  .price-cards b { font-size: 16px; }
  .filters { padding: 13px 14px; }
}

/* ---- 手机 ---- */
@media (max-width: 560px) {
  .nav { display: none; }
  .brand-txt span { display: none; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .card-body { padding: 11px 12px 13px; }
  .card-title { font-size: 13px; min-height: 37px; }
  .price-row .p-main b { font-size: 17px; }
  .price-row .p-sub { display: none; }
  .hero { padding: 14px 0 12px; }
  .pf-search p.sub {
    margin: 8px 0 13px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .pf-stats b { font-size: 20px; }
  .orb { filter: blur(60px); }
  .drop { padding: 16px 12px; font-size: 12.5px; }
  .modal-foot { padding: 12px 16px; }
  .toasts { left: 14px; right: 14px; bottom: 14px; max-width: none; }
  /* 手机上胶囊缩小，14 个换行后约 3~4 行、高度可控 */
  .chips { gap: 6px; }
  .chip { height: 29px; padding: 0 11px; font-size: 12.5px; }
  .chip i { font-size: 10.5px; }
  .filters { padding: 12px 13px; gap: 10px; }
}

/* ---- 超小屏 ---- */
@media (max-width: 380px) {
  .grid { gap: 9px; }
  .card-foot { font-size: 10.5px; }
  .filter-row > * { max-width: 100% !important; }
}

/* ---- 打印 ---- */
@media print { .topbar, .side, .filters, .pager { display: none !important; } }

