/* ══════════════ 礼遇 · 后台设计系统 ══════════════ */
:root {
  --c-primary: #14342B;
  --c-primary-dark: #0C231D;
  --c-primary-light: #235246;
  --c-gold: #C6A15B;
  --c-gold-light: #E8D5A9;
  --c-gold-deep: #9C6B2F;
  --c-bg: #FAF8F5;
  --c-surface: #FFFFFF;
  --c-border: #E5E0D8;
  --c-text: #1A1A1A;
  --c-text-sub: #7A736B;
  --c-text-weak: #A9A29A;
  --c-danger: #B23A2E;
  --c-success: #3D7A5A;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --sh-1: 0 2px 8px rgba(20, 52, 43, .05);
  --sh-2: 0 8px 24px rgba(20, 52, 43, .08);
  --sh-3: 0 16px 48px rgba(20, 52, 43, .12);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }

/* ─────────── 登录 ─────────── */
.login { display: grid; grid-template-columns: 1.1fr .9fr; min-height: 100vh; }
.login__brand {
  position: relative;
  background: linear-gradient(150deg, #0C231D 0%, #14342B 55%, #1D4538 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 12%;
  overflow: hidden;
}
.login__brand::after {
  content: '';
  position: absolute;
  width: 620px; height: 620px;
  right: -220px; bottom: -260px;
  border: 1px solid rgba(232, 213, 169, .22);
  border-radius: 50%;
}
.login__brand::before {
  content: '';
  position: absolute;
  width: 420px; height: 420px;
  right: -110px; bottom: -150px;
  border: 1px solid rgba(232, 213, 169, .16);
  border-radius: 50%;
}
.login__mark {
  width: 84px; height: 84px;
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(232, 213, 169, .6),
              0 0 0 6px rgba(198, 161, 91, .18),
              0 18px 40px rgba(0, 0, 0, .34);
  margin-bottom: 28px;
}
.login__mark img {
  display: block;
  width: 100%; height: 100%;
  padding: 7px;
  box-sizing: border-box;
  object-fit: contain;
}
.login__title { font-size: 30px; font-weight: 600; letter-spacing: .14em; }
.login__sub { margin-top: 10px; font-size: 11px; letter-spacing: .32em; color: rgba(232, 213, 169, .55); }

.login__panel { display: grid; place-items: center; padding: 40px; }
.login__form { width: 340px; }
.login__h2 { font-size: 24px; font-weight: 600; letter-spacing: .06em; }
.login__hint { margin: 8px 0 32px; font-size: 13px; color: var(--c-text-sub); }
.login__err { margin-top: 14px; font-size: 12px; color: var(--c-danger); min-height: 16px; }
.login__tip { margin-top: 24px; font-size: 11px; color: var(--c-text-weak); line-height: 1.7; }

.field { display: block; margin-bottom: 18px; }
.field__label { display: block; font-size: 12px; color: var(--c-text-sub); margin-bottom: 8px; letter-spacing: .05em; }
.field__input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
  outline: none;
}
.field__input:hover { border-color: #D5CEC3; }
.field__input:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(20, 52, 43, .1);
}

/* ─────────── 按钮 ─────────── */
.btn {
  position: relative;
  overflow: hidden;
  height: 40px;
  padding: 0 20px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform .24s var(--ease), box-shadow .24s var(--ease),
              background-color .18s var(--ease), border-color .18s var(--ease), color .18s;
}
.btn--block { width: 100%; height: 46px; margin-top: 8px; }
.btn--primary { background: var(--c-primary); color: #fff; box-shadow: 0 4px 14px rgba(20, 52, 43, .18); }
.btn--primary::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(232, 213, 169, .32) 50%, transparent 80%);
  transform: translateX(-120%);
  transition: transform .6s var(--ease);
}
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(20, 52, 43, .24); }
.btn--primary:hover::after { transform: translateX(120%); }
.btn--primary:active { transform: translateY(0) scale(.99); }

.btn--ghost { background: #fff; border: 1px solid var(--c-border); color: var(--c-text-sub); }
.btn--ghost:hover { border-color: var(--c-gold); color: var(--c-gold-deep); background: #FDF9EF; }

.btn--gold { background: linear-gradient(135deg, #D9BC7E, #C6A15B); color: #fff; }
.btn--gold:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(198, 161, 91, .3); }

.btn--danger { background: #fff; border: 1px solid #E8C9C4; color: var(--c-danger); }
.btn--danger:hover { background: #FDF4F3; border-color: var(--c-danger); }

.btn--sm { height: 30px; padding: 0 12px; font-size: 12px; border-radius: 6px; }
.btn--link { height: auto; padding: 0; color: var(--c-gold-deep); font-size: 12px; }
.btn--link:hover { text-decoration: underline; }

/* ─────────── 布局 ─────────── */
.app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }

.sidebar {
  background: var(--c-primary-dark);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 22px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.sidebar__mark {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  flex: none;
  box-shadow: 0 0 0 1px rgba(232, 213, 169, .5),
              0 4px 12px rgba(0, 0, 0, .28);
  transition: transform .24s var(--ease), box-shadow .24s var(--ease);
}
.sidebar__mark img {
  display: block;
  width: 100%; height: 100%;
  padding: 3px;
  box-sizing: border-box;
  object-fit: contain;
}
.sidebar__brand:hover .sidebar__mark {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(232, 213, 169, .75),
              0 8px 18px rgba(0, 0, 0, .34);
}
.sidebar__name { font-size: 15px; font-weight: 600; letter-spacing: .1em; }
.sidebar__sub { font-size: 9px; letter-spacing: .26em; color: rgba(232, 213, 169, .5); margin-top: 2px; }

.nav { flex: 1; padding: 14px 10px; overflow-y: auto; }
.nav__group { font-size: 10px; letter-spacing: .2em; color: rgba(255, 255, 255, .25); padding: 18px 12px 8px; }
.nav__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  margin-bottom: 2px;
  border-radius: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, .62);
  transition: background-color .18s var(--ease), color .18s var(--ease), padding-left .18s var(--ease);
  cursor: pointer;
}
.nav__item::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  width: 3px; height: 0;
  background: var(--c-gold);
  border-radius: 0 3px 3px 0;
  transform: translateY(-50%);
  transition: height .24s var(--ease-spring);
}
.nav__item:hover { background: rgba(232, 213, 169, .09); color: #fff; }
.nav__item:hover::before { height: 16px; }
.nav__item--active { background: rgba(232, 213, 169, .13); color: var(--c-gold-light); }
.nav__item--active::before { height: 22px; }
.nav__dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .5; }

.sidebar__foot { padding: 16px 20px 22px; border-top: 1px solid rgba(255, 255, 255, .06); }
.sidebar__user { font-size: 12px; color: rgba(255, 255, 255, .55); margin-bottom: 10px; }
.sidebar__logout {
  font-size: 12px;
  color: rgba(255, 255, 255, .4);
  transition: color .18s;
}
.sidebar__logout:hover { color: var(--c-danger); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 32px 20px;
  background: var(--c-bg);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar__title { font-size: 22px; font-weight: 600; letter-spacing: .02em; }
.topbar__sub { margin-top: 5px; font-size: 12px; color: var(--c-text-sub); }
.topbar__right { display: flex; gap: 10px; align-items: center; }

.content { padding: 0 32px 48px; }

/* ─────────── 卡片 ─────────── */
.card {
  background: var(--c-surface);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  padding: 22px;
}
.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.card__title { font-size: 15px; font-weight: 600; letter-spacing: .02em; }
.card__hint { font-size: 12px; color: var(--c-text-weak); }

/* 指标卡 */
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-bottom: 20px; }
.stat {
  position: relative;
  overflow: hidden;
  background: #fff;
  border-radius: var(--r-lg);
  padding: 20px 20px 18px;
  box-shadow: var(--sh-1);
  transition: transform .28s var(--ease), box-shadow .28s var(--ease);
}
.stat::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  height: 2px; width: 0;
  background: linear-gradient(90deg, var(--c-gold), var(--c-gold-light));
  transition: width .4s var(--ease);
}
.stat:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.stat:hover::before { width: 100%; }
.stat__label { font-size: 12px; color: var(--c-text-sub); letter-spacing: .04em; }
.stat__value {
  margin-top: 10px;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.stat__value--gold { color: var(--c-gold-deep); }
.stat__value--danger { color: var(--c-danger); }
.stat__unit { font-size: 13px; font-weight: 400; color: var(--c-text-weak); margin-left: 3px; }

/* ─────────── 表格 ─────────── */
.table-wrap { overflow-x: auto; margin: 0 -22px -22px; padding: 0 22px 6px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  text-align: left;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--c-text-weak);
  padding: 0 12px 10px;
  border-bottom: 1px solid var(--c-border);
  white-space: nowrap;
}
tbody td {
  padding: 14px 12px;
  border-bottom: 1px solid #F6F2EB;
  vertical-align: middle;
}
tbody tr { position: relative; transition: background-color .18s var(--ease); }
tbody tr::after {
  content: '';
  position: absolute;
  left: -22px; top: 0; bottom: 0;
  width: 3px;
  background: var(--c-gold);
  opacity: 0;
  transition: opacity .18s var(--ease);
}
tbody tr:hover { background: rgba(232, 213, 169, .1); }
tbody tr:hover::after { opacity: 1; }
tbody tr:last-child td { border-bottom: none; }
.row-actions { display: flex; gap: 8px; flex-wrap: nowrap; opacity: .68; transition: opacity .18s var(--ease); }
.row-actions .btn { flex: 0 0 auto; white-space: nowrap; }
tr:hover .row-actions { opacity: 1; }

.thumb { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; background: #F5F1EA; display: block; }
.cell-title { font-weight: 500; }
.cell-sub { font-size: 11px; color: var(--c-text-weak); margin-top: 2px; }
.mono { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }

.badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}
.badge--green { background: rgba(61, 122, 90, .1); color: var(--c-success); }
.badge--gold { background: rgba(198, 161, 91, .14); color: var(--c-gold-deep); }
.badge--red { background: rgba(178, 58, 46, .1); color: var(--c-danger); }
.badge--gray { background: #F2EEE8; color: var(--c-text-weak); }

/* 内联输入 */
.inline-input {
  width: 92px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  font-variant-numeric: tabular-nums;
  transition: border-color .18s, background-color .18s, box-shadow .18s;
  outline: none;
}
.inline-input:hover { border-color: var(--c-border); background: #fff; }
.inline-input:focus {
  border-color: var(--c-primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(20, 52, 43, .1);
}

/* ─────────── 图表 ─────────── */
.chart { display: flex; align-items: flex-end; gap: 10px; height: 180px; padding-top: 12px; }
.chart__col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.chart__bar {
  width: 100%;
  max-width: 46px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #235246, #14342B);
  min-height: 4px;
  transition: height .6s var(--ease), background .18s;
  position: relative;
}
.chart__col:hover .chart__bar { background: linear-gradient(180deg, #C6A15B, #9C6B2F); }
.chart__label { font-size: 11px; color: var(--c-text-weak); }
.chart__val { font-size: 11px; color: var(--c-text-sub); font-variant-numeric: tabular-nums; }

/* ─────────── 表单 ─────────── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid--3 { grid-template-columns: repeat(3, 1fr); }
.span2 { grid-column: span 2; }
.fitem { display: flex; flex-direction: column; gap: 8px; }
.fitem__label { font-size: 12px; color: var(--c-text-sub); letter-spacing: .04em; }
.fitem__hint { font-size: 11px; color: var(--c-text-weak); }
.input, .select, .textarea {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.textarea { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.7; }
.input:hover, .select:hover, .textarea:hover { border-color: #D5CEC3; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(20, 52, 43, .1);
}

/* 图片上传 */
.uploader { display: flex; flex-wrap: wrap; gap: 10px; }
.uploader__item { position: relative; width: 78px; height: 78px; border-radius: 10px; overflow: hidden; }
.uploader__item img { width: 100%; height: 100%; object-fit: cover; }
.uploader__del {
  position: absolute; top: 3px; right: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .55);
  color: #fff; font-size: 10px;
  display: grid; place-items: center;
  opacity: 0; transition: opacity .18s;
}
.uploader__item:hover .uploader__del { opacity: 1; }
.uploader__add {
  width: 78px; height: 78px;
  border: 1px dashed var(--c-border);
  border-radius: 10px;
  display: grid; place-items: center;
  color: var(--c-text-weak);
  font-size: 22px;
  transition: border-color .18s, color .18s, background-color .18s;
}
.uploader__add:hover { border-color: var(--c-gold); color: var(--c-gold-deep); background: #FDF9EF; }

/* SKU 表 */
.sku-table td, .sku-table th { padding: 8px 8px; }
.sku-table .input { height: 34px; }

/* ─────────── 弹窗 ─────────── */
/* 作者样式里的 display 会盖掉 UA 的 [hidden]{display:none}，这里显式兜底 */
[hidden] { display: none !important; }
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; }
.modal__mask {
  position: absolute; inset: 0;
  background: rgba(12, 35, 29, .42);
  backdrop-filter: blur(3px);
  animation: fade .2s var(--ease);
}
.modal__box {
  position: relative;
  width: min(560px, 92vw);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--r-lg);
  box-shadow: var(--sh-3);
  animation: pop .24s var(--ease-spring);
}
.modal__box--wide { width: min(880px, 94vw); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.97); } }
.modal__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 22px 14px;
  border-bottom: 1px solid #F4F0E9;
}
.modal__title { font-size: 16px; font-weight: 600; }
.modal__close { color: var(--c-text-weak); font-size: 14px; transition: transform .24s var(--ease), color .18s; }
.modal__close:hover { color: var(--c-text); transform: rotate(90deg); }
.modal__body { padding: 20px 22px; overflow-y: auto; }
.modal__foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 22px 20px;
  border-top: 1px solid #F4F0E9;
}

/* ─────────── Toast ─────────── */
.toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translate(-50%, 16px);
  padding: 11px 20px;
  background: rgba(12, 35, 29, .94);
  color: #fff;
  font-size: 13px;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s var(--ease), transform .24s var(--ease);
  z-index: 200;
}
.toast--show { opacity: 1; transform: translate(-50%, 0); }
.toast--err { background: rgba(178, 58, 46, .96); }

/* ─────────── 空状态 ─────────── */
.empty-state { padding: 56px 0; text-align: center; color: var(--c-text-weak); font-size: 13px; }

/* ─────────── 核销台 ─────────── */
.verify { max-width: 520px; margin: 26px auto 0; }
.verify__input {
  width: 100%;
  height: 68px;
  text-align: center;
  font-size: 30px;
  letter-spacing: .5em;
  font-variant-numeric: tabular-nums;
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.verify__input:focus { border-color: var(--c-primary); box-shadow: 0 0 0 4px rgba(20, 52, 43, .1); }
.verify__ok {
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--r-md);
  background: rgba(61, 122, 90, .08);
  color: var(--c-success);
  font-size: 13px;
  display: none;
}
.verify__ok--show { display: block; }

/* 分段 */
.segment { display: inline-flex; background: #F2EEE8; border-radius: 8px; padding: 3px; }
.segment__item {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--c-text-sub);
  transition: background-color .18s, color .18s;
}
.segment__item:hover { color: var(--c-text); }
.segment__item--active { background: #fff; color: var(--c-text); box-shadow: 0 1px 3px rgba(20, 52, 43, .1); font-weight: 500; }

.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.toolbar .input, .toolbar .select { width: auto; min-width: 140px; height: 36px; }
.spacer { flex: 1; }

@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .form-grid, .form-grid--3 { grid-template-columns: 1fr; }
  .span2 { grid-column: span 1; }
}

/* ══════════════ 手机端（店主用手机浏览器管店） ══════════════ */
html { -webkit-text-size-adjust: 100%; }

@media (max-width: 860px) {
  /* 左侧栏 → 顶部横向滑动导航 */
  .app { grid-template-columns: 1fr; }
  .sidebar {
    flex-direction: row;
    align-items: center;
    gap: 2px;
    height: auto;
    padding: 0 6px;
    position: sticky;
    top: 0;
    z-index: 30;
    box-shadow: 0 2px 14px rgba(12, 35, 29, .22);
  }
  .sidebar__brand { display: none; }
  .nav {
    display: flex;
    flex: 1;
    gap: 2px;
    padding: 7px 2px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav__group { display: none; }
  .nav__item {
    flex: 0 0 auto;
    margin: 0;
    padding: 8px 11px;
    font-size: 12px;
    white-space: nowrap;
    border-radius: 7px;
  }
  .nav__dot { display: none; }
  /* 竖条改成底部横条 */
  .nav__item::before {
    left: 50%; top: auto; bottom: 1px;
    width: 0; height: 2px;
    transform: translateX(-50%);
    border-radius: 2px;
  }
  .nav__item:hover::before { width: 55%; height: 2px; }
  .nav__item--active::before { width: 55%; height: 2px; }

  .sidebar__foot {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    padding: 0 4px 0 6px;
    border-top: none;
    border-left: 1px solid rgba(255, 255, 255, .08);
  }
  .sidebar__user { display: none; }
  .sidebar__logout { font-size: 11px; padding: 8px 4px; white-space: nowrap; }

  /* 顶栏不吸顶，避免被导航盖住 */
  .topbar {
    position: static;
    padding: 16px 16px 12px;
    align-items: center;
  }
  .topbar__title { font-size: 18px; }
  .topbar__sub { font-size: 11px; margin-top: 3px; }
  .topbar__right { gap: 8px; }
  .content { padding: 0 16px 44px; }

  .card { padding: 16px; border-radius: 14px; }
  .card__head { margin-bottom: 14px; }
  .table-wrap { margin: 0 -16px -16px; padding: 0 16px 4px; }

  .stats { gap: 10px; margin-bottom: 14px; }
  .stat { padding: 14px 14px 12px; border-radius: 14px; }
  .stat__value { font-size: 22px; margin-top: 6px; }

  /* 触屏没有 hover，操作按钮直接常显 */
  .row-actions, .uploader__del { opacity: 1; }
  .btn { height: 44px; padding: 0 16px; }
  .btn--sm { height: 32px; padding: 0 11px; }
  .btn--block { height: 48px; }
  .btn--link { height: auto; padding: 0; }
  .inline-input { width: 72px; }
  .toolbar { gap: 10px; margin-bottom: 14px; }
  .toolbar .input, .toolbar .select { min-width: 0; flex: 1 1 140px; }

  .modal__box { width: 94vw; max-height: 88vh; }
  .modal__box--wide { width: 96vw; }
  .modal__body { padding: 16px; }
  .modal__head, .modal__foot { padding-left: 16px; padding-right: 16px; }

  .verify { margin-top: 8px; }
  .verify__input { height: 60px; font-size: 26px; letter-spacing: .35em; }
  .chart { height: 150px; gap: 6px; }
  .chart__label { font-size: 10px; }

  /* 登录页：品牌块压成顶部小头图 */
  .login { grid-template-columns: 1fr; }
  .login__brand { padding: 34px 22px 30px; min-height: auto; }
  .login__brand::before, .login__brand::after { display: none; }
  .login__mark { width: 46px; height: 46px; font-size: 21px; margin-bottom: 14px; }
  .login__title { font-size: 21px; letter-spacing: .1em; }
  .login__sub { font-size: 10px; letter-spacing: .26em; }
  .login__panel {
    padding: 26px 20px calc(40px + env(safe-area-inset-bottom));
    place-items: start center;
  }
  .login__form { width: 100%; max-width: 420px; }
  .login__h2 { font-size: 20px; }
  .login__hint { margin-bottom: 22px; }
}

@media (max-width: 420px) {
  .topbar, .content { padding-left: 12px; padding-right: 12px; }
  .card { padding: 13px; }
  .table-wrap { margin: 0 -13px -13px; padding: 0 13px 4px; }
  .stat__value { font-size: 20px; }
  .nav__item { padding: 7px 9px; font-size: 11.5px; }
}

/* ═══════════ 平台：广告图 / 铺货 ═══════════ */

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

.asset-card {
  border: 1px solid var(--c-border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--c-surface);
  transition: box-shadow .28s ease, transform .28s ease, border-color .28s ease;
}
.asset-card:hover {
  box-shadow: 0 12px 30px rgba(20, 52, 43, .10);
  transform: translateY(-2px);
  border-color: var(--c-gold-light);
}

.asset-card__img {
  position: relative;
  aspect-ratio: 750 / 420;
  background: #F1EDE6;
}
.asset-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.asset-card__badge {
  position: absolute; left: 10px; top: 10px;
  background: rgba(0, 0, 0, .55); color: #fff;
  font-size: 11px; padding: 3px 9px; border-radius: 999px;
}

.asset-card__body { padding: 14px 16px 16px; display: grid; gap: 8px; }
.asset-card__body .row-actions { flex-wrap: wrap; }

/* 按钮不换行；广告图卡片动作区两列排 */
.btn { white-space: nowrap; }
.asset-card__body .row-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.asset-card__body .row-actions > *:last-child { grid-column: 1 / -1; }

/* ═══════════ 平台：分类管理筛选 chip ═══════════ */

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text-sub);
  font-size: 13px;
  cursor: pointer;
  transition: transform .22s ease, background .22s ease, border-color .22s ease, color .22s ease, box-shadow .22s ease;
}
.chip:hover {
  border-color: var(--c-gold);
  background: #FDF9EF;
  color: var(--c-text);
  transform: translateY(-1px);
}
.chip__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--c-text-weak);
  transition: background .22s ease;
}
.chip.is-on {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: #fff;
  box-shadow: 0 8px 18px rgba(20, 52, 43, .18);
}
.chip.is-on .chip__dot { background: var(--c-gold-light); }

/* ═══════════ 平台：管理范围下拉（可搜索） ═══════════ */

.pcscope { position: relative; width: 340px; max-width: 100%; }

.pcscope__btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 11px 15px;
  border: 1px solid var(--c-border);
  border-radius: 12px;
  background: var(--c-surface);
  cursor: pointer;
  text-align: left;
  transition: border-color .22s ease, box-shadow .22s ease, transform .22s ease;
}
.pcscope__btn:hover {
  border-color: var(--c-gold);
  box-shadow: 0 8px 20px rgba(20, 52, 43, .08);
}
.pcscope.is-open .pcscope__btn {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(20, 52, 43, .08);
}

.pcscope__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--c-gold);
  flex: none;
}
.pcscope__text { display: grid; gap: 2px; min-width: 0; }
.pcscope__name {
  font-size: 14px; color: var(--c-text); font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pcscope__sub { font-size: 11px; color: var(--c-text-weak); }
.pcscope__caret {
  width: 7px; height: 7px;
  margin-left: auto; margin-bottom: 3px;
  border-right: 1.6px solid var(--c-text-weak);
  border-bottom: 1.6px solid var(--c-text-weak);
  transform: rotate(45deg);
  transition: transform .22s ease;
}
.pcscope.is-open .pcscope__caret {
  transform: rotate(-135deg);
  margin-bottom: -3px;
}

.pcscope__panel {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 40;
  padding: 10px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 12px;
  box-shadow: 0 20px 44px rgba(20, 52, 43, .16);
  animation: pcscopeIn .18s ease;
}
@keyframes pcscopeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.pcscope__list { max-height: 300px; overflow-y: auto; margin-top: 8px; }

.pcscope__opt {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 13px;
  color: var(--c-text);
  cursor: pointer;
  transition: background .16s ease, color .16s ease;
}
.pcscope__opt:hover { background: #FDF9EF; }
.pcscope__opt-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcscope__opt em {
  margin-left: auto; font-style: normal; font-size: 11px;
  color: var(--c-text-weak);
}
.pcscope__opt.is-on { background: var(--c-primary); color: #fff; }
.pcscope__opt.is-on em { color: rgba(255, 255, 255, .66); }

.pcscope__empty {
  padding: 18px 12px;
  text-align: center;
  font-size: 13px;
  color: var(--c-text-weak);
}

/* ═══════════ 平台：弹窗内选店铺（可搜索多选下拉） ═══════════ */

.spick { position: relative; width: 100%; }

.spick__btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--c-border);
  border-radius: 12px;
  background: var(--c-surface);
  cursor: pointer;
  text-align: left;
  transition: border-color .22s ease, box-shadow .22s ease;
}
.spick__btn:hover {
  border-color: var(--c-gold);
  box-shadow: 0 8px 20px rgba(20, 52, 43, .08);
}
.spick.is-open .spick__btn {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(20, 52, 43, .08);
}

.spick__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--c-gold);
  flex: none;
  transition: background .22s ease, box-shadow .22s ease;
}
.spick.is-open .spick__dot { box-shadow: 0 0 0 4px rgba(198, 161, 91, .16); }

.spick__text { display: grid; gap: 2px; min-width: 0; flex: 1; }
.spick__name {
  font-size: 14px; font-weight: 500; color: var(--c-text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.spick__sub {
  font-size: 11px; color: var(--c-text-weak);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.spick__caret {
  width: 7px; height: 7px; flex: none;
  margin-bottom: 3px;
  border-right: 1.6px solid var(--c-text-weak);
  border-bottom: 1.6px solid var(--c-text-weak);
  transform: rotate(45deg);
  transition: transform .22s ease, border-color .22s ease;
}
.spick.is-open .spick__caret {
  transform: rotate(-135deg);
  margin-bottom: -3px;
  border-color: var(--c-primary);
}

.spick__panel {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 260;
  padding: 10px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 12px;
  box-shadow: 0 24px 52px rgba(20, 52, 43, .2);
  animation: spickIn .18s ease;
}
@keyframes spickIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.spick__search {
  width: 100%;
  height: 36px;
  font-size: 13px;
}

.spick__list {
  max-height: 260px;
  overflow-y: auto;
  margin-top: 8px;
  padding-right: 2px;
}
.spick__list::-webkit-scrollbar { width: 6px; }
.spick__list::-webkit-scrollbar-thumb {
  background: rgba(20, 52, 43, .16);
  border-radius: 99px;
}

.spick__opt {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px;
  border-radius: 9px;
  font-size: 13px;
  color: var(--c-text);
  cursor: pointer;
  transition: background .16s ease, color .16s ease;
}
.spick__opt:hover { background: #FDF9EF; }
.spick__opt input[type="checkbox"] {
  width: 15px; height: 15px; flex: none;
  accent-color: var(--c-primary);
  cursor: pointer;
}
.spick__opt-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spick__opt em {
  margin-left: auto; flex: none;
  font-style: normal; font-size: 11px;
  color: var(--c-text-weak);
}
.spick__opt.is-on {
  background: var(--c-primary);
  color: #fff;
}
.spick__opt.is-on:hover { background: #1B4136; }
.spick__opt.is-on em { color: rgba(255, 255, 255, .6); }
.spick__opt.is-on input[type="checkbox"] { accent-color: var(--c-gold-light); }

.spick__foot {
  display: flex; justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--c-border);
}

/* ══════════════ 商品批量导入 ══════════════ */

.imp-lead {
  display: flex; gap: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: #FBF7EE;
  border: 1px solid #EFE4CB;
  font-size: 13px;
  line-height: 1.85;
  color: var(--c-text-sub);
}
.imp-lead b { color: var(--c-text); font-weight: 600; }
.imp-lead__n {
  flex: none;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--c-primary);
  color: var(--c-gold-light);
  font-size: 12px; font-weight: 600;
  margin-top: 2px;
}

.imp-top {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 14px;
}

.imp-drop {
  border: 1.5px dashed #D9CBAC;
  border-radius: 14px;
  padding: 26px 20px;
  text-align: center;
  background: #FDFBF7;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.imp-drop:hover,
.imp-drop.is-over {
  border-color: var(--c-gold);
  background: #FBF5E7;
  transform: translateY(-1px);
}
.imp-drop__icon {
  width: 40px; height: 40px;
  margin: 0 auto 10px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--c-primary);
  color: var(--c-gold-light);
  font-size: 18px;
  transition: transform .2s ease;
}
.imp-drop:hover .imp-drop__icon { transform: translateY(-2px); }
.imp-drop__t { font-size: 14px; font-weight: 600; color: var(--c-text); }
.imp-drop__s { margin-top: 4px; font-size: 12px; color: var(--c-text-sub); }
.imp-drop__fmt { margin-top: 10px; font-size: 11px; color: var(--c-text-weak); letter-spacing: .02em; }

.imp-side {
  display: flex; flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--c-border);
  background: #fff;
}
.imp-side__t { font-size: 13px; font-weight: 600; color: var(--c-text); }
.imp-side__s { font-size: 12px; color: var(--c-text-sub); line-height: 1.7; }
.imp-side .btn { margin-top: 8px; }

.imp-imgs {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--c-border);
  background: #fff;
}
.imp-imgs__head { display: flex; align-items: flex-start; gap: 14px; }
.imp-imgs__head > div:first-child { flex: 1; min-width: 0; }
.imp-imgs__t { font-size: 13px; font-weight: 600; color: var(--c-text); }
.imp-imgs__s { margin-top: 5px; font-size: 12px; line-height: 1.8; color: var(--c-text-sub); }
.imp-imgs__s code {
  padding: 1px 5px;
  border-radius: 4px;
  background: #F4F0E8;
  font-size: 11px;
  color: var(--c-gold-deep);
}
.imp-imgs__stat {
  margin-top: 10px;
  font-size: 12px;
  color: var(--c-text-weak);
}
.imp-imgs__stat.is-ok { color: var(--c-success); }
.imp-imgs__stat.is-err { color: var(--c-danger); }
.imp-imgs__stat.is-busy { color: var(--c-gold-deep); }

.imp-note {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #F7F5F1;
  font-size: 12px;
  line-height: 1.85;
  color: var(--c-text-sub);
}
.imp-note b { color: var(--c-text); }

.imp-warn {
  padding: 12px 14px;
  margin-bottom: 12px;
  border-radius: 10px;
  background: #FDF9EF;
  border: 1px solid #EFE4CB;
  font-size: 12px;
  line-height: 1.85;
  color: #7A5C1E;
}
.imp-warn--err { background: #FDF2F2; border-color: #F3D6D6; color: #9B2C2C; }
.imp-problems { margin: 6px 0 0; padding-left: 18px; }
.imp-problems li { margin-bottom: 2px; }

.imp-sum {
  display: flex; flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.imp-sum__item {
  display: flex; align-items: baseline; gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  background: #F7F5F1;
  font-size: 12px;
  color: var(--c-text-sub);
}
.imp-sum__item b { font-size: 17px; font-family: var(--font-mono, ui-monospace, monospace); color: var(--c-text); }
.imp-sum__item b.is-gold { color: var(--c-gold-deep); }
.imp-sum__item b.is-warn { color: #B7791F; }

.imp-mode {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}
.imp-mode__opt {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 14px;
  border: 1px solid var(--c-border);
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--c-text-sub);
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
}
.imp-mode__opt:hover { border-color: var(--c-gold); background: #FDF9EF; }
.imp-mode__opt b { color: var(--c-text); }
.imp-mode__opt input {
  margin-top: 3px;
  width: 15px; height: 15px; flex: none;
  accent-color: var(--c-primary);
  cursor: pointer;
}
.imp-mode__opt:has(input:checked) { border-color: var(--c-primary); background: #F5F8F5; }

.imp-table { max-height: 46vh; overflow: auto; }
.imp-table td { vertical-align: middle; }
.imp-noimg {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  border-radius: 8px;
  background: #F1EDE6;
  font-size: 10px;
  color: var(--c-text-weak);
}

.imp-done { text-align: center; padding: 18px 0 22px; }
.imp-done__mark {
  width: 52px; height: 52px;
  margin: 0 auto 12px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--c-primary);
  color: var(--c-gold-light);
  font-size: 24px;
}
.imp-done__t { font-size: 17px; font-weight: 600; color: var(--c-text); }
.imp-done__s { margin-top: 8px; font-size: 13px; color: var(--c-text-sub); }
.imp-done__s b { color: var(--c-text); }
.imp-done__s b.is-err { color: var(--c-danger); }

@media (max-width: 780px) {
  .imp-top { grid-template-columns: 1fr; }
  .imp-imgs__head { flex-direction: column; }
}

/* 商品编码小标签（列表里显示，方便和 Excel 对得上） */
.code-chip {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 6px;
  border-radius: 5px;
  background: #F4F0E8;
  color: var(--c-gold-deep);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .02em;
  vertical-align: 1px;
  white-space: nowrap;
}
