/* ==========================================================================
   TAGE 运营管理台
   延续官网墨蓝 #13202d / 琥珀 #d3a448 的品牌语言，
   工作区改为中性浅灰底与白色数据面板，信息密度更紧凑。
   ========================================================================== */

:root {
  --ink: #13202d;
  --ink-2: #1b2b39;
  --ink-3: #2b3a47;
  --amber: #d3a448;
  --amber-strong: #8a6417;
  --amber-soft: #f7eddb;
  --canvas: #eff1f1;
  --surface: #ffffff;
  --surface-2: #f7f8f7;
  --line: #e3e6e6;
  --line-strong: #cdd3d4;
  --text: #25313a;
  --muted: #5d6a72;
  --muted-2: #66737b;
  --ok: #2f6b43;
  --ok-bg: #e7f2e9;
  --danger: #a93a33;
  --danger-bg: #fbeceb;
  --info: #2f5578;
  --info-bg: #eaf1f7;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(19, 32, 45, .05);
  --shadow-lg: 0 24px 64px rgba(9, 19, 28, .28);
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, ul, ol, figure, fieldset { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

body.is-locked { overflow: hidden; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.od-icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -.14em;
}
.ico-14 { --od-icon-size: 14px; }
.ico-16 { --od-icon-size: 16px; }
.ico-18 { --od-icon-size: 18px; }
.ico-20 { --od-icon-size: 20px; }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--amber-strong);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   基础控件
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.btn:disabled { opacity: .5; }
.btn-primary { background: var(--amber); color: var(--ink); }
.btn-primary:hover:not(:disabled) { background: #c7973d; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover:not(:disabled) { background: #1f3140; }
.btn-ghost { background: #fff; border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover:not(:disabled) { background: #f6f7f6; border-color: #b9c2c4; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #95302a; }
.btn-danger-ghost { background: #fff; border-color: #e6c7c4; color: var(--danger); }
.btn-danger-ghost:hover:not(:disabled) { background: #fdf1f0; border-color: #d8a9a5; }
.btn-danger-text { color: var(--danger); }
.btn-danger-text:hover:not(:disabled) { background: #fdf1f0; border-color: #e6c7c4; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn-xs { height: 32px; padding: 0 11px; font-size: 13.5px; border-radius: 7px; }
.btn-lg { height: 46px; font-size: 15px; }
.btn-block { width: 100%; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--muted);
  transition: background-color .16s ease, color .16s ease;
}
.icon-btn:hover { background: #f1f3f2; color: var(--text); }
.icon-btn-dark { color: #a9b6c0; }
.icon-btn-dark:hover { background: rgba(255, 255, 255, .08); color: #fff; }

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--amber-strong);
  font-size: 13.5px;
  font-weight: 600;
}
.link-btn:hover { color: #7e5713; }

.input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  font-size: 16px;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.input::placeholder { color: #98a3aa; }
.input:hover { border-color: #b9c2c4; }
.input:focus {
  outline: none;
  border-color: var(--ink-3);
  box-shadow: 0 0 0 3px rgba(211, 164, 72, .26);
}
.input[aria-invalid="true"] { border-color: #c25a52; background: #fffafa; }
textarea.input {
  height: auto;
  min-height: 88px;
  padding: 10px 12px;
  line-height: 1.65;
  resize: vertical;
}
select.input {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 34px;
  cursor: pointer;
}
.input-mono {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13.5px;
  line-height: 1.7;
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label,
.field-label { font-size: 13.5px; font-weight: 600; color: #3b4750; }
.field-hint { font-size: 12.5px; color: var(--muted); line-height: 1.55; }
.field-error {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--danger);
}
.form-error {
  padding: 9px 12px;
  border: 1px solid #f0cfcc;
  border-radius: var(--radius-sm);
  background: var(--danger-bg);
  color: #8c2f29;
  font-size: 13.5px;
  line-height: 1.55;
}
.form-error-summary {
  padding: 11px 13px;
  border: 1px solid #f0cfcc;
  border-radius: var(--radius-sm);
  background: var(--danger-bg);
  color: #8c2f29;
  font-size: 13.5px;
}
.form-error-summary p { margin-bottom: 4px; font-weight: 600; }
.form-error-summary ul { padding-left: 18px; list-style: disc; display: flex; flex-direction: column; gap: 2px; }
.form-error-summary a { text-decoration: underline; }

.select-wrap { position: relative; min-width: 0; }
.select-chevron {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-2);
  pointer-events: none;
}

.search-field { position: relative; flex: 1 1 240px; max-width: 360px; min-width: 0; }
.search-field > .od-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-2);
  pointer-events: none;
}
.search-field .input { padding-left: 38px; }

.switch {
  position: relative;
  width: 42px; height: 24px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #ccd2d4;
  transition: background-color .2s ease;
}
.switch::after {
  content: "";
  position: absolute;
  inset: -10px -8px;
}
.switch-knob {
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(9, 19, 28, .25);
  transition: transform .2s ease;
}
.switch[aria-checked="true"] { background: var(--ok); }
.switch[aria-checked="true"] .switch-knob { transform: translateX(18px); }
.switch:disabled { opacity: .45; }
.switch:focus-visible { outline-offset: 3px; }

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--amber-strong);
  text-transform: uppercase;
}

.mark {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  flex: none;
  border-radius: 50%;
  background: var(--amber);
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .4px;
}
.mark-lg { width: 44px; height: 44px; font-size: 20px; }

.avatar {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  flex: none;
  border-radius: 50%;
  background: #2a3b4a;
  color: #e7d3ad;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .4px;
}
.avatar-sm { width: 30px; height: 30px; font-size: 11px; }

/* --------------------------------------------------------------------------
   登录
   -------------------------------------------------------------------------- */

.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr);
  background: #fff;
}

.login-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  padding: 40px 44px;
  color: #e8e6e0;
  background:
    linear-gradient(180deg, rgba(10, 21, 30, .84) 0%, rgba(10, 21, 30, .95) 100%),
    url("../uploads/mvuudce4-028a3829.jpg") center / cover no-repeat;
  overflow: hidden;
}
.login-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .16) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: .13;
  -webkit-mask-image: linear-gradient(115deg, #000, transparent 68%);
  mask-image: linear-gradient(115deg, #000, transparent 68%);
  pointer-events: none;
}
.login-visual > * { position: relative; z-index: 1; }

.login-brand { display: flex; align-items: center; gap: 12px; }
.login-brand-text strong { display: block; color: #fff; font-size: 18px; letter-spacing: .5px; line-height: 1.2; }
.login-brand-text span { display: block; font-size: 10.5px; letter-spacing: 2.4px; color: #9fb0c0; }

.login-copy { max-width: 520px; }
.login-copy .login-kicker {
  margin-bottom: 22px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  color: #f0c870;
}
.login-copy .login-headline {
  max-width: 520px;
  margin-bottom: 18px;
  font-size: clamp(32px, 3.3vw, 48px);
  line-height: 1.2;
  letter-spacing: -.04em;
  color: #fff;
}
.login-copy p {
  max-width: 440px;
  font-size: 15.5px;
  line-height: 1.8;
  color: #b9c4ce;
}
.login-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.login-tags span {
  padding: 4px 11px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  font-size: 12px;
  color: #cfd8e0;
}

.login-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #8fa0ae;
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding-top: 18px;
}

.login-panel {
  display: grid;
  place-items: center;
  padding: 48px 40px;
  background: #fff;
}
.login-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: min(372px, 100%);
}
.login-card h1 {
  font-size: 27px;
  line-height: 1.3;
  letter-spacing: -.03em;
  color: var(--ink);
}
.login-sub {
  margin-top: -6px;
  margin-bottom: 6px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--muted);
}
.login-hint {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 9px 11px;
  border: 1px solid #ece5d5;
  border-radius: var(--radius-sm);
  background: #f6f4ee;
  color: #6b5a36;
  font-size: 12.5px;
  line-height: 1.55;
}
.login-hint .od-icon { color: var(--amber-strong); margin-top: 1px; }
.login-hint strong { color: #4f3f22; }
.password-wrap { position: relative; }
.password-wrap .input { padding-right: 48px; }
.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transform: translateY(-50%);
  transition: color .15s ease, background .15s ease;
}
.password-toggle:hover,
.password-toggle:focus-visible {
  background: #f3f1ea;
  color: var(--ink);
}
.password-toggle.is-visible { color: var(--amber-strong); }
.password-toggle .od-icon { pointer-events: none; }
.login-mobile-brand { display: none; align-items: center; gap: 10px; margin-bottom: 4px; }
.login-mobile-brand strong { display: block; color: var(--ink); font-size: 16px; line-height: 1.2; }
.login-mobile-brand span { display: block; font-size: 11px; letter-spacing: 1.4px; color: var(--muted); }

/* --------------------------------------------------------------------------
   应用框架
   -------------------------------------------------------------------------- */

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

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  width: 244px;
  height: 100vh;
  flex: none;
  padding: 0 14px;
  background: var(--ink);
  color: #c3ced6;
}

.side-brand { display: flex; align-items: center; gap: 10px; height: 72px; padding: 0 6px; flex: none; }
.side-brand-text strong { display: block; color: #fff; font-size: 15px; letter-spacing: .5px; line-height: 1.2; }
.side-brand-text span { display: block; margin-top: 2px; font-size: 10.5px; letter-spacing: 1.6px; color: #93a3b0; }

.sidebar :where(a, button):focus-visible { outline-color: #f0c870; }
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; padding-bottom: 12px; }
.side-group {
  margin: 16px 10px 6px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 1.6px;
  color: #7d8d9a;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 42px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: #c3ced6;
  font-size: 14.5px;
  text-align: left;
  transition: background-color .16s ease, color .16s ease;
}
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.is-active { background: rgba(211, 164, 72, .15); color: #fff; font-weight: 600; }
.nav-item.is-active .od-icon { color: #efc778; }
.nav-badge {
  margin-left: auto;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(211, 164, 72, .22);
  color: #f2d49a;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.side-user {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  padding: 14px 4px;
  border-top: 1px solid rgba(255, 255, 255, .09);
}
.side-user-text { flex: 1; min-width: 0; }
.side-user-text strong { display: block; font-size: 13.5px; color: #edf1f4; line-height: 1.3; }
.side-user-text span { display: block; font-size: 11.5px; color: #8fa0ae; }

.main { display: flex; flex-direction: column; flex: 1; min-width: 0; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 64px;
  flex: none;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
}
.topbar-menu { display: none; }
.crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--muted);
  min-width: 0;
}
.crumb span:last-child { color: var(--ink); font-weight: 600; }
.crumb-sep { color: #b7c0c6; }
.topbar-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.site-link { text-decoration: none; }

.user-menu-wrap { position: relative; }
.user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 4px 8px 4px 4px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--text);
  font-size: 13.5px;
}
.user-btn:hover { background: #f3f5f4; }
.user-btn-name { white-space: nowrap; }

.user-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 50;
  min-width: 176px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(9, 19, 28, .16);
}
.user-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--text);
  font-size: 14px;
  text-align: left;
}
.user-menu button:hover { background: #f4f6f5; }
.user-menu button + button { margin-top: 2px; }
.user-menu button:last-child { color: var(--danger); }

.content { width: 100%; max-width: 1360px; margin: 0 auto; padding: 28px 32px 56px; }

.view-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.view-head h1 {
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: -.03em;
  color: var(--ink);
}
.view-head h1:focus { outline: none; }
.view-head p { margin-top: 4px; font-size: 13.5px; color: var(--muted); }
.view-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.view-actions .toolbar-count { margin-bottom: 0; }
.save-state { font-size: 13px; color: var(--muted); }
.save-state.is-dirty { color: #8a6417; font-weight: 600; }

/* --------------------------------------------------------------------------
   概览
   -------------------------------------------------------------------------- */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.kpi {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.kpi-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--muted);
}
.kpi-ico {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: #f5f1e7;
  color: var(--amber-strong);
  flex: none;
}
.kpi-body { --od-gap: 2px; margin-top: 12px; }
.kpi-num {
  font-size: 32px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.kpi-sub { font-size: 12.5px; color: var(--muted); }

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 20px 14px;
}
.card-head h2 { font-size: 17px; line-height: 1.3; letter-spacing: -.01em; color: var(--ink); }
.card-head p { margin-top: 3px; font-size: 12.5px; color: var(--muted); }
.card-body { display: flex; flex-direction: column; gap: 16px; padding: 4px 20px 20px; }

.segmented {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f2f4f3;
}
.segmented button {
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--muted);
  font-size: 12.5px;
}
.segmented button[aria-pressed="true"] {
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(19, 32, 45, .1);
}

.chart-wrap { min-height: 200px; margin: 0 10px 0 2px; }
.chart-wrap svg { display: block; width: 100%; height: auto; }
.chart-wrap text { font-family: var(--font); }
.chart-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
  padding: 10px 20px 16px;
  border-top: 1px solid #f1f3f3;
  font-size: 13px;
  color: var(--muted);
}
.chart-foot strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.chart-note { margin-left: auto; font-size: 12px; color: var(--muted-2); }
.sep { width: 1px; height: 12px; background: var(--line); flex: none; }

.dist-list { display: flex; flex-direction: column; gap: 15px; padding: 6px 20px 20px; }
.dist-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 12px;
  align-items: end;
}
.dist-cat { display: flex; flex-direction: column; }
.dist-label { font-size: 14px; font-weight: 600; color: var(--text); }
.dist-en { font-size: 11px; letter-spacing: .2px; color: var(--muted-2); }
.dist-val { font-size: 12px; color: var(--muted); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dist-track { grid-column: 1 / -1; height: 7px; border-radius: 999px; background: #eef0f0; overflow: hidden; }
.dist-fill { display: block; height: 100%; border-radius: 999px; background: var(--ink-3); }
.dist-empty { padding: 6px 0 4px; font-size: 13.5px; color: var(--muted); }

/* --------------------------------------------------------------------------
   表格与移动卡片
   -------------------------------------------------------------------------- */

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fafbfa;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .2px;
  text-align: left;
  white-space: nowrap;
}
.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #eef0f0;
  font-size: 16px;
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fafbfa; }
.ta-r { text-align: right; }

.mono {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .2px;
  color: #4a5762;
  white-space: nowrap;
}
.cell-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cell-strong { display: block; font-size: 16px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.cell-sub { display: block; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
td .cell-sub { line-height: 1.5; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.chip-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.chip-new { background: #fbf0d9; color: #7a5510; }
.chip-following { background: #e9f0f7; color: #2f5578; }
.chip-quoted { background: #e6f1ee; color: #2b6653; }
.chip-won { background: #e7f2e9; color: #2f6b43; }
.chip-lost { background: #eef0f1; color: #56626a; }

.cat-pill {
  display: inline-block;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfbfa;
  color: #4a5762;
  font-size: 12px;
  white-space: nowrap;
}

.mobile-list { display: none; }
.record-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 15px 18px;
  border-bottom: 1px solid #eef0f0;
}
.record-card:last-child { border-bottom: 0; }
.record-card.is-selected { background: #fbf7ee; }
.record-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.record-name { font-size: 16px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.record-sub { font-size: 13px; color: var(--muted); }
.record-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.record-meta span {
  padding: 2px 8px;
  border-radius: 999px;
  background: #f4f6f5;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.record-btn { align-self: flex-start; margin-top: 4px; height: 40px; }

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 46px 24px;
  text-align: center;
}
.empty-ico {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  margin-bottom: 4px;
  border-radius: 50%;
  background: #f3f5f4;
  color: #8a969d;
}
.empty h3 { font-size: 16px; color: var(--ink); }
.empty p { max-width: 340px; font-size: 13.5px; line-height: 1.6; color: var(--muted); }
.empty-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }

/* 工具栏 */
.toolbar {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}
.filter-field { display: flex; flex-direction: column; gap: 4px; flex: none; min-width: 0; }
.filter-label { font-size: 11.5px; font-weight: 600; letter-spacing: .3px; color: var(--muted); }
.filter-search { flex: 1 1 260px; max-width: 340px; }
.filter-field .search-field { width: 100%; max-width: none; flex: none; }
.filter-field .select-wrap { width: 168px; }
.toolbar .select-wrap .input { height: 38px; font-size: 13.5px; }
.toolbar .search-field .input { height: 38px; font-size: 16px; }
.toolbar-reset { height: 38px; flex: none; }
.toolbar-count { margin-left: auto; margin-bottom: 10px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }

/* 询盘批量处理与跟进状态 */
.th-check,
.td-check { width: 44px; padding-right: 0; }
.th-check { padding-left: 20px; }
.td-check { padding-left: 20px; }
.row-check,
#inqSelectAll {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--ink-3);
  cursor: pointer;
  vertical-align: middle;
}
.row-check:focus-visible,
#inqSelectAll:focus-visible { outline: 2px solid var(--amber-strong); outline-offset: 2px; }
.data-table tbody tr.is-selected { background: #fbf7ee; }
.data-table tbody tr.is-selected:hover { background: #f8f2e4; }

.batch-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--line);
  background: #fbf8f1;
}
.batch-bar[hidden] { display: none; }
.batch-count { font-size: 12.5px; font-weight: 600; color: var(--amber-strong); white-space: nowrap; }
.batch-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.batch-status { width: 152px; }
.batch-status .input { height: 32px; padding-right: 30px; font-size: 13px; }
.batch-status .select-chevron { right: 9px; }

.follow-cell { display: flex; flex-direction: column; gap: 2px; min-width: 112px; }
.follow-owner { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; }
.follow-owner.is-empty { font-weight: 400; color: var(--muted-2); }
.follow-date { font-size: 12px; color: var(--muted); white-space: nowrap; }
.follow-date.is-overdue { color: var(--danger); font-weight: 600; }
.follow-date.is-today { color: var(--amber-strong); font-weight: 600; }
.follow-date.is-done,
.follow-date.is-none { color: var(--muted-2); }

.record-top-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.record-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-left: -6px;
  cursor: pointer;
}
.record-check input { width: 18px; height: 18px; accent-color: var(--ink-3); }
.record-follow { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.record-follow.is-overdue { background: var(--danger-bg); color: var(--danger); font-weight: 600; }
.record-follow.is-today { background: var(--amber-soft); color: var(--amber-strong); font-weight: 600; }

/* 产品单元 */
.prod-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.prod-thumb {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f6f7f5;
  overflow: hidden;
}
.prod-thumb img { width: 100%; height: 100%; object-fit: contain; }
.status-cell { display: flex; align-items: center; gap: 8px; }
.status-text { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.status-text.on { color: var(--ok); }
.row-actions { display: inline-flex; align-items: center; gap: 4px; }

/* 产品分类 */
#view-products > .card { scroll-margin-top: 80px; }
.category-list { display: flex; flex-direction: column; }
.category-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-top: 1px solid #eef0f0;
  transition: background .15s ease;
}
.category-row:first-child { border-top-color: var(--line); }
.category-row:hover { background: #fafbfa; }
.category-row.is-inactive { background: #fbfbfa; }
.category-row.is-inactive .prod-thumb { opacity: .65; }
.category-row.is-inactive .category-name { color: var(--muted); }
.category-row.is-inactive .category-count,
.category-row.is-inactive .category-sort { opacity: .78; }
.category-row .prod-thumb { width: 52px; height: 52px; border-radius: 8px; }
.category-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.category-name { font-size: 15.5px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.category-meta { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.category-stats { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.category-count {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.category-count strong { font-size: 14px; color: var(--ink); font-variant-numeric: tabular-nums; }
.category-count:hover { border-color: var(--line-strong); background: #f7f8f7; color: var(--text); }
.category-sort { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.category-sort strong {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 6px;
  background: #f3f5f4;
  color: var(--ink);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.category-empty { padding: 42px 24px; }
.member-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.you-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 4px;
  background: #f3f5f4;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  vertical-align: 1px;
}
.select-sm { height: 34px; font-size: 13.5px; width: 100%; }
.role-select { position: relative; display: inline-block; width: 126px; }
.role-select .select-chevron { right: 10px; }
.record-role { display: block; padding-top: 2px; }
.record-role .role-select { width: 100%; }

/* --------------------------------------------------------------------------
   站点内容 / 团队 / 设置
   -------------------------------------------------------------------------- */

.site-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  gap: 16px;
}
.card-full { grid-column: 1 / -1; }
.site-grid + .notice { margin-top: 16px; }

.notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 11px 14px;
  border: 1px solid #eae3d3;
  border-radius: var(--radius-sm);
  background: #f6f4ee;
  color: #6a5a38;
  font-size: 13px;
  line-height: 1.6;
}
.notice .od-icon { color: var(--amber-strong); margin-top: 2px; }

.switch-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 30px; }
.share-platform-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
.share-platform-option { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text); cursor: pointer; }
.share-platform-option input { width: 16px; height: 16px; accent-color: var(--ink-3); }
.share-platform-option input:disabled { cursor: not-allowed; }
#sharePlatformsField.is-disabled { opacity: .55; }

.settings-grid .card-body.assist-settings-body { gap: 14px; }
.assist-rule-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid #f0f2f2;
}
.assist-rule-head .field-hint { max-width: 560px; margin-top: 3px; }
.assist-rule-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 2px;
}
.assist-rule {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbf9;
}
.assist-rule-copy { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.assist-rule-keywords { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.assist-rule-answer {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--muted);
}
.assist-rule-actions { display: flex; flex: none; gap: 2px; }
.assist-rule-icon { width: 28px; height: 28px; border-radius: 6px; color: var(--muted); }
.assist-rule-icon:hover:not(:disabled) { background: #eef0ee; color: var(--ink); }
.assist-rule-icon:disabled { opacity: .35; cursor: not-allowed; }
.assist-rule-delete:hover:not(:disabled) { background: #fbeeed; color: var(--danger); }
.assist-rule-empty {
  margin: 0;
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
}
#assistRuleError[hidden] { display: none; }
@media (max-width: 767px) {
  .assist-rule-head { align-items: stretch; flex-direction: column; }
  .assist-rule-head .btn { width: 100%; }
  .assist-rule-actions { flex-wrap: wrap; }
}
.lang-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f2f2;
}
.lang-row:nth-last-child(-n+2) { border-bottom: 0; }
.lang-code {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  flex: none;
  border-radius: 8px;
  background: #f3f4f2;
  color: #4d5a62;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .3px;
}
.lang-row .od-field { flex: 1; min-width: 0; }
.lang-lock {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: #8a6417;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.settings-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.settings-grid .card-body { gap: 0; }
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
}
.switch-row + .switch-row { border-top: 1px solid #f0f2f2; }
.switch-title { display: block; font-size: 14.5px; font-weight: 600; color: var(--text); }
.switch-desc { display: block; margin-top: 2px; max-width: 430px; font-size: 12.5px; line-height: 1.55; color: var(--muted); }
.notify-email { margin-top: 16px; padding-top: 16px; border-top: 1px solid #f0f2f2; }
.inline-field { display: flex; gap: 8px; align-items: flex-start; }
.inline-field .input { flex: 1; min-width: 0; }

.danger-card { border-color: #ecd6d3; }
.danger-card .card-head h2 { color: var(--danger); }
.danger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
}
.danger-row + .danger-row { border-top: 1px solid #f4e4e2; }

/* --------------------------------------------------------------------------
   抽屉
   -------------------------------------------------------------------------- */

.scrim {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(9, 19, 28, .5);
  animation: fadeIn .2s ease-out;
}
.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  width: min(468px, 100vw);
  background: #fff;
  box-shadow: -20px 0 60px rgba(9, 19, 28, .2);
  animation: drawerIn .24s ease-out;
}
.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex: none;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--line);
}
.drawer-title { --od-gap: 4px; align-items: flex-start; }
.drawer-head h2 { font-size: 20px; letter-spacing: -.01em; color: var(--ink); font-family: var(--mono); }
.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.drawer-sec h3 { margin-bottom: 10px; font-size: 13.5px; font-weight: 600; color: var(--ink); letter-spacing: .2px; }
.meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.meta-label { font-size: 11.5px; color: var(--muted-2); }
.meta-value { font-size: 13.5px; color: var(--text); overflow-wrap: anywhere; }
.link-strong { color: #8a6417; text-decoration: underline; text-underline-offset: 2px; }
.message-box {
  padding: 13px 14px;
  border: 1px solid #eef0f0;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
}
.drawer-form { display: flex; flex-direction: column; gap: 14px; }
.follow-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.follow-grid .field { min-width: 0; }
.follow-grid input[type="date"] { color: var(--text); }
.drawer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 2px;
}
.drawer-updated { font-size: 11.5px; color: var(--muted-2); }
.timeline { display: flex; flex-direction: column; gap: 14px; }
.timeline li { position: relative; padding-left: 18px; }
.timeline li::before {
  content: "";
  position: absolute;
  left: 0; top: 6px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--amber-strong);
}
.timeline li::after {
  content: "";
  position: absolute;
  left: 3px; top: 16px; bottom: -14px;
  width: 1px;
  background: var(--line);
}
.timeline li:last-child::after { display: none; }
.tl-text { display: block; font-size: 13.5px; color: var(--text); }
.tl-time { display: block; margin-top: 1px; font-size: 11.5px; color: var(--muted-2); }

/* --------------------------------------------------------------------------
   弹窗
   -------------------------------------------------------------------------- */

.dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow-lg);
  overflow: auto;
}
.dialog[open] { animation: dialogIn .18s ease-out; }
.dialog::backdrop { background: rgba(9, 19, 28, .55); }
.dialog-sm { width: min(440px, calc(100vw - 32px)); }

.dialog-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.dialog-head h2 { font-size: 19px; line-height: 1.3; letter-spacing: -.01em; color: var(--ink); }
.dialog-head p { margin-top: 3px; font-size: 12.5px; color: var(--muted); }
.dialog-body { display: flex; flex-direction: column; gap: 16px; padding: 20px 24px; }
.dialog-foot {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 24px;
  border-top: 1px solid var(--line);
  background: #fafbfa;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.confirm-text { font-size: 14.5px; line-height: 1.7; color: var(--text); }

.image-field { display: block; }
.image-field legend {
  padding: 0;
  margin-bottom: 7px;
  font-size: 13.5px;
  font-weight: 600;
  color: #3b4750;
}
.image-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.img-option {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}
.img-option img {
  width: 100%;
  height: 64px;
  object-fit: contain;
  border-radius: 5px;
  background: #f6f7f5;
}
.img-option span { display: block; font-size: 11.5px; text-align: center; color: var(--muted); }
.img-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.img-option.is-selected { border-color: var(--amber-strong); box-shadow: 0 0 0 2px rgba(211, 164, 72, .22); }
.img-option:focus-within { outline: 2px solid var(--amber-strong); outline-offset: 2px; }

/* --------------------------------------------------------------------------
   反馈
   -------------------------------------------------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 120;
  max-width: calc(100vw - 32px);
  padding: 11px 18px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-size: 13.5px;
  line-height: 1.5;
  box-shadow: 0 12px 32px rgba(9, 19, 28, .28);
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(9, 19, 28, .5);
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes drawerIn { from { opacity: .3; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@keyframes dialogIn { from { opacity: 0; transform: translateY(10px) scale(.99); } to { opacity: 1; transform: none; } }

/* --------------------------------------------------------------------------
   响应式
   -------------------------------------------------------------------------- */

@media (max-width: 1199px) {
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .overview-grid { grid-template-columns: minmax(0, 1fr); }
  .dist-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 28px; }
}

@media (max-width: 1023px) {
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 90;
    height: 100dvh;
    transform: translateX(-102%);
    visibility: hidden;
    transition: transform .24s ease, visibility .24s ease;
    box-shadow: 18px 0 48px rgba(9, 19, 28, .22);
  }
  .sidebar.is-open { transform: none; visibility: visible; }
  .nav-scrim { display: none; }
  .nav-scrim:not([hidden]) { display: block; }
  .topbar-menu { display: inline-flex; }
  .topbar { padding: 0 20px; }
  .content { padding: 24px 20px 48px; }
}

@media (min-width: 1024px) {
  .nav-scrim { display: none !important; }
}

@media (max-width: 900px) {
  .login { grid-template-columns: minmax(0, 1fr); }
  .login-visual { display: none; }
  .login-panel { min-height: 100vh; padding: 36px 24px; }
  .login-mobile-brand { display: flex; }
  .login-card { width: min(392px, 100%); }
}

@media (max-width: 860px) {
  .site-grid { grid-template-columns: minmax(0, 1fr); }
  .settings-grid { grid-template-columns: minmax(0, 1fr); }
  .switch-list { grid-template-columns: 1fr; }
  .lang-row:nth-last-child(-n+2) { border-bottom: 1px solid #f0f2f2; }
  .lang-row:last-child { border-bottom: 0; }
  .dist-list { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  .table-wrap { display: none; }
  .mobile-list { display: block; }
  .view-head h1 { font-size: 22px; }
  .btn, .btn-sm { height: 44px; }
  .link-btn { min-height: 44px; }
  .nav-item { height: 46px; }
  .role-select .input { height: 44px; }
  .content { padding: 18px 16px 44px; }
  .topbar { height: 60px; padding: 0 14px; gap: 8px; }
  .crumb-prefix { display: none; }
  .site-link-text { display: none; }
  .user-btn-name { display: none; }
  .user-btn { padding: 4px; height: 44px; }
  .icon-btn { width: 44px; height: 44px; }
  .topbar-menu { width: 44px; height: 44px; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { padding: 16px; }
  .kpi-num { font-size: 28px; }
  .toolbar { padding: 12px 16px; gap: 8px; }
  .toolbar .filter-field { flex: 1 1 140px; }
  .toolbar .filter-search { flex-basis: 100%; max-width: none; order: -1; }
  .filter-field .select-wrap { width: 100%; }
  .toolbar-reset { order: 8; flex: 1 1 100%; }
  .toolbar-count { width: 100%; margin-left: 0; margin-bottom: 0; order: 9; }
  .card-head { padding: 16px 16px 12px; }
  .category-row {
    grid-template-columns: 46px minmax(0, 1fr) auto;
    grid-template-areas:
      "thumb main actions"
      "stats stats status";
    gap: 10px 12px;
    padding: 14px 16px;
  }
  .category-row .prod-thumb { grid-area: thumb; align-self: start; width: 46px; height: 46px; }
  .category-row .category-main { grid-area: main; }
  .category-row .category-stats { grid-area: stats; justify-content: flex-start; }
  .category-row .status-cell { grid-area: status; justify-self: end; }
  .category-row .row-actions { grid-area: actions; justify-self: end; }
  .chart-foot { padding: 10px 16px 14px; }
  .chart-note { margin-left: 0; width: 100%; }
  .dist-list { padding: 4px 16px 18px; }
  .drawer { width: 100%; }
  .drawer-body { padding: 18px 18px 36px; }
  .drawer-head { padding: 16px 18px 14px; }
  .dialog { width: calc(100vw - 20px); max-height: calc(100vh - 24px); }
  .dialog-head { padding: 16px 18px 12px; }
  .dialog-body { padding: 16px 18px; }
  .dialog-foot { padding: 12px 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .view-actions { width: 100%; }
  .view-actions .btn { flex: 1 1 auto; }
  .record-btn { height: 44px; }
  .record-card .btn-xs { height: 44px; padding: 0 14px; }
  .segmented button { height: 44px; }
  .meta-grid { grid-template-columns: 1fr 1fr; }
  .batch-bar { padding: 10px 16px; }
  .batch-actions { width: 100%; margin-left: 0; }
  .batch-status { flex: 1 1 150px; width: auto; }
  .batch-actions .btn { flex: 1 1 auto; height: 40px; }
  .follow-grid { grid-template-columns: 1fr; }
  .record-top-left { gap: 8px; }
  .record-check { width: 44px; height: 44px; margin-left: -10px; }
  .record-check input { width: 20px; height: 20px; }
}

@media (max-width: 560px) {
  .kpi-grid { gap: 12px; }
  .kpi { padding: 14px; }
  .kpi-num { font-size: 26px; }
  .kpi-head { font-size: 12.5px; }
  .segmented { width: 100%; }
  .segmented button { flex: 1; }
  .card-head { gap: 10px; }
  .view-head { gap: 12px; }
  .save-state { width: 100%; order: -1; }
  .danger-row, .switch-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .danger-row .btn, .switch-row .switch { align-self: flex-end; }
  .inline-field { flex-direction: column; align-items: stretch; }
  .inline-field .btn { height: 42px; }
  .image-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .meta-grid { grid-template-columns: 1fr; }
  .record-meta span { font-size: 11.5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   真实接口：连接状态、加载、内容编辑与账号
   -------------------------------------------------------------------------- */

.server-note {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid #f0cfcc;
  border-radius: 8px;
  background: var(--danger-bg);
  color: #7d302b;
  font-size: 13px;
  line-height: 1.65;
}
.server-note strong { font-size: 13.5px; }
.server-note code {
  padding: 1px 5px;
  border: 1px solid #efd6d3;
  border-radius: 4px;
  background: #fff;
  font-family: var(--mono);
  font-size: 12px;
}
.server-note .link-btn { align-self: flex-start; color: #7d302b; text-decoration: underline; }

.app-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 28px;
  border-bottom: 1px solid #f0dfbd;
  background: #fbf0d9;
  color: #7a5510;
  font-size: 13.5px;
}
.app-banner .od-icon { color: var(--amber-strong); }
.app-banner .link-btn { margin-left: auto; color: #7a5510; }

.app-loading {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(19, 32, 45, .72);
  color: #fff;
  font-size: 14px;
  backdrop-filter: blur(3px);
}
.spinner {
  width: 30px;
  height: 30px;
  border: 3px solid rgba(255, 255, 255, .25);
  border-top-color: #f0c870;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 16px;
}
.content-grid .card-body { gap: 14px; }
.content-grid + .notice { margin-top: 16px; }

.feature-edit-list { display: flex; flex-direction: column; gap: 12px; margin-top: 2px; }
.feature-edit {
  display: grid;
  grid-template-columns: 34px minmax(0, .85fr) minmax(0, 1.4fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafbfa;
}
.feature-num {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-top: 22px;
  border-radius: 8px;
  background: var(--amber-soft);
  color: #7a5510;
  font-size: 11.5px;
  font-weight: 700;
}
.feature-edit .field { gap: 5px; }

.perm-note {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}
.field-hint code {
  padding: 1px 4px;
  border-radius: 4px;
  background: #f5f1e7;
  font-family: var(--mono);
  font-size: 11.5px;
  color: #7a5510;
}

.account-card { display: flex; align-items: center; gap: 12px; }
.account-card .od-field { flex: 1; min-width: 0; }

.secret-box {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafbfa;
}
.secret-box strong { font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }
.secret-box code {
  display: block;
  padding: 8px 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 20px;
  letter-spacing: 1.5px;
}
.secret-box .btn { align-self: flex-start; margin-top: 4px; }

.sort-actions { display: inline-flex; align-items: center; gap: 2px; }
.sort-btn { width: 30px; height: 30px; padding: 0; }
.sort-btn:disabled { opacity: .35; }

.readonly-lock {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 1000px) {
  .content-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 767px) {
  .app-banner { padding: 10px 16px; }
  .feature-edit { grid-template-columns: minmax(0, 1fr); }
  .feature-num { margin-top: 0; }
  .secret-box code { font-size: 18px; }
}

.input:disabled,
.input[readonly] {
  background: #f6f7f6;
  color: #7b878e;
  cursor: not-allowed;
}

.login-remote {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 9px 11px;
  border: 1px solid #cfe3d3;
  border-radius: 8px;
  background: #f0f7f1;
  color: #2f6b43;
  font-size: 12.5px;
  line-height: 1.55;
}
.login-remote .od-icon { color: #2f6b43; margin-top: 2px; }
.login-remote a {
  color: #245536;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.link-btn:disabled { opacity: .55; cursor: not-allowed; }

/* 页面内容编辑、素材库与首页选品 */
.content-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 16px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.content-tab {
  height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
}
.content-tab:hover { background: #f5f6f5; color: var(--ink); }
.content-tab.is-active { background: var(--ink); color: #fff; }

.media-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafbfa;
}
.media-preview {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.media-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.media-meta .field-hint { margin: 0; }
.media-field input[type="hidden"] { display: none; }

.home-product-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.home-product-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 13.5px;
  cursor: pointer;
}
.home-product-item input { width: 16px; height: 16px; flex: none; accent-color: var(--amber-strong); }
.home-product-thumb {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f6f7f5;
}
.home-product-thumb img { width: 100%; height: 100%; object-fit: contain; }
.home-product-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: var(--ink);
}
.home-product-cat { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.home-product-item:has(input:disabled) { opacity: .6; cursor: not-allowed; }

.faq-edit-list { display: flex; flex-direction: column; gap: 10px; }
.faq-edit {
  display: grid;
  grid-template-columns: 34px minmax(0, .9fr) minmax(0, 1.5fr);
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fafbfa;
}

.asset-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.asset-multi-hint,
.asset-single-hint {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.asset-multi-hint { background: var(--amber-soft); color: var(--amber-strong); }
.asset-single-hint { background: var(--paper); color: var(--muted); }
.asset-multi-hint[hidden],
.asset-single-hint[hidden] { display: none; }
.asset-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.asset-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.asset-tile:hover { border-color: var(--amber-strong); box-shadow: 0 0 0 2px rgba(211, 164, 72, .18); }
.asset-tile.is-selected {
  border-color: var(--amber-strong);
  background: var(--amber-soft);
  box-shadow: 0 0 0 2px rgba(211, 164, 72, .22);
}
.asset-tile img { width: 100%; height: 82px; object-fit: contain; border-radius: 5px; background: #f6f7f5; }
.asset-name { font-size: 11px; color: var(--muted); }
.asset-check {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, .94);
  color: transparent;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 1px 3px rgba(11, 23, 34, .12);
}
.asset-tile.is-selected .asset-check {
  border-color: var(--amber-strong);
  background: var(--amber);
  color: var(--ink);
}
.asset-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: #7a5510;
  font-size: 10px;
  font-weight: 600;
}
.asset-batchbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-top: 1px solid var(--line);
  background: #fafbfa;
}
.asset-batchbar[hidden] { display: none; }
.asset-batch-count { color: var(--ink); font-size: 13px; font-weight: 700; }
.asset-batch-spacer { flex: 1; }

@media (max-width: 767px) {
  .content-tabs { width: 100%; flex-wrap: nowrap; overflow-x: auto; }
  .home-product-list { grid-template-columns: minmax(0, 1fr); }
  .asset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .faq-edit { grid-template-columns: minmax(0, 1fr); }
}

.record-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }

/* 多语言与富文本编辑 */
.content-langbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.content-langbar .switch-desc { max-width: 520px; margin-top: 2px; }
.select-lang { min-width: 190px; }
.prod-langbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7f8f6;
}
.prod-lang {
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.prod-lang:hover { background: #fff; color: var(--ink); }
.prod-lang.is-active { background: var(--ink); color: #fff; }
.prod-lang-hint { margin-top: -6px; }
.rte {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.rte:focus-within { border-color: #8d99a4; box-shadow: 0 0 0 3px rgba(19, 32, 45, .08); }
.rte-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px;
  border-bottom: 1px solid var(--line);
  background: #fafbfa;
}
.rte-btn {
  height: 30px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: none;
  color: #3b4750;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.rte-btn:hover { border-color: var(--line); background: #fff; }
.rte-btn.rte-danger { color: var(--danger); }
.rte-btn.rte-danger:hover { border-color: #e6c7c4; background: var(--danger-bg); }
.rte-bold { font-weight: 800; }
.rte-italic { font-style: italic; }
.rte-area {
  min-height: 150px;
  max-height: 340px;
  overflow-y: auto;
  padding: 12px 14px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.75;
  outline: none;
}
.rte-area:empty::before {
  content: attr(data-placeholder);
  color: #9aa3ab;
  pointer-events: none;
}
.rte-area p + p { margin-top: 10px; }
.rte-area ul,
.rte-area ol { margin: 8px 0 8px 20px; }
.rte-area li { margin: 4px 0; }
.rte-area a { color: #8a611c; text-decoration: underline; }
.rte-area figure { margin: 12px 0; }
.rte-area img { max-width: 100%; height: auto; border-radius: 8px; }
.rte-area figcaption { margin-top: 4px; color: var(--muted); font-size: 12.5px; }
.rte-area figcaption:empty::before { content: "图片说明（可选）"; color: #9aa3ab; }
@media (max-width: 767px) {
  .content-langbar { flex-direction: column; align-items: stretch; }
  .select-lang { width: 100%; }
}
.lang-coverage { color: var(--muted); font-size: 12.5px; white-space: nowrap; }

/* Google 翻译入口 */
.content-langbar { flex-wrap: wrap; }
.lang-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.prod-lang-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.prod-lang-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 767px) {
  .prod-lang-row { align-items: stretch; }
  .prod-lang-actions { width: 100%; }
}

/* 产品图集与变体 */
.gallery-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 10px;
  margin: 8px 0;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #f1f3f4;
}
.gallery-order {
  position: absolute;
  top: 6px;
  left: 6px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(19, 32, 45, .82);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.gallery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px;
}
.btn-xs {
  height: 28px;
  padding: 0 8px;
  font-size: 12px;
  border-radius: 6px;
}
.variant-editor { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.variant-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) auto;
  gap: 8px;
  align-items: start;
}
@media (max-width: 620px) {
  .variant-row { grid-template-columns: minmax(0, 1fr); }
}

/* 变体值图片 */
.variant-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafbfa;
}
.variant-card-head { display: flex; align-items: center; gap: 8px; }
.variant-card-head .input { flex: 1 1 auto; min-width: 0; }
.variant-values { display: flex; flex-direction: column; gap: 8px; }
.variant-value { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.variant-value-thumb {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.variant-value-thumb img { width: 100%; height: 100%; object-fit: contain; }
.variant-value-empty { color: var(--muted); font-size: 10px; }
.variant-value .input { flex: 1 1 140px; min-width: 0; height: 36px; }
.variant-values .field-hint { margin: 0; }

/* 详情描述代码模式 */
.rte-mode { margin-left: auto; }
.rte-mode[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}
.rte-code {
  display: block;
  width: 100%;
  min-height: 220px;
  max-height: 340px;
  padding: 12px 14px;
  border: 0;
  background: #fff;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Courier New", monospace;
  font-size: 12.5px;
  line-height: 1.65;
  white-space: pre;
  overflow: auto;
  resize: none;
  outline: none;
}
.rte-code:focus { box-shadow: inset 0 0 0 2px rgba(211, 164, 72, .35); }

/* --------------------------------------------------------------------------
   媒体管理
   -------------------------------------------------------------------------- */
.media-layout {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.media-rail {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 14px;
}
.media-rail-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px 10px;
  border-bottom: 1px solid var(--line);
}
.media-rail-head h2 {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.media-rail-total { font-size: 11.5px; color: var(--muted-2); white-space: nowrap; }
.media-folder-list { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.media-folder-row {
  display: flex;
  align-items: center;
  border-radius: 8px;
  padding-right: 2px;
}
.media-folder-row:hover { background: #f4f5f4; }
.media-folder-row.is-active { background: var(--ink); }
.media-folder-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--text);
  font-size: 13.5px;
  text-align: left;
}
.media-folder-row.is-active .media-folder-btn { color: #fff; }
.media-folder-btn em {
  flex: none;
  font-style: normal;
  font-size: 11.5px;
  color: var(--muted-2);
}
.media-folder-row.is-active .media-folder-btn em { color: rgba(255, 255, 255, .65); }
.media-folder-actions { display: none; gap: 2px; padding-right: 2px; }
.media-folder-row:hover .media-folder-actions,
.media-folder-row:focus-within .media-folder-actions { display: flex; }
.media-folder-icon {
  width: 26px;
  height: 26px;
  color: var(--muted);
  border-radius: 6px;
}
.media-folder-icon:hover { background: rgba(19, 32, 45, .08); }
.media-folder-row.is-active .media-folder-icon { color: rgba(255, 255, 255, .78); }
.media-folder-row.is-active .media-folder-icon:hover { background: rgba(255, 255, 255, .14); }
.media-rail-add {
  width: 100%;
  min-height: 38px;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 12.5px;
}
.media-rail-add:hover { border-color: var(--amber-strong); color: var(--amber-strong); }
.media-rail-add:disabled { opacity: .5; }

.media-panel { min-width: 0; }
.media-panel.is-dragover {
  outline: 2px dashed var(--amber-strong);
  outline-offset: -3px;
  background: var(--amber-soft);
}
.media-toolbar { align-items: flex-end; }
.media-filterbar {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 20px 12px;
  border-bottom: 1px solid var(--line);
  background: #fafbf9;
}
.media-filterbar-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding-right: 4px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .3px;
}
.media-filterbar .filter-field .select-wrap { width: 140px; }
.media-filterbar .select-wrap .input { height: 38px; font-size: 13.5px; }
.media-filterbar .toolbar-reset:disabled { opacity: .45; cursor: not-allowed; }
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  padding: 12px 16px 16px;
}
.media-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.media-card:hover { border-color: #c9b17c; box-shadow: 0 6px 18px rgba(19, 32, 45, .07); }
.media-card-thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #f5f6f4;
  cursor: zoom-in;
}
.media-card-thumb img { width: 100%; height: 100%; object-fit: contain; }
.media-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(19, 32, 45, .82);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .02em;
}
.media-card-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  padding: 8px 10px 7px;
}
.media-card-name { font-size: 11.5px; font-weight: 600; color: var(--ink); }
.media-card-meta { font-size: 10.5px; color: var(--muted-2); }
.media-card-folder {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  font-size: 10.5px;
  color: var(--muted);
  min-width: 0;
}
.media-card-folder .od-icon { flex: none; }
.media-usage {
  margin-left: auto;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: #7a5510;
  font-size: 9.5px;
  font-weight: 600;
  white-space: nowrap;
}
.media-card-actions {
  display: flex;
  margin-top: auto;
  border-top: 1px solid var(--line);
}
.media-mini {
  flex: 1;
  min-height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-right: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
}
.media-mini:last-child { border-right: 0; }
.media-mini:hover { background: #f6f7f5; color: var(--ink); }
.media-mini-danger:hover { background: var(--danger-bg); color: var(--danger); }
.media-mini:disabled { opacity: .38; background: #fff; }
.media-mini:disabled:hover { color: var(--muted); }

.media-edit-preview {
  display: grid;
  place-items: center;
  min-height: 160px;
  max-height: 240px;
  margin-bottom: 16px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f5f6f4;
  overflow: hidden;
}
.media-edit-preview img { width: auto; max-width: 100%; max-height: 220px; object-fit: contain; }
.media-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--text);
}
.media-check input { accent-color: var(--amber-strong); }
.media-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.media-mode {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}
.media-mode input { margin-top: 3px; accent-color: var(--amber-strong); }
.media-mode strong { display: block; font-size: 13px; font-weight: 600; color: var(--ink); }
.media-mode small { display: block; margin-top: 2px; font-size: 11.5px; line-height: 1.45; color: var(--muted); }
.media-mode:has(input:checked) { border-color: #c9a45d; background: #fffaf0; }
.media-mode:has(input:disabled) { opacity: .5; cursor: not-allowed; }

.asset-folder-filter { flex: none; }
.asset-folder-filter .input { width: 132px; height: 32px; padding: 0 26px 0 9px; font-size: 12.5px; }
.asset-folder-filter .select-chevron { right: 8px; }
.asset-dim { font-size: 10px; color: var(--muted-2); }

@media (max-width: 1000px) {
  .media-layout { grid-template-columns: minmax(0, 1fr); }
  .media-folder-list { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding-bottom: 2px; }
  .media-folder-row { flex: 0 0 auto; border: 1px solid var(--line); background: #fff; }
  .media-folder-row.is-active { border-color: var(--ink); }
  .media-folder-actions { display: none; }
  .media-folder-row.is-active .media-folder-actions { display: flex; }
  .media-rail-add { display: none; }
}
@media (max-width: 767px) {
  .media-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; padding: 10px 12px 14px; }
  .media-modes { grid-template-columns: minmax(0, 1fr); }
  .media-card-actions { flex-wrap: nowrap; }
  .media-mini { min-width: 0; }
  .asset-folder-filter .input { width: 118px; }
}
.media-folder-btn > span { min-width: 0; }
.media-card-folder > .od-truncate { min-width: 0; }

/* 媒体批量操作与排序 */
.media-toolbar .filter-field .select-wrap { width: 150px; }
.media-bulk {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--line);
  background: #fafbf9;
}
.media-bulk[hidden] { display: none; }
.media-bulk-count { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.media-bulk .link-btn { font-size: 12.5px; }
.media-bulk-spacer { flex: 1 1 auto; }
.media-bulk .btn-sm { min-height: 32px; }
.media-bulk .btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.media-bulk .btn-danger:hover { background: #8f2f29; border-color: #8f2f29; color: #fff; }
.media-bulk .btn-danger:disabled { opacity: .45; }

.media-manual-hint {
  margin: 12px 20px 0;
  padding: 8px 12px;
  border: 1px dashed #c9a45d;
  border-radius: 8px;
  background: #fffaf0;
  color: #7a5510;
  font-size: 12px;
  line-height: 1.5;
}

.media-card { position: relative; }
.media-badge { left: 6px; right: auto; top: 6px; font-size: 9.5px; padding: 1px 6px; }
.media-pick {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 1px 4px rgba(9, 19, 28, .16);
  cursor: pointer;
}
.media-pick input { width: 14px; height: 14px; accent-color: var(--amber-strong); cursor: pointer; }
.media-card.is-selected { border-color: #b58b35; box-shadow: 0 0 0 2px rgba(211, 164, 72, .3); }
.media-grid.is-manual .media-card { cursor: grab; }
.media-grid.is-manual .media-card:active { cursor: grabbing; }
.media-card.is-dragging { opacity: .42; }
.media-card.is-dragover { outline: 2px dashed var(--amber-strong); outline-offset: 2px; }

@media (max-width: 767px) {
  .media-bulk { padding: 10px 14px; }
  .media-bulk-spacer { display: none; }
  .media-bulk .btn-sm { flex: 1 1 auto; }
  .media-toolbar .filter-field .select-wrap { width: 132px; }
  .media-filterbar { padding: 10px 12px 12px; }
  .media-filterbar-title { flex: 1 1 100%; height: auto; padding: 0 2px; }
  .media-filterbar .filter-field { flex: 1 1 120px; }
  .media-filterbar .filter-field .select-wrap { width: 100%; }
  .media-filterbar .toolbar-reset { flex: 1 1 100%; }
}
.media-grid.is-manual .media-card { user-select: none; }
.media-card img { -webkit-user-drag: none; user-select: none; }

/* 尺寸表参数工具 */
.size-chart-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.size-chart-param { flex: none; }
.size-chart-param .input { width: 214px; height: 34px; font-size: 13px; }
.size-chart-params {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: #fafbf9;
  min-height: 40px;
}
.size-chart-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 5px 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 11.5px;
}
.size-chart-chip-name { font-weight: 600; color: var(--ink); }
.size-chart-chip-type { color: var(--muted-2); font-size: 10.5px; }
.size-chart-chip.is-size { border-color: #c9d6e4; background: #f3f7fb; }
.size-chart-chip.is-measure { border-color: #e2cfa4; background: #fffaf0; }
.size-chart-chip button {
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
}
.size-chart-chip button:hover { background: var(--danger-bg); color: var(--danger); }
@media (max-width: 560px) {
  .size-chart-param { width: 100%; }
  .size-chart-param .input { width: 100%; }
}
.audience-edit { grid-template-columns: 34px minmax(0, .7fr) minmax(0, 1fr) minmax(0, 1.4fr); }
@media (max-width: 860px) {
  .audience-edit { grid-template-columns: minmax(0, 1fr); }
}

/* 文章管理 */
.prod-cell-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.article-lang-list { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.article-lang-tag {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 20px;
  padding: 0 5px;
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
}
.article-status {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.article-status.is-live { background: var(--ok-bg); color: var(--ok); }
.article-status.is-draft { background: #f1f2f2; color: var(--muted); }
.article-lang-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-left: 4px;
  border-radius: 50%;
  background: var(--ok);
  vertical-align: middle;
}
#articleDialog .dialog-body { max-height: calc(100vh - 220px); overflow-y: auto; }
.article-rte-area { min-height: 320px; max-height: 560px; }
.article-rte.is-code .rte-btn:not(.rte-mode) { display: none; }
.article-rte.is-code .rte-toolbar { justify-content: flex-end; }

/* ---------------------------------------------------------- 合作伙伴品牌 LOGO */
.partner-edit-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.partner-edit-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafbfa;
}
.partner-logo-box { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.partner-logo-box img {
  display: block;
  width: 150px;
  height: 64px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
}
.partner-logo-empty {
  display: grid;
  place-items: center;
  width: 150px;
  height: 64px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
}
.partner-logo-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.partner-name-box { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.partner-name-label { color: var(--muted); font-size: 12px; font-weight: 600; }
.partner-row-actions { display: flex; align-items: center; gap: 4px; }
.partner-row-actions .btn { min-width: 34px; }
@media (max-width: 720px) {
  .partner-edit-row { grid-template-columns: minmax(0, 1fr); }
  .partner-row-actions { justify-content: flex-end; }
}

/* ------------------------------------------------------- 品牌 LOGO 与站点图标 */
.brand-preview {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 88px;
  padding: 20px 22px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  overflow: hidden;
}
.brand-preview-hint {
  position: absolute;
  top: 10px;
  right: 14px;
  color: #8ea2b3;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}
.brand-preview-lockup { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-preview-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  background: var(--amber);
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .5px;
}
.brand-preview-name strong { display: block; color: #fff; font-size: 17px; letter-spacing: .3px; }
.brand-preview-name small { display: block; color: #9fb0c0; font-size: 11.5px; letter-spacing: 1.5px; }
.brand-preview-logo { display: block; width: auto; max-width: 260px; object-fit: contain; }
.brand-preview-svg { display: flex; align-items: center; height: 40px; max-width: 260px; }
.brand-preview-svg svg { display: block; height: 100%; width: auto; max-width: 100%; }

.brand-mode {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}
.brand-mode-btn {
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.brand-mode-btn.is-active { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.brand-mode-btn:disabled { cursor: not-allowed; opacity: .55; }

.brand-panel { display: flex; flex-direction: column; gap: 12px; }
.brand-save-hint { margin: -6px 0 2px; color: var(--amber-strong); }
.brand-upload-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.brand-upload-row .field-hint { margin: 0; }
.brand-media-field { background: #fff; }
.brand-image-preview {
  width: 100%;
  max-height: 120px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ink);
  object-fit: contain;
}

.brand-svg-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.brand-svg-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}
.brand-svg-tab {
  height: 26px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.brand-svg-tab.is-active { background: #fff; color: var(--ink); }
.brand-svg-tab:disabled { cursor: not-allowed; opacity: .55; }
.brand-svg-code {
  min-height: 180px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.6;
}
.brand-svg-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  padding: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: #fafbfa;
}
.brand-svg-preview.is-empty { color: var(--muted); }

.brand-settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}
.brand-height-row { display: flex; align-items: center; gap: 12px; }
.brand-height-row input[type="range"] { flex: 1 1 auto; accent-color: var(--amber-strong); }
.brand-height-value { min-width: 48px; color: var(--muted); font-family: var(--mono); font-size: 12.5px; }
.brand-icon-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.brand-icon-preview {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.brand-icon-preview img { width: 100%; height: 100%; object-fit: contain; }
.brand-icon-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: var(--amber);
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
}
@media (max-width: 720px) {
  .brand-settings-grid { grid-template-columns: minmax(0, 1fr); }
  .brand-preview-logo, .brand-preview-svg { max-width: 170px; }
}
.brand-panel[hidden],
.brand-svg-preview[hidden],
.brand-image-preview[hidden],
.brand-icon-preview img[hidden],
.brand-icon-fallback[hidden],
.brand-svg-code[hidden] { display: none; }

/* --------------------------------------------------------------------------
   代码编辑
   -------------------------------------------------------------------------- */
.code-layout {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.code-rail {
  min-width: 0;
  padding: 14px;
}
.code-rail-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px 10px;
  border-bottom: 1px solid var(--line);
}
.code-rail-head h2 {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.code-rail-head span { font-size: 11.5px; color: var(--muted-2); white-space: nowrap; }
.code-file-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: calc(100vh - 250px);
  margin-top: 10px;
  overflow-y: auto;
}
.code-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 8px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
}
.code-file:hover { background: #f3f5f4; }
.code-file.is-active { background: var(--ink); color: #fff; }
.code-file-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.code-file-main strong { font-size: 12.5px; font-weight: 600; }
.code-file-main span {
  overflow: hidden;
  font-size: 10.5px;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.code-file.is-active .code-file-main span { color: rgba(255, 255, 255, .64); }
.code-file-side { display: flex; flex: none; flex-direction: column; align-items: flex-end; gap: 2px; }
.code-file-side em {
  font-style: normal;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .5px;
  color: var(--amber-strong);
}
.code-file-side small { font-size: 9.5px; color: var(--muted-2); white-space: nowrap; }
.code-file.is-active .code-file-side em { color: var(--amber); }
.code-file.is-active .code-file-side small { color: rgba(255, 255, 255, .55); }

.code-panel { min-width: 0; overflow: hidden; }
.code-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.code-bar-path { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.code-bar-path strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.code-bar-path span { font-size: 11.5px; color: var(--muted); }
.code-state {
  flex: none;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef4ee;
  color: #2f6b45;
  font-size: 11.5px;
  font-weight: 600;
}
.code-state.is-dirty { background: #fff3df; color: #8a5b12; }
.code-warning {
  margin: 0;
  padding: 9px 16px;
  border-bottom: 1px solid #f0e2c5;
  background: #fffaf0;
  color: #7a5510;
  font-size: 11.5px;
  line-height: 1.55;
}
.code-editor-wrap {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  height: min(62vh, 620px);
  min-height: 380px;
  background: #fbfbf9;
}
.code-gutter {
  margin: 0;
  padding: 12px 10px;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: #f3f5f4;
  color: #98a3aa;
  font: 12.5px/1.65 ui-monospace, SFMono-Regular, Consolas, "Courier New", monospace;
  text-align: right;
  white-space: pre;
  user-select: none;
}
.code-editor {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 12px 14px;
  border: 0;
  outline: none;
  resize: none;
  background: #fbfbf9;
  color: #1b2a35;
  font: 12.5px/1.65 ui-monospace, SFMono-Regular, Consolas, "Courier New", monospace;
  tab-size: 2;
  white-space: pre;
  overflow: auto;
}
.code-editor:focus { box-shadow: inset 0 0 0 2px rgba(211, 164, 72, .26); }
.code-editor:disabled { color: #98a3aa; }
.code-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 8px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}
.code-shortcut { margin-left: auto; }
@media (max-width: 1000px) {
  .code-layout { grid-template-columns: minmax(0, 1fr); }
  .code-file-list {
    flex-direction: row;
    flex-wrap: nowrap;
    max-height: 220px;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .code-file { min-width: 180px; }
}
@media (max-width: 767px) {
  .code-editor-wrap { height: 58vh; min-height: 320px; }
  .code-bar { padding: 10px 12px; }
  .code-warning { padding: 8px 12px; }
  .code-foot { padding: 8px 12px; }
  .code-shortcut { display: none; }
}

/* --------------------------------------------------------------------------
   法律页面富文本
   -------------------------------------------------------------------------- */
.legal-editor { display: flex; flex-direction: column; gap: 6px; }
.legal-editor + .legal-editor { margin-top: 20px; padding-top: 18px; border-top: 1px solid #f0f2f2; }
.legal-editor-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.legal-mode-switch { display: flex; gap: 4px; }
.legal-mode-switch .rte-btn { height: 28px; padding: 0 10px; }
.legal-mode-switch .rte-btn[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.legal-rte .rte-area { min-height: 280px; max-height: 460px; }
.legal-rte .rte-code { min-height: 280px; max-height: 460px; }
.legal-rte .rte-area[hidden],
.legal-rte .rte-code[hidden] { display: none; }
.legal-editor.is-code .rte-toolbar { display: none; }
.legal-editor.is-code .rte-area { display: none; }

/* --------------------------------------------------------------------------
   小程序商城：订单与会员
   -------------------------------------------------------------------------- */
.order-status {
  display: inline-block;
  padding: 3px 9px;
  border: 1px solid #d7d2c6;
  border-radius: 6px;
  background: #fbfbfa;
  color: #4a5762;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.order-status.pending_payment { border-color: #e4cfa4; background: #fdf5e5; color: #7a5a1e; }
.order-status.paid { border-color: #bfd8c8; background: #eff7f1; color: #2e6b45; }
.order-status.production { border-color: #c9d6e6; background: #f0f5fa; color: #33566f; }
.order-status.shipped { border-color: #cfd8e0; background: #f4f7f9; color: #3f5b6b; }
.order-status.completed { border-color: #c4ccc4; background: #f4f6f4; color: #45584a; }
.order-status.canceled { border-color: #e2c9c3; background: #fbf2ef; color: #8c4a3b; }

.order-pay {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 11.5px;
  white-space: nowrap;
  background: #f4f2ec;
  color: #6b6252;
}
.order-pay.is-paid { background: #eff7f1; color: #2e6b45; }
.order-pay.is-pending { background: #fdf5e5; color: #7a5a1e; }

.order-detail { display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }
.order-detail-section { border: 1px solid #ece8df; border-radius: 10px; padding: 12px 14px; background: #fcfbf8; }
.order-detail-section h3 { margin: 0 0 8px; font-size: 13px; color: #243442; }
.order-detail-row { display: flex; justify-content: space-between; gap: 18px; padding: 4px 0; font-size: 13px; line-height: 1.6; }
.order-detail-row span:first-child { color: #6c7884; flex: 0 0 auto; }
.order-detail-row span:last-child { text-align: right; color: #243442; }
.order-item { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-top: 1px solid #f0ece4; font-size: 13px; }
.order-item:first-of-type { border-top: none; }
.order-item-thumb { width: 54px; height: 54px; flex: 0 0 54px; border-radius: 8px; object-fit: cover; background: #f3f1ec; border: 1px solid #e9e4da; }
.order-item-thumb.is-empty { display: block; }
.order-item-body { flex: 1 1 auto; min-width: 0; }
.order-item-name { color: #243442; font-weight: 600; }
.order-item-meta { color: #6c7884; font-size: 12px; margin-top: 2px; }
.order-item-sku { color: #8a7040; font-size: 11.5px; margin-top: 3px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; }
.order-item-price { white-space: nowrap; color: #243442; }
.member-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.danger-text { color: #9a4635; }
.order-status.active { border-color: #bfd8c8; background: #eff7f1; color: #2e6b45; }
.order-status.blocked { border-color: #e2c9c3; background: #fbf2ef; color: #8c4a3b; }
.order-total { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 1px solid #e5dfd4; font-size: 14px; font-weight: 700; color: #13202d; }
.order-timeline { margin-top: 16px; border-top: 1px solid #ece8df; padding-top: 12px; }
.order-timeline h3 { margin: 0 0 8px; font-size: 13px; color: #243442; }
.order-timeline-item { display: flex; gap: 10px; padding: 4px 0; font-size: 12.5px; color: #5c6b7a; }
.order-timeline-item time { flex: 0 0 auto; color: #8a949e; }
.order-empty-cell { color: #8a949e; font-size: 13px; }

/* --------------------------------------------------------------------------
   访问分析
   -------------------------------------------------------------------------- */
.analytics-kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.chart-legend { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.legend-item { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: #5c6b7a; white-space: nowrap; }
.legend-swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend-pv { background: #2a78d6; }
.legend-uv { background: #a57621; }

.analytics-chart { position: relative; min-height: 220px; }
.analytics-chart svg { display: block; width: 100%; height: auto; }
.chart-tooltip[hidden] { display: none; }
.chart-tooltip {
  position: absolute;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 116px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(19, 32, 45, .94);
  color: #f3f5f7;
  font-size: 11.5px;
  line-height: 1.45;
  pointer-events: none;
  box-shadow: 0 8px 20px rgba(19, 32, 45, .18);
}
.chart-tooltip strong { font-size: 12px; font-weight: 600; color: #fff; }
.chart-tooltip span { color: #c7d1d9; }

.analytics-data { margin-top: 10px; border-top: 1px solid #f0ece4; padding-top: 10px; }
.analytics-data summary { cursor: pointer; font-size: 12px; color: #6c7884; }
.analytics-data summary:hover { color: #13202d; }
.analytics-data .table-wrap { margin-top: 10px; }

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.analytics-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.bar-list { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: flex; flex-direction: column; gap: 5px; }
.bar-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.bar-label { font-size: 12.5px; color: #44515d; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-value { font-size: 12px; color: #243442; font-variant-numeric: tabular-nums; flex: none; }
.bar-track { height: 7px; border-radius: 4px; background: #f1eee7; overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 0 4px 4px 0; background: #2a78d6; min-width: 2px; }
.analytics-none { margin: 4px 0 0; font-size: 12.5px; color: #8a949e; }

@media (max-width: 1100px) {
  .analytics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analytics-grid .card:first-child { grid-column: 1 / -1; }
  .analytics-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .analytics-grid,
  .analytics-grid-2,
  .analytics-kpi-grid { grid-template-columns: 1fr; }
  .analytics-grid .card:first-child { grid-column: auto; }
}

/* 物流管理 */
.shipping-courier-list { display: flex; flex-direction: column; }
.shipping-courier-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-top: 1px solid #f0ece4;
}
.shipping-courier-row:first-child { border-top: none; }
.shipping-courier-main { display: flex; flex-direction: column; min-width: 0; }
.shipping-courier-name { font-size: 13.5px; font-weight: 600; color: #13202d; }
.shipping-courier-meta { margin-top: 2px; font-size: 12px; color: #6c7884; }
.shipping-courier-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.shipping-rate-table .input { min-width: 84px; height: 36px; padding: 0 8px; font-size: 12.5px; }
.shipping-rate-table td { vertical-align: middle; }
.shipping-rate-table .select-wrap { min-width: 130px; }

.shipping-batch { margin-bottom: 16px; padding: 12px 14px; border: 1px solid #e7e1d5; border-radius: 10px; background: #fcfbf8; }
.shipping-batch-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.shipping-batch-head strong { font-size: 13px; color: #13202d; }
.shipping-batch-panel { margin-top: 12px; }
.shipping-province-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px 12px;
  max-height: 220px;
  overflow: auto;
  padding: 10px;
  margin-bottom: 8px;
  border: 1px solid #ece8df;
  border-radius: 8px;
  background: #fff;
}
.shipping-province-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #44515d; }
.shipping-province-item input { margin: 0; }

/* 文章分类 */
.article-category-list { display: flex; flex-direction: column; }
.article-category-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  border-top: 1px solid #f0ece4;
}
.article-category-row:first-child { border-top: none; }
.article-category-main { display: flex; flex-direction: column; min-width: 0; }
.article-category-name { font-size: 13.5px; font-weight: 600; color: #13202d; }
.article-category-meta { margin-top: 2px; font-size: 12px; color: #6c7884; }

/* 产品批量导入 */
.import-result {
  margin-top: 16px;
  max-height: 320px;
  overflow: auto;
  padding: 14px 16px;
  border: 1px solid #e7e1d5;
  border-radius: 10px;
  background: #fcfbf8;
}
.import-summary { margin: 0 0 10px; font-size: 13px; color: #243442; }
.import-summary strong { font-weight: 700; }
.import-result .table-wrap { margin-top: 6px; }
