/* =========================================================
   3777 Vintage · 3777 Vintage
   单文件样式表 — 管理端 + 买家展示页
   ========================================================= */

:root {
  --ink: #191612;
  --ink-2: #24201a;
  --ink-3: #332d25;
  --paper: #f5f0e8;
  --paper-2: #ece4d7;
  --paper-3: #e3d8c8;
  --card: #fffdf9;
  --muted: #7c7468;
  --muted-2: #a39a8c;
  --line: #e4dacb;
  --line-strong: #d2c2aa;
  --gold: #b58a4d;
  --gold-dark: #8d6731;
  --gold-soft: #ead9ba;
  --olive: #5f6e58;
  --rose: #a66a57;
  --danger: #ae4b40;
  --danger-soft: #f6e5e1;
  --success: #536d50;
  --shadow-sm: 0 1px 2px rgba(33, 26, 16, 0.05), 0 8px 20px rgba(33, 26, 16, 0.04);
  --shadow-md: 0 16px 44px rgba(33, 26, 16, 0.12);
  --shadow-lg: 0 30px 80px rgba(20, 16, 10, 0.22);
  --radius: 18px;
  --radius-sm: 12px;
  --font-serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-locked {
  overflow: hidden;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  font-weight: 600;
  line-height: 1.25;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

em {
  font-style: normal;
}

code {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.55);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86em;
  word-break: break-all;
}

::selection {
  color: #fff;
  background: var(--gold-dark);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.eyebrow {
  margin-bottom: 7px;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.19em;
  line-height: 1.2;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
}

.helper {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.65;
}

.text-link {
  color: var(--gold-dark);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 19px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease),
    border-color 0.25s var(--ease), color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn .icon {
  width: 16px;
  height: 16px;
}

.btn-primary {
  color: #f8f2e7;
  background: var(--ink);
  border-color: var(--ink);
  box-shadow: 0 8px 18px rgba(25, 22, 18, 0.16);
}

.btn-primary:hover {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
  box-shadow: 0 10px 24px rgba(141, 103, 49, 0.24);
}

.btn-dark {
  color: #f8f2e7;
  background: var(--ink);
  border-color: var(--ink);
}

.btn-dark:hover {
  background: var(--ink-3);
}

.btn-ghost {
  color: var(--ink-2);
  border-color: var(--line);
  background: rgba(255, 253, 249, 0.6);
}

.btn-ghost:hover {
  border-color: var(--line-strong);
  background: var(--card);
}

.btn-light {
  color: var(--ink);
  background: #fbf6ed;
  border-color: rgba(255, 255, 255, 0.18);
}

.btn-light:hover {
  background: #fff;
}

.btn-danger {
  color: #fff;
  background: var(--danger);
  border-color: var(--danger);
}

.btn-danger:hover {
  background: #933b31;
}

.btn-sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 12.5px;
}

.btn-lg {
  min-height: 50px;
  padding: 0 24px;
  font-size: 14px;
}

.btn-block {
  width: 100%;
}

.btn[disabled] {
  opacity: 0.55;
  cursor: wait;
  transform: none;
}

.btn.is-loading .icon {
  animation: spin 1s linear infinite;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  color: var(--ink-2);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.icon-btn:hover {
  border-color: var(--line-strong);
  background: var(--paper);
}

.icon-btn-dark {
  color: #d8c7ac;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.icon-btn-dark:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
}

.icon-btn .icon {
  width: 17px;
  height: 17px;
}

/* ---------- 表单 ---------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.field-label {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.field-label em {
  color: var(--gold-dark);
}

.field-label small {
  color: var(--muted-2);
  font-weight: 400;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffdfa;
  color: var(--ink);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.input::placeholder,
.textarea::placeholder {
  color: #b5ab9d;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--gold);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(181, 138, 77, 0.12);
}

.textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.65;
}

.select {
  appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237c7468' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  cursor: pointer;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field-span-2 {
  grid-column: span 2;
}

.form-error {
  min-height: 18px;
  margin: 4px 0 0;
  color: var(--danger);
  font-size: 12.5px;
}

.form-error:empty {
  min-height: 0;
  margin: 0;
}

/* ---------- 开关 ---------- */

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.switch-row:last-of-type {
  border-bottom: 0;
}

.switch-row > span:first-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.switch-row strong {
  font-size: 13.5px;
  font-weight: 600;
}

.switch-row small {
  color: var(--muted);
  font-size: 12px;
}

.switch-row input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.switch {
  position: relative;
  width: 42px;
  height: 24px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #d8cfc0;
  transition: background 0.25s;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.16);
  transition: transform 0.25s var(--ease);
}

.switch-row input:checked + .switch {
  background: var(--gold);
}

.switch-row input:checked + .switch::after {
  transform: translateX(18px);
}

.switch-row input:focus-visible + .switch {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.switch.is-small {
  width: 36px;
  height: 21px;
}

.switch.is-small::after {
  width: 15px;
  height: 15px;
}

.switch.is-small input:checked + .switch::after {
  transform: translateX(15px);
}

/* ---------- 状态点 ---------- */

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #6f8b62;
  box-shadow: 0 0 0 4px rgba(111, 139, 98, 0.12);
}

.status-dot.is-offline {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(174, 75, 64, 0.12);
}

.status-dot.is-pending {
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(181, 138, 77, 0.14);
}

/* =========================================================
   管理端 · 登录
   ========================================================= */

.admin-body {
  background:
    radial-gradient(1200px 700px at 10% 0%, rgba(181, 138, 77, 0.06), transparent 60%),
    var(--paper);
}

.login-view {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  min-height: 100dvh;
}

.login-art {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 8vw;
  color: #f4ecdf;
  background:
    radial-gradient(800px 560px at 78% 20%, rgba(181, 138, 77, 0.22), transparent 62%),
    radial-gradient(700px 700px at 5% 100%, rgba(96, 70, 38, 0.3), transparent 58%),
    #171410;
}

.login-art::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 35% 40%, black, transparent 75%);
}

.login-art-inner {
  position: relative;
  z-index: 2;
  max-width: 560px;
}

.login-mark {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  margin-bottom: 48px;
  border: 1px solid rgba(234, 217, 186, 0.42);
  border-radius: 50%;
  color: var(--gold-soft);
  font-family: var(--font-serif);
  font-size: 28px;
  line-height: 1;
}

.login-art .eyebrow {
  color: rgba(234, 217, 186, 0.64);
}

.login-art h1 {
  margin: 16px 0 26px;
  font-family: var(--font-serif);
  font-size: clamp(48px, 6vw, 84px);
  font-weight: 500;
  letter-spacing: 0.06em;
}

.login-art h1 span {
  display: block;
  margin-top: 14px;
  color: rgba(244, 236, 223, 0.56);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.42em;
}

.login-art-copy {
  color: rgba(244, 236, 223, 0.76);
  font-family: var(--font-serif);
  font-size: clamp(20px, 2.4vw, 29px);
  line-height: 1.9;
  letter-spacing: 0.08em;
}

.login-art-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 52px;
  color: rgba(234, 217, 186, 0.58);
  font-size: 11.5px;
  letter-spacing: 0.14em;
}

.login-art-meta span {
  position: relative;
  padding-left: 15px;
}

.login-art-meta span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 5px;
  height: 5px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  transform: translateY(-50%);
}

.login-art-ring {
  position: absolute;
  right: -18vw;
  bottom: -32vw;
  width: 62vw;
  height: 62vw;
  border: 1px solid rgba(234, 217, 186, 0.16);
  border-radius: 50%;
}

.login-art-ring::before,
.login-art-ring::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(234, 217, 186, 0.1);
  border-radius: 50%;
}

.login-art-ring::before {
  inset: 9%;
}

.login-art-ring::after {
  inset: 19%;
}

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 7vw;
  background: var(--paper);
}

.login-box {
  width: min(390px, 100%);
}

.login-brand-mobile {
  display: none;
}

.login-box h2 {
  margin: 8px 0 6px;
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.login-sub {
  margin-bottom: 32px;
  color: var(--muted);
  font-size: 13.5px;
}

.pin-wrap {
  position: relative;
}

.pin-input {
  height: 52px;
  padding-right: 48px;
  letter-spacing: 0.25em;
}

.pin-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  transform: translateY(-50%);
}

.pin-toggle:hover {
  color: var(--ink);
  background: var(--paper);
}

.pin-toggle .icon {
  width: 17px;
  height: 17px;
}

.login-box .btn-block {
  margin-top: 18px;
}

.login-hint {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 24px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 253, 249, 0.6);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.login-hint strong {
  color: var(--gold-dark);
}

.hint-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--gold);
}

.login-links {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.login-links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12.5px;
}

.login-links a:hover {
  color: var(--ink);
}

.login-links .icon {
  width: 14px;
  height: 14px;
}

/* =========================================================
   管理端 · 框架
   ========================================================= */

.app-shell {
  min-height: 100dvh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: 248px;
  padding: 30px 22px 22px;
  color: #e8ddcb;
  background:
    radial-gradient(360px 300px at 20% 0%, rgba(181, 138, 77, 0.16), transparent 70%),
    #171410;
}

.sidebar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 100% 6px;
}

.sidebar > * {
  position: relative;
  z-index: 1;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 28px;
}

.brand-monogram {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 1px solid rgba(234, 217, 186, 0.42);
  border-radius: 50%;
  color: var(--gold-soft);
  font-family: var(--font-serif);
  font-size: 21px;
  line-height: 1;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

.brand-text strong {
  color: #f4ecdf;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.brand-text small {
  margin-top: 2px;
  color: rgba(232, 221, 203, 0.4);
  font-size: 9px;
  letter-spacing: 0.16em;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 12px;
}

.side-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(232, 221, 203, 0.62);
  font-size: 13.5px;
  text-align: left;
  transition: background 0.2s, color 0.2s;
}

.side-link .icon {
  width: 18px;
  height: 18px;
  opacity: 0.8;
}

.side-link em {
  margin-left: auto;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(232, 221, 203, 0.6);
  font-size: 10px;
  font-style: normal;
}

.side-link:hover {
  color: #f4ecdf;
  background: rgba(255, 255, 255, 0.045);
}

.side-link.is-active {
  color: #f4ecdf;
  background: rgba(234, 217, 186, 0.1);
  box-shadow: inset 2px 0 0 var(--gold);
}

.side-link.is-active .icon {
  color: var(--gold-soft);
  opacity: 1;
}

.sidebar-card {
  margin-top: auto;
  padding: 17px;
  border: 1px solid rgba(234, 217, 186, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.sidebar-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #e8ddcb;
  font-size: 11.5px;
  font-weight: 600;
}

.sidebar-card p {
  margin: 10px 0 14px;
  color: rgba(232, 221, 203, 0.46);
  font-size: 11px;
  line-height: 1.65;
}

.sidebar-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gold-soft);
  font-size: 11.5px;
  font-weight: 600;
}

.sidebar-link .icon {
  width: 13px;
  height: 13px;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
  padding: 18px 4px 0;
  border-top: 1px solid rgba(234, 217, 186, 0.1);
}

.admin-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(234, 217, 186, 0.14);
  color: var(--gold-soft);
  font-size: 12px;
}

.admin-mini > span:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.35;
}

.admin-mini strong {
  color: #e8ddcb;
  font-size: 11.5px;
  font-weight: 600;
}

.admin-mini small {
  overflow: hidden;
  color: rgba(232, 221, 203, 0.38);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main-shell {
  min-height: 100dvh;
  margin-left: 248px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 76px;
  padding: 0 38px;
  border-bottom: 1px solid rgba(210, 194, 170, 0.55);
  background: rgba(245, 240, 232, 0.85);
  backdrop-filter: blur(18px);
}

.topbar-title h1 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.topbar-title .eyebrow {
  margin-bottom: 2px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.content {
  width: 100%;
  max-width: 1460px;
  margin: 0 auto;
  padding: 34px 38px 70px;
}

.view-panel {
  display: none;
}

.view-panel.is-active {
  display: block;
  animation: panelIn 0.45s var(--ease);
}

.welcome-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 26px;
}

.welcome-title {
  font-family: var(--font-serif);
  font-size: clamp(24px, 2.2vw, 31px);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.welcome-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 253, 249, 0.55);
}

.welcome-badge > div {
  display: flex;
  flex-direction: column;
  line-height: 1.4;
}

.welcome-badge strong {
  font-size: 11.5px;
  font-weight: 600;
}

.welcome-badge small {
  color: var(--muted);
  font-size: 10.5px;
}

/* ---------- 统计 ---------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stat-card {
  position: relative;
  overflow: hidden;
  padding: 19px 20px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.stat-card::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -46px;
  width: 110px;
  height: 110px;
  border: 1px solid var(--line);
  border-radius: 50%;
  opacity: 0.55;
}

.stat-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 15px;
  border-radius: 9px;
  background: #f1e9dc;
  color: var(--ink-2);
}

.stat-icon .icon {
  width: 16px;
  height: 16px;
}

.stat-icon-gold {
  background: #f4e9d5;
  color: var(--gold-dark);
}

.stat-icon-olive {
  background: #e8ede3;
  color: var(--olive);
}

.stat-icon-rose {
  background: #f3e5e0;
  color: var(--rose);
}

.stat-card p {
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 0.05em;
}

.stat-card strong {
  display: block;
  margin: 4px 0 1px;
  font-family: var(--font-serif);
  font-size: clamp(28px, 2.4vw, 36px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.stat-card small {
  color: var(--muted-2);
  font-size: 10.5px;
}

.stat-card small span {
  color: var(--gold-dark);
  font-weight: 600;
}

.finance-band {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-top: 16px;
  padding: 19px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(100deg, #fbf7ef, #f7f1e7);
}

.finance-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 122px;
}

.finance-item > span {
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.08em;
}

.finance-item strong {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.finance-item small {
  color: var(--muted-2);
  font-size: 10px;
}

.finance-divider {
  width: 1px;
  height: 38px;
  background: var(--line);
}

.finance-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  color: var(--gold-dark);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.finance-link .icon {
  width: 14px;
  height: 14px;
}

.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(310px, 0.85fr);
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}

.dash-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.card-head h3 {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.card-head .eyebrow {
  margin-bottom: 4px;
}

.activity-list {
  display: flex;
  flex-direction: column;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.activity-item:first-child {
  padding-top: 0;
}

.activity-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.activity-thumb {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 10px;
  object-fit: cover;
  background: var(--paper-2);
}

.activity-thumb-placeholder {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: var(--paper-2);
  color: var(--muted-2);
  font-family: var(--font-serif);
  font-size: 17px;
}

.activity-main {
  min-width: 0;
  flex: 1;
}

.activity-main strong {
  display: block;
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-main small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10.5px;
}

.activity-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.activity-badge {
  display: inline-flex;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.activity-badge.in {
  color: var(--success);
  background: #eaf0e5;
}

.activity-badge.out {
  color: var(--danger);
  background: var(--danger-soft);
}

.activity-badge.return,
.activity-badge.adjust {
  color: var(--gold-dark);
  background: #f5ead6;
}

.activity-amount {
  color: var(--ink-2);
  font-family: var(--font-serif);
  font-size: 13px;
}

.category-bars {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.cat-bar-row {
  display: grid;
  grid-template-columns: 52px 1fr 26px;
  gap: 10px;
  align-items: center;
  font-size: 11.5px;
}

.cat-bar-row > span:first-child {
  color: var(--ink-2);
}

.cat-bar-row > span:last-child {
  color: var(--muted);
  text-align: right;
}

.cat-bar {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--paper-2);
}

.cat-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), #cfac76);
  transition: width 0.6s var(--ease);
}

.quick-card {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 23px;
  border-radius: var(--radius);
  color: #f1e7d7;
  background:
    radial-gradient(400px 260px at 100% 0%, rgba(181, 138, 77, 0.25), transparent 70%),
    var(--ink);
}

.quick-card .eyebrow {
  color: rgba(234, 217, 186, 0.55);
}

.quick-card h3 {
  margin: 5px 0 8px;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
}

.quick-card p {
  max-width: 300px;
  color: rgba(241, 231, 215, 0.54);
  font-size: 11.5px;
  line-height: 1.65;
}

.quick-card .btn {
  flex: 0 0 auto;
}

.quick-card .btn .icon {
  width: 15px;
  height: 15px;
}

/* ---------- 区块标题 ---------- */

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.section-head h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: 27px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.section-sub {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12.5px;
}

.count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 23px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
}

/* ---------- 库存 ---------- */

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.search-box {
  position: relative;
  flex: 1;
  max-width: 420px;
}

.search-box .icon {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 17px;
  height: 17px;
  color: var(--muted-2);
  transform: translateY(-50%);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  height: 44px;
  padding: 0 16px 0 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  outline: none;
  font-size: 13px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(181, 138, 77, 0.1);
}

.filter-row {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.filter-row .select {
  width: auto;
  min-width: 108px;
  height: 38px;
  min-height: 38px;
  padding-top: 0;
  padding-bottom: 0;
  border-radius: 999px;
  background-color: var(--card);
  font-size: 12px;
}

.inventory-wrap {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.inv-head,
.inv-row {
  display: grid;
  grid-template-columns: minmax(230px, 2.3fr) minmax(70px, 0.8fr) minmax(78px, 0.8fr) 80px 90px 68px;
  align-items: center;
  gap: 14px;
  padding: 0 20px;
}

.inv-head {
  height: 42px;
  border-bottom: 1px solid var(--line);
  background: #faf5ec;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.09em;
}

.inv-row {
  min-height: 79px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.2s;
}

.inv-row:last-child {
  border-bottom: 0;
}

.inv-row:hover {
  background: #fdf9f2;
}

.inv-row .mobile-meta {
  display: none;
}

.inv-main {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.inv-thumb {
  position: relative;
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 10px;
  background: var(--paper-2);
}

.inv-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.inv-thumb-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--muted-2);
  font-family: var(--font-serif);
  font-size: 18px;
}

.inv-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.inv-info strong {
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inv-info small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inv-brand {
  color: var(--gold-dark);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.inv-product {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.inv-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.inv-copy strong,
.inv-copy .inv-name {
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inv-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inv-thumb {
  display: block;
}

.inv-thumb img {
  display: block;
}

.inv-operator {
  font-size: 9.5px !important;
}

.inv-lock-note {
  display: block;
  margin-top: 3px;
  color: var(--gold-dark);
  font-size: 9px;
}

.inv-action-danger:hover {
  color: var(--danger);
  background: var(--danger-soft);
}


.inv-category {
  color: var(--muted);
  font-size: 11.5px;
}

.inv-price {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.status-chip::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.status-in_stock {
  color: var(--success);
  background: #eaf0e5;
}

.status-reserved {
  color: var(--gold-dark);
  background: #f5ead6;
}

.status-sold {
  color: var(--muted);
  background: #eee9e1;
}

.status-archived {
  color: var(--muted-2);
  background: #f0ebe3;
}

.inv-visible {
  display: flex;
  align-items: center;
}

.visibility-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 10px;
}

.visibility-toggle .switch {
  width: 30px;
  height: 18px;
}

.visibility-toggle .switch::after {
  width: 12px;
  height: 12px;
}

.visibility-toggle .switch.is-on {
  background: var(--gold);
}

.visibility-toggle .switch.is-on::after {
  transform: translateX(12px);
}

.inv-actions {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
}

.inv-action {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  transition: background 0.2s, color 0.2s;
}

.inv-action:hover {
  background: var(--paper-2);
  color: var(--ink);
}

.inv-action .icon {
  width: 15px;
  height: 15px;
}

.inv-action.danger:hover {
  color: var(--danger);
  background: var(--danger-soft);
}

.inv-action[disabled],
.visibility-toggle[disabled] {
  opacity: 0.34;
  cursor: not-allowed;
}

.inv-action[disabled]:hover,
.visibility-toggle[disabled]:hover {
  background: transparent;
  color: var(--muted);
}

.inventory-results {
  min-height: 100px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 270px;
  padding: 36px 24px;
  text-align: center;
}

.empty-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--gold-dark);
  font-family: var(--font-serif);
  font-size: 24px;
}

.empty-state h3 {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
}

.empty-state p {
  max-width: 320px;
  margin: 7px 0 16px;
  color: var(--muted);
  font-size: 12px;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  padding: 18px 0 0;
}

/* ---------- 分类 ---------- */

.categories-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.45fr);
  gap: 18px;
  align-items: start;
}

.categories-layout > .card {
  min-height: 220px;
}

.category-tip {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(100deg, #f1e8da, #f8f3ea);
}

.category-tip .icon {
  width: 22px;
  height: 22px;
  color: var(--gold-dark);
}

.category-tip h3 {
  margin-bottom: 4px;
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 500;
}

.category-tip p {
  max-width: 720px;
  color: var(--muted);
  font-size: 12px;
}

.inline-form {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.inline-form .field {
  flex: 1;
}

.inline-form .btn {
  min-height: 44px;
}

.category-list {
  display: flex;
  flex-direction: column;
}

.category-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--line);
}

.category-row:first-child {
  padding-top: 0;
}

.category-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.category-swatch {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 9px;
  background: var(--paper-2);
  color: var(--gold-dark);
  font-family: var(--font-serif);
  font-size: 14px;
}

.category-row-main {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.category-row-main strong {
  font-size: 13px;
  font-weight: 600;
}

.category-row-main small {
  color: var(--muted);
  font-size: 10.5px;
}

.category-row-actions {
  display: flex;
  gap: 2px;
}

.category-row-actions .inv-action {
  width: 28px;
  height: 28px;
}

.category-row.editing .category-row-main {
  flex-direction: row;
  align-items: center;
  gap: 6px;
}

.category-name-input {
  width: 100%;
  height: 34px;
  padding: 0 9px;
  border: 1px solid var(--gold);
  border-radius: 7px;
  background: #fff;
  font-size: 13px;
  outline: none;
}

/* ---------- 设置 ---------- */

.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 18px;
  align-items: start;
}

.settings-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.default-pin-warning {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 15px;
  padding: 11px 13px;
  border: 1px solid #e7c9a2;
  border-radius: 9px;
  background: #fbf0df;
  color: #8a5e24;
  font-size: 11.5px;
  line-height: 1.5;
}

.default-pin-warning .icon {
  width: 15px;
  height: 15px;
  margin-top: 1px;
}

.data-actions {
  display: flex;
  flex-direction: column;
}

.data-action {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 2px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  text-align: left;
}

.data-action:last-child {
  border-bottom: 0;
}

.data-action:hover strong {
  color: var(--gold-dark);
}

.data-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 9px;
  background: var(--paper-2);
  color: var(--gold-dark);
}

.data-icon .icon {
  width: 16px;
  height: 16px;
}

.data-action > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.data-action strong {
  font-size: 12px;
  font-weight: 600;
  transition: color 0.2s;
}

.data-action small {
  color: var(--muted);
  font-size: 10.5px;
}

.data-action > .icon {
  width: 14px;
  height: 14px;
  color: var(--muted-2);
}

.sync-card {
  padding: 21px;
  border-radius: var(--radius);
  color: #eee3d0;
  background:
    radial-gradient(300px 220px at 100% 0%, rgba(181, 138, 77, 0.25), transparent 70%),
    var(--ink);
}

.sync-card-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 8px;
}

.sync-card-head strong {
  font-size: 13px;
}

.sync-card p {
  margin-bottom: 13px;
  color: rgba(238, 227, 208, 0.55);
  font-size: 11.5px;
  line-height: 1.65;
}

.sync-card code {
  display: block;
  margin-bottom: 13px;
  padding: 9px 11px;
  border-color: rgba(238, 227, 208, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: var(--gold-soft);
  font-size: 12px;
}

/* =========================================================
   管理端 · 弹层 / 抽屉
   ========================================================= */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(20, 16, 10, 0.42);
  backdrop-filter: blur(3px);
  animation: fadeIn 0.25s ease;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  width: min(500px, 100vw);
  background: var(--card);
  box-shadow: var(--shadow-lg);
  transform: translateX(102%);
  transition: transform 0.45s var(--ease);
}

.drawer.is-open {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 26px 18px;
  border-bottom: 1px solid var(--line);
}

.drawer-head h2 {
  font-family: var(--font-serif);
  font-size: 23px;
  font-weight: 500;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 22px 26px 36px;
  overscroll-behavior: contain;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 30px;
  background: rgba(20, 16, 10, 0.46);
  backdrop-filter: blur(4px);
}

.modal.is-open {
  display: flex;
  animation: fadeIn 0.25s ease;
}

.modal-card {
  display: flex;
  flex-direction: column;
  width: min(660px, 100%);
  max-height: min(90dvh, 900px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.4s var(--ease);
}

.modal-wide {
  width: min(820px, 100%);
}

.modal-sm {
  width: min(400px, 100%);
  padding: 30px;
  text-align: center;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 23px 26px 18px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  font-family: var(--font-serif);
  font-size: 25px;
  font-weight: 500;
}

.modal-form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

.modal-scroll {
  overflow-y: auto;
  padding: 24px 26px;
  overscroll-behavior: contain;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 26px;
  border-top: 1px solid var(--line);
  background: #fbf6ed;
}

.modal-foot-note {
  color: var(--muted);
  font-size: 10.5px;
}

.modal-foot-actions {
  display: flex;
  gap: 8px;
}

.form-section + .form-section {
  margin-top: 28px;
  padding-top: 25px;
  border-top: 1px solid var(--line);
}

.form-section-head {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: baseline;
  column-gap: 9px;
  margin-bottom: 17px;
}

.form-section-head > span {
  color: var(--gold);
  font-family: var(--font-serif);
  font-size: 12px;
}

.form-section-head h3 {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
}

.form-section-head p {
  grid-column: 2;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11.5px;
}

/* 上传 */

.upload-block {
  margin-bottom: 19px;
}

.upload-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.upload-btn {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 15px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: #fcf8f1;
  text-align: left;
  transition: border-color 0.2s, background 0.2s;
}

.upload-btn:hover {
  border-color: var(--gold);
  background: #fdf8ef;
}

.upload-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--paper-2);
  color: var(--gold-dark);
}

.upload-icon .icon {
  width: 16px;
  height: 16px;
}

.upload-btn > span:last-child {
  display: flex;
  flex-direction: column;
}

.upload-btn strong {
  font-size: 11.5px;
  font-weight: 600;
}

.upload-btn small {
  color: var(--muted);
  font-size: 9.5px;
}

.image-editor {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 9px;
  margin-top: 12px;
}

.image-editor:empty {
  display: none;
}

.image-tile {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-2);
}

.image-tile.is-cover {
  box-shadow: 0 0 0 2px var(--gold);
}

.image-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-tile.is-private img {
  opacity: 0.55;
}

.image-tile-badge {
  position: absolute;
  top: 5px;
  left: 5px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(25, 22, 18, 0.72);
  color: #fff;
  font-size: 8px;
  letter-spacing: 0.04em;
  backdrop-filter: blur(4px);
}

.image-tile-actions {
  position: absolute;
  right: 4px;
  bottom: 4px;
  display: flex;
  gap: 3px;
}

.image-tile-btn {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(25, 22, 18, 0.68);
  color: #fff;
  backdrop-filter: blur(4px);
}

.image-tile-btn:hover {
  background: var(--ink);
}

.image-tile-btn .icon {
  width: 11px;
  height: 11px;
}

.image-tile-btn.is-active {
  color: var(--gold-soft);
}

.image-editor-sm {
  grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
}

/* 出库 / 入库 */

.stockout-item {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 18px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbf6ed;
}

.stockout-item img {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border-radius: 9px;
  object-fit: cover;
}

.stockout-thumb {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 9px;
  background: var(--paper-2);
}

.stockout-thumb img {
  width: 100%;
  height: 100%;
}

.stockout-item-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.stockout-item-info strong {
  overflow: hidden;
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stockout-item-info small {
  color: var(--muted);
  font-size: 10.5px;
}

.stockout-item-price {
  margin-left: auto;
  font-family: var(--font-serif);
  font-size: 15px;
  white-space: nowrap;
}

.mini-uploader {
  display: flex;
  gap: 8px;
}

.mini-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fcf8f1;
  font-size: 11px;
  font-weight: 600;
}

.mini-upload-btn:hover {
  border-color: var(--gold);
}

.mini-upload-btn .icon {
  width: 14px;
  height: 14px;
}

.notice-strip {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 17px;
  padding: 11px 13px;
  border: 1px solid #e8d3b2;
  border-radius: 9px;
  background: #fbf2e4;
  color: #7d5828;
  font-size: 11px;
  line-height: 1.55;
}

.notice-strip .icon {
  width: 14px;
  height: 14px;
  margin-top: 1px;
}

/* 确认 */

.confirm-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 13px;
  border-radius: 50%;
  background: var(--danger-soft);
  color: var(--danger);
}

.confirm-icon .icon {
  width: 21px;
  height: 21px;
}

.modal-sm h2 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
}

.modal-sm > p {
  margin: 8px 0 22px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.65;
}

.confirm-actions {
  display: flex;
  gap: 9px;
  justify-content: center;
}

.confirm-actions .btn {
  flex: 1;
}

/* 图片灯箱 */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: rgba(12, 10, 7, 0.93);
}

.lightbox.is-open {
  display: flex;
  animation: fadeIn 0.2s ease;
}

.lightbox img {
  max-width: min(1100px, 92vw);
  max-height: 88vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.lightbox-close .icon {
  width: 18px;
  height: 18px;
}

/* 抽屉内容 */

.detail-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
  border-radius: 14px;
  background: var(--paper-2);
}

.detail-hero img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.detail-hero-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  color: var(--muted-2);
  font-family: var(--font-serif);
  font-size: 54px;
}

.detail-hero-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 6px;
}

.detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.detail-title-row h3 {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.35;
}

.detail-code {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.04em;
}

.detail-price {
  margin: 14px 0 16px;
  font-family: var(--font-serif);
  font-size: 30px;
  color: var(--gold-dark);
}

.detail-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.detail-actions .btn {
  flex: 1;
}

.detail-section {
  padding: 17px 0;
  border-top: 1px solid var(--line);
}

.detail-section h4 {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.detail-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 18px;
}

.detail-fact {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.detail-fact span {
  color: var(--muted);
  font-size: 10px;
}

.detail-fact strong {
  font-size: 12.5px;
  font-weight: 500;
  word-break: break-word;
}

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.detail-gallery button {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--paper-2);
}

.detail-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s var(--ease);
}

.detail-gallery button:hover img {
  transform: scale(1.06);
}

.gallery-tag {
  position: absolute;
  bottom: 4px;
  left: 4px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(20, 16, 10, 0.65);
  color: #fff;
  font-size: 8px;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-item {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 0 0 16px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--paper-2);
  color: var(--gold-dark);
}

.timeline-dot .icon {
  width: 12px;
  height: 12px;
}

.timeline-item:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 26px;
  left: 12.5px;
  bottom: 0;
  width: 1px;
  background: var(--line);
}

.timeline-main {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding-top: 2px;
}

.timeline-main strong {
  font-size: 11.5px;
  font-weight: 600;
}

.timeline-main small {
  color: var(--muted);
  font-size: 10px;
}

.timeline-amount {
  color: var(--gold-dark);
  font-family: var(--font-serif);
  font-size: 12px;
}

.detail-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.detail-empty {
  color: var(--muted-2);
  font-size: 11px;
}

/* ---------- 底部导航 / toast ---------- */

.bottom-nav {
  display: none;
}

.toast-stack {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(420px, 90vw);
  padding: 11px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(25, 22, 18, 0.94);
  color: #f6efe4;
  font-size: 12px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
  animation: toastIn 0.35s var(--ease);
}

.toast.is-error {
  background: rgba(142, 54, 44, 0.96);
}

.toast.is-success .icon {
  color: #b9d3a8;
}

.toast .icon {
  width: 14px;
  height: 14px;
}

.toast.is-hiding {
  animation: toastOut 0.3s ease forwards;
}

/* =========================================================
   买家展示页
   ========================================================= */

.shop-body {
  background: var(--paper);
  color: var(--ink);
}

.shop-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 76px;
  padding: 0 max(28px, 4vw);
  border-bottom: 1px solid rgba(210, 194, 170, 0.45);
  background: rgba(247, 243, 236, 0.88);
  backdrop-filter: blur(16px);
  transition: box-shadow 0.3s, background 0.3s;
}

.shop-header.is-scrolled {
  background: rgba(247, 243, 236, 0.96);
  box-shadow: 0 8px 30px rgba(44, 33, 19, 0.06);
}

.shop-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.shop-brand .brand-monogram {
  width: 38px;
  height: 38px;
  border-color: var(--line-strong);
  color: var(--gold-dark);
  font-size: 20px;
}

.shop-brand .brand-text strong {
  color: var(--ink);
  font-size: 19px;
}

.shop-brand .brand-text small {
  color: var(--muted-2);
  font-size: 8px;
  letter-spacing: 0.2em;
}

.shop-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.shop-icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink-2);
}

.shop-icon-btn:hover {
  border-color: var(--line-strong);
  background: var(--card);
}

.shop-icon-btn .icon {
  width: 17px;
  height: 17px;
}

.shop-contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: #f7f0e4;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.shop-contact-btn:hover {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
}

.shop-contact-btn .icon {
  width: 14px;
  height: 14px;
}

.search-drawer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 18px max(24px, 4vw);
  border-bottom: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow-md);
  transform: translateY(-110%);
  transition: transform 0.4s var(--ease);
}

.search-drawer.is-open {
  transform: translateY(0);
}

.search-drawer-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 760px;
  margin: 0 auto;
}

.search-drawer-inner > .icon {
  width: 20px;
  height: 20px;
  color: var(--muted);
}

.search-drawer input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  font-family: var(--font-serif);
  font-size: 21px;
  outline: none;
}

.search-drawer input::placeholder {
  color: var(--muted-2);
}

/* 首屏 */

.shop-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  align-items: center;
  min-height: min(640px, 78vh);
  padding: 58px max(28px, 6vw) 66px;
  background:
    radial-gradient(700px 500px at 90% 15%, rgba(181, 138, 77, 0.1), transparent 60%),
    linear-gradient(180deg, #f8f4ed, #f2ebe0);
}

.shop-hero-copy {
  position: relative;
  z-index: 2;
  max-width: 610px;
}

.shop-hero-copy .eyebrow {
  margin-bottom: 22px;
  color: var(--gold-dark);
}

.shop-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(44px, 6.4vw, 86px);
  font-weight: 400;
  line-height: 1.16;
  letter-spacing: 0.01em;
}

.shop-hero h1 em {
  position: relative;
  color: var(--gold-dark);
  font-style: italic;
  font-weight: 500;
}

.shop-hero h1 em::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3px;
  height: 1px;
  background: rgba(141, 103, 49, 0.35);
}

.shop-hero-sub {
  margin-top: 22px;
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: 16px;
  letter-spacing: 0.1em;
}

.shop-hero-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 34px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.05em;
}

.shop-hero-meta strong {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
}

.meta-line {
  width: 42px;
  height: 1px;
  background: var(--line-strong);
}

.shop-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 34px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--ink);
  background: none;
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 38px;
}

.shop-hero-cta .icon {
  width: 15px;
  height: 15px;
  transition: transform 0.25s;
}

.shop-hero-cta:hover .icon {
  transform: translateY(3px);
}

.shop-hero-art {
  position: relative;
  z-index: 1;
  height: 440px;
}

.hero-frame {
  position: absolute;
  overflow: hidden;
  border: 5px solid #fbf6ed;
  background: #d9cdbb;
  box-shadow: 0 26px 60px rgba(46, 35, 21, 0.18);
}

.hero-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: rgba(141, 103, 49, 0.35);
  font-family: var(--font-serif);
  font-size: 70px;
  background:
    radial-gradient(300px 200px at 30% 20%, rgba(255, 255, 255, 0.65), transparent 60%),
    #e4d8c6;
}

.hero-frame-1 {
  top: 44px;
  left: 2%;
  width: 33%;
  height: 58%;
  transform: rotate(-4deg);
  z-index: 1;
}

.hero-frame-2 {
  top: 0;
  left: 30%;
  width: 43%;
  height: 70%;
  transform: rotate(1.5deg);
  z-index: 2;
}

.hero-frame-3 {
  right: 0;
  bottom: 8px;
  width: 34%;
  height: 54%;
  transform: rotate(4deg);
  z-index: 3;
}

.hero-seal {
  position: absolute;
  left: 52%;
  bottom: 4px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  width: 82px;
  height: 82px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: rgba(247, 243, 236, 0.9);
  color: var(--gold-dark);
  backdrop-filter: blur(6px);
  transform: translateX(-50%);
}

.hero-seal span {
  font-family: var(--font-serif);
  font-size: 26px;
  line-height: 1;
}

.hero-seal small {
  font-size: 6.5px;
  letter-spacing: 0.12em;
}

.hero-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.4;
  background-image: radial-gradient(rgba(86, 67, 42, 0.1) 0.6px, transparent 0.6px);
  background-size: 4px 4px;
  mix-blend-mode: multiply;
}

/* 商品目录 */

.shop-catalog {
  max-width: 1360px;
  margin: 0 auto;
  padding: 64px max(24px, 5vw) 30px;
}

.catalog-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.catalog-head h2 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 400;
}

.catalog-note {
  color: var(--muted);
  font-size: 11.5px;
}

.catalog-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.category-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-chips::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: 0 0 auto;
  padding: 7px 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.chip:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.5);
}

.chip.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: #f7f0e4;
}

.sort-select {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10.5px;
}

.sort-select select {
  padding: 4px 2px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
  outline: none;
  cursor: pointer;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 30px 22px;
  margin-top: 32px;
  transition: opacity 0.25s;
}

.shop-grid.is-updating {
  opacity: 0.42;
  pointer-events: none;
}

.shop-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  animation: cardIn 0.55s var(--ease) both;
}

.shop-card-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: 3px;
  background: #e8dfd1;
}

.shop-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease), opacity 0.6s;
}

.shop-card:hover .shop-card-image img {
  transform: scale(1.045);
}

.shop-card-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: rgba(141, 103, 49, 0.32);
  font-family: var(--font-serif);
  font-size: 48px;
  background:
    radial-gradient(200px 160px at 30% 20%, rgba(255, 255, 255, 0.7), transparent 65%),
    #e6dccb;
}

.shop-card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(25, 22, 18, 0.78);
  color: #f7f0e4;
  font-size: 8.5px;
  letter-spacing: 0.08em;
  backdrop-filter: blur(6px);
}

.shop-card-badge.is-reserved {
  background: rgba(181, 138, 77, 0.9);
}

.shop-card-fav {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(247, 243, 236, 0.78);
  color: var(--ink);
  opacity: 0;
  backdrop-filter: blur(4px);
  transition: opacity 0.25s;
}

.shop-card:hover .shop-card-fav {
  opacity: 1;
}

.shop-card-fav:hover {
  background: #fff;
}

.shop-card-fav .icon {
  width: 14px;
  height: 14px;
}

.shop-card-info {
  padding: 14px 2px 0;
}

.shop-card-brand {
  color: var(--gold-dark);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.shop-card-name {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-top: 5px;
}

.shop-card-name h3 {
  overflow: hidden;
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-card-condition {
  flex: 0 0 auto;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 9.5px;
}

.shop-card-bottom {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
}

.shop-card-price {
  font-family: var(--font-serif);
  font-size: 17px;
  letter-spacing: 0.01em;
}

.shop-card-price small {
  margin-right: 2px;
  color: var(--gold-dark);
  font-size: 11px;
}

.shop-card-code {
  color: var(--muted-2);
  font-size: 8.5px;
  letter-spacing: 0.04em;
}

.shop-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 90px 20px;
  text-align: center;
}

.shop-empty .empty-mark {
  width: 64px;
  height: 64px;
  font-size: 28px;
}

.shop-empty h3 {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 500;
}

.shop-empty p {
  max-width: 340px;
  margin: 8px 0 20px;
  color: var(--muted);
  font-size: 12px;
}

.shop-loading {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 32px;
}

.shop-loading[hidden] {
  display: none;
}

.skeleton-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skeleton {
  border-radius: 4px;
  background: linear-gradient(90deg, #eae1d3 25%, #f3ece1 37%, #eae1d3 63%);
  background-size: 400% 100%;
  animation: shimmer 1.5s infinite linear;
}

.skeleton-img {
  aspect-ratio: 4 / 5;
}

.skeleton-line {
  height: 12px;
  width: 82%;
}

.skeleton-line.short {
  width: 48%;
}

.shop-load-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font-size: 11px;
  letter-spacing: 0.05em;
}

.shop-load-more:hover {
  border-color: var(--ink);
}

.shop-load-more .icon {
  width: 14px;
  height: 14px;
}

/* 买家页引言 */

.shop-note {
  position: relative;
  max-width: 920px;
  margin: 60px auto 70px;
  padding: 0 40px;
  text-align: center;
}

.shop-note-mark {
  height: 36px;
  color: var(--gold);
  font-family: var(--font-serif);
  font-size: 58px;
  line-height: 0.8;
}

.shop-note p {
  margin: 10px 0 18px;
  font-family: var(--font-serif);
  font-size: clamp(18px, 2.2vw, 26px);
  line-height: 1.8;
  letter-spacing: 0.04em;
}

.shop-note span {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.2em;
}

/* 买家页页脚 */

.shop-footer {
  padding: 46px max(24px, 6vw) 38px;
  border-top: 1px solid var(--line);
  background: #f1eae0;
  text-align: center;
}

.shop-footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
  text-align: left;
}

.shop-footer-brand .brand-monogram {
  border-color: var(--line-strong);
  color: var(--gold-dark);
}

.shop-footer-brand strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.shop-footer-brand small {
  color: var(--muted-2);
  font-size: 7.5px;
  letter-spacing: 0.16em;
}

.shop-footer > p {
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: 13px;
  letter-spacing: 0.06em;
}

.shop-footer-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 22px;
  margin: 22px 0;
}

.shop-footer-actions button,
.shop-footer-actions a {
  padding: 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: none;
  color: var(--ink-2);
  font-size: 10.5px;
  letter-spacing: 0.06em;
}

.shop-footer-actions button:hover,
.shop-footer-actions a:hover {
  border-bottom-color: var(--ink);
}

.copyright {
  color: var(--muted-2);
  font-size: 8.5px;
  letter-spacing: 0.06em;
}

/* ---------- 买家商品详情 ---------- */

.shop-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.shop-modal.is-open {
  display: flex;
}

.shop-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(18, 14, 9, 0.55);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.25s ease;
}

.shop-item-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(340px, 0.88fr);
  width: min(1080px, 100%);
  max-height: min(90dvh, 860px);
  overflow: hidden;
  border-radius: 4px;
  background: var(--card);
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.45s var(--ease);
}

.shop-gallery {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #eee6d9;
}

.shop-gallery-main {
  position: relative;
  flex: 1;
  min-height: 390px;
  overflow: hidden;
  background: #e4dacb;
}

.shop-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: zoom-in;
}

.shop-gallery-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 390px;
  color: rgba(141, 103, 49, 0.3);
  font-family: var(--font-serif);
  font-size: 64px;
}

.shop-gallery-thumbs {
  display: flex;
  gap: 7px;
  padding: 10px;
  overflow-x: auto;
  background: rgba(255, 253, 249, 0.7);
}

.shop-gallery-thumbs button {
  width: 55px;
  height: 55px;
  flex: 0 0 auto;
  overflow: hidden;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 2px;
  background: #ddd2c1;
  opacity: 0.65;
}

.shop-gallery-thumbs button.is-active {
  border-color: var(--gold);
  opacity: 1;
}

.shop-gallery-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop-item-info {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 38px 36px 30px;
  overscroll-behavior: contain;
}

.shop-item-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 253, 249, 0.88);
  color: var(--ink);
  backdrop-filter: blur(6px);
}

.shop-item-close:hover {
  background: #fff;
}

.shop-item-close .icon {
  width: 16px;
  height: 16px;
}

.shop-item-brand {
  margin-bottom: 8px;
  color: var(--gold-dark);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.shop-item-title {
  padding-right: 30px;
  font-family: var(--font-serif);
  font-size: clamp(24px, 2.4vw, 34px);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.02em;
}

.shop-item-title-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.shop-copy-name {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  margin-top: 6px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 9px;
  white-space: nowrap;
  cursor: pointer;
}

.shop-copy-name:hover {
  border-color: var(--gold);
  color: var(--gold-dark);
}

.shop-copy-name .icon {
  width: 12px;
  height: 12px;
}

.shop-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.shop-item-meta span {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--muted);
  font-size: 9.5px;
}

.shop-item-price {
  margin: 24px 0 3px;
  font-family: var(--font-serif);
  font-size: clamp(30px, 3.4vw, 42px);
  color: var(--ink);
  letter-spacing: 0.01em;
}

.shop-item-price small {
  margin-right: 3px;
  color: var(--gold-dark);
  font-size: 16px;
}

.shop-item-price-note {
  color: var(--muted-2);
  font-size: 9.5px;
  letter-spacing: 0.03em;
}

.shop-item-desc {
  margin-top: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
  white-space: pre-wrap;
}

.shop-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 22px 0;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.shop-spec span {
  display: block;
  color: var(--muted-2);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.shop-spec strong {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 500;
}

.shop-item-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}

.shop-buy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--ink);
  color: #f7f0e4;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.shop-buy-btn:hover {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
}

.shop-buy-btn .icon {
  width: 15px;
  height: 15px;
}

.shop-share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  color: var(--ink-2);
  font-size: 10.5px;
  letter-spacing: 0.04em;
}

.shop-share-btn:hover {
  border-color: var(--ink);
}

.shop-share-btn .icon {
  width: 13px;
  height: 13px;
}

.shop-item-footnote {
  margin-top: 15px;
  color: var(--muted-2);
  font-size: 9px;
  line-height: 1.65;
  text-align: center;
}

.shop-reserved-note {
  margin-top: 10px;
  padding: 9px 11px;
  border: 1px solid #e6cda7;
  border-radius: 2px;
  background: #fbf2e3;
  color: #825b27;
  font-size: 10px;
  text-align: center;
}

/* 联系弹层 */

.contact-panel {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  padding: 38px;
  border-radius: 5px;
  background: var(--card);
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.4s var(--ease);
}

.contact-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
}

.contact-close:hover {
  background: var(--paper);
  color: var(--ink);
}

.contact-close .icon {
  width: 16px;
  height: 16px;
}

.contact-panel h2 {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 400;
}

.contact-sub {
  margin: 8px 0 22px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.7;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fbf6ed;
}

.contact-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--ink);
  color: var(--gold-soft);
  font-family: var(--font-serif);
  font-size: 19px;
}

.contact-card > div {
  flex: 1;
  min-width: 0;
}

.contact-card strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 500;
}

.contact-card small {
  color: var(--muted-2);
  font-size: 8.5px;
  letter-spacing: 0.08em;
}

.contact-card p {
  margin-top: 2px;
  font-size: 12px;
  word-break: break-all;
}

.contact-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 13px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 11.5px;
}

.contact-phone .icon {
  width: 14px;
  height: 14px;
  color: var(--gold-dark);
}

.contact-note {
  margin-top: 16px;
  color: var(--muted-2);
  font-size: 9.5px;
  line-height: 1.6;
}

/* 买家灯箱 */

.shop-lightbox {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 30px;
  background: rgba(12, 10, 7, 0.94);
}

.shop-lightbox.is-open {
  display: flex;
  animation: fadeIn 0.2s ease;
}

.shop-lightbox img {
  max-width: 94vw;
  max-height: 90vh;
  object-fit: contain;
}

.shop-lightbox-close {
  position: absolute;
  top: 22px;
  right: 22px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: transparent;
  color: #fff;
}

.shop-lightbox-close .icon {
  width: 18px;
  height: 18px;
}

/* =========================================================
   动画
   ========================================================= */

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(8px);
  }
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -100% 0;
  }
}

.reveal {
  animation: panelIn 0.8s var(--ease) both;
}

.reveal:nth-child(2) {
  animation-delay: 0.08s;
}

.reveal:nth-child(3) {
  animation-delay: 0.16s;
}

.reveal:nth-child(4) {
  animation-delay: 0.24s;
}

.reveal:nth-child(5) {
  animation-delay: 0.32s;
}

/* =========================================================
   404
   ========================================================= */

.not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 40px 24px;
  text-align: center;
}

.not-found .brand-monogram {
  width: 56px;
  height: 56px;
  margin-bottom: 24px;
  border-color: var(--line-strong);
  color: var(--gold-dark);
  font-size: 26px;
}

.not-found h1 {
  max-width: 640px;
  margin: 10px 0 12px;
  font-family: var(--font-serif);
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 400;
  letter-spacing: 0.03em;
}

.not-found > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 13px;
}

.not-found-actions {
  display: flex;
  gap: 10px;
  margin-top: 26px;
}

@media (max-width: 560px) {
  .not-found-actions {
    flex-direction: column;
    width: 100%;
    max-width: 260px;
  }
}

/* =========================================================
   响应式
   ========================================================= */

@media (max-width: 1240px) {
  .stat-grid {
    gap: 12px;
  }

  .finance-band {
    gap: 22px;
  }

  .finance-item {
    min-width: 100px;
  }

  .shop-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .shop-hero {
    min-height: 600px;
  }

  .shop-hero-art {
    height: 380px;
  }
}

@media (max-width: 1080px) {
  .topbar {
    padding: 0 26px;
  }

  .content {
    padding: 28px 26px 66px;
  }

  .inv-head,
  .inv-row {
    grid-template-columns: minmax(210px, 2fr) 0.75fr 0.75fr 76px 82px 62px;
    gap: 10px;
    padding: 0 16px;
  }

  .dash-grid {
    grid-template-columns: 1fr;
  }

  .dash-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .quick-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .shop-hero {
    grid-template-columns: 1fr 0.9fr;
    padding-left: 5vw;
    padding-right: 5vw;
  }

  .shop-hero-art {
    height: 330px;
  }

  .shop-item-panel {
    grid-template-columns: 1fr 0.86fr;
  }

  .shop-item-info {
    padding: 32px 26px 24px;
  }

  .shop-gallery-main {
    min-height: 340px;
  }

  .shop-gallery-main img {
    max-height: 70vh;
  }
}

@media (max-width: 900px) {
  .sidebar {
    display: none;
  }

  .main-shell {
    margin-left: 0;
  }

  .bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 45;
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: calc(62px + env(safe-area-inset-bottom));
    padding: 4px 8px env(safe-area-inset-bottom);
    border-top: 1px solid var(--line);
    background: rgba(255, 253, 249, 0.94);
    backdrop-filter: blur(18px);
  }

  .bottom-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-width: 48px;
    padding: 6px 10px;
    border: 0;
    background: none;
    color: var(--muted-2);
    font-size: 9px;
  }

  .bottom-link .icon {
    width: 19px;
    height: 19px;
  }

  .bottom-link.is-active {
    color: var(--ink);
  }

  .bottom-link.is-active .icon {
    color: var(--gold-dark);
  }

  .bottom-add {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-top: -20px;
    border: 4px solid var(--paper);
    border-radius: 50%;
    background: var(--ink);
    color: #f6efe4;
    box-shadow: 0 8px 18px rgba(25, 22, 18, 0.22);
  }

  .bottom-add .icon {
    width: 21px;
    height: 21px;
  }

  .content {
    padding-bottom: 98px;
  }

  .shop-header {
    height: 68px;
    padding: 0 20px;
  }

  .shop-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 56px;
    padding-bottom: 50px;
  }

  .shop-hero-copy {
    max-width: 560px;
  }

  .shop-hero-art {
    width: min(460px, 100%);
    height: 330px;
    margin: 48px auto 0;
  }

  .shop-hero-meta {
    margin-top: 24px;
  }

  .shop-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px 14px;
  }

  .shop-item-panel {
    grid-template-columns: 1fr;
    max-height: 92dvh;
    overflow-y: auto;
  }

  .shop-gallery {
    min-height: 0;
  }

  .shop-gallery-main {
    min-height: 0;
    aspect-ratio: 4 / 3;
  }

  .shop-gallery-main img {
    max-height: none;
  }

  .shop-item-info {
    overflow: visible;
    padding: 26px 24px 28px;
  }

  .shop-item-actions {
    margin-top: 8px;
  }

  .shop-item-close {
    position: fixed;
    top: 20px;
    right: 20px;
  }

  .shop-modal {
    padding: 0;
  }

  .shop-item-panel {
    width: 100%;
    max-height: 100dvh;
    min-height: 100dvh;
    border-radius: 0;
  }
}

@media (max-width: 760px) {
  .login-view {
    grid-template-columns: 1fr;
  }

  .login-art {
    display: none;
  }

  .login-panel {
    min-height: 100dvh;
    padding: 32px 24px;
  }

  .login-brand-mobile {
    display: block;
    margin-bottom: 48px;
    font-family: var(--font-serif);
    font-size: 26px;
    letter-spacing: 0.1em;
  }

  .login-brand-mobile span {
    color: var(--muted);
    font-family: var(--font-sans);
    font-size: 11px;
    letter-spacing: 0.2em;
  }

  .topbar {
    height: 64px;
    padding: 0 17px;
  }

  .topbar-title h1 {
    font-size: 18px;
  }

  .topbar-title .eyebrow {
    display: none;
  }

  .hide-mobile {
    display: none !important;
  }

  .content {
    padding: 20px 15px 96px;
  }

  .welcome-row {
    display: block;
    margin-bottom: 18px;
  }

  .welcome-badge {
    display: none;
  }

  .welcome-title {
    font-size: 22px;
    line-height: 1.45;
  }

  .stat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }

  .stat-card {
    padding: 15px 15px 14px;
    border-radius: 14px;
  }

  .stat-icon {
    width: 28px;
    height: 28px;
    margin-bottom: 10px;
  }

  .stat-card strong {
    font-size: 29px;
  }

  .finance-band {
    flex-wrap: wrap;
    gap: 13px 18px;
    margin-top: 10px;
    padding: 16px;
  }

  .finance-item {
    min-width: calc(50% - 9px);
    flex: 1;
  }

  .finance-item strong {
    font-size: 19px;
  }

  .finance-divider {
    display: none;
  }

  .finance-link {
    width: 100%;
    margin-left: 0;
    padding-top: 10px;
    border-top: 1px solid var(--line);
  }

  .dash-grid {
    margin-top: 10px;
  }

  .dash-side {
    display: flex;
  }

  .card {
    padding: 17px;
    border-radius: 14px;
  }

  .card-head {
    margin-bottom: 13px;
  }

  .quick-card {
    padding: 19px;
    border-radius: 14px;
  }

  .section-head {
    display: block;
    margin-bottom: 16px;
  }

  .section-head h2 {
    font-size: 24px;
  }

  .section-head > .btn {
    display: none;
  }

  .head-actions {
    justify-content: flex-start;
    margin-top: 10px;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .search-box {
    max-width: none;
  }

  .filter-row {
    width: 100%;
    margin-left: 0;
    overflow: visible;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
  }

  .filter-row .select,
  .filter-row .input {
    width: 100%;
    min-width: 0;
  }

  .inventory-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .inv-head {
    display: none;
  }

  .inventory-results {
    display: flex;
    flex-direction: column;
    gap: 9px;
  }

  .inv-row {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    grid-template-areas:
      "thumb main"
      "meta meta"
      "actions actions";
    gap: 4px 11px;
    min-height: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--card);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
  }

  .inv-row:last-child {
    border-bottom: 1px solid var(--line);
  }

  .inv-thumb {
    grid-area: thumb;
    width: 58px;
    height: 58px;
    border-radius: 10px;
  }

  .inv-product {
    grid-area: main;
    align-items: flex-start;
    padding-top: 1px;
  }

  .inv-copy {
    gap: 2px;
  }

  .inv-name,
  .inv-info strong {
    font-size: 13px;
    line-height: 1.45;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .inv-code,
  .inv-operator,
  .inv-brand {
    font-size: 10px;
  }

  .inv-category,
  .inv-price,
  .inv-status,
  .status-chip,
  .inv-visible {
    display: none;
  }

  .inv-actions {
    grid-area: actions;
    align-self: stretch;
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 5px;
    padding-top: 7px;
    border-top: 1px solid var(--line);
  }

  .inv-action {
    width: 30px;
    height: 30px;
    border-radius: 8px;
  }

  .inv-row .mobile-meta {
    grid-area: meta;
    display: flex;
    align-items: center;
    gap: 7px;
    padding-top: 3px;
    padding-left: 69px;
    color: var(--muted);
    font-size: 10px;
  }

  .inv-row .mobile-meta .status-chip {
    display: inline-flex;
  }

  .inv-row .mobile-meta > span:last-child {
    display: inline-block;
    margin-left: auto;
    color: var(--ink);
    font-weight: 700;
    font-size: 12px;
  }

  .categories-layout {
    grid-template-columns: 1fr;
  }

  .category-tip {
    grid-column: auto;
    display: block;
    padding: 18px;
  }

  .category-tip .icon {
    margin-bottom: 8px;
  }

  .inline-form {
    flex-direction: column;
    align-items: stretch;
  }

  .inline-form .btn {
    width: 100%;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .form-grid-2 {
    grid-template-columns: 1fr;
  }

  .field-span-2 {
    grid-column: auto;
  }

  .modal {
    padding: 0;
    align-items: flex-end;
  }

  .modal-card {
    width: 100%;
    max-height: 94dvh;
    border-radius: 18px 18px 0 0;
  }

  .modal-wide {
    max-height: 96dvh;
  }

  .modal-head {
    padding: 17px 18px 13px;
  }

  .modal-head h2 {
    font-size: 22px;
  }

  .modal-scroll {
    padding: 18px;
  }

  .modal-foot {
    padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  }

  .modal-foot-note {
    display: none;
  }

  .modal-foot-actions {
    width: 100%;
  }

  .modal-foot-actions .btn {
    flex: 1;
  }

  .upload-actions {
    grid-template-columns: 1fr;
  }

  .upload-btn {
    padding: 11px 13px;
  }

  .drawer {
    width: 100%;
    border-radius: 0;
  }

  .drawer-head {
    padding: 18px 18px 13px;
  }

  .drawer-body {
    padding: 16px 18px calc(30px + env(safe-area-inset-bottom));
  }

  .detail-title-row h3 {
    font-size: 21px;
  }

  .detail-price {
    font-size: 26px;
  }

  .detail-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    padding: 10px 0;
    background: var(--card);
  }

  .toast-stack {
    bottom: calc(78px + env(safe-area-inset-bottom));
  }

  .shop-body .toast-stack {
    bottom: max(22px, env(safe-area-inset-bottom));
  }

  .shop-header {
    height: 62px;
    padding: 0 16px;
  }

  .shop-brand .brand-monogram {
    width: 34px;
    height: 34px;
    font-size: 18px;
  }

  .shop-brand .brand-text strong {
    font-size: 17px;
  }

  .shop-contact-btn {
    width: 38px;
    height: 38px;
    padding: 0;
    justify-content: center;
  }

  .shop-contact-btn span {
    display: none;
  }

  .shop-hero {
    padding: 44px 20px 36px;
  }

  .shop-hero-copy .eyebrow {
    margin-bottom: 16px;
  }

  .shop-hero h1 {
    font-size: clamp(42px, 11.5vw, 60px);
  }

  .shop-hero-sub {
    margin-top: 15px;
    font-size: 14px;
  }

  .shop-hero-meta {
    margin-top: 20px;
  }

  .shop-hero-cta {
    margin-top: 24px;
  }

  .shop-hero-art {
    height: 280px;
    margin-top: 34px;
  }

  .hero-frame {
    border-width: 4px;
  }

  .hero-frame-1 {
    left: 0;
    width: 34%;
    height: 55%;
  }

  .hero-frame-2 {
    left: 27%;
    width: 45%;
    height: 72%;
  }

  .hero-frame-3 {
    width: 35%;
    height: 52%;
  }

  .hero-seal {
    width: 64px;
    height: 64px;
  }

  .hero-seal span {
    font-size: 20px;
  }

  .shop-catalog {
    padding: 42px 16px 20px;
  }

  .catalog-head {
    display: block;
    margin-bottom: 16px;
  }

  .catalog-head h2 {
    font-size: 29px;
  }

  .catalog-note {
    margin-top: 5px;
    font-size: 10.5px;
  }

  .catalog-controls {
    display: block;
    padding: 9px 0;
  }

  .category-chips {
    margin: 0 -16px;
    padding: 1px 16px;
  }

  .sort-select {
    display: none;
  }

  .shop-grid {
    grid-template-columns: 1fr 1fr;
    gap: 25px 11px;
    margin-top: 20px;
  }

  .shop-card-info {
    padding: 9px 1px 0;
  }

  .shop-card-name h3 {
    font-size: 12.5px;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .shop-card-brand {
    font-size: 7.5px;
  }

  .shop-card-price {
    font-size: 16px;
  }

  .shop-card-code {
    display: none;
  }

  .shop-card-badge {
    top: 7px;
    left: 7px;
    padding: 3px 7px;
    font-size: 7.5px;
  }

  .shop-loading {
    grid-template-columns: 1fr 1fr;
    gap: 11px;
  }

  .shop-note {
    margin: 40px auto 46px;
    padding: 0 25px;
  }

  .shop-note p {
    font-size: 18px;
  }

  .shop-footer {
    padding: 34px 20px 28px;
  }

  .shop-footer-actions {
    gap: 16px;
  }

  .shop-modal {
    padding: 0;
    align-items: flex-end;
  }

  .shop-item-panel {
    width: 100%;
    max-height: 96dvh;
    min-height: 0;
    border-radius: 16px 16px 0 0;
  }

  .shop-gallery-main {
    aspect-ratio: 1;
  }

  .shop-gallery-thumbs {
    padding: 7px;
  }

  .shop-gallery-thumbs button {
    width: 45px;
    height: 45px;
  }

  .shop-item-info {
    padding: 21px 18px calc(24px + env(safe-area-inset-bottom));
  }

  .shop-item-title {
    font-size: 25px;
  }

  .shop-item-price {
    margin-top: 17px;
    font-size: 31px;
  }

  .shop-specs {
    gap: 12px;
    margin: 16px 0;
    padding: 14px 0;
  }

  .contact-panel {
    width: 100%;
    padding: 28px 20px calc(28px + env(safe-area-inset-bottom));
    border-radius: 16px 16px 0 0;
  }

  .contact-panel h2 {
    font-size: 27px;
  }

  .shop-lightbox {
    padding: 12px;
  }
}

@media (max-width: 380px) {
  .stat-card strong {
    font-size: 26px;
  }

  .shop-hero-art {
    height: 240px;
  }

  .shop-grid {
    gap: 20px 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* =========================================================
   v2 · 订单 / 发货 / 退货 / VIP / 权限
   ========================================================= */

/* 通用记录卡 */
.record-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.record-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  color: var(--ink);
  text-align: left;
  transition: border-color 0.18s var(--ease), transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

button.record-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.record-cover {
  position: relative;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--paper-2);
  color: var(--gold-dark);
  font-family: var(--font-serif);
  font-size: 20px;
}

.record-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.record-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.record-topline {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.record-topline strong {
  overflow: hidden;
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-title {
  overflow: hidden;
  font-size: 12.5px;
  color: var(--ink-2);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-meta,
.record-tags,
.record-date {
  overflow: hidden;
  color: var(--muted);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-date {
  color: var(--muted-2);
}

.record-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  white-space: nowrap;
}

.record-side b {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 500;
}

.record-side small {
  color: var(--muted-2);
  font-size: 9.5px;
}

.lock-card .record-side {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  justify-items: end;
  gap: 6px 10px;
}

.lock-card .record-side b {
  grid-column: 1 / -1;
}

.lock-card .record-side .text-btn {
  padding: 0;
  font-size: 11px;
}

.record-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.order-status,
.return-status {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 9.5px;
  white-space: nowrap;
}

.order-status-completed,
.return-status-stocked {
  background: #e8efe3;
  color: var(--success);
}

.order-status-returned {
  background: #f3e8e2;
  color: #9b5638;
}
.order-status-reserved {
  background: #f6edd8;
  color: #8c6a28;
}
.order-status-cancelled,
.return-status-cancelled {
  background: #eee9e1;
  color: var(--muted);
}

.return-status-pending {
  background: var(--gold-soft);
  color: var(--gold-dark);
}

.proof-stack {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--card);
  font-family: var(--font-sans);
  font-size: 10px;
  color: var(--gold-dark);
}

/* 订单详情 */
.order-detail-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.order-detail-head strong {
  font-family: var(--font-serif);
  font-size: 27px;
  font-weight: 500;
}

.order-detail-head .text-btn {
  margin-left: auto;
}

.order-detail-item {
  margin-bottom: 18px;
}

.order-info {
  margin-bottom: 4px;
}

.order-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

/* 发货日报 */
.shipment-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.shipment-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}

.shipment-cover {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: var(--paper-2);
  color: var(--gold-dark);
  font-family: var(--font-serif);
}

.shipment-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shipment-cover-tag {
  position: absolute;
  bottom: 4px;
  left: 4px;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(25, 22, 18, 0.72);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 8px;
}

.shipment-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.shipment-main p {
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shipment-main small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shipment-main .shipment-note {
  color: var(--ink-2);
  font-style: italic;
}

.shipment-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
}

/* VIP 客户 */
.customer-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.customer-row {
  display: grid;
  grid-template-columns: 42px minmax(140px, 1.2fr) auto 150px 90px;
  gap: 14px;
  align-items: center;
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--card);
  color: var(--ink);
  text-align: left;
}

.customer-row:hover {
  border-color: var(--line-strong);
}

.customer-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--gold-soft);
  font-family: var(--font-serif);
  font-size: 18px;
}

.customer-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.customer-main strong {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 500;
}

.customer-main small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-level {
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--gold-dark);
  font-size: 9.5px;
  white-space: nowrap;
}

.customer-stats {
  display: grid;
  grid-template-columns: auto auto;
  gap: 0 5px;
  align-items: baseline;
  font-size: 10px;
  color: var(--muted);
}

.customer-stats b {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  text-align: right;
}

.customer-stats small {
  font-size: 9px;
}

.customer-date {
  color: var(--muted-2);
  font-size: 9.5px;
  text-align: right;
}

.customer-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.customer-hero .customer-avatar {
  width: 54px;
  height: 54px;
  font-size: 23px;
}

.customer-hero h2 {
  font-family: var(--font-serif);
  font-size: 27px;
  font-weight: 400;
}

.customer-hero p:last-child {
  color: var(--muted);
  font-size: 11.5px;
}

.customer-numbers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--line);
}

.customer-numbers div {
  padding: 12px;
  background: var(--paper);
}

.customer-numbers span {
  display: block;
  color: var(--muted);
  font-size: 9.5px;
}

.customer-numbers strong {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
}

.mini-record {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.mini-record:last-child {
  border-bottom: 0;
}

.mini-record span {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mini-record strong {
  overflow: hidden;
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-record small {
  color: var(--muted);
  font-size: 10px;
}

.mini-record b {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}

/* 基础资料 */
.catalog-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.25fr);
  gap: 18px;
  align-items: start;
}

.catalog-form {
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 4px 0;
}

.catalog-form h3 {
  margin-bottom: 2px;
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 400;
}

.catalog-form .text-btn {
  align-self: flex-start;
}

.catalog-search {
  margin-bottom: 10px;
}

.catalog-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.catalog-row:last-child {
  border-bottom: 0;
}

.catalog-row > span:first-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.catalog-row strong {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 500;
}

.catalog-row small {
  color: var(--muted);
  font-size: 10px;
}

.catalog-row-actions {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
}

.catalog-child {
  padding-left: 18px;
  background: linear-gradient(90deg, transparent, #fbf7ef 18px);
}

.catalog-child strong {
  font-size: 13.5px;
  color: var(--ink-2);
}

.catalog-group {
  padding: 4px 0;
  border-bottom: 1px solid var(--line);
}

.catalog-group:last-child {
  border-bottom: 0;
}

.catalog-group .catalog-row {
  border-bottom: 0;
}

.empty-inline {
  padding: 26px 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--gold-dark);
  font-size: 9.5px;
  white-space: nowrap;
}

/* 账号权限 */
.users-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 18px;
  align-items: start;
}

.user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.user-row:last-child {
  border-bottom: 0;
}

.user-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--paper-2);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 17px;
}

.user-main {
  flex: 1;
  min-width: 0;
}

.user-name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.user-name-row strong {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 500;
}

.user-main > small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-perm-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 4px;
}

.user-actions {
  flex: 0 0 auto;
}

.role-badge {
  display: inline-flex;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--muted);
  font-size: 9px;
}

.role-admin {
  background: var(--ink);
  color: var(--gold-soft);
}

.role-manager {
  background: var(--gold-soft);
  color: var(--gold-dark);
}

.role-badge.is-off {
  background: var(--danger-soft);
  color: var(--danger);
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.permission-group {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fbf7ef;
}

.permission-group h4 {
  margin-bottom: 6px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.permission-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 3px 0;
  font-size: 11px;
  line-height: 1.45;
  cursor: pointer;
}

.permission-item input {
  margin-top: 3px;
  accent-color: var(--ink);
}

.permission-item em {
  padding: 0 4px;
  border-radius: 3px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 8px;
}

.permission-item.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 回收站 / 更多菜单 */
.recycle-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.more-nav-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 8px 0 4px;
}

.more-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 15px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbf7ef;
  color: var(--ink);
  font-size: 11px;
}

.more-link:hover {
  border-color: var(--line-strong);
  background: var(--card);
}

.more-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--paper);
  color: var(--gold-dark);
}

.more-icon .icon {
  width: 16px;
  height: 16px;
}

/* 小尺寸按钮与危险文本 */
.btn-sm {
  padding: 7px 12px;
  font-size: 11px;
}

.text-btn-danger {
  color: var(--danger);
}

.text-btn-danger:hover {
  color: #8f332b;
}

/* 订单/发货表单里的固定商品 */
.fixed-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbf6ed;
}

.fixed-item-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.fixed-item-copy strong {
  overflow: hidden;
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fixed-item-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fixed-lock {
  margin-left: auto;
  color: var(--muted-2);
  font-size: 9px;
  white-space: nowrap;
}

/* 页面级空态/加载态 */
.empty-state,
.loading-state {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 30px;
  border: 1px dashed var(--line-strong);
  border-radius: 15px;
  background: rgba(255, 253, 249, 0.52);
  text-align: center;
}

.empty-state h3 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 400;
}

.empty-state p,
.loading-state p {
  max-width: 420px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11.5px;
}

.loading-dot {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 1px solid var(--line-strong);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 980px) {
  .catalog-layout,
  .users-layout {
    grid-template-columns: 1fr;
  }

  .shipment-grid {
    grid-template-columns: 1fr;
  }

  .customer-row {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 10px;
  }

  .customer-level {
    grid-column: 3;
    grid-row: 1;
  }

  .customer-stats {
    grid-column: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }

  .customer-date {
    grid-column: 2;
    text-align: left;
  }
}

@media (max-width: 680px) {
  .record-card {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 10px;
    padding: 11px 12px;
  }

  .record-cover {
    width: 48px;
    height: 48px;
  }

  .record-side {
    grid-column: 2;
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
  }

  .record-side b {
    font-size: 16px;
  }

  .record-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    padding-top: 2px;
  }

  .record-title,
  .record-meta,
  .record-tags {
    white-space: normal;
  }

  .shipment-card {
    grid-template-columns: 74px minmax(0, 1fr);
    padding: 11px;
  }

  .shipment-actions {
    grid-column: 2;
    flex-direction: row;
    align-items: center;
  }

  .customer-row {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    padding: 11px 12px;
  }

  .customer-level {
    grid-column: 3;
  }

  .customer-stats {
    grid-column: 2;
  }

  .customer-date {
    grid-column: 2;
  }

  .customer-numbers {
    grid-template-columns: 1fr;
  }

  .permission-grid {
    grid-template-columns: 1fr;
  }

  .more-nav-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .order-detail-head {
    flex-wrap: wrap;
  }

  .order-detail-head .text-btn {
    margin-left: 0;
  }

  .order-detail-actions .btn {
    flex: 1;
  }
}

@media (max-width: 640px) {
  .topbar-user {
    padding: 0;
    border-color: transparent;
    background: transparent;
  }

  .topbar-user > span:last-child {
    display: none;
  }

  .topbar-avatar {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .topbar-user:focus {
    outline: none;
  }
}

/* ---------------------------- v2 dashboard / shell fixes ---------------------------- */

.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 10px 6px 6px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.user-chip:hover {
  border-color: var(--line);
  background: var(--card);
}

.user-chip > span:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.user-chip strong {
  max-width: 120px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-chip small {
  color: var(--muted);
  font-size: 10px;
}

.user-chip .avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-serif);
  font-size: 15px;
}

@media (max-width: 640px) {
  .user-chip {
    padding: 0;
    border-color: transparent;
    background: transparent;
  }

  .user-chip > span:last-child {
    display: none;
  }

  .user-chip .avatar {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .user-chip:focus {
    outline: none;
  }
}


.topbar-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 10px 6px 6px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.topbar-user:hover {
  border-color: var(--line);
  background: var(--card);
}

.topbar-user > span:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.topbar-user strong {
  max-width: 120px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-user small {
  color: var(--muted);
  font-size: 10px;
}

.topbar-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-serif);
  font-size: 15px;
}

.quick-link-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 22px;
}

.quick-link-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.quick-link-card:hover {
  border-color: var(--gold);
  background: #fdf9f2;
}

.quick-link-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 9px;
  background: var(--paper-2);
  color: var(--gold-deep);
}

.quick-link-icon .icon {
  width: 16px;
  height: 16px;
}

.quick-link-card strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
}

.quick-link-card small {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.activity-row:first-child {
  padding-top: 0;
}

.activity-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.activity-row:hover .activity-title {
  color: var(--gold-deep);
}

.activity-thumb {
  display: block;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 9px;
  background: var(--paper-2);
}

.activity-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.activity-thumb .inv-thumb-placeholder {
  width: 100%;
  height: 100%;
}

.activity-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.activity-title {
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-meta {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-side {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.activity-amount {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 10px;
}

.movement-chip {
  display: inline-flex;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
}

.movement-in {
  background: #e8f0e4;
  color: #4f6b44;
}

.movement-out {
  background: #f6e3e3;
  color: #9c4a4a;
}

.movement-return {
  background: #f5ebd3;
  color: #87662c;
}

.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(280px, 1fr);
  gap: 18px;
  align-items: start;
}

.dash-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

@media (max-width: 900px) {
  .quick-link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dash-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .topbar-user > span:last-child {
    display: none;
  }

  .quick-link-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------------------------- v2 item drawer ---------------------------- */

.drawer-hero {
  position: relative;
  height: 260px;
  margin: -22px -26px 20px;
  overflow: hidden;
  background: var(--paper-2);
}

.drawer-hero > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.drawer-hero.is-empty {
  display: grid;
  place-items: center;
}

.drawer-hero-badges {
  position: absolute;
  top: 14px;
  left: 14px;
  display: flex;
  gap: 6px;
}

.drawer-hero-badges .tag-chip {
  background: rgba(255, 255, 255, 0.88);
}

.drawer-title-block h2 {
  margin: 3px 0 2px;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.35;
}

.drawer-code {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
}

.drawer-price {
  margin-top: 10px;
  font-family: var(--font-serif);
  font-size: 27px;
  color: var(--ink);
}

.drawer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.drawer-actions .btn {
  min-height: 34px;
  padding: 7px 14px;
  font-size: 11px;
}

.drawer-subactions {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0 2px;
}

.text-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--gold-deep);
  font: inherit;
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.text-btn:hover {
  color: var(--ink);
}

.drawer-section {
  padding-top: 18px;
}

.drawer-section h3 {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-bottom: 10px;
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 500;
}

.drawer-section h3 small {
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 10px;
}

.drawer-section .info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px 18px;
}

.info-grid > div {
  min-width: 0;
}

.info-grid span {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.info-grid strong {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  font-size: 11.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 600;
}

.drawer-notes {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.timeline-row {
  position: relative;
  display: flex;
  gap: 11px;
  padding: 0 0 14px 2px;
}

.timeline-row:last-child {
  padding-bottom: 0;
}

.timeline-row::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 0;
  left: 6px;
  width: 1px;
  background: var(--line);
}

.timeline-row:last-child::before {
  display: none;
}

.timeline-dot {
  position: relative;
  z-index: 1;
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  margin-top: 3px;
  border: 2px solid var(--card);
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
}

.timeline-dot.is-muted {
  background: var(--muted-2);
  box-shadow: 0 0 0 1px var(--muted-2);
}

.timeline-row > div {
  min-width: 0;
}

.timeline-row strong {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
}

.timeline-row small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.timeline-money {
  color: var(--gold-deep) !important;
}

.change-list {
  margin: 5px 0 0;
  padding-left: 14px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.drawer-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.drawer-image {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-2);
}

.drawer-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.drawer-image span {
  position: absolute;
  bottom: 4px;
  left: 4px;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(20, 16, 10, 0.6);
  color: #fff;
  font-size: 8px;
}

.drawer-image.is-private::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px dashed rgba(154, 111, 42, 0.6);
  border-radius: 8px;
  pointer-events: none;
}

@media (max-width: 520px) {
  .drawer-hero {
    height: 220px;
  }

  .drawer-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}



/* ---------------------------- 账号页 / 移动端收尾 ---------------------------- */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.app-shell,
.main,
.content,
.view-panel {
  min-width: 0;
}

.content {
  overflow-x: clip;
}

.account-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, #211c16, #332a1f);
  color: #f4ecdd;
  margin-bottom: 14px;
}

.account-avatar {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  border: 1px solid rgba(201, 164, 99, 0.55);
  border-radius: 50%;
  background: rgba(201, 164, 99, 0.16);
  color: #e3c791;
  font-family: var(--font-serif);
  font-size: 30px;
}

.account-identity h2 {
  margin: 2px 0 4px;
  color: #fffaf0;
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 500;
}

.account-identity p {
  margin: 0;
  color: #bfb3a2;
  font-size: 12px;
}

.account-identity .eyebrow {
  color: #c9a46a;
  font-size: 9px;
}

.account-identity .account-store {
  margin-top: 7px;
  color: #d8c3a1;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.account-functions .more-nav-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* 留底/面单图片的删除按钮固定在右上角 */
.image-tile > .image-tile-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 2;
}

@media (max-width: 720px) {
  .account-functions .more-nav-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .account-hero {
    gap: 14px;
    padding: 20px 18px;
    border-radius: 14px;
  }

  .account-avatar {
    width: 56px;
    height: 56px;
    flex-basis: 56px;
    font-size: 23px;
  }

  .account-identity h2 {
    font-size: 24px;
  }

  .account-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .account-actions .btn {
    justify-content: center;
  }

  .account-actions .btn:first-child {
    grid-column: 1 / -1;
  }

  .account-functions .more-nav-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------------------------- 买家页分类/品牌/尺码 ---------------------------- */
.shop-filter-panel {
  display: grid;
  gap: 11px;
  margin: 0 0 22px;
  padding: 15px 0 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.shop-filter-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.shop-filter-kicker {
  flex: 0 0 38px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.shop-filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-chips {
  display: flex;
  flex: 1;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  padding: 1px 0;
  scrollbar-width: none;
}

.brand-chips::-webkit-scrollbar {
  display: none;
}

.shop-subcategories {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding-left: 50px;
}

.chip-count {
  margin-left: 3px;
  opacity: 0.45;
  font-size: 9px;
}

.shop-filter-empty {
  color: var(--muted);
  font-size: 11px;
}

.shop-size-select {
  min-width: 132px;
  padding: 7px 30px 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font-family: inherit;
  font-size: 11px;
}

.shop-filter-clear {
  margin-left: auto;
  padding: 4px 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: var(--gold-dark);
  font-family: inherit;
  font-size: 10px;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .shop-filter-head {
    flex-wrap: wrap;
  }

  .shop-filter-head .category-chips {
    order: 3;
    flex-basis: 100%;
    margin: 0 -16px;
    padding: 1px 16px;
  }

  .shop-filter-row {
    align-items: flex-start;
  }

  .shop-filter-kicker {
    flex-basis: 34px;
    padding-top: 7px;
  }

  .shop-subcategories {
    padding-left: 46px;
  }

  .shop-size-select {
    min-width: 0;
    flex: 1;
  }
}

/* ---------------------------- v2.3 dashboard / inventory / buyer taxonomy ---------------------------- */

.dash-grid {
  grid-template-columns: minmax(0, 1fr);
}

.catalog-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.catalog-toolbar .category-chips {
  flex: 1 1 auto;
  min-width: 0;
}

.catalog-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.catalog-tools .sort-select {
  margin-left: 0;
}

.shop-filter-clear {
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: var(--muted);
  font-size: 10.5px;
  cursor: pointer;
}

.shop-taxonomy {
  max-width: 1360px;
  margin: 0 auto;
  padding: 20px max(24px, 5vw) 76px;
}

.taxonomy-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.taxonomy-head h2 {
  margin-top: 4px;
  font-family: var(--font-serif);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 400;
}

.taxonomy-tabs {
  display: flex;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
}

.taxonomy-tabs button {
  padding: 7px 15px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.taxonomy-tabs button.is-active {
  background: var(--ink);
  color: var(--paper);
}

.taxonomy-panel {
  margin-top: 24px;
}

.taxonomy-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.taxonomy-pill {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 118px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.28);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.taxonomy-pill:hover {
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.55);
}

.taxonomy-pill strong {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 400;
}

.taxonomy-pill span {
  color: var(--muted);
  font-size: 10px;
}

.taxonomy-pill.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.taxonomy-pill.is-active span {
  color: rgba(255, 255, 255, 0.64);
}

.taxonomy-group + .taxonomy-group {
  margin-top: 20px;
}

.taxonomy-group-title {
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.taxonomy-empty {
  color: var(--muted);
  font-size: 12px;
}

.inventory-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}

.inv-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
}

.inv-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
}

.inv-card-image {
  display: block;
  aspect-ratio: 1 / 1.04;
  overflow: hidden;
  background: var(--paper-deep);
}

.inv-card-image img,
.inv-card-image .thumb-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.inv-card-image .thumb-placeholder {
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-size: 26px;
}

.inv-card-status {
  position: absolute;
  top: 9px;
  left: 9px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(250, 246, 238, 0.92);
  backdrop-filter: blur(4px);
}

.inv-card-status .status-chip {
  padding: 0;
  background: transparent;
  font-size: 9px;
}

.inv-card-info {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px 12px;
}

.inv-card-price {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 400;
  white-space: nowrap;
}

.inv-card-code {
  overflow: hidden;
  color: var(--muted);
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .inv-row .inv-product {
    grid-area: 1 / 1 / 2 / 3;
    display: flex;
    align-items: flex-start;
    gap: 11px;
    min-width: 0;
    padding-top: 0;
  }

  .inv-row .inv-thumb {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    grid-area: auto;
  }

  .inv-row .inv-copy {
    flex: 1 1 auto;
    min-width: 0;
  }

  .inventory-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 10px;
  }

  .inv-card-info {
    flex-direction: column;
    gap: 3px;
    padding: 9px 10px 11px;
  }

  .inv-card-price {
    font-size: 15px;
  }

  .catalog-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .catalog-tools {
    width: 100%;
    justify-content: space-between;
  }

  .taxonomy-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .taxonomy-tabs {
    width: 100%;
  }

  .taxonomy-tabs button {
    flex: 1;
    padding-inline: 8px;
  }

  .shop-taxonomy {
    padding-top: 8px;
    padding-bottom: 56px;
  }

  .taxonomy-pill {
    min-width: calc(50% - 5px);
    flex: 1 1 calc(50% - 5px);
  }
}

/* ---------------------------- v2.4 settings / account / upload ---------------------------- */
.topbar-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.back-btn {
  display: grid;
  place-items: center;
  width: 24px;
  height: 36px;
  flex: 0 0 24px;
  margin-left: -4px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.back-btn:hover { color: var(--gold); }
.back-btn[hidden] { display: none; }
.back-btn .icon { width: 20px; height: 20px; transform: rotate(180deg); }
.topbar-title[hidden] { display: none; }

.topbar-buyer-btn {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  white-space: nowrap;
}
.topbar-buyer-btn .icon { width: 14px; height: 14px; }

.settings-hub {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.settings-hub-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 86px;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.settings-hub-card:hover { border-color: var(--gold); transform: translateY(-1px); }
.settings-hub-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 12px;
  background: var(--paper-2);
  color: var(--gold-dark);
}
.settings-hub-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.settings-hub-copy strong { font-family: var(--font-serif); font-size: 18px; font-weight: 500; }
.settings-hub-copy small { color: var(--muted); font-size: 11px; }
.settings-hub-card > .icon { width: 15px; height: 15px; color: var(--muted); }

.settings-advanced {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding: 14px 18px;
  border: 1px dashed var(--line-strong, var(--line));
  border-radius: 13px;
  background: var(--paper-2);
}
.settings-advanced-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.settings-advanced-copy .eyebrow { margin-bottom: 1px; }
.settings-advanced-copy strong { font-family: var(--font-serif); font-size: 18px; font-weight: 500; }
.settings-advanced-copy span { color: var(--muted); font-size: 11px; }
.settings-advanced .btn .icon { transform: rotate(180deg); }

.catalog-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper-2);
}
.catalog-tabs .tab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  padding: 10px 12px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}
.catalog-tabs .tab-btn:hover { color: var(--ink); background: rgba(255, 255, 255, 0.55); }
.catalog-tabs .tab-btn.is-active {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 4px 16px rgba(30, 24, 18, 0.06);
}
.catalog-tabs .tab-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--paper-2);
  color: var(--gold-dark);
}
.catalog-tabs .tab-btn.is-active .tab-icon { background: var(--ink); color: var(--paper); }
.catalog-tabs .tab-icon .icon { width: 14px; height: 14px; }
.users-layout-single { grid-template-columns: minmax(0, 1fr); }

.account-hero { position: relative; }
.account-gear {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(201, 164, 99, 0.35);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: #e3c791;
  cursor: pointer;
}
.account-gear:hover { background: rgba(255, 255, 255, 0.14); }
.account-gear .icon { width: 16px; height: 16px; }
.account-avatar, .user-chip .avatar { overflow: hidden; }
.account-avatar img, .user-chip .avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

.account-shortcuts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.account-shortcuts[hidden] { display: none; }
.account-shortcut {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.account-shortcut:hover { border-color: var(--gold); }
.account-shortcut-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 50%;
  background: var(--paper-2);
  color: var(--gold-dark);
}
.account-shortcut > span:nth-child(2) { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.account-shortcut strong { font-family: var(--font-serif); font-size: 18px; font-weight: 500; }
.account-shortcut small { color: var(--muted); font-size: 11px; }
.account-shortcut > .icon { width: 15px; height: 15px; color: var(--muted); }

.account-profile-editor {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  margin-bottom: 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper-2);
}
.account-avatar-preview {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  flex: 0 0 68px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-serif);
  font-size: 27px;
}
.account-avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.account-profile-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.account-profile-copy strong { font-family: var(--font-serif); font-size: 19px; font-weight: 500; }
.account-profile-copy small { color: var(--muted); font-size: 11px; }
.account-profile-actions { margin-top: 6px; }
.account-password-section {
  margin-top: 17px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.account-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 11px; }
.account-section-head strong { font-family: var(--font-serif); font-size: 17px; font-weight: 500; }
.account-section-head small { color: var(--muted); font-size: 10px; }
.account-password-section .field { margin-bottom: 10px; }
.account-logout-btn { margin-right: auto; color: var(--danger, #a33a2a); }

.image-editor.upload-plus-grid {
  grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
  margin-top: 10px;
}
.image-add-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0;
  border: 1px dashed var(--line-strong, #cdbca2);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.image-add-tile:hover { border-color: var(--gold); color: var(--gold-dark); background: var(--paper-2); }
.image-add-tile .icon { width: 20px; height: 20px; }
.image-add-tile span { font-size: 10px; }
.upload-title { display: block; color: var(--ink); font-size: 12px; font-weight: 600; }
.upload-title small { color: var(--muted); font-size: 10px; font-weight: 400; }
.upload-field .helper { margin-top: 7px; }

@media (max-width: 760px) {
  .settings-hub { grid-template-columns: minmax(0, 1fr); }
  .settings-advanced { align-items: flex-start; flex-direction: column; }
  .catalog-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-shortcuts { grid-template-columns: minmax(0, 1fr); }
  .account-gear { top: 12px; right: 12px; }
  .account-hero { padding-right: 58px; }
  .image-editor.upload-plus-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .view-panel[data-panel="inventory"] .head-actions {
    gap: 6px;
  }
  .view-panel[data-panel="inventory"] .head-actions .btn {
    padding-inline: 10px;
    font-size: 12px;
    white-space: nowrap;
  }
  .view-panel[data-panel="inventory"] .head-actions .btn .icon {
    width: 14px;
    height: 14px;
  }
}

/* ---------- v7 账号页指标、财务隐私、库存头部、入库联想 ---------- */
.account-hero {
  flex-wrap: wrap;
  align-items: flex-start;
}

.account-identity {
  flex: 1 1 220px;
  min-width: 0;
}

.account-valuation {
  position: relative;
  flex: 1 0 100%;
  margin-top: 4px;
  padding-top: 15px;
  padding-right: 34px;
  border-top: 1px solid rgba(201, 164, 99, 0.28);
}

.account-valuation-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  color: #d8c3a1;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.account-eye {
  position: absolute;
  top: 12px;
  right: 0;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid rgba(201, 164, 99, 0.32);
  border-radius: 50%;
  background: transparent;
  color: #e3c791;
  cursor: pointer;
}

.account-eye:hover {
  background: rgba(255, 255, 255, 0.1);
}

.account-eye .icon {
  width: 13px;
  height: 13px;
}

.account-valuation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.account-valuation-grid > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.account-valuation-grid span {
  color: #bfb3a2;
  font-size: 10.5px;
}

.account-valuation-grid strong {
  overflow: hidden;
  color: #fffaf0;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 16px 0 18px;
}

.account-stat-grid .stat-card {
  min-height: 150px;
}

.account-functions {
  margin-top: 0;
}

.inventory-head-actions {
  gap: 6px;
}

.inventory-head-actions .btn {
  min-height: 38px;
  padding: 9px 11px;
  border-radius: 12px;
  font-size: 12px;
  white-space: nowrap;
}

.inventory-head-actions .count-pill {
  margin-left: 1px;
  background: rgba(255, 255, 255, 0.18);
  color: #fffaf0;
}

.inventory-head-actions .count-pill:empty {
  display: none;
}

.welcome-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 9px;
}

.dashboard-buyer-link {
  white-space: nowrap;
}

.field-suggest {
  position: relative;
}

.name-suggest {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 270px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 16px 36px rgba(54, 42, 26, 0.14);
}

.name-suggest-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.name-suggest-row:hover {
  background: var(--paper-2);
}

.name-suggest-row > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.name-suggest-row strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.name-suggest-row small,
.name-suggest-row em {
  color: var(--muted);
  font-size: 10.5px;
  font-style: normal;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .account-stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .welcome-actions {
    justify-content: flex-start;
  }

  .account-valuation-grid {
    gap: 8px;
  }

  .account-valuation-grid strong {
    font-size: 16px;
  }

  .account-stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin: 10px 0 14px;
  }

  .account-stat-grid .stat-card {
    min-height: 110px;
    padding: 10px 8px;
    border-radius: 12px;
  }

  .account-stat-grid .stat-icon {
    width: 28px;
    height: 28px;
    margin-bottom: 7px;
    border-radius: 8px;
  }

  .account-stat-grid .stat-icon .icon {
    width: 14px;
    height: 14px;
  }

  .account-stat-grid .stat-card p {
    margin: 0 0 4px;
    font-size: 10px;
    line-height: 1.2;
    white-space: nowrap;
  }

  .account-stat-grid .stat-card strong {
    font-size: 22px;
    line-height: 1;
  }

  .account-stat-grid .stat-card small {
    margin-top: 5px;
    font-size: 9px;
    line-height: 1.25;
  }

  .inventory-head-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: 5px;
  }

  .inventory-head-actions .btn {
    justify-content: center;
    min-width: 0;
    padding: 9px 4px;
    font-size: 10.5px;
  }

  .inventory-head-actions .btn .icon {
    width: 13px;
    height: 13px;
  }

  .inventory-head-actions .count-pill {
    display: none;
  }

  .topbar-heading {
    gap: 8px;
  }

  .topbar-buyer-btn {
    min-height: 30px;
    padding: 0 8px;
    font-size: 10px;
  }

  .topbar-buyer-btn .icon {
    width: 12px;
    height: 12px;
  }

  .view-panel[data-panel="shipments"] .filter-row,
  .view-panel[data-panel="returns"] .filter-row {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .view-panel[data-panel="shipments"] #shipment-date,
  .view-panel[data-panel="returns"] #return-date {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    height: 36px;
    min-height: 36px;
  }

  #shipment-today-btn {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 10px;
    font-size: 11px;
  }

  #return-status {
    flex: 0 0 auto;
    width: auto;
    min-width: 94px;
    height: 34px;
    min-height: 34px;
    padding: 0 8px;
    font-size: 11px;
  }
}

/* ---- 数据分析 ---- */
.analytics-head { align-items: flex-start; }
.segmented { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line, #e7e0d4); border-radius: 999px; }
.segment { border: 0; border-radius: 999px; padding: 7px 18px; background: transparent; color: var(--muted, #8a8175); font: inherit; font-size: 13px; cursor: pointer; }
.segment.is-active { background: var(--ink, #211d18); color: #fff; }
.analytics-range { margin: -4px 0 16px; color: var(--muted, #8a8175); font-size: 12px; letter-spacing: .04em; }
.analytics-stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 18px; }
.analytics-stat strong { font-size: 24px; }
.analytics-columns { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .85fr); gap: 18px; align-items: start; }
.analytics-table { border-top: 1px solid var(--line, #e7e0d4); }
.analytics-row { display: grid; grid-template-columns: minmax(100px, 1.3fr) .55fr .55fr 1fr .8fr; gap: 10px; align-items: center; padding: 12px 2px; border-bottom: 1px solid var(--line, #e7e0d4); font-size: 13px; }
.analytics-row-head { color: var(--muted, #8a8175); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.analytics-row span:not(:first-child) { text-align: right; }
.analytics-row strong { font-weight: 500; }
.analytics-inventory-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.analytics-inventory-grid div { display: flex; flex-direction: column; gap: 5px; padding: 12px 0; border-bottom: 1px solid var(--line, #e7e0d4); }
.analytics-inventory-grid span { color: var(--muted, #8a8175); font-size: 12px; }
.analytics-inventory-grid strong { font-size: 18px; font-weight: 500; }
.section-note { color: var(--muted, #8a8175); font-size: 12px; }

/* ---- 扫码 ---- */
.barcode-reader { position: relative; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 14px; background: #171411; }
.barcode-reader video { width: 100%; height: 100%; display: block; object-fit: cover; }
.barcode-frame { position: absolute; inset: 16% 12%; border: 1px solid rgba(255,255,255,.7); border-radius: 10px; box-shadow: 0 0 0 999px rgba(0,0,0,.16) inset; pointer-events: none; }
.barcode-reader > p { position: absolute; left: 12px; right: 12px; bottom: 10px; margin: 0; color: #fff; font-size: 12px; text-align: center; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.barcode-hint { margin-top: 8px; font-size: 11px !important; line-height: 1.6; }

@media (max-width: 900px) {
  .analytics-columns { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .analytics-head { flex-direction: column; align-items: stretch; gap: 10px; }
  .analytics-stat-grid { grid-template-columns: 1fr 1fr; }
  .analytics-stat strong { font-size: 21px; }
  .analytics-row { grid-template-columns: minmax(80px, 1.4fr) .55fr 1fr; }
  .analytics-row > span:nth-child(3), .analytics-row > span:nth-child(5) { display: none; }
  .analytics-row-head > span:nth-child(3), .analytics-row-head > span:nth-child(5) { display: none; }
  .inv-row {
    grid-template-areas:
      "thumb main"
      "meta meta";
    padding: 11px 12px 10px;
  }
  .inv-row .inv-actions { display: none; }
  .inv-row .mobile-meta { padding-left: 69px; }
}

/* ---- 保存到桌面 / 证书安装 ---- */
.account-install {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0 0 14px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.account-install:hover {
  border-color: rgba(150, 116, 62, 0.35);
}

.account-install-icon {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(183, 139, 72, 0.1);
  color: var(--gold, #9a753d);
}

.account-install-copy {
  display: grid;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.account-install-copy strong {
  font-size: 14px;
  font-weight: 600;
}

.account-install-copy small {
  color: var(--muted);
  font-size: 11px;
}

.account-install > .icon {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.install-steps {
  display: grid;
  gap: 9px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: install-step;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.65;
  text-align: left;
}

.install-steps li {
  position: relative;
  padding-left: 27px;
  text-align: left;
}

.install-steps li::before {
  counter-increment: install-step;
  content: counter(install-step);
  position: absolute;
  left: 0;
  top: 1px;
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: rgba(183, 139, 72, 0.12);
  color: var(--gold, #9a753d);
  font-size: 11px;
  font-weight: 600;
}

.barcode-cert {
  margin-top: 14px;
  padding: 12px 13px;
  border: 1px solid rgba(150, 116, 62, 0.22);
  border-radius: 12px;
  background: rgba(183, 139, 72, 0.06);
}

.barcode-cert > p {
  display: grid;
  gap: 3px;
  margin: 0;
}

.barcode-cert strong {
  font-size: 12px;
}

.barcode-cert small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.barcode-cert-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.barcode-cert-actions .btn {
  flex: 1 1 auto;
  justify-content: center;
}

/* --------------------------------- m09097 account / batch / preview / combo --------------------------------- */
body.is-account-view .topbar {
  display: none;
}

body.is-account-view .content {
  padding-top: 28px;
}

.account-install-last {
  margin-top: 12px;
}

.account-avatar {
  cursor: pointer;
}

.account-gear {
  cursor: pointer;
}

.view-panel[data-panel="inventory"] .filter-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.view-panel[data-panel="inventory"] .filter-row > .category-split,
.view-panel[data-panel="inventory"] .filter-row > .select {
  width: 100%;
  min-width: 0;
}

.combo-field {
  position: relative;
  display: block;
}

.combo-field > .input {
  padding-right: 42px;
}

.combo-arrow {
  position: absolute;
  top: 50%;
  right: 5px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transform: translateY(-50%);
}

.combo-arrow:hover {
  background: var(--paper-2);
  color: var(--ink);
}

.combo-arrow .icon {
  width: 15px;
  height: 15px;
  transition: transform 0.2s;
}

.combo-field.is-open .combo-arrow .icon {
  transform: rotate(180deg);
}

.combo-menu {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  left: 0;
  z-index: 45;
  max-height: 220px;
  padding: 5px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(45, 35, 22, 0.14);
}

.combo-menu[hidden] {
  display: none !important;
}

.combo-option {
  display: block;
  width: 100%;
  padding: 9px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.combo-option:hover {
  background: var(--paper-2);
}

.combo-empty {
  margin: 0;
  padding: 9px 11px;
  color: var(--muted);
  font-size: 12px;
}

.tag-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 46px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.tag-toggle {
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-soft);
  font: inherit;
  font-size: 12px;
  line-height: 1.2;
  cursor: pointer;
  pointer-events: auto;
  user-select: none;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}

.tag-toggle:hover {
  border-color: var(--gold);
  color: var(--gold-dark);
}

.tag-toggle.is-on {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.inventory-select-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 0;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}

.inventory-select-cancel {
  position: absolute;
  top: -12px;
  right: 10px;
  z-index: 3;
  display: grid;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  color: var(--muted);
  place-items: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(27, 24, 20, 0.1);
}

.inventory-select-cancel:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.inventory-select-cancel .icon {
  width: 13px;
  height: 13px;
}

.inventory-select-bar[hidden] {
  display: none !important;
}

.inventory-select-bar strong {
  font-size: 13px;
}

.inventory-select-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.inventory-check {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 4;
  width: 19px;
  height: 19px;
  margin: 0;
  accent-color: var(--gold-dark);
  cursor: pointer;
}

.inv-card.is-selected,
.inv-row.is-selected {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
}

.inv-row {
  position: relative;
}

.inv-card.is-selected .inventory-check,
.inv-row.is-selected .inventory-check {
  opacity: 1;
}

.inventory-gallery.is-preview {
  grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
  gap: 10px;
  padding: 12px;
}

.inv-preview-card .inv-card-image {
  aspect-ratio: 1 / 1;
}

.inv-preview-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  min-height: 30px;
  padding: 6px 8px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  line-height: 1.2;
}

.inv-preview-foot > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}

.inv-preview-foot .status-chip {
  flex: 0 0 auto;
  padding: 2px 5px;
  font-size: 8px;
}

.batch-action-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.batch-action {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.batch-action:hover {
  border-color: var(--gold);
}

.batch-action > span:nth-child(2) {
  display: grid;
  flex: 1;
  gap: 3px;
}

.batch-action strong {
  font-size: 13px;
}

.batch-action small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.batch-action > .icon {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.batch-action-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 9px;
  background: var(--paper-2);
  color: var(--gold-dark);
}

.batch-action-icon .icon {
  width: 17px;
  height: 17px;
}

.batch-share-options {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 14px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  color: var(--ink-soft);
  font-size: 13px;
  cursor: pointer;
}

.check-row input {
  width: 17px;
  height: 17px;
  accent-color: var(--gold-dark);
}

.batch-share-preview {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper-2);
}

.batch-share-preview img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
}

.export-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 14px;
}

@media (max-width: 760px) {
  body.is-account-view .content {
    padding-top: calc(16px + env(safe-area-inset-top));
  }

  .topbar {
    height: calc(72px + env(safe-area-inset-top));
    padding-top: calc(env(safe-area-inset-top) + 8px);
  }

  body.is-account-view .topbar {
    display: none;
  }

  .view-panel[data-panel="inventory"] .filter-row {
    grid-template-columns: 1fr 1fr;
  }

  .view-panel[data-panel="inventory"] .filter-row > .category-split {
    grid-column: 1 / -1;
  }

  .inventory-select-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .inventory-select-actions {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .inventory-gallery.is-preview {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    padding: 10px;
  }

  .inv-preview-foot {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
    padding: 5px 6px;
  }

  .batch-share-options {
    gap: 8px 14px;
  }

  .export-field-grid {
    grid-template-columns: 1fr 1fr;
  }

  #finance-password,
  #account-current-password,
  #account-new-password,
  #account-confirm-password {
    font-size: 16px;
  }
}

.category-split {
  display: flex;
  align-items: stretch;
  min-width: 0;
  height: 44px;
  border: 1px solid var(--line, rgba(32, 26, 20, 0.16));
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}

.category-split .select {
  min-width: 0;
  width: 50%;
  height: 100%;
  padding: 0 30px 0 16px;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  box-shadow: none;
}

.category-split .select + .select {
  border-left: 1px solid var(--line, rgba(32, 26, 20, 0.16));
}

.inline-pair {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(0, 1.3fr);
  gap: 8px;
}

.batch-card {
  display: grid;
  gap: 16px;
}

.batch-fields {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
}

.batch-scan-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.batch-scan-row .search-box {
  flex: 1;
  min-width: 0;
}

.batch-results {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line, rgba(32, 26, 20, 0.14));
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
}

.barcode-results {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.barcode-results-title {
  margin: 0 0 2px;
  color: var(--muted, #776b5f);
  font-size: 12px;
}

.batch-match {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.batch-match:hover {
  background: rgba(32, 26, 20, 0.05);
}

.batch-thumb {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  overflow: hidden;
  border-radius: 10px;
  background: #f1ece5;
}

.batch-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.batch-copy {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.batch-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-copy small {
  overflow: hidden;
  color: var(--muted, #776b5f);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-match-add {
  color: var(--gold, #9a753d);
  font-size: 12px;
}

.batch-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 4px;
  border-top: 1px solid var(--line, rgba(32, 26, 20, 0.1));
}

.batch-toolbar-actions {
  display: flex;
  gap: 14px;
}

.batch-count {
  color: var(--muted, #776b5f);
  font-size: 12px;
}

.batch-list {
  display: grid;
  gap: 8px;
}

.batch-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line, rgba(32, 26, 20, 0.12));
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
}

.batch-item input {
  width: 18px;
  height: 18px;
  accent-color: #2e2923;
}

.batch-item .batch-location {
  color: var(--gold, #9a753d);
}

.batch-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line, rgba(32, 26, 20, 0.1));
}

.batch-foot .helper {
  margin: 0;
}

.batch-match-list {
  display: grid;
  gap: 8px;
}

.inv-location {
  color: var(--gold, #9a753d) !important;
}

.scan-prompt {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px dashed rgba(154, 117, 61, 0.35);
  border-radius: 16px;
  background: rgba(250, 246, 239, 0.8);
}

.scan-prompt-icon {
  display: grid;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  background: rgba(154, 117, 61, 0.1);
  color: var(--gold, #9a753d);
}

.scan-prompt p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.65;
}

.scan-prompt p small {
  display: block;
  margin-top: 2px;
  color: var(--muted, #776b5f);
  font-size: 11px;
}

@media (max-width: 640px) {
  .category-split {
    flex: 1 1 100%;
    width: 100%;
  }

  .batch-fields {
    grid-template-columns: 1fr;
  }

  .batch-scan-row {
    align-items: stretch;
    flex-direction: column;
  }

  .batch-scan-row .btn {
    width: 100%;
  }

  .batch-foot {
    align-items: stretch;
    flex-direction: column;
  }

  .batch-foot .btn {
    width: 100%;
  }

  .inline-pair {
    grid-template-columns: minmax(105px, 0.75fr) minmax(0, 1.25fr);
  }

  .inv-location {
    display: none !important;
  }
}

#filter-category-split {
  flex: 0 0 280px;
}

#filter-category-split .select {
  min-width: 0;
  width: 50%;
  padding-inline: 14px 26px;
  font-size: 12px;
}

@media (max-width: 640px) {
  #filter-category-split {
    grid-column: 1 / -1;
    flex: 1 1 100%;
  }
}

.catalog-tabs {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.barcode-results-title {
  text-align: left;
}

@media (max-width: 760px) {
  .catalog-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) and (min-width: 641px) {
  .toolbar {
    flex-wrap: wrap;
  }
  .filter-row {
    flex-wrap: wrap;
    justify-content: flex-end;
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  .inv-location {
    display: block !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .inv-operator {
    display: none;
  }
}

/* ---------- v12 账号、订单日期、数据周报与紧凑卡片 ---------- */
.account-avatar {
  padding: 0;
  border: 1px solid rgba(201, 164, 99, 0.55);
  appearance: none;
  overflow: hidden;
  cursor: pointer;
}

.account-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-avatar:hover {
  border-color: rgba(227, 199, 145, 0.9);
}

.account-store-settings {
  margin: 14px 0 10px;
}

.account-install-last {
  margin-bottom: 0;
}

#topbar-avatar[hidden] {
  display: none !important;
}

.order-date-range {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.view-panel[data-panel="orders"] .filter-row {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.view-panel[data-panel="orders"] #order-phone {
  width: 128px;
  flex: 0 0 128px;
}

.quick-link-value {
  flex: 0 0 auto;
  margin-left: auto;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 23px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.quick-link-arrow {
  margin-left: 2px;
}

.order-date-range .input {
  width: 132px;
}

.date-range-sep {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
}

.analytics-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 9px;
}

#analytics-period {
  flex-wrap: nowrap;
  max-width: 100%;
  overflow-x: auto;
}

#analytics-period .segment {
  flex: 0 0 auto;
  padding-inline: 12px;
  white-space: nowrap;
}

.analytics-date-range {
  display: flex;
  align-items: center;
  gap: 6px;
}

.analytics-date-range .input {
  width: 132px;
  height: 36px;
  min-height: 36px;
  padding-top: 0;
  padding-bottom: 0;
  font-size: 12px;
}

.quick-link-card {
  justify-content: space-between;
  min-height: 64px;
  padding: 13px 14px;
}

.quick-link-copy {
  flex: 1;
  min-width: 0;
}

.quick-link-arrow {
  display: grid;
  place-items: center;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  color: var(--muted-2);
}

.quick-link-arrow .icon {
  width: 14px;
  height: 14px;
  transform: rotate(180deg);
}

.quick-link-card:hover .quick-link-arrow {
  color: var(--gold);
}

#filter-category-split {
  flex: 0 0 200px;
}

#filter-category-split .select {
  padding-inline: 11px 24px;
}

.inv-card-info {
  position: relative;
  display: block;
  min-height: 64px;
  padding: 11px 12px 12px;
}

.inv-card-brand {
  position: absolute;
  top: 11px;
  right: 12px;
  max-width: 52%;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inv-card-price {
  display: block;
  max-width: 48%;
}

.inv-card-code {
  display: block;
  max-width: 100%;
  margin-top: 4px;
  padding-right: 54px;
}

.inv-card-stock {
  position: absolute;
  right: 10px;
  bottom: 9px;
  line-height: 1;
}

.inv-card-stock .status-chip {
  padding: 3px 6px;
  font-size: 9px;
}

@media (max-width: 760px) {
  .topbar {
    height: calc(64px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 17px 0;
  }

  .back-btn {
    width: 36px;
    height: 44px;
    flex-basis: 36px;
    margin-left: -8px;
  }

  .back-btn .icon {
    width: 22px;
    height: 22px;
  }

  .order-date-range {
    grid-column: 1 / -1;
    width: 100%;
  }

  .view-panel[data-panel="orders"] #order-phone {
    width: 100%;
    flex: 1 1 auto;
  }

  .order-date-range .input {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
  }

  .analytics-controls {
    align-items: stretch;
  }

  .analytics-date-range {
    width: 100%;
  }

  .analytics-date-range .input {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
  }

  #filter-category-split {
    flex: 1 1 100%;
  }
}

@media (max-width: 520px) {
  .quick-link-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .quick-link-card {
    min-height: 70px;
    gap: 8px;
    padding: 10px;
  }

  .quick-link-icon {
    width: 29px;
    height: 29px;
  }

  .quick-link-card strong {
    font-size: 12px;
  }

  .quick-link-card small {
    overflow: visible;
    font-size: 9.5px;
    line-height: 1.35;
    white-space: normal;
  }

  .quick-link-arrow {
    display: none;
  }

  .quick-link-value {
    font-size: 21px;
  }
}

/* final m09097 overrides */
@media (max-width: 760px) {
  .topbar {
    height: calc(72px + env(safe-area-inset-top));
    padding-top: calc(env(safe-area-inset-top) + 8px);
  }

  body.is-account-view .topbar {
    display: none;
  }
}

.view-panel[data-panel="inventory"] .filter-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 760px) {
  .view-panel[data-panel="inventory"] .filter-row {
    grid-template-columns: 1fr 1fr;
  }

  .view-panel[data-panel="inventory"] .filter-row > .category-split {
    grid-column: auto;
    width: 100%;
  }

  .view-panel[data-panel="inventory"] .filter-row > #filter-category-split {
    grid-column: auto;
    width: 100%;
  }

  .inv-card-info {
    padding-bottom: 30px;
  }

  .inv-card-stock {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    min-height: 16px;
    z-index: 3;
  }

  .inv-card-stock .status-chip {
    display: inline-flex;
    visibility: visible;
    opacity: 1;
  }

  body.is-account-view .content {
    padding-top: calc(32px + env(safe-area-inset-top, 0px));
  }
}

/* 3777 Vintage brand */
.login-mark {
  width: 96px;
  height: 96px;
  margin-bottom: 28px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.login-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.login-art h1 {
  letter-spacing: 0.02em;
}

.login-art h1 span {
  margin-top: 8px;
  font-size: 16px;
  letter-spacing: 0.32em;
  text-transform: none;
}

.brand-monogram img,
.shop-brand .brand-monogram img {
  display: block;
  width: 84%;
  height: 84%;
  object-fit: contain;
}

.hero-placeholder img {
  width: 46%;
  height: auto;
  object-fit: contain;
  opacity: 0.5;
}

.hero-seal span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
}

.hero-seal span img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.empty-mark img {
  width: 66%;
  height: 66%;
  object-fit: contain;
}

.shop-empty .empty-mark img {
  width: 72%;
  height: 72%;
}

.shop-note-mark img {
  width: auto;
  height: 32px;
  object-fit: contain;
}

.contact-avatar img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.login-brand-mobile img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.view-panel[data-panel="inventory"] .filter-row > .category-split {
  height: 38px;
  min-height: 38px;
}

@media (max-width: 760px) {
  .login-brand-mobile {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 34px;
  }

  .login-brand-mobile span {
    font-family: var(--font-serif);
    font-size: 18px;
    letter-spacing: 0.06em;
  }
}

/* ------------------------- m11047 compact page topbar + sticky filters ------------------------- */
:root {
  --app-topbar-h: 62px;
}

/* overflow-x:hidden turns body into a scroll container and breaks sticky positioning */
body {
  overflow-x: clip;
}

.topbar {
  height: var(--app-topbar-h);
}

.topbar-title,
#account-btn {
  display: none !important;
}

.topbar-heading {
  gap: 8px;
}

.back-btn {
  width: 34px;
  height: 38px;
  flex-basis: 34px;
  margin-left: -6px;
}

/* 库存/订单滚动到搜索框后，搜索与筛选固定在顶栏下方 */
.view-panel[data-panel="inventory"] > .toolbar,
.view-panel[data-panel="orders"] > .toolbar {
  position: sticky;
  top: var(--app-topbar-h);
  z-index: 22;
  padding: 10px 0;
  margin-top: -10px;
  margin-bottom: 4px;
  background: var(--paper);
}

.to-top {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 36;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 10px 24px rgba(32, 25, 17, 0.22);
  cursor: pointer;
}

.to-top[hidden] {
  display: none !important;
}

.to-top .icon {
  width: 19px;
  height: 19px;
  transform: rotate(-90deg);
}

.to-top:hover {
  color: var(--gold);
}

@media (max-width: 760px) {
  :root {
    --app-topbar-h: calc(56px + env(safe-area-inset-top));
  }

  .topbar {
    height: var(--app-topbar-h);
    padding: env(safe-area-inset-top) 14px 0;
  }

  .back-btn {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    margin-left: -6px;
  }

  .back-btn .icon {
    width: 21px;
    height: 21px;
  }

  .to-top {
    right: 14px;
    bottom: calc(84px + env(safe-area-inset-bottom));
    width: 40px;
    height: 40px;
  }
}

/* 品牌 logo 不使用圆形外框 */
.brand-monogram,
.shop-brand .brand-monogram,
.shop-footer-brand .brand-monogram,
.not-found .brand-monogram,
.empty-mark,
.shop-empty .empty-mark,
.hero-seal,
.contact-avatar {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.contact-avatar img {
  width: 38px;
  height: 38px;
}

/* ------------------------- m11417 取消吸顶，页面内关闭按钮 ------------------------- */
/* 顶部返回栏整条移除；页面内只保留关闭叉叉。 */
.topbar {
  display: none !important;
}

.content {
  padding-top: 28px;
}

/* 库存与订单回到普通文档流，滚走筛选后只看到列表。 */
.view-panel[data-panel="inventory"] > .toolbar,
.view-panel[data-panel="orders"] > .toolbar {
  position: static !important;
  top: auto !important;
  z-index: auto !important;
  margin: 0 0 14px !important;
  padding: 0 !important;
  background: transparent !important;
}

.view-panel {
  position: relative;
}

.section-head {
  position: static;
}

.section-head > .has-view-close {
  flex: 1 1 auto;
  min-width: 0;
  padding-right: 52px;
}

.section-head:has(.view-close) > .head-actions,
.section-head:has(.view-close) > .btn {
  margin-top: 12px;
}

.view-close {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.view-close:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: rotate(4deg);
}

.view-close .icon {
  width: 18px;
  height: 18px;
}

@media (max-width: 760px) {
  .content {
    padding-top: calc(18px + env(safe-area-inset-top));
  }

  .section-head > .has-view-close {
    padding-right: 44px;
  }

  .section-head:has(.view-close) > .head-actions,
  .section-head:has(.view-close) > .btn {
    margin-top: 0;
  }

  .view-close {
    top: 0;
    width: 34px;
    height: 34px;
  }

  .view-close .icon {
    width: 16px;
    height: 16px;
  }
}

/* 批量管理：不弹窗，底部固定操作条。 */
body.inventory-selecting .view-panel[data-panel="inventory"] {
  padding-bottom: 104px;
}

.inventory-select-bar {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 90;
  width: min(860px, calc(100vw - 48px));
  margin: 0;
  padding: 10px 14px;
  transform: translateX(-50%);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  box-shadow: 0 14px 40px rgba(34, 27, 19, 0.16);
}

.inventory-select-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.inventory-select-meta strong {
  white-space: nowrap;
}

.inventory-select-exit {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.inventory-select-exit .icon {
  width: 14px;
  height: 14px;
}

.inventory-select-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin-left: auto;
  white-space: nowrap;
}

.inventory-select-actions .text-btn {
  font-size: 13px;
  padding: 5px 0;
}

.inventory-select-actions .text-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

@media (max-width: 760px) {
  .view-panel[data-panel="inventory"] .inventory-head-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    margin-top: 12px;
  }

  .view-panel[data-panel="inventory"] .inventory-head-actions .btn {
    width: 100%;
    min-width: 0;
    justify-content: center;
  }

  #inventory-view-btn {
    grid-column: 1;
    grid-row: 1;
  }

  #inventory-batch-btn {
    grid-column: 2;
    grid-row: 1;
  }

  #inventory-add-btn {
    grid-column: 1;
    grid-row: 2;
  }

  #inventory-quick-out-btn {
    grid-column: 2;
    grid-row: 2;
  }

  .inventory-select-bar {
    bottom: calc(82px + env(safe-area-inset-bottom));
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
    width: calc(100vw - 24px);
    padding: 9px 12px;
  }

  .inventory-select-meta {
    justify-content: space-between;
    width: 100%;
  }

  .inventory-select-actions {
    width: 100%;
    justify-content: space-between;
    gap: 4px;
    margin-left: 0;
  }

  .inventory-select-actions .text-btn {
    font-size: 12px;
    padding: 3px 0;
  }
}


/* 2026-10-28 batch cleanup + card layout */
body.is-locked .inventory-select-bar {
  display: none !important;
}

.inventory-select-actions {
  gap: 8px;
}

.inventory-select-actions .inventory-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.inventory-select-actions .inventory-action-btn:hover {
  border-color: var(--gold);
  background: var(--gold-soft);
  color: var(--gold-deep);
}

.inventory-select-actions .inventory-action-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.inventory-select-actions .inventory-action-danger {
  border-color: rgba(160, 65, 54, 0.28);
  color: #9b3c32;
}

.inventory-select-actions .inventory-action-danger:hover {
  border-color: #9b3c32;
  background: #fbefed;
  color: #7f2c24;
}

/* 多图卡片：状态上移，品牌与价格对齐 */
.inv-card-image {
  position: relative;
}

.inv-card-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-height: 74px;
  padding: 9px 11px 10px;
}

.inv-card-stock {
  position: static;
  align-self: flex-end;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 14px;
  line-height: 1;
}

.inv-card-stock .status-chip {
  padding: 2px 6px;
  font-size: 9px;
}

.inv-card-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 7px;
  width: 100%;
}

.inv-card-price {
  display: block;
  max-width: none;
}

.inv-card-brand {
  position: static;
  max-width: 48%;
  margin-left: auto;
  overflow: hidden;
  transform: translateY(4px);
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inv-card-code {
  max-width: 100%;
  margin-top: 0;
  padding-right: 0;
}

/* 预览模式：小卡、5 列、状态角标 */
.inv-preview-badge {
  position: absolute;
  right: 5px;
  bottom: 5px;
  z-index: 2;
  line-height: 1;
  pointer-events: none;
}

.inv-preview-badge .status-chip {
  padding: 2px 5px;
  font-size: 8px;
  box-shadow: 0 2px 8px rgba(34, 27, 19, 0.1);
}

/* 批量删除密码弹窗 */
.batch-delete-card {
  text-align: left;
}

.batch-delete-copy {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.batch-delete-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 22px 22px;
}

.batch-delete-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.batch-delete-field > span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
}

.batch-delete-field .input {
  width: 100%;
}

#batch-delete-error {
  min-height: 0;
  text-align: left;
}

@media (max-width: 760px) {
  .view-panel[data-panel="inventory"] .inventory-head-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .view-panel[data-panel="inventory"] .inventory-head-actions .btn {
    width: 100%;
    min-width: 0;
    padding: 8px 3px;
    gap: 4px;
    font-size: 11px;
    white-space: nowrap;
  }

  .view-panel[data-panel="inventory"] .inventory-head-actions .btn span {
    font-size: 11px;
  }

  .view-panel[data-panel="inventory"] .inventory-head-actions .btn .icon {
    width: 13px;
    height: 13px;
  }

  #inventory-view-btn,
  #inventory-batch-btn {
    grid-column: 1;
    grid-row: 1;
    width: calc(50% - 4px);
  }

  #inventory-view-btn {
    justify-self: start;
  }

  #inventory-batch-btn {
    justify-self: end;
  }

  #inventory-add-btn {
    grid-column: 2;
    grid-row: 1;
  }

  #inventory-quick-out-btn {
    grid-column: 3;
    grid-row: 1;
  }

  .inventory-head-actions.no-batch #inventory-view-btn {
    width: 100%;
  }

  .inventory-gallery.is-preview {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    padding: 8px;
  }

  .inventory-gallery.is-preview .inv-card {
    border-radius: 10px;
  }

  .inventory-gallery.is-preview .inv-card-image {
    aspect-ratio: 1 / 1;
  }

  .inventory-gallery.is-preview .inv-card-info {
    display: none;
  }

  .inv-preview-foot {
    min-height: 20px;
    padding: 3px 5px;
    font-size: 8px;
  }

  .inv-preview-foot > span:first-child {
    font-size: 8px;
  }

  .inv-preview-badge {
    right: 3px;
    bottom: 3px;
  }

  .inv-preview-badge .status-chip {
    padding: 1px 4px;
    font-size: 7px;
  }

  .inv-preview-card .inventory-check {
    top: 4px;
    left: 4px;
    width: 16px;
    height: 16px;
  }

  .inv-card-info {
    min-height: 72px;
    padding: 8px 10px 10px !important;
  }

  .inventory-select-actions {
    gap: 5px;
  }

  .inventory-select-actions .inventory-action-btn {
    flex: 1 1 0;
    min-width: 0;
    min-height: 30px;
    padding: 0 2px;
    font-size: 11px;
  }

  .batch-delete-form {
    padding: 0 18px 18px;
  }
}

/* 搜索/筛选不吸顶；列表按钮占主要宽度，省略号只留入口。 */
.view-panel[data-panel="inventory"] > .toolbar,
.view-panel[data-panel="orders"] > .toolbar {
  position: static !important;
  top: auto !important;
}

@media (max-width: 760px) {
  #inventory-view-btn {
    width: calc(72% - 4px);
  }

  #inventory-batch-btn {
    width: calc(28% - 4px);
    padding-left: 2px;
    padding-right: 2px;
  }

  .inv-preview-badge {
    display: flex !important;
    width: auto;
    height: auto;
  }

  .inv-preview-badge .status-chip {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
}

/* 每日入库 */
.view-panel[data-panel="returns"] > .section-head {
  margin-bottom: 18px;
}

.inbound-head-actions {
  gap: 8px;
}

.inbound-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 24px;
}

.inbound-day {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.inbound-day:hover {
  border-color: var(--line-strong);
}

.inbound-day.is-active {
  border-color: var(--gold);
  background: var(--gold-soft);
}

.inbound-day > strong {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.inbound-day-marks {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  min-height: 18px;
}

.inbound-mark {
  display: inline-flex;
  align-items: center;
  padding: 2px 5px;
  border-radius: 999px;
  font-size: 10px;
  font-style: normal;
  line-height: 1.4;
  white-space: nowrap;
}

.inbound-mark-return {
  background: var(--gold-soft);
  color: var(--gold-dark);
}

.inbound-mark-arrival {
  background: var(--paper-2);
  color: var(--olive);
}

.inbound-mark-shipment {
  background: var(--paper-2);
  color: var(--olive);
}

.inbound-mark-empty {
  color: var(--muted);
  background: transparent;
  padding-left: 0;
}

.return-type-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--gold-soft);
  color: var(--gold-dark);
  font-size: 11px;
  line-height: 1;
}

.inbound-section {
  padding-top: 22px;
  border-top: 1px solid var(--line);
  margin-top: 22px;
}

.inbound-section:first-of-type {
  margin-top: 0;
}

.inbound-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.inbound-section-head h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 19px;
  margin: 2px 0 0;
}

.inbound-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.inbound-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
}

.inbound-tools .search-box {
  flex: 0 0 220px;
  width: 220px;
}

.inbound-tools .input {
  width: 148px;
}

.inbound-tools .select {
  width: 132px;
}

.compact-sub {
  margin: 6px 0 0;
}

.arrival-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.arrival-card {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}

.arrival-cover {
  width: 82px;
  height: 82px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--paper-2);
  color: var(--muted);
  cursor: zoom-in;
}

.arrival-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.arrival-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.arrival-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.arrival-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 4px;
}

.arrival-actions .btn {
  margin-right: auto;
}

.arrival-photo-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.arrival-photo-head span {
  font-size: 13px;
  font-weight: 600;
}

.arrival-photo-head em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.arrival-photo-field {
  margin-bottom: 14px;
}

#arrival-upload-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.shipment-cover {
  cursor: zoom-in;
}

@media (max-width: 960px) {
  .arrival-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .view-panel[data-panel="returns"] > .section-head {
    display: block;
  }

  .inbound-head-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 14px;
  }

  .inbound-head-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .inbound-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
    overflow: visible;
    padding-bottom: 0;
    margin-bottom: 18px;
  }

  .inbound-day {
    padding: 7px 4px;
    gap: 4px;
    border-radius: 10px;
  }

  .inbound-day > strong {
    font-size: 10px;
    letter-spacing: 0;
    white-space: nowrap;
  }

  .inbound-mark {
    padding: 2px 4px;
    font-size: 9px;
  }

  .inbound-section {
    padding-top: 18px;
    margin-top: 18px;
  }

  .inbound-section-head {
    display: block;
  }

  .inbound-tools {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 12px;
  }

  .inbound-tools .search-box {
    grid-column: 1 / -1;
    width: 100%;
  }

  .inbound-tools .input,
  .inbound-tools .select {
    width: 100%;
  }

  .arrival-card {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px;
  }

  .arrival-cover {
    width: 72px;
    height: 72px;
  }

  .arrival-actions {
    flex-wrap: wrap;
  }

  .arrival-actions .btn {
    margin-right: 0;
  }

  #arrival-upload-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #arrival-modal .modal-card {
    width: calc(100vw - 20px);
  }
}


/* 库存列表：标题两行，编号/尺码并入位置行 */
.inv-mobile-spec {
  display: none;
}

.inv-row .inv-copy .inv-name {
  display: -webkit-box;
  overflow: hidden;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.45;
}

/* 多图卡片：价格/品牌一行，编号/状态一行；文字区更紧凑 */
.inv-card-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-height: 56px;
  padding: 9px 11px 10px;
}

.inv-card-main {
  align-items: center;
}

.inv-card-brand {
  transform: none;
  font-size: 9.5px;
}

.inv-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.inv-card-code {
  display: block;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inv-card-stock {
  position: static;
  flex: 0 0 auto;
  align-self: center;
  min-height: 0;
}

.inv-card-stock .status-chip {
  padding: 2px 6px;
  font-size: 9px;
}

@media (max-width: 760px) {
  .inv-row .inv-code {
    display: none;
  }

  .inv-row .inv-location {
    display: flex !important;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
  }

  .inv-row .inv-location-name {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .inv-row .inv-location .inv-mobile-spec {
    display: inline-block;
    flex: 0 1 auto;
    min-width: 0;
    margin-left: auto;
    overflow: hidden;
    color: var(--muted);
    font-size: 9.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* =========================================================
   登录注册 · 店铺设置二次验证 · 今日概览
   ========================================================= */

.register-form[hidden],
.settings-gate[hidden],
.settings-content[hidden] {
  display: none !important;
}

.login-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.login-mode-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--gold-deep);
  font: inherit;
  font-size: 12.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.login-mode-link:hover {
  color: var(--ink);
}

.register-form .helper {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.7;
}

.settings-gate {
  display: flex;
  justify-content: center;
  padding: 8px 0 24px;
}

.settings-gate-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(100%, 620px);
  padding: 34px;
}

.settings-gate-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 4px;
  border-radius: 50%;
  background: var(--paper-2);
  color: var(--gold-deep);
}

.settings-gate-icon .icon {
  width: 21px;
  height: 21px;
}

.settings-gate-card h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 500;
}

.settings-gate-card .helper {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}

.settings-gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.settings-content {
  min-width: 0;
}

.user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.user-actions .text-btn {
  min-height: 34px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
}

.user-actions .text-btn:hover {
  border-color: var(--gold);
}

.quick-link-grid-today {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.quick-today-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  min-height: 166px;
  padding: 22px 24px;
}

.quick-today-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.quick-today-head .quick-link-copy strong {
  font-size: 15px;
  letter-spacing: 0.01em;
}

.quick-today-head .quick-link-copy small {
  overflow: visible;
  font-size: 11px;
  white-space: normal;
}

.quick-today-value {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: auto;
}

.quick-today-value strong {
  display: inline;
  font-family: var(--font-serif);
  font-size: 40px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
}

.quick-today-value > span {
  color: var(--muted);
  font-size: 12px;
}

.quick-today-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 11.5px;
}

.quick-today-meta strong {
  display: inline;
  margin-left: 2px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.quick-today-foot {
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.02em;
}

@media (max-width: 760px) {
  .quick-link-grid-today {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .quick-today-card {
    min-height: 0;
    padding: 16px 16px 14px;
    gap: 10px;
  }

  .quick-today-value strong {
    font-size: 32px;
  }

  .quick-today-head .quick-link-copy strong {
    font-size: 14px;
  }

  .settings-gate {
    padding: 0;
  }

  .settings-gate-card {
    padding: 22px 18px;
  }

  .settings-gate-card h3 {
    font-size: 20px;
  }

  .settings-gate-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .user-actions {
    justify-content: flex-start;
  }
}

/* ---------- m14186：设置弹窗 / 日期滑动 / 筛选折叠 ---------- */
.settings-hub { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.settings-grid.settings-grid-single { grid-template-columns: minmax(0, 1fr); }
.settings-grid-single > .settings-side { width: 100%; }
.settings-grid-single .card { width: 100%; }
.settings-grid-single .settings-form { max-width: 760px; }

.date-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
}
.date-strip .inbound-days {
  flex: 1 1 auto;
  display: flex;
  grid-template-columns: none;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 2px 0 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
}
.date-strip .inbound-days::-webkit-scrollbar { height: 6px; }
.date-strip .inbound-days::-webkit-scrollbar-thumb { border-radius: 99px; background: var(--line-strong); }
.date-strip .inbound-days::-webkit-scrollbar-track { background: transparent; }
.date-strip .inbound-day {
  flex: 0 0 104px;
  min-width: 104px;
  scroll-snap-align: center;
}
.date-strip-nav {
  display: grid;
  place-items: center;
  width: 32px;
  height: 44px;
  flex: 0 0 32px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--muted);
}
.date-strip-nav:hover { border-color: var(--gold); color: var(--ink); }
.date-strip-nav .icon { width: 16px; height: 16px; }
.date-strip-prev .icon { transform: rotate(180deg); }

.inbound-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}
.inbound-title-row > div:first-child { min-width: 0; }
.inbound-title-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.inbound-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink-2);
  font-size: 12px;
  white-space: nowrap;
}
.inbound-filter-toggle:hover, .inbound-filter-toggle[aria-expanded="true"] {
  border-color: var(--gold);
  background: var(--gold-soft);
  color: var(--gold-dark);
}
.inbound-filter-toggle .icon { width: 14px; height: 14px; }
.inbound-tools-wrap { margin-top: 12px; }
.inbound-tools-wrap[hidden] { display: none !important; }

.shipment-actions { justify-content: flex-end; align-self: center; }
.shipment-actions .btn { min-height: 32px; padding: 5px 11px; font-size: 11px; }
.shipment-delete-btn { color: #9c4a4a; }
.shipment-delete-btn:hover { border-color: #d9b3b3; background: #fbf1f1; }

.movement-pending_in { background: #f3eee2; color: #7c6a45; }
.movement-lock { background: #eee7f2; color: #6d557c; }

.form-success {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #edf3e8;
  color: #47643c;
  font-size: 12px;
  line-height: 1.65;
}
.form-success[hidden] { display: none !important; }

.order-date-btn { white-space: nowrap; }
.order-date-btn span { max-width: 210px; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 760px) {
  /* iOS 聚焦输入框时不再自动放大页面 */
  input, select, textarea, .input, .select { font-size: 16px !important; }
  .settings-hub { grid-template-columns: minmax(0, 1fr); }
  .settings-grid.settings-grid-single { grid-template-columns: minmax(0, 1fr); }
  .date-strip { gap: 4px; margin-bottom: 18px; }
  .date-strip .inbound-days { gap: 6px; padding-bottom: 6px; }
  .date-strip .inbound-day { flex-basis: 82px; min-width: 82px; padding: 8px 6px; }
  .date-strip-nav { width: 26px; height: 40px; flex-basis: 26px; border-radius: 8px; }
  .inbound-section-head { display: block; }
  .inbound-title-row { align-items: center; gap: 10px; }
  .inbound-title-row .compact-sub { display: none; }
  .inbound-title-actions { gap: 6px; }
  .inbound-filter-toggle { min-height: 32px; padding: 5px 10px; font-size: 11px; }
  .inbound-filter-toggle .icon { width: 13px; height: 13px; }
  .inbound-tools-wrap { margin-top: 10px; }
  .inbound-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 0; }
  .inbound-tools .search-box { grid-column: 1 / -1; width: 100%; }
  .inbound-tools .input, .inbound-tools .select { width: 100%; }
  .shipment-actions { grid-column: 1 / -1; justify-content: flex-end; align-self: auto; padding-top: 4px; }
  .shipment-actions .btn { min-height: 30px; }
}


/* m14186 final visual polish */
.inbound-day.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}
.inbound-day.is-active .inbound-mark-return {
  background: rgba(255, 248, 238, 0.16);
  color: #f0d8a9;
}
.inbound-day.is-active .inbound-mark-arrival {
  background: rgba(255, 248, 238, 0.12);
  color: #e8e0cf;
}
.inbound-day.is-active .inbound-mark-empty {
  background: rgba(255, 248, 238, 0.1);
  color: rgba(255, 248, 238, 0.72);
}
.quick-today-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #fffdf9 0%, #f5eee2 100%);
}
.quick-today-card::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: -38px;
  width: 122px;
  height: 122px;
  border: 1px solid rgba(153, 122, 72, 0.16);
  border-radius: 50%;
  pointer-events: none;
}
.quick-today-card .quick-today-value strong {
  font-size: 46px;
}
@media (max-width: 760px) {
  .quick-today-card .quick-today-value strong { font-size: 36px; }
}

/* ---------- m15353：账号消息、库存/订单筛选、日期条与概览照片 ---------- */
.card-head { flex-wrap: wrap; gap: 10px; }
.approval-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink-2);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.approval-bell:hover { border-color: var(--gold); color: var(--gold-dark); }
.approval-bell .icon { width: 15px; height: 15px; }
.approval-bell em {
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 9px;
  font-style: normal;
  line-height: 1;
}
.approval-bell em[hidden] { display: none !important; }
.modal-approval { max-width: 620px; }
.approval-bulk {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
}
.approval-bulk p { display: flex; align-items: baseline; gap: 5px; margin: 0; font-size: 12px; }
.approval-bulk p strong { font-family: var(--font-serif); font-size: 22px; font-weight: 500; color: var(--ink); }
.approval-bulk p small { display: block; margin-left: 6px; color: var(--muted); font-size: 10px; }
.approval-reject-all { color: var(--danger); border-color: #e1c4c4; white-space: nowrap; }
.approval-scroll { max-height: min(54vh, 430px); padding: 6px 22px 16px; }
.approval-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.approval-row:last-child { border-bottom: 0; }
.approval-main { flex: 1; min-width: 0; }
.approval-main strong { display: block; font-family: var(--font-serif); font-size: 15px; font-weight: 500; }
.approval-main small { display: block; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.approval-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }

.user-actions { flex-direction: column; align-items: flex-end; flex-wrap: nowrap; gap: 6px; }
.user-actions .text-btn {
  min-width: 78px;
  min-height: 30px;
  padding: 5px 11px;
  text-align: center;
  text-decoration: none;
}

.inventory-filter-toggle { margin-left: 2px; }
.inventory-filter-toggle span { white-space: nowrap; }
.view-panel[data-panel="inventory"] .toolbar,
.view-panel[data-panel="orders"] .toolbar { margin-top: 0; }
#inventory-toolbar[hidden], #order-toolbar[hidden] { display: none !important; }

/* 多图卡片：状态固定到右下角，与品牌文字右边缘对齐 */
.inv-card-info { position: relative; }
.inv-card-stock {
  position: absolute !important;
  right: 11px;
  bottom: 10px;
  margin: 0;
  align-self: auto;
  justify-content: flex-end;
}
.inv-card-code { padding-right: 58px; }

/* 概览两卡：右侧照片堆叠，滑动时边缘渐隐 */
.quick-today-card { padding-right: min(43%, 230px); }
.quick-today-card .quick-link-arrow { display: none; }
.quick-today-card > .quick-today-head,
.quick-today-card > .quick-today-value,
.quick-today-card > .quick-today-meta,
.quick-today-card > .quick-today-foot { position: relative; z-index: 2; max-width: 62%; }
.quick-today-photos {
  position: absolute;
  top: 50%;
  right: 10px;
  z-index: 1;
  display: flex;
  align-items: center;
  width: min(40%, 218px);
  height: 132px;
  padding: 12px 20px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 13%, #000 87%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 13%, #000 87%, transparent 100%);
  transform: translateY(-50%);
}
.quick-today-photos::-webkit-scrollbar { display: none; }
.quick-today-photos.is-empty { align-items: center; justify-content: center; }
.quick-photo {
  position: relative;
  flex: 0 0 76px;
  width: 76px;
  height: 96px;
  margin-left: -27px;
  padding: 5px 5px 18px;
  border: 1px solid rgba(80, 68, 52, 0.08);
  background: #fffdfa;
  box-shadow: 0 7px 16px rgba(66, 52, 35, 0.13);
  transform: rotate(var(--photo-rotate, 0deg));
  transform-origin: center bottom;
  scroll-snap-align: center;
  transition: opacity 0.16s linear;
}
.quick-photo:first-child { margin-left: 0; }
.quick-photo img { display: block; width: 100%; height: 100%; object-fit: cover; background: var(--paper-2); }
.quick-photo em {
  position: absolute;
  right: 5px;
  bottom: 4px;
  left: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  font-style: normal;
  line-height: 1.2;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quick-photo-empty { color: var(--muted); font-size: 10px; letter-spacing: 0.08em; }

.date-strip { gap: 0; }
.date-strip .inbound-days { gap: 8px; }
.date-strip .inbound-day {
  flex: 0 0 calc((100% - 48px) / 7);
  min-width: calc((100% - 48px) / 7);
  padding: 9px 7px;
  scroll-snap-align: start;
}
.inbound-day > strong { line-height: 1.15; }
.inbound-day-week { margin-top: -3px; color: var(--muted); font-size: 10px; line-height: 1; }
.inbound-day.is-active .inbound-day-week { color: rgba(255, 248, 238, 0.72); }
.inbound-day-marks { margin-top: 2px; }

@media (max-width: 760px) {
  .view-panel[data-panel="inventory"] .inventory-head-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 6px;
    margin-top: 12px;
  }
  .view-panel[data-panel="inventory"] .inventory-head-actions .btn {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    padding: 8px 6px;
    gap: 4px;
    font-size: 10.5px;
  }
  .view-panel[data-panel="inventory"] .inventory-head-actions .btn span { font-size: 10.5px; }
  #inventory-view-btn,
  #inventory-batch-btn {
    flex: 0 0 34px !important;
    width: 34px;
    min-width: 34px;
    padding: 0 !important;
    justify-content: center;
  }
  #inventory-filter-toggle {
    flex: 0 0 48px !important;
    width: 48px;
    min-width: 48px;
    padding: 0 5px !important;
    justify-content: center;
    gap: 3px;
  }
  #inventory-view-btn span,
  #inventory-batch-btn span { display: none; }
  #inventory-filter-toggle span { font-size: 9.5px; white-space: nowrap; }
  #inventory-view-btn .icon,
  #inventory-batch-btn .icon,
  #inventory-filter-toggle .icon { width: 15px; height: 15px; }
  #inventory-view-btn { justify-self: auto; width: 34px; }
  #inventory-batch-btn { justify-self: auto; width: 34px; }
  #inventory-add-btn,
  #inventory-quick-out-btn { flex: 1 1 auto !important; }
  #inventory-add-btn .icon,
  #inventory-quick-out-btn .icon { width: 12px; height: 12px; }

  .view-panel[data-panel="inventory"] .toolbar { margin: 10px 0 12px; }
  .view-panel[data-panel="inventory"] .toolbar .search-box input,
  .view-panel[data-panel="inventory"] .toolbar .select { font-size: 13px !important; }
  .view-panel[data-panel="inventory"] .toolbar .search-box input { height: 38px; }
  .view-panel[data-panel="inventory"] .toolbar .select { min-height: 38px; padding-block: 7px; }

  .section-head > .inbound-filter-toggle { flex: 0 0 auto; align-self: flex-start; margin-top: 2px; }

  .quick-today-card { padding-right: 44%; }
  .quick-today-card > .quick-today-head,
  .quick-today-card > .quick-today-value,
  .quick-today-card > .quick-today-meta,
  .quick-today-card > .quick-today-foot { max-width: 56%; }
  .quick-today-photos { right: 4px; width: 44%; height: 126px; padding-inline: 16px; }
  .quick-photo { flex-basis: 66px; width: 66px; height: 86px; margin-left: -25px; padding: 4px 4px 15px; }

  .date-strip .inbound-days { gap: 6px; padding-bottom: 7px; }
  .date-strip .inbound-day {
    flex-basis: calc((100% - 36px) / 7);
    min-width: calc((100% - 36px) / 7);
    padding: 8px 4px;
  }
  .date-strip .inbound-day > strong { font-size: 11px; }
  .inbound-day-week { font-size: 9px; }
  .inbound-day-marks .inbound-mark { padding: 2px 3px; font-size: 8.5px; }

  .approval-bulk { align-items: flex-start; gap: 8px; padding: 11px 16px; }
  .approval-bulk p { display: block; font-size: 11px; }
  .approval-bulk p small { margin: 4px 0 0; }
  .approval-scroll { padding-inline: 16px; }
  .approval-actions { flex-direction: column; gap: 4px; }
  .approval-actions .btn { min-height: 29px; padding: 4px 10px; }
}
.quick-photo-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: var(--paper-2);
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
}
.quick-photo.is-fallback em { color: var(--muted); }

/* 列表 / 图片视图切换 */
.view-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  vertical-align: middle;
}
.view-switch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 28px;
  padding: 0 9px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}
.view-switch-btn .icon { width: 14px; height: 14px; }
.view-switch-btn.is-active { background: var(--ink); color: #fff; }

/* 筛选按钮统一为深色实心 */
.inbound-filter-toggle,
.inbound-filter-toggle:hover,
.inbound-filter-toggle[aria-expanded="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}
.inbound-filter-toggle:hover { opacity: 0.88; }
.inventory-filter-toggle { margin-left: 2px; }

/* 图片模式 */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.photo-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
button.photo-card { appearance: none; }
.photo-card:hover { border-color: var(--gold); }
.photo-card-media {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--paper-2);
}
.photo-card-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--gold-dark);
  font-family: var(--font-serif);
  font-size: 30px;
}
.photo-card-body { display: grid; gap: 3px; min-width: 0; padding: 8px 10px 11px; }
.photo-card-body strong,
.photo-card-body span,
.photo-card-body small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-card-body strong { font-size: 12px; font-weight: 600; }
.photo-card-body span { color: var(--muted); font-size: 11px; }
.photo-card-body small { color: var(--muted); font-size: 10px; }
.photo-card .return-status { font-style: normal; }
.shipment-grid.is-photo { display: block; }
.arrival-grid.is-photo,
#return-list.is-photo { display: block; }

/* 每日入库标题与右侧操作顶部对齐 */
.inbound-title-row { align-items: flex-start; }
.inbound-title-actions { margin-top: 18px; }
.inbound-title-row > .inbound-title-actions { align-items: flex-start; }

/* 概览照片上移，和左侧文字块保持视觉居中 */
.quick-today-photos { top: 38%; }
.view-panel[data-panel="analytics"] .analytics-head { padding-right: 54px; }

@media (max-width: 760px) {
  .view-panel[data-panel="orders"] .section-head .head-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 720px) {
  .view-switch { padding: 2px; border-radius: 10px; }
  .view-switch-btn { min-height: 26px; padding: 0 7px; font-size: 11px; gap: 4px; }
  .view-switch-btn .icon { width: 13px; height: 13px; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .photo-card-body { padding: 7px 8px 9px; }
  .photo-card-body strong { font-size: 11px; }
  .photo-card-body span { font-size: 10px; }
  .inbound-title-actions { margin-top: 12px; }
}

.analytics-custom-range { display: inline-flex; align-items: center; gap: 8px; }
.analytics-date-range [hidden] { display: none !important; }
.analytics-date-range #analytics-week,
.analytics-date-range #analytics-month { width: 150px; }
.analytics-date-range #analytics-year { width: 110px; }
@media (max-width: 720px) {
  .analytics-custom-range { width: 100%; }
  .analytics-custom-range .input { flex: 1 1 0; min-width: 0; }
  .analytics-date-range #analytics-week,
  .analytics-date-range #analytics-month,
  .analytics-date-range #analytics-year { width: 100%; }
}


/* 奢当家 Excel 导入 */
.import-intro { display:flex; gap:16px; align-items:flex-start; padding:18px; margin-bottom:16px; border:1px solid var(--line); border-radius:16px; background:var(--paper-2); }
.import-drop-icon { width:44px; height:44px; flex:0 0 44px; display:grid; place-items:center; border-radius:50%; background:var(--ink); color:#fff; }
.import-drop-icon .icon { width:20px; height:20px; }
.import-intro strong { display:block; margin-bottom:6px; font-size:14px; }
.import-intro p { margin:0; color:var(--muted); font-size:12px; line-height:1.7; }
.import-intro b { color:var(--ink); font-weight:600; }
.import-file-btn { width:100%; min-height:48px; }
.import-loading { display:flex; align-items:center; justify-content:center; gap:12px; min-height:120px; color:var(--muted); font-size:13px; }
.import-loading .spinner { width:20px; height:20px; border:2px solid var(--line); border-top-color:var(--ink); border-radius:50%; animation:import-spin .8s linear infinite; }
@keyframes import-spin { to { transform:rotate(360deg); } }
.import-summary { display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:10px; margin-bottom:14px; }
.import-summary span { padding:10px 12px; border:1px solid var(--line); border-radius:12px; color:var(--muted); font-size:11px; }
.import-summary b { display:block; margin-top:4px; color:var(--ink); font-size:18px; font-weight:600; }
.import-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px; color:var(--muted); font-size:12px; }
.import-check { display:flex; align-items:center; gap:7px; cursor:pointer; }
.import-list { display:grid; gap:8px; }
.import-row { display:grid; grid-template-columns:22px 52px minmax(0,1fr) auto; gap:10px; align-items:center; padding:10px; border:1px solid var(--line); border-radius:12px; background:var(--paper); }
.import-row.is-existing { opacity:.55; background:var(--paper-2); }
.import-row input[type="checkbox"] { accent-color:var(--ink); }
.import-thumb { width:52px; height:52px; border-radius:8px; overflow:hidden; background:var(--paper-2); display:grid; place-items:center; color:var(--muted); font-size:10px; }
.import-thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.import-copy { min-width:0; }
.import-copy strong { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; font-weight:600; }
.import-copy small { display:block; margin-top:3px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--muted); font-size:10px; }
.import-price { text-align:right; font-size:12px; white-space:nowrap; }
.import-price em { display:block; margin-top:4px; padding:2px 6px; border-radius:999px; background:var(--paper-2); color:var(--muted); font-size:9px; font-style:normal; }
.import-row.is-existing .import-price em { color:var(--danger, #b94a48); }
.import-progress { margin:12px 0 0; color:var(--muted); font-size:12px; }
@media (max-width:720px) {
  .import-summary { grid-template-columns:repeat(2, minmax(0,1fr)); }
  .import-row { grid-template-columns:20px 44px minmax(0,1fr); }
  .import-thumb { width:44px; height:44px; }
  .import-price { grid-column:2 / -1; display:flex; align-items:center; justify-content:space-between; text-align:left; }
  .import-price em { margin-top:0; }
}