/* 淮鲜生管理系统 · 视觉规范：浅色底 + 亮蓝主色 + 白色卡片 */
:root {
  --hxs-ink: #1c2430;
  --hxs-ink-2: #3c4656;
  --hxs-muted: #8a94a6;
  --hxs-line: #eaeef5;
  --hxs-line-strong: #dfe5ef;
  --hxs-canvas: #f6f8fc;
  --hxs-surface: #ffffff;

  --hxs-primary: #2f6bf5;
  --hxs-primary-dark: #1f55da;
  --hxs-primary-light: #7ba3ff;
  --hxs-primary-soft: #eef4ff;
  --hxs-primary-soft-2: #e2ecff;

  --hxs-success: #12b76a;
  --hxs-success-soft: #e9f9f1;
  --hxs-warning: #f79009;
  --hxs-warning-soft: #fff5e6;
  --hxs-danger: #e5484d;
  --hxs-danger-soft: #fff0f0;
  --hxs-violet: #7a5af8;
  --hxs-violet-soft: #f2efff;
  --hxs-cyan: #12b8a0;
  --hxs-cyan-soft: #e6f8f5;

  --hxs-blue-100: var(--hxs-primary-soft);
  --hxs-indigo-100: var(--hxs-violet-soft);
  --hxs-cyan-100: var(--hxs-cyan-soft);
  --hxs-amber-100: var(--hxs-warning-soft);
  --hxs-rose-100: var(--hxs-danger-soft);

  --hxs-radius: 14px;
  --hxs-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04);
  --hxs-shadow: 0 16px 38px rgba(29, 52, 94, 0.12);
  --hxs-shadow-blue: 0 6px 14px rgba(47, 107, 245, 0.2);

  --bs-body-color: var(--hxs-ink);
  --bs-body-bg: var(--hxs-canvas);
  --bs-secondary-color: var(--hxs-muted);
  --bs-border-color: var(--hxs-line);
  --bs-primary: var(--hxs-primary);
  --bs-success: var(--hxs-success);
  --bs-danger: var(--hxs-danger);
  --bs-warning: var(--hxs-warning);
}

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

body {
  background: var(--hxs-canvas);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  font-size: 14px;
  color: var(--hxs-ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

a { color: var(--hxs-primary); text-decoration-color: rgba(47, 107, 245, 0.35); text-underline-offset: 3px; }
a:hover { color: var(--hxs-primary-dark); }
::selection { background: rgba(47, 107, 245, 0.18); }

* { scrollbar-width: thin; scrollbar-color: #d3dae6 transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d3dae6; border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #b6c0d0; background-clip: content-box; }

/* ---------- 登录页 ---------- */
.login-wrap {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 18px;
  background:
    radial-gradient(760px 460px at 82% -12%, #e2ecff 0%, rgba(226, 236, 255, 0) 68%),
    radial-gradient(560px 420px at 6% 106%, #e8f6ff 0%, rgba(232, 246, 255, 0) 70%),
    #f6f8fc;
}
.login-wrap::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  right: -190px;
  top: -210px;
  border: 1px solid rgba(47, 107, 245, 0.12);
  border-radius: 50%;
  box-shadow: 0 0 0 80px rgba(47, 107, 245, 0.045), 0 0 0 160px rgba(47, 107, 245, 0.025);
  pointer-events: none;
}
.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  border: 1px solid #edf1f8;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 60px rgba(29, 52, 94, 0.14);
}
.login-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 4px;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(90deg, #4b84ff, #2f6bf5);
}
.login-card h4 { color: var(--hxs-ink); letter-spacing: 0.02em; }
.login-card .text-muted.small { letter-spacing: 0.1em; }
.login-logo {
  width: 58px;
  height: 58px;
  border-radius: 17px;
  background: linear-gradient(140deg, #4b84ff 0%, #2f6bf5 60%, #1f55da 100%);
  color: #ffffff;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  box-shadow: 0 12px 24px rgba(47, 107, 245, 0.32);
}
.login-card .form-label { margin-bottom: 6px; }
.login-card .form-control { height: 44px; }
.login-card .input-group-text {
  background: #f7f9fd;
  border-color: var(--hxs-line-strong);
  color: var(--hxs-muted);
}
.btn-login {
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: 10px;
  color: #ffffff;
  font-weight: 600;
  letter-spacing: 0.18em;
  background: var(--hxs-primary);
  box-shadow: var(--hxs-shadow-blue);
  transition: filter 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.btn-login:hover, .btn-login:focus {
  color: #ffffff;
  filter: brightness(1.04);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(47, 107, 245, 0.32);
}
.btn-login:disabled { filter: none; transform: none; opacity: 0.7; }
.login-hint {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--hxs-line);
  color: #9aa4b4;
  font-size: 12px;
}

/* ---------- 主框架 ---------- */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 236px;
  flex-shrink: 0;
  background: var(--hxs-surface);
  color: var(--hxs-ink-2);
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  overflow-y: auto;
  overflow-x: hidden;
  border-right: 1px solid var(--hxs-line);
  z-index: 1030;
}
.sidebar::-webkit-scrollbar-thumb { background: #dfe5ef; background-clip: content-box; }
.sidebar::-webkit-scrollbar-thumb:hover { background: #c6d0de; background-clip: content-box; }

.sidebar .brand {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
  color: var(--hxs-ink);
  border-bottom: 1px solid var(--hxs-line);
}
.sidebar .brand .dot {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(140deg, #4b84ff 0%, #2f6bf5 62%, #1f55da 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 16px rgba(47, 107, 245, 0.26);
  flex: none;
}
.sidebar .brand .dot .bi { font-size: 17px; }

.nav-group { display: block; }
.nav-group-title {
  width: calc(100% - 20px);
  margin: 2px 10px;
  border: 0;
  background: transparent;
  color: #3c4656;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  text-align: left;
  transition: background 0.16s ease, color 0.16s ease;
}
.nav-group-title:hover { color: var(--hxs-primary); background: #f4f7fd; }
.nav-group-title .bi { font-size: 16px; color: #97a1b2; opacity: 1; transition: color 0.18s ease; }
.nav-group-title:hover .bi { color: var(--hxs-primary); }
.nav-group-title .caret {
  margin-left: auto;
  font-size: 10px;
  color: #b6bfcd;
  transition: transform 0.18s ease;
}
.nav-group.open .nav-group-title { color: var(--hxs-ink); }
.nav-group.open .nav-group-title .bi { color: var(--hxs-primary); }
.nav-group.open .nav-group-title .caret { transform: rotate(180deg); }

.nav-group-body {
  display: none;
  margin: 2px 10px 8px;
  padding: 2px 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.nav-group.open .nav-group-body { display: block; }

.sidebar .nav-link {
  color: #5b6577;
  padding: 10px 14px;
  margin: 0 10px 2px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}
.sidebar .nav-link .bi { font-size: 16px; opacity: 1; color: #97a1b2; transition: color 0.16s ease; }
.sidebar .nav-link:hover { background: #f4f7fd; color: var(--hxs-primary); }
.sidebar .nav-link:hover .bi { color: var(--hxs-primary); }
.sidebar .nav-link.active {
  background: #eaf1ff;
  color: var(--hxs-primary);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(47, 107, 245, 0.08);
}
.sidebar .nav-link.active .bi { color: var(--hxs-primary); opacity: 1; }
.sidebar .nav-group .nav-link {
  padding: 9px 12px 9px 30px;
  margin: 0 10px 1px;
  font-size: 12.5px;
  font-weight: 500;
  color: #7b8595;
  border-radius: 8px;
}
.sidebar .nav-group .nav-link .bi { font-size: 13px; color: #a3adbc; }
.sidebar .nav-group .nav-link:hover { color: var(--hxs-primary); }
.sidebar .nav-group .nav-link.active { box-shadow: inset 0 0 0 1px rgba(47, 107, 245, 0.07); color: var(--hxs-primary); font-weight: 600; }
.sidebar .nav-group .nav-link.active .bi { color: var(--hxs-primary); }

.main {
  margin-left: 236px;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 64px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--hxs-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 1020;
}
#pageTitle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  color: var(--hxs-ink);
  letter-spacing: 0.01em;
}
#pageTitle::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--hxs-primary);
  box-shadow: 0 0 0 4px var(--hxs-primary-soft);
  flex: none;
}
.topbar-user { display: flex; align-items: center; gap: 10px; }
.topbar-chat {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  color: #5b6577;
  background: #f6f8fc;
  border: 1px solid #eaeef5;
  text-decoration: none;
  transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.topbar-chat .bi { font-size: 17px; line-height: 1; }
.topbar-chat:hover { color: var(--hxs-primary); background: #f2f7ff; border-color: #cfe0ff; }
.topbar-chat.is-current {
  color: var(--hxs-primary);
  background: #eef4ff;
  border-color: #bcd3ff;
}
.topbar-chat.has-unread {
  color: var(--hxs-primary);
  background: #eef4ff;
  border-color: #bcd3ff;
  box-shadow: 0 4px 12px rgba(47, 107, 245, 0.16);
}
.topbar-chat-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: #ef4444;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
  border: 1.5px solid #ffffff;
  box-sizing: content-box;
  animation: chatPulse 1.8s ease-out infinite;
}
@keyframes chatPulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
  70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .topbar-chat-badge { animation: none; }
}
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--hxs-primary-soft);
  color: var(--hxs-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex: none;
  border: 1px solid #dbe7ff;
}
.user-name { color: var(--hxs-ink-2); font-size: 13px; font-weight: 600; }
.btn-logout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 11px;
  border: 1px solid var(--hxs-line-strong);
  border-radius: 9px;
  background: #ffffff;
  color: #6b7688;
  font-size: 12.5px;
  font-weight: 600;
  transition: all 0.18s ease;
}
.btn-logout .bi { font-size: 14px; }
.btn-logout:hover {
  background: var(--hxs-danger-soft);
  border-color: #f6d3d4;
  color: var(--hxs-danger);
}
.content { padding: 22px 24px 40px; flex: 1; min-width: 0; }

/* ---------- 卡片 / 数据看板 ---------- */
.card {
  border: 1px solid var(--hxs-line);
  border-radius: var(--hxs-radius);
  box-shadow: var(--hxs-shadow-sm);
  background: var(--hxs-surface);
}
.stat-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.stat-card:hover {
  transform: translateY(-2px);
  border-color: #dbe7ff;
  box-shadow: 0 10px 26px rgba(29, 52, 94, 0.09);
}
.stat-card .icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex: none;
}
.stat-card .num {
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--hxs-ink);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stat-card .label { color: var(--hxs-muted); font-size: 12.5px; margin-top: 3px; }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.card-head h6 { font-size: 15px; font-weight: 700; color: var(--hxs-ink); margin: 0; letter-spacing: 0.01em; }
.card-head .sub { font-size: 12px; color: var(--hxs-muted); white-space: nowrap; }
.chart-card { padding: 18px 18px 10px; }
.chart-box { width: 100%; height: 300px; }
.chart-box-sm { width: 100%; height: 246px; }
.chart-fallback { padding: 24px 8px; color: var(--hxs-muted); font-size: 13px; text-align: center; }

.quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.quick-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--hxs-line);
  border-radius: 11px;
  background: #ffffff;
  color: var(--hxs-ink-2);
  text-decoration: none;
  transition: all 0.18s ease;
}
.quick-item:hover {
  border-color: #cfe0ff;
  background: #f8fbff;
  color: var(--hxs-primary);
  transform: translateY(-1px);
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(47, 107, 245, 0.08);
}
.quick-item .qi-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--hxs-primary-soft);
  color: var(--hxs-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex: none;
}
.quick-item span { font-size: 13px; font-weight: 600; }
.quick-item .bi-arrow-up-right { margin-left: auto; color: #b3bcc9; font-size: 12px; }
.quick-item:hover .bi-arrow-up-right { color: var(--hxs-primary); }

/* ---------- 表格 ---------- */
.table { --bs-table-bg: transparent; color: var(--hxs-ink-2); margin-bottom: 0; }
.table > :not(caption) > * > * { padding: 0.7rem 0.8rem; border-bottom-color: #f1f4f9; }
.table thead th {
  color: #7c8798;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.01em;
  background: #f8fafd;
  border-bottom: 1px solid var(--hxs-line);
  white-space: nowrap;
}
.table thead th:first-child { border-top-left-radius: 9px; }
.table thead th:last-child { border-top-right-radius: 9px; }
.table td { vertical-align: middle; font-size: 13px; }
.table tbody tr { transition: background 0.15s ease; }
.table tbody tr:hover { background: #f8fbff; }
.table .btn + .btn { margin-left: 4px; }
.thumb-emoji {
  width: 80px;
  height: 80px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  border: 1px solid rgba(16, 24, 40, 0.04);
  flex: none;
}

/* ---------- 徽标 / 文本 ---------- */
.badge {
  font-weight: 600;
  font-size: 11.5px;
  padding: 0.38em 0.62em;
  border-radius: 6px;
  letter-spacing: 0.01em;
}
.badge-soft { background: var(--hxs-primary-soft); color: var(--hxs-primary); }
.badge-soft-gray { background: #f2f5fa; color: #7b8595; }
.badge-soft-red { background: var(--hxs-danger-soft); color: var(--hxs-danger); }
.badge-soft-green { background: var(--hxs-success-soft); color: #0a9d5b; }
.badge-soft-amber { background: var(--hxs-warning-soft); color: #c77400; }

.page-title { font-size: 20px; font-weight: 700; color: var(--hxs-ink); letter-spacing: -0.01em; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.empty { text-align: center; color: #9aa4b4; padding: 40px 0; font-size: 13px; }
.text-danger { color: var(--hxs-danger) !important; }
.text-success { color: var(--hxs-success) !important; }
.spinner-border.text-primary { color: var(--hxs-primary) !important; }

/* ---------- 按钮 ---------- */
.btn {
  border-radius: 9px;
  font-weight: 600;
  font-size: 13px;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.btn-sm { font-size: 12.5px; padding: 0.35rem 0.7rem; border-radius: 8px; }
.btn:active { transform: translateY(0); }
.btn-success, .btn-primary {
  color: #ffffff;
  border-color: transparent;
  background: var(--hxs-primary);
  box-shadow: 0 4px 10px rgba(47, 107, 245, 0.16);
}
.btn-success:hover, .btn-primary:hover, .btn-success:focus, .btn-primary:focus {
  color: #ffffff;
  background: var(--hxs-primary-dark);
  border-color: transparent;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(47, 107, 245, 0.2);
}
.btn-outline-primary, .btn-outline-success {
  color: var(--hxs-primary);
  border-color: #d6e3ff;
  background: #ffffff;
}
.btn-outline-primary:hover, .btn-outline-success:hover {
  color: #ffffff;
  background: var(--hxs-primary);
  border-color: var(--hxs-primary);
}
.btn-outline-secondary {
  color: #5b6577;
  border-color: var(--hxs-line-strong);
  background: #ffffff;
}
.btn-outline-secondary:hover { color: var(--hxs-primary); background: #f7faff; border-color: #cfe0ff; }
.btn-outline-danger { color: var(--hxs-danger); border-color: #f6d9da; background: #ffffff; }
.btn-outline-danger:hover { color: #ffffff; background: var(--hxs-danger); border-color: var(--hxs-danger); }
.btn-outline-warning { color: #b76e00; border-color: #f7dfb8; background: #ffffff; }
.btn-outline-warning:hover { color: #ffffff; background: var(--hxs-warning); border-color: var(--hxs-warning); }
.btn-light { background: #f4f6fa; border-color: transparent; color: #5b6577; }
.btn-light:hover { background: #eaeff7; color: var(--hxs-ink); }
.btn:focus-visible, .form-control:focus-visible, .form-select:focus-visible {
  outline: 2px solid rgba(47, 107, 245, 0.45);
  outline-offset: 2px;
}

/* ---------- 表单 ---------- */
.form-control, .form-select {
  border-color: var(--hxs-line-strong);
  border-radius: 9px;
  color: var(--hxs-ink);
  background-color: #ffffff;
  font-size: 13px;
  box-shadow: none;
}
.form-control::placeholder { color: #aab3c2; }
.form-control:focus, .form-select:focus {
  border-color: var(--hxs-primary);
  box-shadow: 0 0 0 0.2rem rgba(47, 107, 245, 0.13);
}
.form-control-sm, .form-select-sm { font-size: 12.5px; border-radius: 8px; }
.form-label { font-weight: 600; font-size: 12.5px; color: #5b6577; margin-bottom: 0.4rem; }
.input-group-text { border-color: var(--hxs-line-strong); background: #f7f9fd; color: var(--hxs-muted); }
.form-text { color: #9aa4b4; }

/* ---------- 分页 ---------- */
.pagination { margin: 0; gap: 4px; }
.page-link {
  color: #5b6577;
  border-color: var(--hxs-line);
  border-radius: 8px;
  padding: 0.35rem 0.66rem;
  font-size: 12.5px;
  transition: all 0.15s ease;
}
.page-link:hover { background: #f2f7ff; color: var(--hxs-primary); border-color: #d6e3ff; }
.page-item.active .page-link {
  background: var(--hxs-primary);
  border-color: var(--hxs-primary);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(47, 107, 245, 0.24);
}
.page-item.disabled .page-link { color: #b9c1cd; background: #fafbfe; }

/* ---------- 弹窗 / 提示 ---------- */
.modal-content {
  border: 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(16, 30, 54, 0.24);
}
.modal-header {
  padding: 17px 22px;
  border-bottom: 1px solid var(--hxs-line);
  background: #ffffff;
}
.modal-title { font-size: 16px; font-weight: 700; color: var(--hxs-ink); }
.modal-body { padding: 22px; }
.modal-footer { padding: 14px 22px; background: #f9fbfe; border-top: 1px solid var(--hxs-line); gap: 8px; }
/* ---------- 操作提示：1:1 仿 Element UI（Message / MessageBox） ---------- */
.el-message {
  min-width: 380px;
  box-sizing: border-box;
  border-width: 1px;
  border-style: solid;
  border-color: #ebeef5;
  position: fixed;
  left: 50%;
  top: 20px;
  transform: translate(-50%, -100%);
  background-color: #edf2fc;
  transition: opacity 0.3s, transform 0.4s, top 0.4s;
  overflow: hidden;
  padding: 15px 15px 15px 20px;
  display: flex;
  align-items: center;
  border-radius: 4px;
  opacity: 0;
  z-index: 3000;
  pointer-events: none;
  font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
}
.el-message.is-visible { opacity: 1; transform: translate(-50%, 0); }
.el-message__icon { margin-right: 10px; font-size: 16px; line-height: 1; }
.el-message__content { padding: 0; margin: 0; font-size: 14px; line-height: 1; word-break: break-word; }
.el-message--success { background-color: #f0f9eb; border-color: #e1f3d8; }
.el-message--success .el-message__icon, .el-message--success .el-message__content { color: #67c23a; }
.el-message--info { background-color: #f4f4f5; border-color: #e9e9eb; }
.el-message--info .el-message__icon, .el-message--info .el-message__content { color: #909399; }
.el-message--warning { background-color: #fdf6ec; border-color: #faecd8; }
.el-message--warning .el-message__icon, .el-message--warning .el-message__content { color: #e6a23c; }
.el-message--error { background-color: #fef0f0; border-color: #fde2e2; }
.el-message--error .el-message__icon, .el-message--error .el-message__content { color: #f56c6c; }

.el-message-box__wrapper {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background-color: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s;
  font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
}
.el-message-box__wrapper.is-visible { opacity: 1; }
.el-message-box {
  width: 420px;
  max-width: 100%;
  padding-bottom: 10px;
  background-color: #ffffff;
  border: 1px solid #ebeef5;
  border-radius: 4px;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  text-align: left;
  overflow: hidden;
  box-sizing: border-box;
  transform: translateY(-20px);
  transition: transform 0.3s;
}
.el-message-box__wrapper.is-visible .el-message-box { transform: none; }
.el-message-box__header { position: relative; padding: 15px 15px 10px; }
.el-message-box__title { font-size: 18px; line-height: 1; color: #303133; }
.el-message-box__headerbtn {
  position: absolute;
  top: 15px;
  right: 15px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #909399;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.el-message-box__headerbtn:hover { color: #409eff; }
.el-message-box__content { padding: 10px 15px; color: #606266; font-size: 14px; }
.el-message-box__container { position: relative; }
.el-message-box__status {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  color: #e6a23c;
}
.el-message-box__status + .el-message-box__message { padding-left: 36px; }
.el-message-box__message p { margin: 0; line-height: 24px; }
.el-message-box__btns { padding: 5px 15px 0; text-align: right; }
.el-button {
  display: inline-block;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  background: #ffffff;
  border: 1px solid #dcdfe6;
  color: #606266;
  text-align: center;
  box-sizing: border-box;
  outline: none;
  margin: 0;
  font-weight: 500;
  transition: 0.1s;
  user-select: none;
}
.el-button + .el-button { margin-left: 10px; }
.el-button--small { padding: 9px 15px; font-size: 12px; border-radius: 3px; }
.el-button--default:hover { color: #409eff; border-color: #c6e2ff; background-color: #ecf5ff; }
.el-button--primary { color: #ffffff; background-color: #409eff; border-color: #409eff; }
.el-button--primary:hover { background-color: #66b1ff; border-color: #66b1ff; }
.el-button:focus-visible { outline: 2px solid rgba(64, 158, 255, 0.45); outline-offset: 1px; }

/* ---------- 分类树 ---------- */
.category-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; align-items: start; }
.category-tree-card, .category-detail-card { padding: 16px; min-height: 520px; }
.category-tree-card .card-head { margin-bottom: 12px; }
.tree-tools { display: flex; gap: 6px; margin-bottom: 10px; }
.tree-tools .form-control { flex: 1; min-width: 0; }
.tree-tools .btn { flex: none; }
.category-tree { max-height: 520px; overflow: auto; border: 1px solid var(--hxs-line); border-radius: 10px; padding: 6px; background: #ffffff; }
.tree-row { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px; cursor: pointer; font-size: 13px; color: var(--hxs-ink-2); }
.tree-row:hover { background: #f5f9ff; }
.tree-row.selected { background: var(--hxs-primary-soft); color: var(--hxs-primary); font-weight: 600; }
.tree-toggle { width: 16px; flex: none; text-align: center; color: #98a2b3; }
.tree-toggle.tree-leaf { color: #c6cedb; }
.tree-icon { color: #8a94a6; }
.tree-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-code { font-size: 11px; color: #98a2b3; }
.tree-badge { font-size: 11px; color: #7b8595; background: #f2f5fa; border-radius: 10px; padding: 1px 7px; }
.tree-children { margin-left: 18px; padding-left: 6px; border-left: 1px solid var(--hxs-line); }
.tree-empty, .category-placeholder { padding: 40px 12px; text-align: center; color: #9aa4b4; font-size: 13px; }
.category-placeholder i { font-size: 28px; display: block; margin-bottom: 10px; color: #c6cedb; }
.tree-foot { margin-top: 10px; font-size: 12px; color: #9aa4b4; text-align: right; }

/* ---------- 菜单树表（若依风格） ---------- */
.menu-tree-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.menu-tree-toolbar .form-control { width: 260px; max-width: 100%; }
.menu-tree-table { margin-bottom: 0; }
.menu-tree-table thead th { font-size: 12px; color: #7b8595; font-weight: 600; background: #f7f9fc; white-space: nowrap; }
.menu-tree-row td { vertical-align: middle; }
.menu-tree-row:hover td { background: #f5f9ff; }
.menu-tree-name { display: flex; align-items: center; gap: 6px; min-width: 180px; }
.menu-tree-toggle { width: 18px; height: 18px; flex: none; display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; padding: 0; color: #98a2b3; font-size: 11px; }
.menu-tree-toggle:hover { color: var(--hxs-primary); }
.menu-tree-toggle.leaf { color: #c6cedb; }
.menu-tree-icon { color: #8a94a6; font-size: 13px; }
.menu-tree-label { font-size: 13px; color: var(--hxs-ink-2); }
.menu-tree-label.is-dir { font-weight: 600; color: var(--hxs-ink); }
.menu-tree-count { font-size: 11px; color: #7b8595; background: #f2f5fa; border-radius: 10px; padding: 1px 7px; }
@media (max-width: 767.98px) {
  .menu-tree-toolbar .form-control { width: 100%; }
}
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--hxs-line); flex-wrap: wrap; }
.detail-title { font-size: 17px; font-weight: 700; margin: 0 0 4px; color: var(--hxs-ink); }
.detail-sub { font-size: 12px; color: #9aa4b4; }
.detail-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.category-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; margin: 16px 0 0; }
.category-meta > div { display: flex; gap: 10px; font-size: 13px; }
.category-meta dt { flex: none; width: 72px; color: #9aa4b4; font-weight: 400; }
.category-meta dd { margin: 0; color: var(--hxs-ink-2); word-break: break-all; }
.child-list { margin-top: 20px; border-top: 1px solid var(--hxs-line); padding-top: 14px; }
.child-title { font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--hxs-ink-2); }
.child-title span { color: #9aa4b4; font-weight: 400; }
.child-row { display: flex; align-items: center; gap: 8px; padding: 8px 6px; border-bottom: 1px dashed var(--hxs-line); font-size: 13px; }
.child-row:last-child { border-bottom: 0; }
.child-icon { width: 26px; display: flex; align-items: center; justify-content: center; flex: none; }
.child-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 分类图标（图片） ---------- */
.cat-ico { width: 24px; height: 24px; border-radius: 7px; display: block; object-fit: contain; }
.detail-title-wrap { display: flex; align-items: center; gap: 10px; min-width: 0; }
.detail-ico { width: 44px; height: 44px; border-radius: 13px; flex: none; object-fit: contain; }
.meta-ico { width: 28px; height: 28px; border-radius: 9px; object-fit: contain; vertical-align: -9px; margin-right: 8px; }
.child-ico { width: 26px; height: 26px; border-radius: 8px; object-fit: contain; }
.cat-ico-text { font-size: 15px; line-height: 1; }

.icon-field { display: flex; gap: 14px; align-items: flex-start; }
.icon-preview {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 92px;
  height: 92px;
  border: 1px dashed var(--hxs-line-strong);
  border-radius: 14px;
  background: #f9fbfe;
}
.icon-preview-img { width: 44px; height: 44px; border-radius: 12px; object-fit: contain; }
.icon-preview-tip { font-size: 11px; color: #9aa4b4; }
.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  gap: 6px;
  flex: 1;
  min-width: 0;
  max-height: 210px;
  overflow: auto;
  padding: 2px;
}
.icon-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 3px;
  border: 1px solid var(--hxs-line);
  border-radius: 11px;
  background: #ffffff;
  cursor: pointer;
  transition: border-color .12s, box-shadow .12s, background .12s;
}
.icon-cell img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }
.icon-cell:hover { border-color: var(--hxs-primary-light); background: #fbfdff; }
.icon-cell.active { border-color: var(--hxs-primary); box-shadow: 0 0 0 2px rgba(47, 107, 245, .16); background: #f8fbff; }
.icon-upload { color: #8a94a6; font-size: 16px; border-style: dashed; }

@media (max-width: 991.98px) {
  .category-layout { grid-template-columns: 1fr; }
  .category-tree-card, .category-detail-card { min-height: 0; }
  .category-meta { grid-template-columns: 1fr; }
}

/* ---------- 商品规格行 ---------- */
.spec-rows { margin-top: 6px; }
.spec-header,
.spec-row {
  display: grid;
  grid-template-columns: minmax(120px, 1.3fr) 96px 96px 88px 64px;
  gap: 8px;
  align-items: center;
}
.spec-header {
  margin-bottom: 6px;
  color: var(--hxs-muted);
  font-size: 12px;
  font-weight: 600;
}
.spec-row .form-control { min-width: 0; width: 100%; }
.spec-original { min-height: 16px; color: #8a93a3; font-size: 12px; line-height: 1.3; }
.spec-row .spec-del { width: 100%; padding-left: 0; padding-right: 0; }
.spec-empty { grid-column: 1 / -1; }
.spec-summary { margin-top: 8px; color: var(--hxs-muted); font-size: 12.5px; }
.spec-summary:empty { display: none; }

/* 总库存：只读，由品规自动累计 */
.stock-auto { display: flex; align-items: center; gap: 8px; }
.stock-auto > i { color: var(--hxs-primary); font-size: 15px; }
.stock-auto input[readonly] {
  max-width: 180px;
  background: #f2f6fd;
  color: var(--hxs-primary);
  font-weight: 700;
  cursor: default;
}
.stock-auto .stock-unit { color: var(--hxs-muted); font-size: 13px; }

/* ---------- 配送设置 ---------- */
.delivery-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 100%;
  padding: 16px 18px;
  border: 1px solid #e8edf7;
  border-radius: 12px;
  background: #fafcff;
}
.delivery-switch .form-check-input { width: 42px; height: 22px; cursor: pointer; }
.delivery-preview {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--hxs-primary-soft);
  color: #3d5a99;
  font-size: 12.5px;
}

@media (max-width: 767.98px) {
  .spec-header { display: none; }
  .spec-row { grid-template-columns: 1fr 1fr; }
  .spec-row .spec-name,
  .spec-row .spec-del { grid-column: 1 / -1; }
}

/* ---------- 商品图片编辑 ---------- */
.thumb-empty {
  background: #f4f7fc;
  color: #b9c2cf;
  font-size: 30px;
  border-style: dashed;
  border-color: var(--hxs-line-strong);
}
.thumb-photo {
  width: 80px;
  height: 80px;
  border-radius: 14px;
  object-fit: cover;
  object-position: center;
  border: 1px solid rgba(16, 24, 40, 0.06);
  background: #f7f9fd;
  flex: none;
}
.image-editor { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
.image-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.image-tile {
  position: relative;
  width: 104px;
  height: 104px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--hxs-line);
  background: #f7f9fd;
}
.image-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.image-tile.is-main {
  border-color: var(--hxs-primary);
  box-shadow: 0 0 0 2px rgba(47, 107, 245, 0.16);
}
.main-badge {
  position: absolute;
  left: 0;
  top: 0;
  padding: 3px 7px;
  border-bottom-right-radius: 8px;
  background: var(--hxs-primary);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.image-actions {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 6px 4px 5px;
  background: rgba(16, 24, 40, 0.55);
}
.img-act {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.94);
  color: #4b5563;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.img-act:hover { background: #ffffff; color: var(--hxs-primary); }
.img-act.danger:hover { color: var(--hxs-danger); }
.upload-tile {
  width: 104px;
  height: 104px;
  border: 1px dashed #cfd8e6;
  border-radius: 10px;
  background: #f9fbfe;
  color: var(--hxs-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}
.upload-tile .bi { font-size: 20px; }
.upload-tile:hover { background: var(--hxs-primary-soft); border-color: var(--hxs-primary); }

/* ---------- 富文本编辑器 ---------- */
.rich-editor {
  border: 1px solid var(--hxs-line-strong);
  border-radius: 9px;
  overflow: hidden;
  background: #ffffff;
}
.rich-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px 8px;
  background: #f8fafd;
  border-bottom: 1px solid var(--hxs-line);
}
.rich-toolbar button {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #5b6577;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.rich-toolbar button:hover { background: var(--hxs-primary-soft); color: var(--hxs-primary); }
.rich-content {
  min-height: 180px;
  max-height: 420px;
  overflow-y: auto;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--hxs-ink);
  outline: none;
}
.rich-content:empty::before { content: attr(data-placeholder); color: #aab3c2; }
.rich-content h3 { font-size: 17px; font-weight: 700; margin: 12px 0 6px; }
.rich-content h4 { font-size: 15px; font-weight: 700; margin: 10px 0 6px; }
.rich-content p { margin: 0 0 8px; }
.rich-content ul, .rich-content ol { padding-left: 22px; margin: 0 0 8px; }
.rich-content blockquote {
  border-left: 3px solid var(--hxs-primary);
  padding-left: 12px;
  color: var(--hxs-muted);
  margin: 8px 0;
}
.rich-content a { color: var(--hxs-primary); }
.rich-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 6px 0; }

/* ---------- 移动端抽屉菜单 ---------- */
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--hxs-line-strong);
  background: #ffffff;
  color: var(--hxs-ink-2);
  border-radius: 10px;
  flex: none;
}
.menu-toggle .bi { font-size: 18px; }
.menu-toggle:hover { color: var(--hxs-primary); border-color: #cfe0ff; background: #f8fbff; }
.sidebar-mask { display: none; }

@media (max-width: 991.98px) {
  .layout { flex-direction: column; }
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 280px;
    max-width: 86vw;
    max-height: none;
    overflow-y: auto;
    border-radius: 0 20px 20px 0;
    border-right: 0;
    box-shadow: 18px 0 48px rgba(16, 30, 54, 0.18);
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.26s cubic-bezier(0.22, 0.61, 0.36, 1), visibility 0.26s;
    z-index: 1050;
  }
  .sidebar.open { transform: translateX(0); visibility: visible; }
  .sidebar:not(.open) { pointer-events: none; }
  .sidebar-mask.show {
    display: block;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(2px);
    z-index: 1040;
  }
  .sidebar .brand { height: 64px; padding: 0 18px; font-size: 16px; }
  .sidebar nav {
    flex-direction: column !important;
    flex-wrap: nowrap;
    overflow: visible;
    padding: 8px 10px 26px !important;
    gap: 0;
  }
  .sidebar .nav-link {
    padding: 12px 14px;
    margin: 0 4px 2px;
    border-radius: 10px;
    font-size: 14px;
    white-space: normal;
    min-height: 44px;
  }
  .nav-group-title {
    width: calc(100% - 8px);
    margin: 2px 4px;
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 15px;
    min-height: 44px;
  }
  .nav-group-body { margin: 2px 4px 8px; border-radius: 10px; }
  .sidebar .nav-group .nav-link { padding: 10px 12px 10px 36px; margin: 0 4px 1px; min-height: 42px; font-size: 13.5px; }
  .main { margin-left: 0; }
  .topbar { height: 58px; padding: 0 14px; gap: 10px; }
  .topbar #pageTitle { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .menu-toggle { display: inline-flex; }
  .content { padding: 16px 14px 32px; }
  .page-title { font-size: 18px; }
  body.nav-open { overflow: hidden; }
  .chart-box { height: 260px; }
  .chart-box-sm { height: 236px; }
  .table { white-space: nowrap; }
}

@media (max-width: 767.98px) {
  .table-card {
    border-collapse: separate;
    border-spacing: 0 10px;
    white-space: normal;
  }
  .table-card thead { display: none; }
  .table-card tbody { display: block; }
  .table-card tbody tr {
    display: block;
    background: #ffffff;
    border: 1px solid var(--hxs-line);
    border-radius: 13px;
    padding: 3px 14px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  }
  .table-card tbody td {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    padding: 10px 0 !important;
    border: 0;
    border-bottom: 1px dashed #eef1f7;
    text-align: right;
    white-space: normal;
    font-size: 13px;
    min-width: 0;
  }
  .table-card tbody td:last-child { border-bottom: 0; }
  .table-card tbody td::before {
    content: attr(data-label);
    flex: none;
    max-width: 42%;
    color: var(--hxs-muted);
    font-weight: 500;
    font-size: 12.5px;
    text-align: left;
  }
  .table-card tbody td[data-label=""]::before { display: none; }
  .table-card tbody td[colspan] { justify-content: center; }
  .table-card tbody td[colspan]::before { display: none; }
  .table-card tbody td .btn { white-space: nowrap; }
  .table-card tbody td .member-actions { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }

  .table-responsive.table-card-wrap { overflow: visible; }
  .pager-wrap { flex-direction: column; align-items: stretch !important; gap: 10px; }
  .pager-wrap .pagination { justify-content: center; flex-wrap: wrap; }
  .toolbar { gap: 8px; }
  .toolbar .form-control, .toolbar .form-select { max-width: 100% !important; }
  .toolbar > .btn { flex: 1 1 auto; }

  .modal-dialog { margin: 12px 10px; }
  .modal-content { border-radius: 16px; }
  .modal-body { padding: 18px; }
  .modal-footer .btn { flex: 1; }
  .form-control, .form-select { font-size: 16px; }
  .form-control-sm, .form-select-sm { font-size: 16px; }
  .form-label { font-size: 13px; }
  .input-group-text { font-size: 14px; }

  .card.p-3 { padding: 14px !important; }
  .stat-card .num { font-size: 22px; }
  .stat-card .icon { width: 40px; height: 40px; border-radius: 12px; font-size: 18px; }
  .card-head { margin-bottom: 10px; }
  .card-head h6 { font-size: 14.5px; }
  .card-head .sub { font-size: 11.5px; }
  .chart-box { height: 240px; }
  .chart-box-sm { height: 220px; }
}

@media (max-width: 575.98px) {
  .content { padding: 12px 12px calc(26px + env(safe-area-inset-bottom)); }
  .topbar { padding: 0 12px; height: 56px; }
  .topbar-chat { width: 34px; height: 34px; border-radius: 10px; }
  .topbar-user { gap: 8px; }
  .user-name { display: none; }
  .btn-logout span { display: none; }
  .btn-logout { width: 34px; padding: 0; justify-content: center; }
  .page-title { font-size: 17px; }
  .member-actions .btn { padding: 0.25rem 0.5rem; font-size: 12.5px; }
  .login-card { border-radius: 18px; }
  .login-wrap { padding: 18px 14px; }
  .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart-box { height: 220px; }
  .chart-box-sm { height: 200px; }
  #chartStatus { height: 250px; }
  .table-card tbody td { padding: 9px 0 !important; }
  .pagination { gap: 3px; }
  .page-link { padding: 0.32rem 0.55rem; }

  .stat-card { padding: 12px !important; }
  .stat-card .d-flex { gap: 10px !important; }
  .stat-card .icon { width: 34px; height: 34px; border-radius: 10px; font-size: 15px; }
  .stat-card .num { font-size: 19px; letter-spacing: -0.03em; }
  .stat-card .label { font-size: 11.5px; margin-top: 2px; }
}

@media (max-width: 380px) {
  .quick-item .bi-arrow-up-right { display: none; }
  .stat-card .num { font-size: 17px; }
  .stat-card .label { font-size: 11px; }
  .stat-card .icon { width: 30px; height: 30px; font-size: 14px; }
  .content { padding-left: 10px; padding-right: 10px; }
}

/* ---------- 经营看板 / 统计报表 ---------- */
.dash-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.dash-title { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; color: var(--hxs-ink); }
.dash-sub { margin-top: 4px; font-size: 12.5px; color: var(--hxs-muted); }
.report-updated { font-size: 12px; color: #9aa4b4; }

/* ---------- 首页工作台：规模卡 / 待办 / 库存预警 ---------- */
.stat-tile { display: flex; flex-direction: row; align-items: center; gap: 14px; padding: 16px; text-align: left; transition: border-color 0.18s ease, box-shadow 0.18s ease; }
.stat-tile:hover { border-color: #dbe7ff; box-shadow: 0 10px 24px rgba(29, 52, 94, 0.07); }
.stat-ico {
  width: 44px; height: 44px; border-radius: 13px; flex: none;
  display: flex; align-items: center; justify-content: center; font-size: 19px;
}
.stat-ico.blue { background: #eaf1ff; color: #2f6bf5; }
.stat-ico.violet { background: #f0ecff; color: #7b5cf0; }
.stat-ico.green { background: #e6f8f1; color: #0f9d76; }
.stat-ico.orange { background: #fff1e6; color: #e8833a; }
.stat-ico.cyan { background: #e6f6fb; color: #1a9ec4; }
.stat-ico.red { background: #ffeded; color: #e5484d; }
.stat-body { display: flex; flex-direction: column; min-width: 0; }
.stat-label { font-size: 12.5px; color: #8a94a6; }
.stat-value {
  font-size: 21px; font-weight: 700; color: var(--hxs-ink); letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stat-note { margin-top: 2px; font-size: 11.5px; color: #a6b0bf; }

.todo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.todo-item {
  display: flex; align-items: center; gap: 10px; padding: 12px;
  border: 1px solid var(--hxs-line); border-radius: 12px; background: #ffffff;
  text-decoration: none; color: inherit;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}
.todo-item:hover { border-color: #cfe0ff; box-shadow: 0 8px 18px rgba(29, 52, 94, 0.07); transform: translateY(-1px); }
.todo-item.is-zero .todo-count { color: #9aa4b4; }
.todo-item.is-zero .todo-ico { opacity: 0.6; }
.todo-ico {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.todo-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.todo-label { font-size: 12.5px; color: #6b7688; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-count { font-size: 17px; font-weight: 700; color: var(--hxs-ink); font-variant-numeric: tabular-nums; line-height: 1.25; }
.todo-count small { margin-left: 3px; font-size: 11px; font-weight: 500; color: #9aa4b4; }
.todo-arrow { flex: none; font-size: 12px; color: #c3cbd8; }

.stock-list { display: flex; flex-direction: column; }
.stock-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 2px; border-bottom: 1px dashed var(--hxs-line); font-size: 13px;
}
.stock-row:last-child { border-bottom: 0; }
.stock-name { min-width: 0; color: var(--hxs-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stock-num { flex: none; font-weight: 600; color: #e8833a; font-variant-numeric: tabular-nums; }
.stock-num.zero { color: var(--hxs-danger); }
.stock-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; min-height: 168px; font-size: 12.5px; color: #9aa4b4;
}
.stock-empty .bi { font-size: 26px; color: #b7e3d1; }

@media (max-width: 991.98px) {
  .todo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575.98px) {
  .dash-head { align-items: flex-start; }
  .dash-head > .card-link { margin-left: auto; }
  .stock-empty { min-height: 120px; }
  .stat-tile { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; }
  .stat-value { font-size: 18px; }
  .stat-note { display: none; }
  .todo-grid { gap: 8px; }
  .todo-item { padding: 10px; gap: 8px; }
  .todo-ico { width: 30px; height: 30px; font-size: 14px; }
  .todo-count { font-size: 15px; }
  .todo-label { font-size: 12px; }
  .todo-arrow { display: none; }
}

.seg {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: #f2f5fa;
  max-width: 100%;
}
.seg button {
  border: 0;
  background: transparent;
  color: #6b7688;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  white-space: nowrap;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}
.seg button:hover { color: var(--hxs-primary); }
.seg button.active {
  background: #ffffff;
  color: var(--hxs-primary);
  box-shadow: 0 1px 3px rgba(29, 52, 94, 0.12);
}

.period-card { padding: 16px; cursor: pointer; transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease; }
.period-card:hover { border-color: #cfe0ff; box-shadow: 0 8px 20px rgba(29, 52, 94, 0.07); }
.period-card.active {
  border-color: #bcd3ff;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 72%);
  box-shadow: 0 10px 24px rgba(47, 107, 245, 0.1);
}
.period-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.period-name { font-size: 13px; font-weight: 600; color: #5b6577; }
.period-card.active .period-name { color: var(--hxs-primary); }
.period-range { font-size: 11.5px; color: #9aa4b4; white-space: nowrap; }
.period-amount {
  margin: 8px 0 4px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--hxs-ink);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.period-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; font-size: 12px; color: #8a94a6; }
.period-growth {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  font-size: 11.5px;
  color: #9aa4b4;
}
.growth { display: inline-flex; align-items: center; gap: 2px; font-size: 11.5px; font-weight: 600; }
.growth.up { color: #0a9d5b; }
.growth.down { color: var(--hxs-danger); }
.growth.flat { color: #9aa4b4; font-weight: 500; }
.growth .bi { font-size: 11px; }
.dot-sep { color: #c3cbd8; }
.card-link { font-size: 12.5px; font-weight: 600; color: var(--hxs-primary); text-decoration: none; white-space: nowrap; }
.card-link:hover { color: var(--hxs-primary-dark); text-decoration: none; }
.card-link .bi { font-size: 11px; }

.rank-list { display: flex; flex-direction: column; }
.rank-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed #eef1f7; }
.rank-row:last-child { border-bottom: 0; }
.rank-no {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: #f2f5fa;
  color: #7b8595;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.rank-row:nth-child(1) .rank-no { background: var(--hxs-primary); color: #ffffff; }
.rank-row:nth-child(2) .rank-no { background: #e3ecff; color: #2f6bf5; }
.rank-row:nth-child(3) .rank-no { background: #e6f8f5; color: #0da58f; }
.rank-name {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 13px;
  color: #3c4656;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-name small { font-size: 11px; color: #9aa4b4; flex: none; }
.rank-track { width: 90px; height: 6px; border-radius: 4px; background: #f2f5fa; overflow: hidden; flex: none; }
.rank-track i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #7ba3ff, #2f6bf5); }
.rank-val { min-width: 76px; text-align: right; font-size: 12px; color: #5b6577; font-variant-numeric: tabular-nums; flex: none; }
.rank-empty { padding: 28px 0; text-align: center; font-size: 12.5px; color: #9aa4b4; }

.kpi-card { transition: border-color 0.18s ease, box-shadow 0.18s ease; }
.kpi-card:hover { border-color: #dbe7ff; box-shadow: 0 8px 20px rgba(29, 52, 94, 0.07); }
.kpi-label { font-size: 12.5px; color: #8a94a6; }
.kpi-num {
  margin-top: 6px;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--hxs-ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kpi-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-top: 6px; font-size: 11px; color: #9aa4b4; }
.kpi-extra { margin-top: 2px; font-size: 11px; color: #9aa4b4; }

.report-filter .seg { flex: 0 0 auto; }
.report-custom { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.report-custom .form-control { width: 138px; }
.report-range-text { font-size: 12px; color: #8a94a6; }

.member-level-box { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #eef1f7; }
.member-level-title { margin-bottom: 6px; font-size: 11.5px; color: #9aa4b4; }
.level-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.level-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f2f5fa;
  color: #5b6577;
  font-size: 11.5px;
  font-weight: 600;
}
.level-chip b { color: var(--hxs-primary); font-size: 11.5px; }

@media (max-width: 575.98px) {
  .dash-title { font-size: 18px; }
  .period-amount { font-size: 26px; }
  .period-card { padding: 14px; }
  .kpi-num { font-size: 19px; }
  .rank-track { width: 56px; }
  .rank-val { min-width: 62px; }
  .report-custom { width: 100%; }
  .report-custom .form-control { flex: 1 1 110px; width: auto; min-width: 0; }
  .report-custom .btn { flex: 1 1 100%; }
  .report-range-text { width: 100%; text-align: right; }
  .report-updated { width: 100%; text-align: right; }
}

/* ---------- 客服消息 ---------- */
.nav-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--hxs-danger);
  color: #fff;
  font-size: 10px;
  line-height: 16px;
  vertical-align: middle;
}

.chat-layout {
  display: flex;
  gap: 14px;
  height: calc(100vh - 150px);
  height: calc(100dvh - 150px);
  min-height: 520px;
}

.chat-sessions {
  width: 320px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-sessions .list {
  flex: 1;
  overflow-y: auto;
}

.chat-sessions .btn { flex: none; white-space: nowrap; }

.chat-session-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid #f2f5fa;
  cursor: pointer;
  transition: background 0.15s ease;
}

.chat-session-item:hover { background: #f8fbff; }
.chat-session-item.active { background: var(--hxs-primary-soft); }

.chat-avatar-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--hxs-primary-soft);
  color: var(--hxs-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
  overflow: hidden;
}

.chat-avatar-circle img { width: 100%; height: 100%; object-fit: cover; }

.chat-session-main { flex: 1; min-width: 0; }

.chat-session-name {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--hxs-ink);
}

.chat-session-time { font-size: 11px; font-weight: 400; color: #9aa4b4; flex-shrink: 0; }

.chat-session-preview {
  margin-top: 3px;
  font-size: 12px;
  color: #8f99a9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-unread {
  flex-shrink: 0;
  min-width: 18px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--hxs-danger);
  color: #fff;
  font-size: 11px;
  text-align: center;
}

.chat-panel { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }

.chat-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid #f2f5fa;
}

.chat-messages { flex: 1; overflow-y: auto; padding: 16px; background: #f8fafd; }

.chat-msg { display: flex; gap: 8px; margin-bottom: 14px; }
.chat-msg.mine { flex-direction: row-reverse; }
.chat-msg-body { max-width: 72%; }

.chat-bubble {
  padding: 9px 12px;
  border-radius: 10px;
  background: #fff;
  color: var(--hxs-ink-2);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

.chat-msg.mine .chat-bubble { background: var(--hxs-primary-soft); color: #1c3f8f; }

.chat-meta {
  display: flex;
  gap: 8px;
  margin-top: 4px;
  font-size: 11px;
  color: #a6afbd;
}

.chat-msg.mine .chat-meta { justify-content: flex-end; }

.chat-input {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #f2f5fa;
  background: #fff;
}

.chat-input textarea { flex: 1; height: 64px; resize: none; }

.chat-product {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 210px;
  padding: 8px;
  border: 1px solid #eef1f7;
  border-radius: 8px;
  background: #fff;
}

.chat-product img,
.chat-product .ph {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
  background: #f3f6fb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.chat-empty { padding: 40px 0; text-align: center; font-size: 13px; color: #9aa4b4; }

@media (max-width: 991.98px) {
  .chat-layout { flex-direction: column; height: auto; min-height: 0; }
  .chat-sessions { width: 100%; max-height: none; }
  .chat-sessions .list {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }
  .chat-session-item {
    min-width: 232px;
    max-width: 76vw;
    border-bottom: 0;
    border-right: 1px solid #f2f5fa;
    scroll-snap-align: start;
    flex: none;
  }
  .chat-session-item:last-child { border-right: 0; }
  .chat-panel { min-height: 460px; }
  .chat-messages { min-height: 280px; }
  .chat-msg-body { max-width: 82%; }
}

@media (max-width: 575.98px) {
  .seg button { padding: 6px 9px; font-size: 12px; }
  .el-message { min-width: 0; max-width: calc(100vw - 24px); padding: 12px 14px 12px 16px; }
  .el-message__content { line-height: 1.4; }
  .el-message-box__title { font-size: 17px; }
  .chat-panel { min-height: calc(100dvh - 260px); }
  .chat-input { padding: 10px 12px; gap: 8px; align-items: flex-end; }
  .chat-input textarea { height: 56px; }
  .chat-input .btn { height: 56px; padding: 0 16px; }
  .chat-messages { padding: 12px; }
  .chat-session-item { min-width: 210px; }
}
