/* ============ 1210 管理后台 · CRMEB 风格 ============ */
:root {
  --admin-primary: #0256FF;
  --admin-primary-dark: #0146d4;
  --admin-primary-light: #E5EEFF;
  --admin-side-bg: #282c34;
  --admin-side-text: rgba(255, 255, 255, 0.75);
  --admin-content-bg: #F0F2F5;
  --admin-header-bg: #ffffff;
  --admin-text: #333;
  --admin-text-sub: #8a8f99;
}

body {
  background: var(--admin-content-bg);
  color: var(--admin-text);
}

/* ============ 顶部头部 ============ */
.admin-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 60px;
  background: var(--admin-header-bg);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}
.admin-header .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: #282c34;
}
.admin-header .logo .logo-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0256FF, #4a8bff);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.admin-header .header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.admin-header .admin-user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #444;
}
.admin-header .admin-user .u-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--admin-primary-light);
  color: var(--admin-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* ============ 侧边栏 ============ */
.admin-wrap {
  min-height: calc(100vh - 60px);
  display: flex;
}
.admin-side {
  position: sticky;
  top: 60px;
  width: 220px;
  height: calc(100vh - 60px);
  overflow-y: auto;
  background: var(--admin-side-bg);
  padding: 12px 0;
  flex-shrink: 0;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.06);
}
.admin-side .side-title {
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
  padding: 16px 24px 8px;
  letter-spacing: 1px;
}
.admin-side a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  color: var(--admin-side-text);
  font-size: 14px;
  border-left: 3px solid transparent;
  transition: all 0.2s;
}
.admin-side a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}
.admin-side a.active {
  background: var(--admin-primary);
  color: #fff;
  border-left-color: #fff;
  font-weight: 600;
}
.admin-side a .side-icon {
  width: 20px;
  text-align: center;
  font-size: 16px;
}

/* ============ 主内容区 ============ */
.admin-main {
  flex: 1;
  padding: 24px;
  background: var(--admin-content-bg);
  min-width: 0;
}
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.page-head .ph-title {
  font-size: 20px;
  font-weight: 700;
  color: #282c34;
  display: flex;
  align-items: center;
  gap: 10px;
}
.page-head .ph-title::before {
  content: '';
  width: 4px;
  height: 22px;
  border-radius: 2px;
  background: var(--admin-primary);
}
.page-head .ph-sub {
  font-size: 13px;
  color: var(--admin-text-sub);
  margin-top: 4px;
  padding-left: 14px;
}

/* ============ 卡片 ============ */
.card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  padding: 20px 24px;
  margin-bottom: 16px;
  border: none;
}
.card h3 {
  font-size: 16px;
  margin-bottom: 16px;
  color: #282c34;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card h3::before {
  content: '';
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: var(--admin-primary);
}

/* ============ 首页工作台 ============ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}
.kpi-card {
  position: relative;
  border-radius: 14px;
  color: #fff;
  padding: 16px 18px 12px;
  overflow: hidden;
  min-height: 132px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.10);
}
.kpi-card::after {
  content: '';
  position: absolute;
  right: -30px;
  top: -30px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}
.kpi-card > div { position: relative; z-index: 1; }
.kpi-top { display: flex; align-items: center; gap: 8px; font-size: 13px; opacity: 0.95; letter-spacing: 0.3px; }
.kpi-icon { font-size: 18px; }
.kpi-value { font-size: 28px; font-weight: 700; margin: 10px 0 4px; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 12px; opacity: 0.92; }
.kpi-spark { height: 32px; margin-top: 6px; }

.dash-row { display: flex; gap: 16px; margin-bottom: 16px; align-items: stretch; }
.dash-row .card { flex: 1; margin-bottom: 0; }
.dash-chart-card { min-width: 0; }
.dash-chart-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.dash-chart-head h3 { margin-bottom: 0; }
.seg { display: inline-flex; background: #eef1f5; border-radius: 8px; padding: 3px; }
.seg-btn { border: none; background: transparent; padding: 5px 14px; font-size: 13px; color: #666; border-radius: 6px; cursor: pointer; transition: all .2s; }
.seg-btn:hover { color: var(--admin-primary); }
.seg-btn.active { background: #fff; color: var(--admin-primary); font-weight: 600; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.10); }
.chart-main { height: 330px; }
.chart-sub { height: 210px; }
.dash-half { min-width: 0; }
.portrait-wrap { display: flex; gap: 4px; }
.donut-box { flex: 1; min-width: 0; text-align: center; }
.donut-chart { height: 210px; }
.donut-tip { font-size: 13px; color: #8a8f99; margin-top: -4px; }
.buyer-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 2px 0 10px; }
.chip { background: #f7f9fc; border-radius: 10px; padding: 12px 6px; text-align: center; border: 1px solid #eef1f5; }
.chip-v { font-size: 17px; font-weight: 700; color: #1f2430; }
.chip-l { font-size: 11px; color: #8a8f99; margin-top: 4px; }

@media (max-width: 1280px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-row { flex-direction: column; }
}

/* ============ 表格 ============ */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}
th {
  background: var(--admin-primary-light);
  color: var(--admin-primary);
  font-weight: 600;
  padding: 12px 14px;
  text-align: left;
  border-bottom: none;
  white-space: nowrap;
}
td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid #f0f2f5;
  color: #333;
}
tr:hover td {
  background: #fafcff;
}
tr:last-child td {
  border-bottom: none;
}

/* ============ 按钮 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #d9dee5;
  color: #444;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1.4;
}
.btn:hover {
  border-color: var(--admin-primary);
  color: var(--admin-primary);
}
.btn-primary {
  background: var(--admin-primary);
  border-color: var(--admin-primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--admin-primary-dark);
  color: #fff;
}
.btn-success {
  background: #18a058;
  border-color: #18a058;
  color: #fff;
}
.btn-success:hover {
  background: #128049;
  color: #fff;
}
.btn-warning {
  background: #f5a623;
  border-color: #f5a623;
  color: #fff;
}
.btn-warning:hover {
  background: #d18d12;
  color: #fff;
}
.btn-danger {
  background: #f53f3f;
  border-color: #f53f3f;
  color: #fff;
}
.btn-danger:hover {
  background: #d03434;
  color: #fff;
}
.btn-outline {
  background: #fff;
  color: var(--admin-primary);
  border: 1px solid var(--admin-primary);
}
.btn-outline:hover {
  background: var(--admin-primary-light);
  color: var(--admin-primary-dark);
}
.btn-sm {
  padding: 4px 12px;
  font-size: 12px;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============ 状态标签 ============ */
.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.5;
}
.tag-green { background: #e8f8f0; color: #18a058; }
.tag-red { background: #fdecef; color: #d03050; }
.tag-blue { background: #e8eefd; color: #0256FF; }
.tag-gray { background: #f0f0f2; color: #888; }
.tag-orange { background: #fff1e6; color: #FF6A1F; }

/* ============ 表单 ============ */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 13px; color: #555; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d9dee5;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 3px rgba(2, 86, 255, 0.08);
}
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }

/* ============ 商品图片上传 ============ */
.img-upload-preview { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.up-img { position: relative; width: 80px; height: 80px; border-radius: 8px; overflow: hidden; border: 2px solid transparent; cursor: pointer; }
.up-img.main { border-color: var(--admin-primary); }
.up-img img { width: 100%; height: 100%; object-fit: cover; }
.up-del { position: absolute; top: 4px; right: 4px; width: 18px; height: 18px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.up-main-tag { position: absolute; left: 4px; bottom: 4px; background: var(--admin-primary); color: #fff; font-size: 10px; padding: 1px 6px; border-radius: 4px; }
.up-empty { width: 80px; height: 80px; border: 1px dashed #d9dee5; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 12px; }
.img-upload-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tip-text { font-size: 12px; color: #999; }

/* ============ 登录页 ============ */
.admin-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0256FF 0%, #282c34 120%);
  padding: 24px;
}
.admin-login-card {
  width: 400px;
  max-width: 100%;
  background: #fff;
  border-radius: 12px;
  padding: 40px 36px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}
.admin-login-card .login-logo {
  text-align: center;
  margin-bottom: 28px;
}
.admin-login-card .login-logo .ll-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto;
  border-radius: 14px;
  background: linear-gradient(135deg, #0256FF, #4a8bff);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}
.admin-login-card .login-logo .ll-title {
  font-size: 20px;
  font-weight: 700;
  color: #282c34;
  margin-top: 14px;
}
.admin-login-card .login-logo .ll-sub {
  font-size: 13px;
  color: var(--admin-text-sub);
  margin-top: 6px;
}

/* ============ 弹窗 ============ */
.admin-modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(40, 44, 52, 0.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.admin-modal {
  width: 640px;
  max-width: 100%;
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 12px;
  padding: 28px 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}
.admin-modal h3 {
  font-size: 17px;
  font-weight: 700;
  color: #282c34;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-modal h3::before {
  content: '';
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: var(--admin-primary);
}
.modal-foot {
  text-align: right;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

/* ============ Toast ============ */
.toast {
  position: fixed;
  top: 76px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(40, 44, 52, 0.92);
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  max-width: 80%;
  word-break: break-all;
}
.toast.show { opacity: 1; }

/* ============ 响应式 ============ */
@media (max-width: 900px) {
  .admin-side { width: 170px; }
  .admin-main { padding: 16px; }
  .form-row { flex-direction: column; gap: 0; }
  th, td { padding: 8px 10px; font-size: 12px; }
}

/* ============ 网站设置（美化版） ============ */
.site-settings { display: flex; flex-direction: column; gap: 16px; }
.site-groups { display: flex; flex-direction: column; gap: 16px; }
.site-group { margin-bottom: 0; padding: 22px 26px; }
.site-group-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid #f0f2f5; }
.site-group-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--admin-primary-light); color: var(--admin-primary); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.site-group-titles { display: flex; flex-direction: column; gap: 2px; }
.site-group-title { font-size: 15px; font-weight: 700; color: #282c34; }
.site-group-sub { font-size: 12px; color: var(--admin-text-sub); }
.site-grid { display: flex; flex-wrap: wrap; gap: 16px 20px; }
.site-grid .form-group { flex: 1 1 calc(50% - 20px); min-width: 250px; margin-bottom: 0; }
.site-grid .form-group.wide { flex: 1 1 100%; }
.site-grid input,
.site-grid textarea { font-family: inherit; background: #fafbfc; }
.site-grid input:focus,
.site-grid textarea:focus { background: #fff; }
.site-grid textarea { resize: vertical; min-height: 76px; }
.site-grid .form-group label { font-weight: 600; color: #444; }
.field-desc { font-size: 12px; color: var(--admin-text-sub); margin-top: 5px; line-height: 1.5; }
.site-save-bar { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff; border: 1px solid #eef0f4; border-radius: 12px; padding: 12px 16px; box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04); }
.site-save-hint { font-size: 13px; color: var(--admin-text-sub); }
.site-save-btns { display: flex; gap: 8px; flex-shrink: 0; }
@media (max-width: 900px) {
  .site-save-bar { flex-direction: column; align-items: stretch; }
  .site-save-btns { justify-content: flex-end; }
}
/* ============ 商品管理（CRMEB 风格优化） ============ */
.admin-modal-lg { width: 860px; }
.form-section-title {
  font-size: 14px;
  font-weight: 700;
  color: #282c34;
  padding-bottom: 8px;
  margin: 6px 0 16px;
  border-bottom: 1px solid #eef0f4;
  display: flex;
  align-items: center;
  gap: 6px;
}
.form-section-title::before {
  content: '';
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: var(--admin-primary);
}
.form-tip {
  font-size: 12px;
  color: #8a919f;
  background: #f7f8fa;
  border-left: 3px solid #c9d4e4;
  padding: 8px 12px;
  border-radius: 4px;
  margin-bottom: 14px;
  line-height: 1.6;
}
.required { color: #e94f37; margin-right: 2px; }
.img-count { font-size: 12px; color: #999; margin-left: 6px; font-weight: 400; }
.product-list-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.list-total { font-size: 13px; color: #999; font-weight: 400; margin-left: 8px; }
.filter-bar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.filter-input { padding: 7px 12px; border: 1px solid #d9dee5; border-radius: 6px; font-size: 13px; outline: none; }
.filter-input:focus { border-color: var(--admin-primary); }
.filter-select { min-width: 110px; }
.prod-cell { display: flex; align-items: center; gap: 12px; min-width: 260px; }
.prod-thumb-wrap { width: 56px; height: 56px; border-radius: 8px; overflow: hidden; border: 1px solid #eef0f4; background: #fafbfc; flex: none; display: flex; align-items: center; justify-content: center; }
.prod-thumb { width: 100%; height: 100%; object-fit: cover; }
.prod-name { font-weight: 600; color: #282c34; }
.prod-sub { font-size: 12px; color: #999; margin-top: 2px; }
.prod-meta { font-size: 12px; color: #aab; margin-top: 4px; }
.prod-cat-tag { margin-left: 6px; vertical-align: 1px; font-size: 11px; padding: 1px 8px; border-radius: 4px; font-weight: 400; }
.table-wrap { overflow-x: auto; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.pager-info { font-size: 13px; color: #666; }
.pager .btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.empty-cell { text-align: center; color: #999; padding: 32px 0 !important; }
/* ============ 网站设置 · 可视化编辑器 ============ */
#site-nav-editor,
#site-topright-editor { border: 1px solid #eef0f4; border-radius: 8px; background: #fff; overflow: hidden; }
.editor-head,
.editor-row { display: flex; align-items: center; gap: 10px; padding: 7px 12px; }
.editor-head { background: #f8f9fb; font-size: 12px; color: var(--admin-text-sub); font-weight: 600; }
.editor-row { border-top: 1px solid #f0f2f5; }
.editor-row:hover { background: #fafbfc; }
.editor-cell-drag { width: 18px; color: #c0c4cc; text-align: center; font-size: 13px; flex-shrink: 0; }
.editor-cell-icon { width: 64px; flex-shrink: 0; }
.editor-cell-name { flex: 1; min-width: 120px; }
.editor-cell-cat { width: 150px; flex-shrink: 0; }
.editor-cell-url { flex: 1; min-width: 140px; }
.editor-cell-check { width: 64px; flex-shrink: 0; }
.editor-cell-check label { display: flex; align-items: center; gap: 4px; font-size: 13px; color: #555; cursor: pointer; white-space: nowrap; }
.editor-cell input[type="text"] { width: 100%; padding: 6px 10px; border: 1px solid #d9dee5; border-radius: 6px; font-size: 13px; outline: none; box-sizing: border-box; background: #fff; }
.editor-cell input[type="text"]:focus { border-color: var(--admin-primary); box-shadow: 0 0 0 3px rgba(2, 86, 255, 0.08); }
.editor-cell-ops { display: flex; gap: 4px; width: 88px; justify-content: flex-end; flex-shrink: 0; }
.editor-op { width: 26px; height: 26px; border: 1px solid #e3e6ea; background: #fff; border-radius: 6px; color: #666; cursor: pointer; font-size: 12px; display: flex; align-items: center; justify-content: center; padding: 0; }
.editor-op:hover:not(:disabled) { border-color: var(--admin-primary); color: var(--admin-primary); }
.editor-op.danger:hover:not(:disabled) { border-color: #d03050; color: #d03050; }
.editor-op:disabled { opacity: .4; cursor: not-allowed; }
.editor-foot { padding: 10px 12px; border-top: 1px solid #f0f2f5; }
.editor-empty { padding: 16px; text-align: center; color: #bbb; font-size: 13px; border-top: 1px solid #f0f2f5; }
.link-mode-switch { display: flex; gap: 18px; margin-bottom: 10px; font-size: 13px; color: #555; }
.link-mode-switch label { display: flex; align-items: center; gap: 4px; cursor: pointer; }
.advanced-field label { color: #999; }
.advanced-block { margin-top: 4px; border: 1px dashed #e3e6ea; border-radius: 8px; padding: 8px 12px; }
.advanced-block summary { font-size: 12px; color: var(--admin-text-sub); cursor: pointer; user-select: none; }
.advanced-block textarea { margin-top: 8px; }
@media (max-width: 900px) {
  .editor-head, .editor-row { flex-wrap: wrap; gap: 6px; }
  .editor-cell-icon, .editor-cell-cat, .editor-cell-url { width: 100%; flex: none; }
  .editor-cell-name { width: 100%; flex: none; }
  .editor-cell-check { width: auto; }
  .editor-cell-ops { width: auto; }
}


/* ============ 网站设置 · 页脚栏目编辑器 ============ */
#site-footer-editor { border: 1px solid #eef0f4; border-radius: 8px; background: #fff; overflow: hidden; }
.fc-col { border: 1px solid #eef0f4; border-radius: 10px; margin: 12px; background: #fbfcfe; padding: 0; overflow: hidden; }
.fc-col-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #f0f4fb; }
.fc-col-index { width: 20px; height: 20px; border-radius: 50%; background: var(--admin-primary); color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.fc-col-title { flex: 1; min-width: 160px; padding: 6px 10px; border: 1px solid #d9dee5; border-radius: 6px; font-size: 13px; outline: none; box-sizing: border-box; background: #fff; }
.fc-col-title:focus { border-color: var(--admin-primary); box-shadow: 0 0 0 3px rgba(2, 86, 255, 0.08); }
.fc-col-head .editor-cell-ops { width: auto; }
.fc-items { padding: 2px 12px; }
.fc-item-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px dashed #edf0f4; flex-wrap: wrap; }
.fc-item-row:first-child { border-top: none; }
.fc-item-row input { padding: 6px 10px; border: 1px solid #d9dee5; border-radius: 6px; font-size: 13px; outline: none; box-sizing: border-box; background: #fff; }
.fc-item-row input:focus { border-color: var(--admin-primary); box-shadow: 0 0 0 3px rgba(2, 86, 255, 0.08); }
.fc-text { width: 170px; flex-shrink: 0; }
.fc-value { flex: 1; min-width: 160px; }
.fc-ops { width: auto; }
.fc-empty { padding: 10px 4px; color: #bbb; font-size: 13px; }
.fc-item-add { padding: 8px 12px 12px; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
@media (max-width: 900px) {
  .fc-text { width: 100%; flex: none; }
  .fc-value { width: 100%; flex: none; min-width: 0; }
}

/* ============ 侧边栏 · CRMEB 折叠菜单 ============ */
.admin-side .side-group-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  color: var(--admin-side-text);
  font-size: 14px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s;
}
.admin-side .side-group-title:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.admin-side .side-group-title .side-icon { width: 20px; text-align: center; font-size: 16px; flex-shrink: 0; }
.admin-side .side-group-title .side-arrow { margin-left: auto; font-size: 12px; color: rgba(255, 255, 255, 0.4); transition: transform 0.2s; }
.admin-side .side-group.open .side-group-title .side-arrow { transform: rotate(90deg); }
.admin-side .side-group-items { display: none; }
.admin-side .side-group.open .side-group-items { display: block; }
.admin-side .side-group-items a {
  display: block;
  padding: 11px 24px 11px 54px;
  font-size: 13px;
  border-left: 3px solid transparent;
}
.admin-side .side-group-items a:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.admin-side .side-group-items a.active { background: var(--admin-primary); color: #fff; border-left-color: #fff; font-weight: 600; }

/* ============ 网站设置 · 页内选项卡 ============ */
.site-tab-bar { display: flex; gap: 8px; flex-wrap: wrap; }
.site-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid #e3e6ea;
  background: #fff;
  color: #555;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.site-tab:hover { border-color: var(--admin-primary); color: var(--admin-primary); }
.site-tab.active { background: var(--admin-primary); border-color: var(--admin-primary); color: #fff; font-weight: 600; }
.site-tab .st-icon { font-size: 15px; }

/* ============ B6 多规格 SKU 编辑器 ============ */
.spec-dim-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.spec-dim-row .spec-dim-name { flex: 0 0 180px; }
.spec-dim-row .spec-dim-values { flex: 1; }
.spec-dim-row input { padding: 7px 12px; border: 1px solid #d9dee5; border-radius: 6px; font-size: 13px; outline: none; box-sizing: border-box; }
.spec-dim-row input:focus { border-color: var(--admin-primary); box-shadow: 0 0 0 3px rgba(2, 86, 255, 0.08); }
.spec-dim-empty,
.sku-editor-empty { padding: 16px; text-align: center; color: #bbb; font-size: 13px; background: #fafbfc; border: 1px dashed #d9dee5; border-radius: 8px; }
.spec-dim-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.sku-matrix-table { width: 100%; border-collapse: collapse; }
.sku-matrix-table th { font-size: 12px; color: #8a919f; background: #f8f9fb; padding: 8px 10px; font-weight: 600; white-space: nowrap; }
.sku-matrix-table td { padding: 6px 10px; border-top: 1px solid #f0f2f5; vertical-align: middle; }
.sku-matrix-table input { width: 100%; padding: 5px 8px; border: 1px solid #d9dee5; border-radius: 5px; font-size: 13px; outline: none; box-sizing: border-box; }
.sku-matrix-table input:focus { border-color: var(--admin-primary); box-shadow: 0 0 0 2px rgba(2, 86, 255, 0.08); }
.sku-spec-cell { white-space: nowrap; }
.sku-spec-text { font-size: 12px; font-weight: 600; color: #282c34; }

/* ============ 风格配色编辑器（网站设置 → 风格配色） ============ */
.site-color-field .color-input-wrap { display: flex; align-items: center; gap: 10px; }
.site-color-field .color-swatch {
  width: 44px; height: 36px; padding: 2px; border: 1px solid #d9dee5; border-radius: 6px;
  background: #fff; cursor: pointer; flex: 0 0 auto;
}
.site-color-field .color-text {
  flex: 1; min-width: 0; padding: 8px 12px; border: 1px solid #d9dee5; border-radius: 6px;
  font-family: Consolas, Menlo, monospace; font-size: 13px; letter-spacing: .5px; outline: none;
  text-transform: uppercase;
}
.site-color-field .color-text:focus { border-color: var(--admin-primary); box-shadow: 0 0 0 3px rgba(2,86,255,.08); }

/* ---- 配色实时预览 ---- */
.theme-preview-wrap { margin: 4px 0 18px; }
.theme-preview-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; background: #f8f9fb; border: 1px solid #eef0f4;
  border-bottom: none; border-radius: 10px 10px 0 0;
}
.theme-preview-bar .tp-bar-title { font-size: 13px; font-weight: 600; color: #282c34; }
.theme-preview-bar .tp-presets { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: #8a919f; }
.theme-preview-bar .tp-presets .btn { padding: 4px 10px; font-size: 12px; }

.theme-preview {
  /* 预览区默认值 = 后端 themeDefaults()，JS 会用表单当前值覆盖 */
  --p-theme: #FF7A2F; --p-theme-dark: #F2631A;
  --p-theme-op: rgba(255,122,47,.08); --p-theme-light: rgba(255,122,47,.14);
  --p-grad-start: #FF9A4D; --p-grad-end: #FF6A1F;
  --p-hero-start: #5FA8F0; --p-hero-end: #CFE6FA;
  --p-price: #FF6A1F; --p-page-bg: #F4F7FB; --p-radius: 14px;
  --p-text-1: #1F2430; --p-text-2: #5A6272; --p-text-3: #98A0AE;
  max-width: 380px; margin: 0 auto; padding: 14px; background: var(--p-page-bg);
  border: 1px solid #eef0f4; border-radius: 0 0 10px 10px; color: var(--p-text-1);
}
.theme-preview .tp-hero {
  background: linear-gradient(165deg, var(--p-hero-start), var(--p-hero-end));
  border-radius: var(--p-radius); padding: 18px 16px; margin-bottom: 10px;
}
.theme-preview .tp-hero-text h3 { font-size: 22px; font-weight: 800; color: #fff; letter-spacing: 1px; text-shadow: 0 2px 8px rgba(0,40,90,.25); }
.theme-preview .tp-hero-text p { font-size: 12px; color: rgba(255,255,255,.92); margin: 6px 0 12px; }
.theme-preview .tp-btn {
  display: inline-block; padding: 7px 18px; border-radius: 999px; font-size: 13px; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, var(--p-grad-start), var(--p-grad-end));
  box-shadow: 0 4px 12px var(--p-theme-light);
}
.theme-preview .tp-notice {
  display: flex; align-items: center; gap: 8px; background: #fff; border-radius: var(--p-radius);
  padding: 10px 12px; font-size: 12px; color: var(--p-text-1); margin-bottom: 12px;
}
.theme-preview .tp-notice .tp-check {
  width: 18px; height: 18px; border-radius: 50%; flex: 0 0 auto; text-align: center; line-height: 18px;
  font-size: 11px; color: #fff; background: var(--p-theme);
}
.theme-preview .tp-notice .tp-arrow { margin-left: auto; color: var(--p-text-3); font-size: 16px; }
.theme-preview .tp-sec-title {
  display: flex; align-items: center; font-size: 15px; font-weight: 700; margin-bottom: 10px; color: var(--p-text-1);
}
.theme-preview .tp-sec-title i { width: 4px; height: 15px; border-radius: 2px; background: var(--p-theme); margin-right: 7px; }
.theme-preview .tp-sec-title .tp-more { margin-left: auto; font-size: 11px; font-weight: 400; color: var(--p-text-3); }
.theme-preview .tp-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.theme-preview .tp-card {
  position: relative; background: #fff; border-radius: var(--p-radius); padding: 22px 10px 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.theme-preview .tp-tag {
  position: absolute; top: 0; left: 0; font-size: 10px; color: #fff; padding: 2px 8px;
  border-radius: var(--p-radius) 0 var(--p-radius) 0;
  background: linear-gradient(135deg, var(--p-grad-start), var(--p-grad-end));
}
.theme-preview .tp-thumb { width: 52px; height: 52px; margin: 0 auto 8px; border-radius: 10px; background: var(--p-theme-op); }
.theme-preview .tp-name { font-size: 13px; font-weight: 600; text-align: center; color: var(--p-text-1); }
.theme-preview .tp-desc { font-size: 11px; color: var(--p-text-3); text-align: center; margin-top: 2px; }
.theme-preview .tp-price { font-size: 13px; font-weight: 700; color: var(--p-price); text-align: center; margin-top: 5px; }
.theme-preview .tp-cta {
  margin: 14px auto 10px; padding: 11px; border-radius: 999px; text-align: center;
  font-size: 15px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--p-grad-start), var(--p-grad-end));
  box-shadow: 0 6px 16px var(--p-theme-light);
}
.theme-preview .tp-tabbar {
  display: flex; background: #fff; border-radius: var(--p-radius); overflow: hidden;
}
.theme-preview .tp-tabbar span { flex: 1; text-align: center; padding: 9px 0; font-size: 11px; color: var(--p-text-3); }
.theme-preview .tp-tabbar span.active { color: var(--p-theme); font-weight: 700; }
