/* ═══════════════════════════════════════════════════════
   CloudBase Admin · 黑灰极简主题
   设计语言：黑灰 #282C2E 主色 · 深墨绿 #1F3D34 辅助点缀 · 浅灰白 #F7F7F5
   ═══════════════════════════════════════════════════════ */

:root {
  --ink: #282C2E;              /* 黑灰主色（主按钮/Tab 选中/标题/核心交互） */
  --ink-deep: #1B1E20;         /* 黑灰·深 */
  --ink-mid: #3A4042;          /* 黑灰·中调（hover/细边框） */
  --ink-soft: #ECEEED;         /* 浅灰底 */
  --gold: #1F3D34;             /* 深墨绿辅助点缀（小面积） */
  --red: #C2402F;              /* 危险操作（删除/退款） */
  --bg: #F7F7F5;               /* 柔和浅灰白背景 */
  --card: #FFFFFF;
  --text: #282C2E;             /* 标题黑灰 */
  --text-sub: #63666A;         /* 正文中灰 */
  --text-muted: #9C9FA3;       /* 辅助浅灰 */
  --border: #E9E9E6;
  --thumb-bg: #EFEFE9;
  --topbar-bg: rgba(255, 255, 255, 0.82);
  --skeleton: #E7E5DD;
  --switch-track: #D6D2C6;
  --pill-bg: rgba(255, 255, 255, 0.92);
  --imgadd-border: #D4D1C6;
  --imgadd-bg: rgba(255, 255, 255, 0.5);
  --scrollbar: #D8D4C9;
  --shadow-sm: 0 2px 10px rgba(40, 44, 46, 0.05);
  --shadow-md: 0 8px 28px rgba(40, 44, 46, 0.09);
  --shadow-lg: 0 18px 48px rgba(40, 44, 46, 0.16);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.32, 0.72, 0, 1);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 深色主题 · 跟随系统 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { color-scheme: dark; }
  :root:not([data-theme="light"]) {
    --bg: #131517;
    --card: #1C1E20;
    --text: #EAECEC;
    --text-sub: #B8BBBE;
    --text-muted: #8A8D90;
    --border: rgba(255, 255, 255, 0.09);
    --ink-soft: rgba(40, 44, 46, 0.24);
    --thumb-bg: #232527;
    --topbar-bg: rgba(19, 21, 23, 0.85);
    --skeleton: #2A2C2E;
    --switch-track: #3A3D3F;
    --pill-bg: rgba(25, 27, 29, 0.9);
    --imgadd-border: rgba(255, 255, 255, 0.16);
    --imgadd-bg: rgba(255, 255, 255, 0.03);
    --scrollbar: #3A3D3F;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.28);
    --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.55);
  }
}

/* 深色主题 · 手动切换 */
html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="dark"] {
  --bg: #131517;
  --card: #1C1E20;
  --text: #EAECEC;
  --text-sub: #B8BBBE;
  --text-muted: #8A8D90;
  --border: rgba(255, 255, 255, 0.09);
  --ink-soft: rgba(40, 44, 46, 0.24);
  --thumb-bg: #232527;
  --topbar-bg: rgba(19, 21, 23, 0.85);
  --skeleton: #2A2C2E;
  --switch-track: #3A3D3F;
  --pill-bg: rgba(25, 27, 29, 0.9);
  --imgadd-border: rgba(255, 255, 255, 0.16);
  --imgadd-bg: rgba(255, 255, 255, 0.03);
  --scrollbar: #3A3D3F;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.hidden { display: none !important; }

button { font-family: inherit; border: none; background: none; cursor: pointer; color: inherit; }
input, textarea, select { font-family: inherit; font-size: 14px; color: var(--text); }
img { display: block; }

/* ═══════════ 启动画面 ═══════════ */

.boot {
  position: fixed; inset: 0; z-index: 100;
  background: linear-gradient(150deg, #1B1E20 0%, #282C2E 60%, #3A4042 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #fff; transition: opacity 0.5s ease, visibility 0.5s ease;
}
.boot.gone { opacity: 0; visibility: hidden; }
.boot__logo {
  width: 76px; height: 76px; border-radius: 22px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; font-weight: 700; letter-spacing: -0.04em;
  animation: bootPop 0.8s var(--ease-spring) both;
}
.boot__title { margin-top: 22px; font-size: 26px; font-weight: 600; letter-spacing: 0.06em; animation: bootFade 0.8s ease 0.15s both; }
.boot__sub { margin-top: 8px; font-size: 13px; opacity: 0.75; animation: bootFade 0.8s ease 0.25s both; }
.boot__bar { margin-top: 28px; width: 200px; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.18); overflow: hidden; }
.boot__bar-fill { height: 100%; width: 40%; border-radius: 2px; background: linear-gradient(90deg, #1F3D34, #2F5B4C); animation: bootSlide 1.2s ease-in-out infinite; }
@keyframes bootPop { from { transform: scale(0.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes bootFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes bootSlide { 0% { transform: translateX(-120%); } 100% { transform: translateX(420%); } }

/* ═══════════ 布局 ═══════════ */

.app { display: flex; height: 100vh; }

/* ── 侧边栏 ── */
.sidebar {
  width: 236px; flex-shrink: 0;
  background: linear-gradient(180deg, var(--ink-deep) 0%, var(--ink) 100%);
  color: rgba(255, 255, 255, 0.85);
  display: flex; flex-direction: column;
  padding: 22px 14px 18px;
}
.sidebar__logo { display: flex; align-items: center; gap: 12px; padding: 4px 10px 24px; }
.sidebar__logo-mark {
  width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold), #2F5B4C);
  color: var(--ink-deep); font-weight: 800; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(184, 147, 90, 0.35);
}
.sidebar__logo-text { font-size: 16px; font-weight: 700; letter-spacing: 0.02em; }
.sidebar__logo-text span { display: block; font-size: 11px; font-weight: 500; opacity: 0.6; letter-spacing: 0.12em; }

.sidebar__nav { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px; border-radius: 12px;
  font-size: 14px; font-weight: 500; color: rgba(255,255,255,0.72);
  position: relative; overflow: hidden;
  transition: background 0.25s ease, color 0.25s ease, transform 0.15s var(--ease);
}
.nav-item:active { transform: scale(0.97); }
.nav-item:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(255,255,255,0.16), rgba(255,255,255,0.05));
  color: #fff; font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%) scaleY(0);
  width: 3px; height: 22px; border-radius: 2px; background: var(--gold);
  animation: navBarIn 0.3s var(--ease) forwards;
}
@keyframes navBarIn { from { transform: translateY(-50%) scaleY(0); } to { transform: translateY(-50%) scaleY(1); } }
.nav-item__icon { width: 20px; height: 20px; flex-shrink: 0; opacity: 0.85; }

.sidebar__foot { padding: 14px 10px 0; border-top: 1px solid rgba(255,255,255,0.1); }
.conn { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: rgba(255,255,255,0.8); }
.conn__dot { width: 8px; height: 8px; border-radius: 50%; background: #7FDCA8; box-shadow: 0 0 0 3px rgba(127,220,168,0.2); animation: pulse 2.4s ease-in-out infinite; }
.conn__env { margin-top: 6px; font-size: 11px; color: rgba(255,255,255,0.45); word-break: break-all; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.55; } }

/* ── 主区 ── */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 64px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 30px;
  background: var(--topbar-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  z-index: 5;
}
.topbar__title { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.env-chip {
  font-size: 12px; color: var(--ink); background: var(--ink-soft);
  border: 1px solid rgba(40, 44, 46, 0.14);
  padding: 6px 14px; border-radius: 999px; font-weight: 500;
  max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.theme-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--card); border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--text-sub); cursor: pointer;
  transition: all 0.25s var(--ease); box-shadow: var(--shadow-sm);
}
.theme-btn:hover { transform: rotate(15deg) scale(1.06); border-color: var(--ink-mid); }
.theme-btn:active { transform: scale(0.92); }

.page { display: none; flex: 1; overflow-y: auto; padding: 26px 30px 40px; animation: pageIn 0.45s var(--ease) both; }
.page.active { display: block; }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* 滚动条 */
.page::-webkit-scrollbar, .drawer__body::-webkit-scrollbar { width: 8px; }
.page::-webkit-scrollbar-thumb, .drawer__body::-webkit-scrollbar-thumb { background: var(--scrollbar); border-radius: 4px; }
.page::-webkit-scrollbar-track, .drawer__body::-webkit-scrollbar-track { background: transparent; }

/* ═══════════ 工具栏 / 通用控件 ═══════════ */

.toolbar { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.toolbar__spacer { flex: 1; }

.search-box { position: relative; width: 260px; }
.search-box__icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-muted); pointer-events: none; }
.search-box input {
  width: 100%; height: 42px; padding: 0 16px 0 40px;
  border: 1.5px solid var(--border); border-radius: 999px;
  background: var(--card); outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.search-box input:focus { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(40, 44, 46,0.1); }
.search-box input::placeholder { color: var(--text-muted); }

.chips { display: flex; gap: 8px; }
.chip {
  padding: 8px 18px; border-radius: 999px; font-size: 13px; font-weight: 500;
  color: var(--text-sub); background: var(--card);
  border: 1.5px solid var(--border);
  transition: all 0.22s var(--ease);
}
.chip:hover { border-color: var(--ink-mid); color: var(--ink); }
.chip:active { transform: scale(0.94); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: 0 4px 14px rgba(40, 44, 46,0.28); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 22px; border-radius: 999px;
  font-size: 14px; font-weight: 600; position: relative; overflow: hidden;
  cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.btn:active { transform: scale(0.95); }
.btn__icon { width: 18px; height: 18px; }
.btn--primary { background: linear-gradient(135deg, var(--ink-mid), var(--ink)); color: #fff; box-shadow: 0 6px 18px rgba(40, 44, 46,0.28); }
.btn--primary:hover { box-shadow: 0 10px 26px rgba(40, 44, 46,0.34); }
.btn--ghost { background: var(--card); color: var(--ink); border: 1.5px solid var(--border); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--danger { background: var(--red); color: #fff; box-shadow: 0 6px 18px rgba(194,64,47,0.26); }
.btn--small { height: 32px; padding: 0 14px; font-size: 12.5px; }
.btn--shine::after {
  content: ''; position: absolute; top: 0; left: 0; width: 34%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.32), transparent);
  transform: translateX(-200%) skewX(-20deg);
  animation: shine 3.4s ease-in-out infinite; pointer-events: none;
}
@keyframes shine { 0%, 60% { transform: translateX(-200%) skewX(-20deg); } 100% { transform: translateX(460%) skewX(-20deg); } }

/* ═══════════ 商品网格 ═══════════ */

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 20px; }

.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  animation: cardIn 0.5s var(--ease) both;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
@keyframes cardIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.card__thumb { position: relative; aspect-ratio: 1/1; background: var(--thumb-bg); overflow: hidden; }
.card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.card:hover .card__thumb img { transform: scale(1.06); }
.card__status {
  position: absolute; top: 12px; left: 12px;
  font-size: 11.5px; font-weight: 600; padding: 4px 12px; border-radius: 999px;
  background: var(--pill-bg); backdrop-filter: blur(6px);
}
.card__status.on { color: var(--ink); }
.card__status.off { color: var(--text-muted); }

.card__body { padding: 16px 18px 18px; }
.card__name { font-size: 15px; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 42px; }
.card__meta { margin-top: 8px; font-size: 12px; color: var(--text-muted); display: flex; justify-content: space-between; }
.card__price-row { margin-top: 10px; display: flex; align-items: baseline; gap: 8px; }
.card__price { font-size: 20px; font-weight: 800; color: var(--red); letter-spacing: -0.01em; }
.card__price-original { font-size: 12.5px; color: var(--text-muted); text-decoration: line-through; }
.card__actions { margin-top: 14px; display: flex; gap: 8px; }
.card__actions .btn { flex: 1; }

/* ═══════════ 分页 / 空态 ═══════════ */

.pager { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 26px; }
.pager__btn {
  min-width: 36px; height: 36px; padding: 0 12px; border-radius: 10px;
  font-size: 13px; font-weight: 500; color: var(--text-sub);
  background: var(--card); border: 1.5px solid var(--border);
  transition: all 0.2s var(--ease);
}
.pager__btn:hover:not(:disabled) { border-color: var(--ink); color: var(--ink); }
.pager__btn:disabled { opacity: 0.4; cursor: default; }
.pager__btn.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.pager__info { font-size: 12.5px; color: var(--text-muted); }

.empty-state { display: flex; flex-direction: column; align-items: center; padding: 90px 0; color: var(--text-muted); }
.empty-state__icon { font-size: 56px; opacity: 0.5; animation: floatY 3.4s ease-in-out infinite; }
.empty-state__icon--svg { display: flex; align-items: center; justify-content: center; color: var(--text-muted); }
.empty-state__text { margin-top: 14px; font-size: 14px; }
@keyframes floatY { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ═══════════ 内容页 ═══════════ */

.tabs { display: flex; gap: 6px; margin-bottom: 20px; background: var(--card); border-radius: 14px; padding: 6px; box-shadow: var(--shadow-sm); width: fit-content; }
.tab { padding: 9px 22px; border-radius: 10px; font-size: 13.5px; font-weight: 500; color: var(--text-sub); transition: all 0.25s var(--ease); }
.tab:active { transform: scale(0.95); }
.tab.active { background: var(--ink); color: #fff; box-shadow: 0 4px 12px rgba(40, 44, 46,0.25); }

.content-list { display: flex; flex-direction: column; gap: 14px; max-width: 860px; }
.content-row {
  display: flex; align-items: center; gap: 18px;
  background: var(--card); border-radius: var(--radius); padding: 14px 18px;
  box-shadow: var(--shadow-sm);
  animation: cardIn 0.45s var(--ease) both;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.content-row:hover { transform: translateX(4px); box-shadow: var(--shadow-md); }
.content-row__thumb { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: var(--thumb-bg); flex-shrink: 0; }
.content-row__info { flex: 1; min-width: 0; }
.content-row__name { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── 分类层级树（母专区分组 + 子分类挂载） ── */
.cat-group {
  background: var(--card); border-radius: var(--radius); padding: 16px 18px;
  box-shadow: var(--shadow-sm); animation: cardIn 0.45s var(--ease) both;
  border: 1px solid rgba(184,147,90,0.18);
}
.cat-group__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.cat-group__title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cat-group__badge {
  flex-shrink: 0; font-size: 11px; font-weight: 700; letter-spacing: 0.05em;
  padding: 3px 10px; border-radius: 999px;
  background: rgba(40, 44, 46,0.12); color: var(--ink);
}
.cat-group__name { font-size: 16px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-group__explore {
  flex-shrink: 0; font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
  padding: 3px 10px; border-radius: 999px;
  background: rgba(244, 239, 229, 0.9); color: #9A9A94;
}
.cat-group__explore--on { background: rgba(31, 61, 52, 0.1); color: #1F3D34; }
.cat-group__actions { display: flex; gap: 8px; flex-shrink: 0; }
.cat-group__subs { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.cat-sub {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--bg-soft, #F7F6F2); border-radius: 12px; padding: 10px 14px;
  border-left: 3px solid var(--gold, #1F3D34);
  transition: background 0.2s ease;
}
.cat-sub:hover { background: rgba(184,147,90,0.08); }
.cat-sub--empty {
  border-left-color: var(--border); background: transparent;
  color: var(--text-muted); font-size: 12.5px; justify-content: flex-start;
  padding: 12px 14px;
}
.cat-sub__info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cat-sub__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold, #1F3D34); flex-shrink: 0; }
.cat-sub__name { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-sub__meta { font-size: 12px; color: var(--text-muted); flex-shrink: 0; }
.cat-sub__actions { display: flex; gap: 8px; flex-shrink: 0; }
.content-row__sub { margin-top: 4px; font-size: 12.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ═══════════ 订单管理 ═══════════ */

.date-range { display: flex; align-items: center; gap: 8px; }
.date-range input[type="date"] {
  height: 38px; padding: 0 12px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: var(--card); color: var(--text);
  font-size: 13px; outline: none; transition: border-color 0.25s var(--ease);
}
.date-range input[type="date"]:focus { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(40, 44, 46,0.1); }
.date-range__sep { color: var(--text-muted); font-size: 13px; }

/* 多条件搜索行 */
.cond-list { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.cond-row {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--card); border: 1.5px solid var(--border); border-radius: 12px;
  padding: 6px 8px 6px 10px; box-shadow: var(--shadow-sm);
  animation: cardIn 0.35s var(--ease) both;
}
.cond-row:focus-within { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(40, 44, 46,0.08); }
.cond-row__field {
  height: 30px; padding: 0 8px; border: none; outline: none; background: transparent;
  font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer;
}
.cond-row__value {
  height: 30px; width: 180px; padding: 0 10px; border: none; outline: none;
  background: var(--thumb-bg); border-radius: 8px; font-size: 13px; color: var(--text);
}
.cond-row__value::placeholder { color: var(--text-muted); }
.cond-row__del {
  width: 24px; height: 24px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--text-muted); transition: all 0.2s ease;
}
.cond-row__del:hover { background: rgba(194,64,47,0.1); color: var(--red); }
.cond-row__del:active { transform: scale(0.85); }

.order-list { display: flex; flex-direction: column; gap: 12px; }
.order-row {
  background: var(--card); border-radius: var(--radius); padding: 16px 20px;
  box-shadow: var(--shadow-sm); cursor: pointer; transition: all 0.3s var(--ease);
  animation: cardIn 0.5s var(--ease) both;
}
.order-row:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.order-row:active { transform: scale(0.995); }
.order-row__head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.order-row__id { font-size: 12.5px; color: var(--text-muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.order-row__time { margin-left: auto; font-size: 12.5px; color: var(--text-muted); }
.order-row__main { display: flex; align-items: center; gap: 14px; }
.order-row__thumb {
  width: 56px; height: 56px; border-radius: 12px; overflow: hidden; flex-shrink: 0;
  background: var(--thumb-bg);
}
.order-row__thumb img { width: 100%; height: 100%; object-fit: cover; }
.order-row__info { flex: 1; min-width: 0; }
.order-row__name { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-row__sub { margin-top: 4px; font-size: 12.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-row__meta { text-align: right; flex-shrink: 0; }
.order-row__buyer { font-size: 12.5px; color: var(--text-sub); margin-bottom: 4px; }
.order-row__price { font-size: 17px; font-weight: 700; color: var(--ink); }
.order-row__count { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* 用户管理 */
.user-list { display: flex; flex-direction: column; gap: 12px; }
.user-row {
  display: flex; align-items: center; gap: 16px;
  background: var(--card); border-radius: var(--radius); padding: 14px 20px;
  box-shadow: var(--shadow-sm); cursor: pointer; transition: all 0.3s var(--ease);
  animation: cardIn 0.5s var(--ease) both;
}
.user-row:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.user-row:active { transform: scale(0.995); }
.user-row__avatar {
  width: 46px; height: 46px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: var(--thumb-bg); display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: var(--ink-mid);
}
.user-row__avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-row__info { flex: 1; min-width: 0; }
.user-row__name { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-row__meta { margin-top: 4px; font-size: 12.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-row__stats { display: flex; gap: 22px; flex-shrink: 0; }
.user-row__stat { text-align: right; }
.user-row__stat span { display: block; font-size: 11.5px; color: var(--text-muted); margin-bottom: 2px; }
.user-row__stat b { font-size: 15px; font-weight: 700; color: var(--ink); }
.user-row__actions { display: flex; gap: 8px; flex-shrink: 0; }
.toolbar__count { font-size: 13px; color: var(--text-muted); }

/* VIP 客户标记与控制 */
.vip-badge {
  display: inline-flex; align-items: center; height: 20px; padding: 0 8px;
  margin-left: 8px; border-radius: 999px; vertical-align: 1px;
  background: linear-gradient(135deg, #E4CE9A 0%, #C9A063 55%, #A8792F 100%);
  color: #2A1E08; font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
}
.vip-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.vip-chip {
  display: inline-flex; align-items: center; height: 30px; padding: 0 14px;
  border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--thumb-bg); color: var(--text-muted);
}
.vip-chip--on {
  background: linear-gradient(135deg, #E4CE9A 0%, #C9A063 55%, #A8792F 100%);
  color: #2A1E08;
}

/* 邀请有礼（推荐人列表） */
.referral-list { display: flex; flex-direction: column; gap: 12px; }
.referral-row {
  display: flex; align-items: center; gap: 18px;
  background: var(--card); border-radius: var(--radius); padding: 14px 20px;
  box-shadow: var(--shadow-sm); cursor: pointer; transition: all 0.3s var(--ease);
  animation: cardIn 0.5s var(--ease) both;
}
.referral-row:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.referral-row:active { transform: scale(0.995); }
.referral-row__main { flex: 1; min-width: 0; }
.referral-row__name {
  font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 8px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.referral-row__ok {
  flex-shrink: 0; font-size: 11px; font-weight: 700; color: #fff;
  background: var(--gold, #1F3D34); border-radius: 999px; padding: 2px 9px;
}
.referral-row__meta { margin-top: 4px; font-size: 12.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.referral-row__stats { display: flex; gap: 18px; flex-shrink: 0; }
.referral-row__stat { text-align: right; }
.referral-row__stat span { display: block; font-size: 11.5px; color: var(--text-muted); margin-bottom: 2px; }
.referral-row__stat b { font-size: 15px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.referral-row__stat b i { font-style: normal; font-size: 11.5px; color: var(--text-muted); font-weight: 500; }
.referral-row__bar { width: 90px; height: 5px; border-radius: 999px; background: var(--thumb-bg); overflow: hidden; flex-shrink: 0; }
.referral-row__fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #B8935A, #D9BC8A); }
.referral-row__actions { display: flex; gap: 8px; flex-shrink: 0; }

/* 邀请明细抽屉 */
.ref-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.ref-summary__item { background: var(--thumb-bg); border-radius: 12px; padding: 10px 8px; text-align: center; }
.ref-summary__item span { display: block; font-size: 11.5px; color: var(--text-muted); margin-bottom: 4px; }
.ref-summary__item b { font-size: 15px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.ref-summary__item b i { font-style: normal; font-size: 11px; color: var(--text-muted); font-weight: 500; }
.ref-progress { margin-bottom: 18px; }
.ref-progress__bar { height: 7px; border-radius: 999px; background: var(--thumb-bg); overflow: hidden; }
.ref-progress__fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #B8935A, #D9BC8A); }
.ref-progress__text { margin-top: 8px; font-size: 12.5px; color: var(--text-muted); }
.ref-progress__ok { color: var(--gold, #1F3D34); font-weight: 700; }
.ref-friends-title {
  font-size: 13px; font-weight: 700; color: var(--text-sub); letter-spacing: 0.04em;
  margin-bottom: 10px; padding-left: 10px; border-left: 3px solid var(--gold);
}
.ref-friend { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); animation: cardIn 0.4s var(--ease) both; }
.ref-friend:last-child { border-bottom: none; }
.ref-friend__avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: var(--thumb-bg); display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; color: var(--ink-mid);
}
.ref-friend__info { flex: 1; min-width: 0; }
.ref-friend__name { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ref-friend__meta { margin-top: 3px; font-size: 12px; color: var(--text-muted); }
.ref-friend__count {
  flex-shrink: 0; font-size: 12px; color: var(--text-muted);
  background: var(--thumb-bg); border-radius: 999px; padding: 4px 12px;
  font-variant-numeric: tabular-nums;
}
.ref-friend__count.is-on { color: #fff; background: var(--gold, #1F3D34); }

/* 用户详情抽屉 */
.od-hero__avatar {
  width: 52px; height: 52px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: var(--thumb-bg); display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; color: var(--ink-mid);
}
.od-hero__avatar img { width: 100%; height: 100%; object-fit: cover; }
.od-hero__title { font-size: 16px; font-weight: 700; }

/* 状态徽章 */
.order-badge {
  display: inline-flex; align-items: center; height: 24px; padding: 0 11px;
  border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
  flex-shrink: 0;
}
.order-badge--warn    { background: rgba(201, 160, 99, 0.16);  color: #A97E2F; }
.order-badge--info    { background: rgba(40, 44, 46, 0.14);  color: var(--ink-mid); }
.order-badge--primary { background: rgba(184, 147, 90, 0.16); color: #8F6F3C; }
.order-badge--done    { background: rgba(40, 44, 46, 0.12);   color: var(--ink); }
.order-badge--muted   { background: rgba(156, 156, 147, 0.16); color: var(--text-muted); }
.order-badge--danger  { background: rgba(194, 64, 47, 0.13);  color: var(--red); }

/* 订单详情抽屉 */
.od-hero { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.od-hero__id { font-size: 13px; color: var(--text-muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.od-section { margin-bottom: 20px; }
.od-section__title {
  font-size: 13px; font-weight: 700; color: var(--text-sub); letter-spacing: 0.04em;
  margin-bottom: 10px; padding-left: 10px; border-left: 3px solid var(--gold);
}
.od-tl-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 13.5px; border-bottom: 1px dashed var(--border); }
.od-tl-row:last-child { border-bottom: none; }
.od-tl-key { color: var(--text-muted); }
.od-tl-val { color: var(--text); font-weight: 500; }
.od-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.od-kv__item {
  background: var(--thumb-bg); border-radius: 12px; padding: 10px 14px;
}
.od-kv__item--full { grid-column: 1 / -1; }
.od-kv__item span { display: block; font-size: 11.5px; color: var(--text-muted); margin-bottom: 4px; }
.od-kv__item b { font-size: 13.5px; font-weight: 600; word-break: break-all; }
.od-mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px !important; }
.od-muted { font-size: 12.5px; color: var(--text-muted); }
.od-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.od-item:last-child { border-bottom: none; }
.od-item__thumb {
  width: 52px; height: 52px; border-radius: 12px; overflow: hidden; flex-shrink: 0;
  background: var(--thumb-bg); display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 18px;
}
.od-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.od-item__info { flex: 1; min-width: 0; }
.od-item__name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.od-item__spec { margin-top: 3px; font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.od-item__foot { margin-top: 6px; padding: 8px 10px; background: rgba(31, 61, 52, 0.06); border-radius: 8px; }
.od-item__foot-title { font-size: 12px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.od-item__foot-line { font-size: 11.5px; color: var(--text-sub); line-height: 1.7; }
.od-item__price { font-size: 13.5px; font-weight: 600; color: var(--text-sub); flex-shrink: 0; }
.od-summary {
  background: var(--thumb-bg); border-radius: 14px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px;
}
.od-summary__row { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--text-sub); }
.od-summary__row--total { font-size: 15px; font-weight: 700; color: var(--ink); padding-top: 6px; border-top: 1px dashed var(--border); }
.od-summary__row--total b { color: var(--red); font-size: 18px; }
.od-actions { display: flex; flex-wrap: wrap; gap: 10px; }
/* 导出 Word 按钮：全宽幽灵按钮，置于操作按钮区上方 */
.od-export { margin-bottom: 12px; }
.od-export .btn { width: 100%; box-sizing: border-box; text-align: center; text-decoration: none; }

/* ═══════════ 概览页 ═══════════ */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; margin-bottom: 26px; }
.stat {
  background: var(--card); border-radius: var(--radius); padding: 22px 24px;
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
  animation: cardIn 0.5s var(--ease) both;
}
.stat::after {
  content: ''; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%;
  background: radial-gradient(circle, rgba(40, 44, 46,0.06), transparent 70%);
}
.stat__label { font-size: 13px; color: var(--text-muted); }
.stat__value { margin-top: 8px; font-size: 32px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.stat--gold .stat__value { color: var(--gold); }
.stat--red .stat__value { color: var(--red); }

.panel { background: var(--card); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); animation: cardIn 0.5s var(--ease) 0.1s both; }
.panel__title { font-size: 15px; font-weight: 700; margin-bottom: 16px; }
.chips--static { flex-wrap: wrap; }
.chips--static .chip { cursor: default; }

/* ── 评价看板 ── */
.rd-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 16px; }
.rd-score__num { font-size: 40px; font-weight: 800; color: #F5A623; }
.rd-score__unit { font-size: 14px; color: var(--text-muted); }
.rd-count { font-size: 13px; color: var(--text-muted); }
.rd-dist { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.rd-dist__row { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--text-sub); }
.rd-dist__label { width: 34px; text-align: right; flex-shrink: 0; }
.rd-dist__bar { flex: 1; height: 8px; border-radius: 4px; background: var(--thumb-bg); overflow: hidden; }
.rd-dist__bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #E8B84B, #F5A623); transition: width 0.6s var(--ease); }
.rd-dist__val { width: 30px; flex-shrink: 0; }
.rd-latest { display: flex; flex-direction: column; gap: 10px; }
.rd-review {
  background: var(--thumb-bg); border-radius: 12px; padding: 12px 14px;
}
.rd-review__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.rd-review__user { font-size: 12.5px; font-weight: 600; color: var(--text-sub); }
.rd-review__stars { font-size: 12px; color: #F5A623; font-weight: 600; }
.rd-review__product { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-review__content { font-size: 13px; color: var(--text); line-height: 1.6; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.rd-empty { padding: 30px 0; text-align: center; color: var(--text-muted); font-size: 13px; }

/* ═══════════ 抽屉 ═══════════ */

.mask {
  position: fixed; inset: 0; z-index: 40; background: rgba(15, 22, 18, 0.45);
  opacity: 0; visibility: hidden; transition: opacity 0.35s ease, visibility 0.35s ease;
  backdrop-filter: blur(2px);
}
.mask.show { opacity: 1; visibility: visible; }

.drawer {
  position: fixed; top: 0; right: 0; z-index: 50;
  width: min(600px, 94vw); height: 100vh;
  background: var(--bg); display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: translateX(105%);
  transition: transform 0.5s var(--ease-spring);
}
.drawer.open { transform: translateX(0); }
.drawer__head {
  flex-shrink: 0; display: flex; align-items: center; justify-content: space-between;
  padding: 20px 26px; background: var(--card); border-bottom: 1px solid var(--border);
}
.drawer__title { font-size: 17px; font-weight: 700; }
.drawer__close {
  width: 34px; height: 34px; border-radius: 50%; font-size: 15px; color: var(--text-muted);
  background: var(--bg); display: flex; align-items: center; justify-content: center;
  transition: all 0.22s var(--ease);
}
.drawer__close:hover { background: var(--ink-soft); color: var(--ink); transform: rotate(90deg); }
.drawer__body { flex: 1; overflow-y: auto; padding: 24px 26px 30px; }
.drawer__foot {
  flex-shrink: 0; display: flex; justify-content: flex-end; gap: 12px;
  padding: 16px 26px calc(16px + env(safe-area-inset-bottom));
  background: var(--card); border-top: 1px solid var(--border);
}

/* 浮层层级修复：抽屉 z50、默认 .mask z40（仅抽屉遮罩 drawerMask 用）。
 * 确认/分类选择/商品选择/设置弹窗需浮在抽屉之上（手机上抽屉全屏会把 z40 弹窗整个盖住，
 * 桌面端因抽屉靠右、弹窗居中才恰好没暴露）。z70 > 抽屉 50，且内部 .modal(z60) 随遮罩提升。 */
#modalMask, #catPickerMask, #productPickerMask, #settingsMask { z-index: 70; }

/* ── 表单 ── */
.field { margin-bottom: 18px; }
.field__label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-sub); margin-bottom: 7px; letter-spacing: 0.02em; }
.field__input, .field__textarea, .field__select {
  width: 100%; border: 1.5px solid var(--border); border-radius: 12px;
  background: var(--card); padding: 11px 14px; outline: none;
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}
.field__input:focus, .field__textarea:focus, .field__select:focus {
  border-color: var(--ink); box-shadow: 0 0 0 4px rgba(40, 44, 46,0.09);
}
.field__textarea { min-height: 84px; resize: vertical; line-height: 1.5; }
.field__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* 开关 */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { display: none; }
.switch__track {
  width: 46px; height: 26px; border-radius: 999px; background: var(--switch-track);
  transition: background 0.28s var(--ease); position: relative; flex-shrink: 0;
}
.switch__track::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: transform 0.28s var(--ease-spring);
}
.switch input:checked + .switch__track { background: var(--ink); }
.switch input:checked + .switch__track::after { transform: translateX(20px); }
.switch__text { font-size: 13px; font-weight: 500; color: var(--text-sub); }

/* ── 规格编辑器 ── */
.spec-card {
  background: var(--card); border: 1.5px solid var(--border);
  border-radius: 14px; padding: 14px; margin-bottom: 12px;
  animation: cardIn 0.4s var(--ease) both;
}
.spec-card__head { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.spec-card__head .spec-name { flex: 1; }
.spec-req-switch { flex-shrink: 0; }
.spec-modes { display: flex; gap: 8px; margin-bottom: 12px; }
.spec-mode {
  padding: 7px 16px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  color: var(--text-sub); background: var(--card); border: 1.5px solid var(--border);
  transition: all 0.22s var(--ease); cursor: pointer;
}
.spec-mode:active { transform: scale(0.95); }
.spec-mode.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.spec-values { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; min-height: 10px; }
.spec-value-row { display: inline-flex; align-items: center; gap: 6px; animation: cardIn 0.3s var(--ease) both; }
.spec-value {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink-soft); color: var(--ink); border-radius: 999px;
  padding: 5px 14px; font-size: 13px; font-weight: 500;
}
html[data-theme="dark"] .spec-value { color: #A8D5BC; }
.spec-value__x { cursor: pointer; font-style: normal; opacity: 0.5; font-size: 14px; transition: opacity 0.2s ease; }
.spec-value__x:hover { opacity: 1; }
.spec-price { width: 108px; height: 34px; padding: 0 12px; border-radius: 10px; font-size: 13px; }
.spec-add { display: flex; gap: 10px; }
.spec-add .spec-new { flex: 1; }

/* ── 内置规格（颜色/尺码） ── */
.spec-card--color, .spec-card--size { border-color: rgba(184,147,90,0.45); }
.spec-tag {
  flex-shrink: 0; font-size: 11px; font-weight: 700; letter-spacing: 0.03em;
  padding: 3px 10px; border-radius: 999px;
  background: rgba(184,147,90,0.16); color: #8F6F3C;
}
html[data-theme="dark"] .spec-tag { color: #D4B87E; }
.spec-palette__label, .spec-size-range__label, .spec-oos__label {
  display: block; font-size: 12px; font-weight: 600; color: var(--text-sub); margin: 10px 0 8px;
}
.spec-palette__swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.spec-swatch {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 5px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--border); background: var(--card);
  transition: all 0.2s ease; user-select: none;
}
.spec-swatch i { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.12); flex-shrink: 0; }
.spec-swatch em { font-style: normal; font-size: 12px; color: var(--text-sub); }
.spec-swatch:hover { border-color: var(--ink-mid); }
.spec-swatch.active { border-color: var(--ink); background: var(--ink-soft); }
.spec-swatch.active em { color: var(--ink); font-weight: 600; }
.spec-size-range { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.spec-size-range .field__input { width: 110px; }
.spec-size-range__sep { color: var(--text-muted); }
.spec-size-range__hint, .spec-oos__hint { width: 100%; font-size: 11.5px; color: var(--text-muted); }
.spec-oos { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border); }
.spec-oos-input { width: 100%; }
.spec-value-row.is-oos .spec-value {
  background: rgba(194,64,47,0.1); color: var(--red);
  text-decoration: line-through;
}
.spec-oos-mark {
  font-style: normal; font-size: 10px; font-weight: 700; padding: 1px 6px;
  border-radius: 999px; background: var(--red); color: #fff;
}

/* ── 颜色规格缩略图（每个颜色值可上传一张，规格弹窗选中该色时主图切换） ── */
.spec-color-img {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  flex-shrink: 0;
}
.spec-color-img__preview {
  width: 34px; height: 34px; border-radius: 10px; object-fit: cover;
  border: 1px solid var(--border); background: var(--ink-soft);
  display: block;
}
.spec-color-img__del {
  position: absolute; top: -6px; right: -6px; cursor: pointer;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--red, #C2402F); color: #fff;
  font-style: normal; font-size: 11px; line-height: 18px; text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25); transition: transform 0.2s ease;
}
.spec-color-img__del:hover { transform: scale(1.1); }
.spec-color-img__add {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px; cursor: pointer;
  border: 1.5px dashed var(--ink-mid); color: var(--text-sub);
  font-size: 11px; font-weight: 600; user-select: none;
  background: transparent; transition: all 0.2s ease;
}
.spec-color-img__add:hover { border-color: var(--ink); color: var(--ink); background: var(--ink-soft); }
.spec-value-row--color { background: rgba(184,147,90,0.07); border-radius: 12px; padding: 4px 6px; border: 1px solid rgba(184,147,90,0.22); }

/* ── 图片管理 ── */
.thumb-box { display: flex; align-items: center; gap: 18px; }
.thumb-img {
  width: 108px; height: 108px; border-radius: 14px; object-fit: cover;
  background: var(--thumb-bg); border: 1.5px solid var(--border); flex-shrink: 0;
}
.thumb-img--empty { display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 12px; }
.thumb-video { width: 200px; max-height: 140px; border-radius: 14px; background: var(--thumb-bg); border: 1.5px solid var(--border); flex-shrink: 0; object-fit: cover; }
.thumb-actions { display: flex; flex-direction: column; gap: 10px; }
.thumb-hint { font-size: 12px; color: var(--text-muted); line-height: 1.6; }
/* 客户臻选板块照片编辑器（2-3 张，可调顺序） */
.ugc-photos { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.ugc-photo { width: 104px; }
.ugc-photo .thumb-img { width: 100%; height: 104px; border-radius: 12px; }
.ugc-photo__acts { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.ugc-photo__acts .btn--small { padding: 4px 8px; font-size: 12px; }
/* 多选列表（脚型互斥等） */
.check-list { display: flex; flex-wrap: wrap; gap: 8px; }
.check-item {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--thumb-bg); border: 1.5px solid var(--border);
  font-size: 12.5px; cursor: pointer; user-select: none;
}
.check-item:has(input:checked) { border-color: var(--accent); background: rgba(31, 61, 52, 0.06); }
.check-item input { margin: 0; accent-color: #1F3D34; }
.img-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.img-tab {
  padding: 7px 18px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  color: var(--text-sub); background: var(--card); border: 1.5px solid var(--border);
  transition: all 0.22s var(--ease);
}
.img-tab.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; }
.img-tile {
  position: relative; aspect-ratio: 1/1; border-radius: 12px; overflow: hidden;
  background: var(--thumb-bg); box-shadow: var(--shadow-sm);
  animation: cardIn 0.4s var(--ease) both;
}
.img-tile img { width: 100%; height: 100%; object-fit: cover; }
.img-tile__del {
  position: absolute; top: 5px; right: 5px; width: 24px; height: 24px;
  border-radius: 50%; background: rgba(15,22,18,0.62); color: #fff;
  font-size: 12px; display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.2s ease, transform 0.2s var(--ease);
}
.img-tile:hover .img-tile__del { opacity: 1; }
.img-tile__del:active { transform: scale(0.85); }
.img-add {
  aspect-ratio: 1/1; border-radius: 12px; border: 2px dashed var(--imgadd-border);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  color: var(--text-muted); font-size: 12px; background: var(--imgadd-bg);
  transition: all 0.25s var(--ease);
}
.img-add:hover { border-color: var(--ink); color: var(--ink); background: var(--ink-soft); }
.img-add:active { transform: scale(0.96); }
.img-add__plus { font-size: 26px; line-height: 1; font-weight: 300; }
.img-hint { font-size: 12px; color: var(--text-muted); margin: 10px 0 2px; }

/* ═══════════ 弹窗 ═══════════ */

.modal {
  position: fixed; top: 50%; left: 50%; z-index: 60;
  width: min(420px, 92vw); transform: translate(-50%, -50%) scale(0.88);
  background: var(--card); border-radius: 20px; padding: 28px 30px;
  box-shadow: var(--shadow-lg); opacity: 0;
  transition: transform 0.35s var(--ease-spring), opacity 0.25s ease;
}
.modal.show { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.modal__title { font-size: 17px; font-weight: 700; }
.modal__text { margin-top: 12px; font-size: 14px; color: var(--text-sub); line-height: 1.6; }
.modal__actions { margin-top: 24px; display: flex; justify-content: flex-end; gap: 12px; }

/* ═══════════ 设置弹窗 ═══════════ */

.modal--settings { width: min(480px, 92vw); }
.modal__body { margin-top: 6px; }
.settings-section { padding: 16px 0; border-bottom: 1px solid var(--border); }
.settings-section:last-of-type { border-bottom: none; }
.settings-label { font-size: 12.5px; font-weight: 600; color: var(--text-sub); margin-bottom: 12px; letter-spacing: 0.04em; }
.settings-options { display: flex; gap: 10px; flex-wrap: wrap; }
.settings-opt {
  flex: 1; min-width: 108px; padding: 11px 0; border-radius: 12px;
  border: 1.5px solid var(--border); background: var(--card);
  font-size: 13px; font-weight: 500; color: var(--text-sub); text-align: center;
  transition: all 0.22s var(--ease);
}
.settings-opt:active { transform: scale(0.96); }
.settings-opt.active {
  background: var(--ink); border-color: var(--ink); color: #fff;
  box-shadow: 0 4px 14px rgba(40, 44, 46, 0.25);
}
.settings-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; font-size: 13.5px; }
.settings-row > span { color: var(--text-sub); }
.settings-row code {
  font-family: ui-monospace, Consolas, "Courier New", monospace; font-size: 12px;
  color: var(--ink); background: var(--ink-soft);
  padding: 4px 10px; border-radius: 8px;
  max-width: 64%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.set-conn { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; }
html[data-theme="dark"] .settings-row code, html[data-theme="dark"] .set-conn { color: #A8D5BC; }

/* ═══════════ Toast ═══════════ */

.toast-wrap { position: fixed; top: 22px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none; }
.toast {
  padding: 11px 22px; border-radius: 999px; font-size: 13.5px; font-weight: 500;
  color: #fff; background: rgba(30, 30, 27, 0.88); box-shadow: var(--shadow-md);
  backdrop-filter: blur(8px);
  animation: toastIn 0.45s var(--ease-spring) both;
  display: flex; align-items: center; gap: 8px;
}
.toast.ok { background: rgba(40, 44, 46, 0.92); }
.toast.err { background: rgba(194, 64, 47, 0.92); }
.toast.leaving { animation: toastOut 0.3s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-18px) scale(0.92); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-14px) scale(0.94); } }

/* ═══════════ 骨架屏 ═══════════ */

.skeleton { position: relative; overflow: hidden; background: var(--skeleton); border-radius: 8px; }
.skeleton::after {
  content: ''; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.7), transparent);
  animation: shimmer 1.4s ease-in-out infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }

/* 动效偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ── 首页背景（parallaxconfig）参数控件 ── */
.pl-range-val {
  display: inline-block; margin-left: 10px; min-width: 44px;
  font-size: 12.5px; font-weight: 700; color: var(--ink);
  background: rgba(40, 44, 46,0.1); border-radius: 8px; padding: 2px 10px; text-align: center;
}
input[type="range"] {
  width: 100%; height: 6px; -webkit-appearance: none; appearance: none;
  background: linear-gradient(90deg, rgba(40, 44, 46,0.3), rgba(40, 44, 46,0.08));
  border-radius: 3px; outline: none; margin: 10px 0 4px;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; border: 3px solid var(--ink, #282C2E);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2); cursor: pointer;
}
.pl-preview {
  width: 100%; height: 160px; border-radius: 14px;
  background-color: #F7F7F5;
  border: 1px solid var(--border);
  margin-top: 6px;
  transition: background-image 0.15s ease;
}

/* ===== Hero 多按钮编辑器 ===== */
.btn-editor { display: flex; flex-direction: column; gap: 10px; }
.btn-editor__row { display: flex; gap: 8px; align-items: center; }
.btn-editor__text { flex: 1 1 42%; min-width: 0; }
.btn-editor__link { flex: 1 1 46%; min-width: 0; }
.btn-editor__del {
  flex: 0 0 30px; width: 30px; height: 30px;
  border: none; border-radius: 8px;
  background: rgba(194, 64, 47, 0.08); color: #C2402F;
  font-size: 14px; line-height: 1; cursor: pointer;
  transition: background-color .2s ease;
}
.btn-editor__del:hover { background: rgba(194, 64, 47, 0.16); }

/* ===== 分类入口双块表单（一次新增两条） ===== */
.gc-block {
  border: 1px solid var(--border); border-radius: 14px;
  padding: 14px; background: rgba(255, 255, 255, 0.6);
}
.gc-block__title {
  font-size: 13px; font-weight: 700; color: var(--ink);
  letter-spacing: 0.05em; margin-bottom: 10px;
}
.gc-block__title::before {
  content: ''; display: inline-block;
  width: 3px; height: 12px; border-radius: 2px;
  background: var(--gold, #1F3D34); margin-right: 8px; vertical-align: -1px;
}

/* ===== 分类选择弹窗（商品表单，弹窗式点选） ===== */
.modal--picker { width: 420px; max-width: 92vw; }
.modal__sub { margin-top: 6px; font-size: 12.5px; color: var(--text-muted); }
.cat-picker { max-height: 48vh; overflow-y: auto; margin-top: 4px; }
.cat-picker__group { margin-bottom: 10px; }
.cat-picker__group-name {
  font-size: 12px; font-weight: 700; color: var(--ink-mid);
  letter-spacing: 0.08em; padding: 6px 8px 4px;
  border-bottom: 1px solid var(--border);
}
.cat-picker__item {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 10px; border-radius: 10px; cursor: pointer;
  font-size: 14px; transition: background-color .15s ease;
}
.cat-picker__item:hover { background: var(--ink-soft); }
.cat-picker__item.is-active { background: var(--ink); color: #fff; font-weight: 600; }
.cat-picker__dot { width: 5px; height: 5px; border-radius: 50%; background: var(--ink-mid); flex-shrink: 0; }
.cat-picker__item.is-active .cat-picker__dot { background: #fff; }
.cat-picker__meta { font-size: 11px; color: var(--text-muted); }
.cat-picker__item.is-active .cat-picker__meta { color: rgba(255, 255, 255, 0.7); }
.cat-picker__check { margin-left: auto; font-weight: 700; }
.cat-picker__empty { padding: 14px; text-align: center; color: var(--text-muted); font-size: 13px; }

/* 商品表单分类按钮（弹窗触发） */
.cat-btn {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 10px 14px;
  background: var(--card); border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 14px; color: var(--text); cursor: pointer; text-align: left;
  transition: border-color .15s ease;
}
.cat-btn:hover { border-color: var(--ink); }
.cat-btn__arrow { color: var(--text-muted); font-size: 16px; }

/* ===== 规格选择方式（单选/多选） ===== */
.spec-select {
  display: flex; align-items: center; gap: 8px;
  margin: 12px 0 2px;
}
.spec-select__label {
  font-size: 12.5px; font-weight: 600; color: var(--text-sub);
  letter-spacing: 0.04em; margin-right: 2px;
}
.spec-select__hint {
  font-size: 11.5px; color: var(--text-muted); margin-left: 4px;
}

/* ===== 内容行显示开关（紧凑） ===== */
.switch--sm { gap: 6px; }
.switch--sm .switch__track { width: 34px; height: 20px; }
.switch--sm .switch__track::after { width: 14px; height: 14px; top: 3px; left: 3px; }
.switch--sm input:checked + .switch__track::after { transform: translateX(14px); }
.switch--sm .switch__text { font-size: 12px; }

/* ===== 轮播板块标题独立设置区 ===== */
.section-title-panel {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 14px 2px 4px; padding: 14px 16px;
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
}
.section-title-panel__label {
  font-size: 13px; font-weight: 700; color: var(--ink);
  letter-spacing: 0.04em; white-space: nowrap;
}
.section-title-panel__input { flex: 1 1 220px; min-width: 0; }
.section-title-panel__hint {
  flex-basis: 100%; font-size: 11.5px; color: var(--text-muted);
}

/* ===== 推荐板块单元编辑器（商品卡 / 照片卡） ===== */
/* 单元网格：商品单元 2 列一行、照片单元占整行；支持拖动手柄排序 */
#c-rec-items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: start;
}
.rec-item {
  border: 1px solid var(--border); border-radius: 14px;
  padding: 14px; margin-bottom: 0;
  background: rgba(255, 255, 255, 0.6);
  transition: opacity .18s ease, outline-color .18s ease;
}
.rec-item--photo { grid-column: 1 / -1; }
.rec-item.dragging { opacity: 0.45; }
.rec-item.drag-over { outline: 2px dashed var(--gold, #1F3D34); outline-offset: 2px; }
.rec-item__head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.rec-item__drag {
  cursor: grab; color: var(--text-muted);
  display: inline-flex; align-items: center;
  padding: 2px 4px 2px 0; flex-shrink: 0;
  user-select: none; -webkit-user-select: none;
  transition: color .15s ease;
}
.rec-item__drag:hover { color: var(--ink); }
.rec-item__drag:active { cursor: grabbing; }
.rec-item__drag-ico { width: 15px; height: 15px; display: block; }
.rec-item__label {
  font-size: 13px; font-weight: 700; color: var(--ink);
  letter-spacing: 0.04em;
}
.rec-item__label::before {
  content: ''; display: inline-block; width: 3px; height: 12px;
  border-radius: 2px; background: var(--gold, #1F3D34);
  margin-right: 8px; vertical-align: -1px;
}
.rec-item__types { display: flex; gap: 6px; }
.rec-item .rec-item-del { margin-left: auto; }

/* ===== 商品选择弹窗（推荐板块商品单元） ===== */
.pp-search { margin: 10px 0 12px; }
.pp-list { max-height: 50vh; overflow-y: auto; }

/* ===== 脚模数据（16 项测量 × 左/右脚） ===== */
.fm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
.fm-item {
  border: 1px solid var(--border); border-radius: 14px;
  padding: 12px; background: rgba(255, 255, 255, 0.6);
}
.fm-item--core { border-color: rgba(31, 61, 52, 0.45); }
.fm-item__head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.fm-item__name { font-size: 13px; font-weight: 700; color: var(--ink); flex: 1; }
.fm-item__rec {
  font-size: 11px; font-weight: 600; color: #fff;
  background: var(--gold, #1F3D34); border-radius: 999px; padding: 2px 8px;
}
.fm-item__opt {
  font-size: 11px; color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 999px; padding: 2px 8px;
}
.fm-item__cells { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fm-cell { display: flex; flex-direction: column; gap: 4px; }
.fm-cell__label { font-size: 11px; color: var(--text-muted); }
.fm-cell__input { width: 100%; }
/* 用户详情内脚模行 */
.fm-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.fm-row:last-of-type { border-bottom: none; }
.fm-row__info { flex: 1; min-width: 0; }
.fm-row__name { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.fm-row__meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.fm-row__actions { display: flex; gap: 6px; flex-shrink: 0; }
.pp-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 10px; cursor: pointer;
  transition: background-color .15s ease;
}
.pp-item:hover { background: var(--ink-soft); }
.pp-item__img {
  width: 44px; height: 44px; border-radius: 8px; object-fit: cover;
  background: var(--thumb-bg); flex-shrink: 0;
}
.pp-item__img--empty { background: var(--thumb-bg); }
.pp-item__info { flex: 1; min-width: 0; }
.pp-item__name {
  font-size: 14px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pp-item__meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.pp-item__pick {
  font-size: 12px; color: var(--ink); border: 1px solid var(--ink);
  padding: 3px 10px; border-radius: 999px; flex-shrink: 0;
}

/* 商品单元字段（输入 + 选商品按钮 + 已选名） */
.pp-field { display: flex; gap: 8px; align-items: center; }
.pp-field .rec-item-code { flex: 1; min-width: 0; }
.pp-selected {
  font-size: 12.5px; font-weight: 600; color: var(--ink);
  margin-top: 6px;
}

/* ===== 照片单元滚动滑入动画配置 ===== */
.rec-item__anim {
  display: flex; align-items: center; gap: 10px; margin-top: 4px;
}
.rec-item__anim-label {
  font-size: 12.5px; font-weight: 600; color: var(--text-sub);
  letter-spacing: 0.04em;
}
.rec-item__dir { display: flex; align-items: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.rec-item__dir-hint {
  flex-basis: 100%; font-size: 11.5px; color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════
   员工登录 / 强制改密（auth-screen）
   ═══════════════════════════════════════════════════════ */
.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(31, 61, 52, 0.08), transparent 60%),
    var(--bg, #F7F7F5);
}
.auth-box {
  width: 340px;
  max-width: calc(100vw - 40px);
  background: var(--card, #fff);
  border-radius: var(--radius-lg, 24px);
  box-shadow: var(--shadow-lg, 0 18px 48px rgba(40, 44, 46, 0.16));
  padding: 40px 34px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeInUp 0.5s var(--ease, cubic-bezier(0.22, 1, 0.36, 1)) both;
}
.auth-box__logo {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--ink, #282C2E), var(--ink-deep, #1B1E20));
  color: #fff;
  font-size: 26px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 24px rgba(40, 44, 46, 0.25);
}
.auth-box__title {
  margin-top: 16px;
  font-size: 20px; font-weight: 700; color: var(--text, #282C2E);
  letter-spacing: 0.06em;
}
.auth-box__sub {
  margin-top: 6px; margin-bottom: 22px;
  font-size: 12.5px; color: var(--text-muted, #9C9FA3);
  letter-spacing: 0.04em;
}
.auth-box__field { width: 100%; position: relative; margin-bottom: 12px; }
.auth-box__input { width: 100%; padding-right: 64px; }
.auth-box__eye {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  border: none; background: none; cursor: pointer;
  font-size: 12px; color: var(--text-muted, #9C9FA3);
  padding: 6px 10px; border-radius: 8px;
}
.auth-box__eye:hover { color: var(--ink, #282C2E); }
.auth-box__msg {
  width: 100%;
  min-height: 18px;
  font-size: 12.5px; color: var(--red, #C2402F);
  margin: 2px 0 6px;
  text-align: center;
}
.auth-box__btn { width: 100%; height: 44px; margin-top: 4px; }
.auth-box__hint {
  margin-top: 16px;
  font-size: 11.5px; color: var(--text-muted, #9C9FA3);
  text-align: center; line-height: 1.6;
}

/* 顶栏用户信息（手机号 + 角色 + 退出） */
.topbar__user {
  display: flex; align-items: center; gap: 8px;
  margin-right: 14px;
  padding-right: 14px;
  border-right: 1px solid var(--border, #E9E9E6);
}
.topbar__user-phone {
  font-size: 13px; font-weight: 600; color: var(--text, #282C2E);
  font-variant-numeric: tabular-nums;
}
.topbar__user-role {
  font-size: 11px; color: var(--gold, #1F3D34);
  background: rgba(31, 61, 52, 0.08);
  border: 1px solid rgba(31, 61, 52, 0.22);
  padding: 2px 8px; border-radius: 999px;
  letter-spacing: 0.04em;
}
@media (max-width: 720px) {
  /* 移动端：顶栏只保留退出按钮（手机号/角色隐藏） */
  .topbar__user { margin-right: 4px; padding-right: 0; border-right: none; }
  .topbar__user-phone, .topbar__user-role { display: none; }
}

/* ═══════════════════════════════════════════════════════
   员工管理（admin-list / admin-row）
   ═══════════════════════════════════════════════════════ */
.admin-list { display: flex; flex-direction: column; gap: 12px; }
.admin-row {
  background: var(--card, #fff);
  border-radius: var(--radius, 16px);
  box-shadow: var(--shadow-sm, 0 2px 10px rgba(40, 44, 46, 0.05));
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: box-shadow 0.25s var(--ease, cubic-bezier(0.22, 1, 0.36, 1));
}
.admin-row:hover { box-shadow: var(--shadow-md, 0 8px 28px rgba(40, 44, 46, 0.09)); }
.admin-row.is-off { opacity: 0.62; }
.admin-row__main { flex: 1; min-width: 0; }
.admin-row__phone {
  font-size: 15px; font-weight: 700; color: var(--text, #282C2E);
  font-variant-numeric: tabular-nums;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.admin-row__name { margin-top: 4px; font-size: 12.5px; color: var(--text-sub, #63666A); }
.admin-row__perms {
  margin-top: 8px;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.admin-row__meta {
  margin-top: 8px;
  font-size: 11.5px; color: var(--text-muted, #9C9FA3);
}
.admin-row__actions {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: flex-end;
}
.admin-badge {
  font-size: 11px; font-weight: 600;
  color: var(--ink, #282C2E);
  background: var(--ink-soft, #ECEEED);
  border-radius: 999px;
  padding: 2px 9px;
  letter-spacing: 0.04em;
}
.admin-badge--super {
  color: #fff;
  background: var(--gold, #1F3D34);
}
.admin-badge--off {
  color: var(--red, #C2402F);
  background: rgba(194, 64, 47, 0.08);
  border: 1px solid rgba(194, 64, 47, 0.25);
}
.admin-perm {
  font-size: 11.5px;
  color: var(--text-sub, #63666A);
  background: var(--bg, #F7F7F5);
  border: 1px solid var(--border, #E9E9E6);
  border-radius: 999px;
  padding: 3px 10px;
  letter-spacing: 0.03em;
}
.admin-perm--key {
  color: var(--gold, #1F3D34);
  border-color: rgba(31, 61, 52, 0.3);
  background: rgba(31, 61, 52, 0.05);
  font-weight: 600;
}
.admin-perm--none {
  color: var(--text-muted, #9C9FA3);
  border-style: dashed;
}

/* 权限勾选（新增/编辑员工抽屉） */
.perm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.perm-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--border, #E9E9E6);
  border-radius: var(--radius-sm, 10px);
  padding: 12px 12px;
  cursor: pointer;
  transition: border-color 0.2s var(--ease, cubic-bezier(0.22, 1, 0.36, 1)), background 0.2s;
}
.perm-item:hover { border-color: rgba(31, 61, 52, 0.35); }
.perm-item:has(input:checked) {
  border-color: var(--gold, #1F3D34);
  background: rgba(31, 61, 52, 0.04);
}
.perm-item.is-disabled { opacity: 0.6; cursor: not-allowed; }
.perm-item input[type="checkbox"] {
  margin-top: 2px;
  accent-color: var(--gold, #1F3D34);
  width: 15px; height: 15px; flex-shrink: 0;
}
.perm-item__label {
  font-size: 13px; font-weight: 600; color: var(--text, #282C2E);
  display: block;
}
.perm-item__desc {
  font-size: 11px; color: var(--text-muted, #9C9FA3);
  margin-top: 3px; line-height: 1.5; display: block;
}
@media (max-width: 720px) {
  .perm-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════
   移动端适配（可收缩侧边栏 + 内容自适应）
   ═══════════════════════════════════════════════════════ */

/* 桌面端：汉堡按钮与遮罩隐藏 */
.nav-toggle { display: none; }
.sidebar-mask { display: none; }

/* 移动端视口高度：避免手机浏览器地址栏遮挡 */
@supports (height: 100dvh) {
  .app { height: 100dvh; }
}

@media (max-width: 768px) {
  /* ── 侧边栏 → 可收缩抽屉 ── */
  .app { position: relative; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 70;
    width: 264px;
    transform: translateX(-105%);
    transition: transform 0.35s var(--ease-spring, cubic-bezier(0.32, 0.72, 0, 1));
    box-shadow: 0 18px 48px rgba(40, 44, 46, 0.28);
    padding-top: 18px;
  }
  .app.sidebar-open .sidebar { transform: none; }
  .sidebar-mask {
    display: block;
    position: fixed; inset: 0; z-index: 65;
    background: rgba(15, 22, 18, 0.45);
    backdrop-filter: blur(2px);
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }
  .app.sidebar-open .sidebar-mask { opacity: 1; visibility: visible; }

  /* ── 顶栏 ── */
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 12px;
    background: var(--card); border: 1.5px solid var(--border);
    color: var(--text); margin-right: 10px; flex-shrink: 0;
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s var(--ease);
  }
  .nav-toggle:active { transform: scale(0.9); }
  .topbar { height: 56px; padding: 0 14px; }
  .topbar__title { font-size: 16px; }
  .topbar__right { gap: 8px; }
  .theme-btn { width: 36px; height: 36px; }

  /* ── 页面内边距 ── */
  .page { padding: 16px 14px 30px; }

  /* ── 工具栏 / 搜索 / 状态胶囊 ── */
  .toolbar { gap: 10px; margin-bottom: 16px; }
  .search-box { width: 100%; flex-basis: 100%; }
  .chips {
    flex-wrap: nowrap; overflow-x: auto; width: 100%;
    padding-bottom: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex-shrink: 0; padding: 8px 14px; }
  .date-range { width: 100%; flex-wrap: wrap; }
  .date-range input[type="date"] { flex: 1; min-width: 0; }
  .cond-list { flex-direction: column; align-items: stretch; }
  .cond-row { width: 100%; }
  .cond-row__value { flex: 1; width: auto; }

  /* ── 内容 Tabs（横向滚动） ── */
  .tabs {
    width: 100%; overflow-x: auto; flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex-shrink: 0; padding: 9px 16px; }

  /* ── 网格 / 统计 ── */
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .pager { flex-wrap: wrap; gap: 8px; }

  /* ── 列表行自适应 ── */
  .content-row { flex-wrap: wrap; padding: 12px 14px; }
  .cat-group__head { flex-wrap: wrap; }
  .cat-sub { flex-wrap: wrap; }
  .order-row { padding: 12px 14px; }
  .order-row__head { flex-wrap: wrap; }
  .order-row__main { flex-wrap: wrap; }
  .order-row__meta { text-align: left; width: 100%; display: flex; align-items: baseline; gap: 10px; }
  .user-row { flex-wrap: wrap; padding: 12px 14px; }
  .referral-row { flex-wrap: wrap; padding: 12px 14px; }
  .referral-row__bar { width: 70px; }
  .ref-summary { grid-template-columns: repeat(2, 1fr); }
  .admin-row { flex-direction: column; align-items: stretch; gap: 12px; padding: 14px; }
  .admin-row__actions { justify-content: flex-start; flex-wrap: wrap; }

  /* ── 表单 / 抽屉 / 弹窗 ── */
  .field__row { grid-template-columns: 1fr; }
  .fm-grid { grid-template-columns: 1fr; }
  #c-rec-items { grid-template-columns: 1fr; }
  .rec-item { grid-column: 1 / -1 !important; }
  .drawer__head { padding: 16px; }
  .drawer__body { padding: 16px; }
  .drawer__foot { padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); }
  .modal { width: 92vw; padding: 24px 20px; }

  /* ── 编辑抽屉内双列改单列 ── */
  .btn-editor__row { flex-direction: column; align-items: stretch; }
  .pp-field { flex-wrap: wrap; }
}

/* ═══════════════════════════════════════════════════════
   客户臻选主素材编辑器（多主素材 + 每主素材 0-3 张子照片）
   ═══════════════════════════════════════════════════════ */
.ugc-media-editor { display: flex; flex-direction: column; gap: 14px; }
.ugc-media-item {
  border: 1px solid var(--border, #E9E9E6);
  border-radius: var(--radius, 16px);
  padding: 14px;
  background: var(--card, #fff);
  box-shadow: var(--shadow-sm, 0 2px 10px rgba(40, 44, 46, 0.05));
}
.ugc-media-item__head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.ugc-media-item__no {
  font-size: 13px; font-weight: 700; color: var(--ink, #282C2E);
  letter-spacing: 0.04em;
}
.ugc-media-item__types { display: flex; gap: 6px; margin-left: auto; }
.ugc-mdel { margin-left: 4px; }
.ugc-sub-editor {
  margin-top: 12px;
  border-top: 1px dashed var(--border, #E9E9E6);
  padding-top: 10px;
}
.ugc-sub-editor__label {
  display: block;
  font-size: 12px; font-weight: 600; color: var(--text-sub, #63666A);
  margin-bottom: 8px; letter-spacing: 0.03em;
}
.ugc-sub-slots { display: flex; gap: 10px; flex-wrap: wrap; }
.ugc-sub-slot {
  position: relative;
  width: 96px; height: 96px;
  border: 1.5px dashed var(--imgadd-border, #D4D1C6);
  border-radius: 10px;
  background: var(--imgadd-bg, rgba(255, 255, 255, 0.5));
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.ugc-sub-slot.has { border-style: solid; border-color: var(--border, #E9E9E6); }
.ugc-sub-slot .thumb-img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 0;
  position: absolute; inset: 0;
}
.ugc-sub-slot__acts {
  position: absolute; inset: 0;
  background: rgba(40, 44, 46, 0.42);
  display: flex; align-items: center; justify-content: center; gap: 4px;
  opacity: 0; transition: opacity 0.2s ease;
}
.ugc-sub-slot:hover .ugc-sub-slot__acts { opacity: 1; }
.ugc-sub-slot__acts .btn { padding: 3px 8px; font-size: 11px; }
.ugc-sub-add { width: 96px; height: 96px; }
@media (max-width: 720px) {
  .ugc-sub-slot { width: 84px; height: 84px; }
  .ugc-sub-add { width: 84px; height: 84px; }
}

/* ═══════════ 来样定制申请（GM社区） ═══════════ */
.custom-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 24px 32px;
}
.cr-row {
  background: var(--card, #fff);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: var(--shadow-sm, 0 2px 10px rgba(0,0,0,0.05));
  border: 1px solid var(--border, #EBEAE6);
  animation: cardIn 0.45s var(--ease, cubic-bezier(0.22, 1, 0.36, 1)) both;
}
.cr-row__head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.cr-row__spacer { flex: 1; }
.cr-row__status {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(40,44,46,0.08);
  color: var(--ink, #282C2E);
}
.cr-row__status--pending { background: rgba(214, 158, 46, 0.16); color: #9A6A00; }
.cr-row__status--processing { background: rgba(43, 106, 168, 0.14); color: #2B6AA8; }
.cr-row__status--done { background: rgba(31, 61, 52, 0.12); color: var(--gold, #1F3D34); }
.cr-row__status--rejected { background: rgba(194, 64, 47, 0.12); color: #C2402F; }
.cr-row__time {
  font-size: 12px;
  color: var(--ink-muted, #9C9FA3);
}
.cr-row__meta {
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-mid, #63666A);
}
.cr-row__desc {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink, #282C2E);
  white-space: pre-wrap;
}
.cr-row__imgs {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cr-thumb {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--bg-soft, #F7F6F2);
  cursor: zoom-in;
}

/* ═══════════ 内容运营：分组标签（首页装修 / GM社区 / 商品与客户 / 页面背景） ═══════════ */
.content-groups {
  flex: 1 1 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--card, #fff);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: var(--shadow-sm, 0 2px 10px rgba(0,0,0,0.05));
}
.content-group {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.content-group__label {
  flex-shrink: 0;
  min-width: 72px;
  padding-top: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted, #9C9FA3);
  letter-spacing: 0.04em;
  line-height: 1.3;
}
.content-group__tabs {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}
/* 组内标签：比原 tabs 更紧凑，避免右侧溢出 */
.content-groups .tab {
  padding: 7px 16px;
  font-size: 13px;
  border-radius: 9px;
}
/* 组分隔线（除最后一组） */
.content-group + .content-group {
  padding-top: 8px;
  border-top: 1px dashed var(--border, #EBEAE6);
}
/* 新增按钮单独一行、右对齐（分组占满整行后） */
#page-content .toolbar > .toolbar__spacer { display: none; }
#page-content #addContentBtn { margin-left: auto; }

/* ═══════════ 爱鞋修护：交互式价格表（码数价 / 高度价） ═══════════ */
.price-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.price-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.price-row__key {
  width: 92px !important;
  flex-shrink: 0;
  text-align: center;
}
.price-row__val {
  flex: 1;
  min-width: 0;
}
.price-row__eq {
  color: var(--text-muted, #9C9FA3);
  font-size: 14px;
  flex-shrink: 0;
}
.price-row__label {
  width: 92px;
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink, #282C2E);
  text-align: center;
  padding: 9px 0;
  background: var(--bg-soft, #F7F6F2);
  border-radius: 10px;
}
.price-row__del {
  flex-shrink: 0;
  width: 36px;
  padding: 0 !important;
}
.price-rows__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}
