/* ==================================================================
   商家管理后台 · 样式体系（青叙 花艺 · 青岚墨池）
   ---------------------------------------------------------------
   【2026-11-13 去主题化】
   以前这里有 6 套主题色 × 3 种明暗模式，共 18 种组合，另有一整页
   「字体设置」可改全站字体族 / 字号 / 字重。实测结果是：
     · 18 种组合没有任何一种被完整适配过，切一次就有一批页面错色；
     · 字体设置改完，顾客端页面按新的字号重新排版，卡片挤字、按钮换行；
     · 最要命的是有人把品牌色改回别的颜色，全端品牌识别直接崩掉。
   因此本文件现在只有一套：墨池深墨绿 + 固定字族。
   要换品牌色只能改这里并发版，不再提供任何运行时切换入口。
   ================================================================== */

/* ---------------- 默认主题：青叙（品牌深青蓝 + 薄荷） ----------------
   取自品牌 logo 的取样色：#0B6A99 主色、#F2F7FB 冰蓝底、#06283A 墨青侧栏，
   辅助色 #42BCB2 / #9FE6B8 用于渐变与强调。
   需改品牌色时，优先改这里的 --primary 系列与 --bg / --sidebar。 */
:root {
  /* ---------- 主色：墨池青绿（唯一取值，无切换） ---------- */
  --primary: #6fcba6;
  --primary-dark: #4fb48c;
  --primary-light: rgba(111, 203, 166, 0.14);
  --primary-rgb: 111, 203, 166;
  --primary-grad: linear-gradient(135deg, #8fdcc0 0%, #4fb48c 100%);

  /* 品牌辅助色 */
  --brand-mint: #a3e0c6;
  --brand-mint-light: #c6f0de;
  --brand-deep: #08120f;

  --danger: #d98983;
  --danger-bg: rgba(217, 137, 131, 0.14);
  --success: #78c4a4;
  --success-bg: rgba(120, 196, 164, 0.14);
  --warning: #d9b36a;
  --warning-bg: rgba(217, 179, 106, 0.14);

  /* 表面（深墨绿） */
  --bg: #08120f;
  --card: rgba(226, 255, 242, 0.085);
  --card-2: rgba(226, 255, 242, 0.038);
  --border: rgba(196, 240, 222, 0.16);
  --border-strong: rgba(230, 255, 246, 0.30);
  --text-1: #e8f5ef;
  --text-2: #b0c8c0;
  --text-3: #7b948c;

  /* 侧栏（深玻璃） */
  --sidebar: var(--fx-glass-nav);
  --sidebar-text: var(--fx-ink);
  --sidebar-muted: var(--fx-ink2);
  --sidebar-hover: rgba(111, 203, 166, 0.12);
  --sidebar-border: var(--fx-edge);

  --overlay: rgba(4, 10, 8, 0.62);

  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.30), 0 4px 14px rgba(0, 0, 0, 0.24);
  --shadow-lg: 0 18px 40px rgba(0, 0, 0, 0.34);
}

/* 主题色切换已删除（2026-11-13）：后台只保留墨池一套，见文件头说明。 */

/* 明暗模式已删除：后台固定深墨绿，无 light/dark 切换。 */

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  /* 墨池环境光：四团青绿冷光铺在页底，玻璃卡才有东西可折射。
     background-attachment + 视口尺寸是必须的：后台页面很长，
     用百分比尺寸会把光斑按整页高度摊平，滚到中段就只剩纯色。 */
  background-color: var(--fx-bg-bottom);
  background-image:
    radial-gradient(96% 62% at 2% -14%, rgba(38, 150, 112, 0.72) 0%, rgba(38, 150, 112, 0) 100%),
    radial-gradient(86% 54% at 102% -6%, rgba(96, 196, 160, 0.42) 0%, rgba(96, 196, 160, 0) 100%),
    radial-gradient(98% 66% at 98% 106%, rgba(22, 104, 80, 0.62) 0%, rgba(22, 104, 80, 0) 100%),
    radial-gradient(54% 32% at 44% 46%, rgba(114, 206, 170, 0.20) 0%, rgba(114, 206, 170, 0) 100%),
    linear-gradient(168deg, #0d1a16 0%, #08120f 48%, #06100d 100%);
  background-size: 100vw 100vh;
  background-position: 0 0;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text-1);
  font-size: 14px;
}

#app { height: 100%; }

/* ---------------- 布局（悬浮玻璃：四边留白 12px） ---------------- */
.layout { display: flex; height: 100vh; overflow: hidden; padding: var(--fx-float); gap: var(--fx-float); }

.sidebar {
  width: 208px;
  background: var(--sidebar);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-radius: var(--fx-radius-card);
  backdrop-filter: var(--fx-blur-nav);
  -webkit-backdrop-filter: var(--fx-blur-nav);
  border: 1px solid var(--sidebar-border);
  box-shadow: var(--fx-shadow);
}
.logo {
  height: 62px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  color: var(--sidebar-text);
  font-weight: 700;
  font-size: 16px;
  border-bottom: 1px solid var(--sidebar-border);
}
.logo-mark { width: 28px; height: 28px; display: block; flex-shrink: 0; }
.logo-mark svg { width: 100%; height: 100%; display: block; }
/* 店铺 Logo（商家自己上传的图）：圆角裁切成正方形，不拉伸 */
.logo-mark img {
  width: 28px; height: 28px; display: block;
  object-fit: cover; border-radius: 7px;
  background: rgba(255, 255, 255, 0.9);
}
.logo-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; flex: 1; }
/* 店铺名可能很长（如「青叙·鲜花定制」），超出侧栏宽度时用省略号，不允许撑破布局 */
.logo-text b {
  font-size: 14px; font-weight: 600; letter-spacing: 0.02em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.logo-text i {
  font-style: normal;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.24em;
  color: var(--sidebar-muted);
}
.logo-dot {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--primary-grad);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.36);
}
.menu { flex: 1; overflow-y: auto; padding: 12px 10px; display: flex; flex-direction: column; gap: 4px; }
.menu-group-title {
  padding: 14px 12px 6px;
  font-size: 12px;
  color: var(--sidebar-muted);
}
.menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 0 14px;
  height: 42px;
  border-radius: 999px;
  color: var(--sidebar-text);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  position: relative;
  font-size: 14px;
}
.menu-item:hover { background: var(--sidebar-hover); color: var(--primary); }
.menu-item.active {
  background: var(--primary-grad);
  color: #fff;
  box-shadow: 0 6px 18px rgba(var(--primary-rgb), 0.3);
}
.menu-item .badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  border-radius: 999px;
  min-width: 20px; height: 20px;
  font-size: 12px; line-height: 20px; text-align: center;
  padding: 0 6px;
}
.menu-item.active .badge { background: rgba(255, 255, 255, 0.32); }

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

.topbar {
  height: 62px;
  margin-right: var(--fx-float);
  background: var(--fx-glass-nav);
  backdrop-filter: var(--fx-blur-nav);
  -webkit-backdrop-filter: var(--fx-blur-nav);
  border: 1px solid var(--fx-edge);
  border-radius: 18px;
  box-shadow: var(--fx-shadow);
  display: flex; align-items: center;
  padding: 0 24px;
  gap: 16px;
  flex-shrink: 0;
}
.topbar-title { font-size: 17px; font-weight: 600; flex: 1; }
.topbar-user { display: flex; align-items: center; gap: 12px; color: var(--text-2); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--primary-grad);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

.content { flex: 1; overflow-y: auto; padding: 20px 24px; }

/* ---------------- 底部常驻保存栏（店铺设置） ---------------- */
.save-bar {
  position: sticky;
  bottom: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 16px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 -6px 18px rgba(20, 40, 80, 0.08);
}
.save-bar-hint { margin-right: auto; font-size: 12px; color: var(--text-3, var(--text-2)); }


/* 主题切换器样式已删除。 */

/* ---------------- 通用 ---------------- */
/* 卡片 = 外观玻璃：半透明 + 描边 + 浮起投影；不叠 backdrop-filter
   （性能裁决：admin 同屏卡片多，blur 层留给侧栏/顶栏/弹层，见 05-施工日志） */
.card {
  background: var(--fx-glass);
  border: 1px solid var(--fx-edge);
  border-radius: var(--fx-radius-card);
  box-shadow: var(--fx-shadow);
  padding: 20px;
  margin-bottom: 16px;
}

/* 低性能/不支持 backdrop-filter 的回退：玻璃变实色（S8） */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .sidebar, .topbar { background: var(--fx-fallback); }
}
.card-title {
  font-size: 15px; font-weight: 600;
  margin-bottom: 16px;
  display: flex; align-items: center; justify-content: space-between;
}
.row { display: flex; gap: 16px; }
.col { display: flex; flex-direction: column; gap: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.flex { display: flex; align-items: center; }
.flex-1 { flex: 1; min-width: 0; }
.gap { gap: 12px; }
.right { margin-left: auto; }
.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }
.muted { color: var(--text-3); font-size: 13px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--card);
  color: var(--text-1);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn-primary {
  background: var(--primary-grad);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.28);
}
.btn-primary:hover { color: #fff; filter: brightness(1.05); }
.btn-danger { color: var(--danger); border-color: transparent; background: var(--danger-bg); }
.btn-danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-success { color: var(--success); border-color: transparent; background: var(--success-bg); }
.btn-success:hover { background: var(--success); border-color: var(--success); color: #fff; }
.btn-sm { height: 28px; padding: 0 12px; font-size: 12px; }
.btn-lg { height: 40px; padding: 0 22px; font-size: 14px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-link { border: none; background: none; color: var(--primary); padding: 0 6px; }
.btn-link:hover { text-decoration: underline; color: var(--primary); }
.btn-link.danger { color: var(--danger); }

/* 表单 */
.form-item { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.form-label .req { color: var(--danger); margin-right: 2px; }
.input, .select, .textarea {
  width: 100%;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0 12px;
  font-size: 13px;
  color: var(--text-1);
  outline: none;
  transition: border 0.15s, box-shadow 0.15s;
  background: var(--card);
  font-family: inherit;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.textarea { height: auto; padding: 10px 12px; resize: vertical; min-height: 80px; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23999' fill='none' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 30px; }
.form-row { display: flex; gap: 12px; }
.form-row > * { flex: 1; }
.form-hint { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.inline-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.inline-form .input, .inline-form .select { width: auto; min-width: 140px; }

/* 表格 */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table th { color: var(--text-3); font-weight: 500; background: var(--card-2); white-space: nowrap; }
.table tbody tr:hover { background: var(--card-2); }
.table .num { font-variant-numeric: tabular-nums; }

/* 标签 */
.tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 20px;
}
.tag-gray { background: var(--card-2); color: var(--text-3); }
.tag-primary { background: var(--primary-light); color: var(--primary); }
.tag-success { background: var(--success-bg); color: var(--success); }
.tag-warning { background: var(--warning-bg); color: var(--warning); }
.tag-danger { background: var(--danger-bg); color: var(--danger); }
.tag-info { background: var(--primary-light); color: var(--primary); }

/* 统计卡 */
.stat-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px;
}
.stat-label { font-size: 13px; color: var(--text-3); }
.stat-value { font-size: 28px; font-weight: 700; margin-top: 8px; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: 12px; color: var(--text-3); margin-top: 6px; }
.stat-card.primary {
  background: var(--primary-grad);
  color: #fff;
  border: none;
}
.stat-card.primary .stat-label, .stat-card.primary .stat-sub { color: rgba(255, 255, 255, 0.88); }
.stat-card.primary .stat-value { color: #fff; }
.stat-value.up { color: var(--success); }
.stat-value.down { color: var(--danger); }

/* 分页 */
.pagination {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 8px; margin-top: 16px; font-size: 13px; color: var(--text-2);
}
.page-btn {
  min-width: 30px; height: 30px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--text-1);
  cursor: pointer;
  font-size: 13px;
}
.page-btn.active { background: var(--primary-grad); border-color: transparent; color: #fff; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0;
  background: var(--overlay);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
}
.modal {
  background: var(--card);
  border-radius: var(--radius-lg);
  width: 560px;
  max-width: 92vw;
  max-height: 86vh;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: modal-in 0.2s ease;
}
.modal.wide { width: 760px; }
@keyframes modal-in { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}
.modal-close { cursor: pointer; color: var(--text-3); font-size: 18px; background: none; border: none; }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 12px; }

/* 图片上传 */
.upload-box {
  width: 120px; height: 120px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-3);
  font-size: 26px;
  transition: all 0.15s;
  position: relative;
  overflow: hidden;
  background: var(--card-2);
}
.upload-box:hover { border-color: var(--primary); color: var(--primary); }
.upload-box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* 店铺 Logo 必须完整显示（正方形 1:1 的品牌图不能被裁掉边缘） */
.upload-box.upload-contain img { object-fit: contain; background: #fff; }
.upload-grid { display: flex; gap: 10px; flex-wrap: wrap; }

/* 商品图 */
.product-img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--card-2); }

/* 内嵌子卡（规格编辑器等） */
.sub-card {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 12px;
}

/* 登录页 */
.login-page {
  height: 100vh;
  display: flex; align-items: center; justify-content: center;
  /* 2026-11-16 黑夜模式：原先是亮绿渐变 --primary-grad（#8fdcc0→#4fb48c），
     登录框浮在上面整页发白。改成与后台整体同一套深墨绿环境光，
     卡片才有"暗玻璃"的层次，不再发白。 */
  background-color: #08120f;
  background-image:
    radial-gradient(90% 60% at 6% -12%, rgba(38, 150, 112, 0.42) 0%, rgba(38, 150, 112, 0) 100%),
    radial-gradient(80% 52% at 102% -6%, rgba(96, 196, 160, 0.22) 0%, rgba(96, 196, 160, 0) 100%),
    radial-gradient(92% 64% at 98% 106%, rgba(22, 104, 80, 0.38) 0%, rgba(22, 104, 80, 0) 100%),
    linear-gradient(168deg, #0d1a16 0%, #08120f 48%, #06100d 100%);
  position: relative;
  overflow: hidden;
}
.login-page::before,
.login-page::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  /* 暗底上用青绿微光做氛围，不再是刺眼的白斑 */
  background: rgba(146, 224, 190, 0.055);
}
.login-page::before { width: 460px; height: 460px; top: -180px; right: -140px; }
.login-page::after { width: 320px; height: 320px; bottom: -140px; left: -100px; }
.login-card {
  position: relative;
  z-index: 1;
  width: 390px;
  /* 黑夜模式：深色玻璃卡（原来是半透明白，叠在亮绿上就发白） */
  background: rgba(18, 33, 28, 0.72);
  border: 1px solid rgba(150, 220, 195, 0.16);
  border-radius: 20px;
  padding: 40px 36px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}
.login-title { font-size: 22px; font-weight: 700; text-align: center; color: var(--text-1); }
.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}
.login-mark { width: 44px; height: 44px; display: block; flex-shrink: 0; }
.login-mark svg { width: 100%; height: 100%; display: block; }
.login-mark img {
  width: 44px; height: 44px; display: block;
  object-fit: cover; border-radius: 10px;
  border: 1px solid var(--border);
  /* 黑夜模式：白底方块在暗卡上很扎眼，改深色衬底 */
  background: rgba(226, 255, 242, 0.08);
}
.login-brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.login-brand-text b { font-size: 20px; font-weight: 600; letter-spacing: 0.08em; color: var(--text-1); }
.login-brand-text i {
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--text-3);
}
.login-sub { text-align: center; color: var(--text-3); font-size: 13px; margin: 8px 0 28px; }
.login-input { margin-bottom: 16px; }
.login-input .input { height: 44px; }
/* 黑夜模式：背景转深后，按钮改回品牌亮绿渐变才跳得出来 */
.login-btn {
  width: 100%; height: 44px; font-size: 15px;
  background: var(--primary-grad);
  box-shadow: 0 12px 28px rgba(var(--primary-rgb), 0.30);
}
.login-btn:hover { background: var(--primary-grad); filter: brightness(1.06); }
.login-tip { margin-top: 18px; text-align: center; font-size: 12px; color: var(--text-3); }

/* toast */
.toast {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  background: rgba(22, 40, 61, 0.88);
  color: #fff;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 13px;
  z-index: 3000;
  animation: toast-in 0.2s ease;
}
@keyframes toast-in { from { transform: translate(-50%, -10px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.toast.error { background: var(--danger); }
.toast.success { background: var(--success); }

/* 空状态 */
.empty-state { text-align: center; padding: 60px 0; color: var(--text-3); }
.empty-state .icon { font-size: 40px; margin-bottom: 12px; opacity: 0.4; }

/* 图表 */
.chart { width: 100%; height: 320px; }
.chart-sm { width: 100%; height: 260px; }

/* loading */
.loading-bar { text-align: center; padding: 40px; color: var(--text-3); }

/* 订单备注 */
.remark-box {
  background: var(--warning-bg);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--warning);
}

@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .sidebar { width: 64px; }
  .sidebar .logo span, .menu-item span, .menu-group-title { display: none; }
}

/* 预设色板已删除。 */

/* 字体设置页（ViewFont）样式已删除：后台不再提供字体调节入口。 */

/* ---------------- 第三方平台接入管理 ---------------- */
.pf-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; line-height: 1.5; }
.pf-ops { white-space: nowrap; }
.pf-ops .btn-link + .btn-link { margin-left: 10px; }

.pf-preset {
  margin-bottom: 18px; padding: 12px 14px;
  border-radius: var(--radius); background: var(--card-2);
  border: 1px solid var(--border);
}
.pf-preset-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 8px; }
.pf-preset-list .btn { height: 30px; padding: 0 12px; font-size: 13px; }
.pf-tip { font-size: 12px; color: var(--text-3); line-height: 1.7; }
.pf-tip code {
  background: var(--primary-light); color: var(--primary-dark);
  padding: 1px 5px; border-radius: 4px; font-size: 12px;
}

.pf-extra-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.pf-extra-row .input { flex: 1 1 0; min-width: 0; }
.pf-eq { flex: none; color: var(--text-3); }
.pf-enable { margin-top: 18px; }

@media (max-width: 760px) {
  .pf-extra-row { flex-wrap: wrap; }
  .pf-extra-row .input { flex: 1 1 130px; }
  .pf-preset-list .btn { flex: 1 1 auto; }
}

/* ==================================================================
   分类管理：首页左侧栏目 + 分类折叠树
   ================================================================== */

.ct-title-left,
.ct-title-right { display: inline-flex; align-items: center; gap: 10px; }
.ct-title-left { font-size: 15px; font-weight: 600; }

/* ---------------- 首页左侧栏目 ---------------- */
.nt-list { display: flex; flex-direction: column; gap: 6px; }
.nt-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card-2);
}
.nt-item.nt-missing { border-color: var(--danger); background: var(--danger-bg); }
.nt-idx {
  width: 22px; height: 22px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--primary-light); color: var(--primary);
  font-size: 12px; line-height: 22px; text-align: center;
}
.nt-name { font-size: 14px; color: var(--text-1); }
.nt-kind { font-size: 12px; color: var(--text-3); }
.nt-ops {
  margin-left: auto;
  display: flex; align-items: center; gap: 2px;
  white-space: nowrap;
}
.nt-ops .btn-link[disabled] {
  color: var(--text-3); opacity: 0.35; cursor: not-allowed;
}
.nt-ops .btn-link[disabled]:hover { text-decoration: none; }

.nt-add {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 14px; padding-top: 14px;
  border-top: 1px dashed var(--border);
}
.nt-chip {
  border: 1px solid var(--border-strong);
  background: var(--card); color: var(--text-2);
  border-radius: 999px; padding: 4px 12px;
  font-size: 13px; cursor: pointer;
  transition: all 0.15s;
}
.nt-chip:hover {
  border-color: var(--primary); color: var(--primary);
  background: var(--primary-light);
}
.nt-foot { margin-top: 16px; display: flex; gap: 10px; }

/* ---------------- 分类折叠树 ---------------- */
.cat-tree { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.ct-group + .ct-group { border-top: 1px solid var(--border); }
.ct-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; min-height: 46px;
}
.ct-root { background: var(--card-2); }
.ct-root:hover { background: var(--primary-light); }
.ct-child { padding-left: 46px; }
.ct-child:hover { background: var(--card-2); }
.ct-none { color: var(--text-3); font-size: 13px; }
.ct-caret {
  width: 22px; height: 22px; flex-shrink: 0;
  border: none; border-radius: 6px; padding: 0;
  background: var(--card); color: var(--text-2);
  font-size: 12px; line-height: 22px;
  cursor: pointer; transition: all 0.15s;
}
.ct-caret:hover { background: var(--primary); color: #fff; }
.ct-name { font-size: 14px; font-weight: 500; color: var(--text-1); }
.ct-branch { color: var(--text-3); font-size: 13px; }
.ct-count, .ct-sort { font-size: 13px; color: var(--text-3); }
.ct-ops { margin-left: auto; display: flex; gap: 4px; white-space: nowrap; }

@media (max-width: 760px) {
  .ct-row { flex-wrap: wrap; gap: 6px; }
  .ct-ops { margin-left: 0; width: 100%; }
  .nt-add { flex-direction: column; align-items: flex-start; }
  .ct-title-right { flex-wrap: wrap; }
  .ct-title-right .input { width: 100% !important; }
}

/* =============================================================================
   员工管理（三端集成：商家端 / 骑手端）
   —— 顶部统计条、分区 tab、邀请码、骑手实时地图、二维码弹窗
   ============================================================================= */

/* 顶部四个统计小卡 */
.stat-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.stat-item {
  flex: 1;
  min-width: 108px;
  background: var(--card-2);
  border-radius: 10px;
  padding: 12px 14px;
  text-align: center;
}
.stat-num { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat-num.warn { color: var(--warning); }
.stat-item .stat-label { margin-top: 4px; }

/* 分区 tab */
.tab-bar { display: flex; gap: 6px; flex-wrap: wrap; }
.tab-item {
  position: relative;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-3);
  background: var(--card-2);
  user-select: none;
  transition: color 0.15s, background 0.15s;
}
.tab-item:hover { color: var(--primary); }
.tab-item.active { background: var(--primary); color: #fff; }
.tab-badge {
  display: inline-block;
  margin-left: 6px;
  min-width: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  vertical-align: 1px;
}
.tab-badge.ok { background: var(--success); }
.tab-item.active .tab-badge { background: rgba(255, 255, 255, 0.32); }

/* 员工 / 邀请码 / 验证码表格 */
.staff-table td { vertical-align: middle; }
.staff-table .sub { margin-top: 2px; }
.staff-ops { white-space: nowrap; }
.staff-ops .btn-link { margin-right: 8px; }
.staff-ops .btn-link:last-child { margin-right: 0; }
.btn-link.ok { color: var(--success); }
.btn-link.ok:hover { color: var(--success); }

/* 等宽字体：邀请码 / 验证码 */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace; }
.invite-code { font-size: 15px; letter-spacing: 2px; }

/* 提示条（测试模式警示等） */
.staff-warn {
  background: var(--warning-bg);
  color: var(--warning);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.75;
  margin-bottom: 12px;
}

/* 骑手实时地图 */
.map-box {
  height: 420px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--card-2);
  border: 1px solid var(--border);
}
/* Leaflet 自带控件在深色主题下需要一点对比度 */
.map-box .leaflet-control-zoom a { color: #333; }
.map-box .leaflet-tooltip { font-size: 12px; }

/* 二维码弹窗 */
.qr-modal { text-align: center; }
.qr-box {
  display: inline-block;
  padding: 10px;
  background: #fff;
  border-radius: 10px;
  margin: 10px 0 6px;
  line-height: 0;
}
.qr-box img, .qr-box canvas { display: block; }
.qr-code-text { font-size: 24px; font-weight: 700; letter-spacing: 4px; margin: 6px 0; }
.modal-actions { display: flex; justify-content: center; gap: 12px; margin-top: 18px; }

@media (max-width: 760px) {
  .map-box { height: 300px; }
  .staff-ops .btn-link { margin-right: 6px; }
}


/* 接口配置页 */
.switch-line { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.switch-line input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); }
.secret-line { display: flex; align-items: center; gap: 8px; }
.ok-line { color: var(--success); }

/* ==================================================================
   客服消息 · 站内聊天工作台
   ------------------------------------------------------------------
   左列表 296px + 右对话，整体撑满可视区（calc 减去顶栏与内边距）。
   颜色全部走主题变量，切换主题/明暗时自动跟随。
   ================================================================== */
.chat-wrap {
  display: flex;
  height: calc(100vh - 150px);
  min-height: 480px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

/* ---------------- 左侧会话列表 ---------------- */
.chat-list {
  width: 296px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: var(--card-2);
}
.chat-list-head {
  padding: 12px;
  border-bottom: 1px solid var(--border);
}
.chat-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-3);
}
.chat-check {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.chat-items {
  flex: 1;
  overflow-y: auto;
}
.chat-item {
  display: flex;
  gap: 10px;
  padding: 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.chat-item:hover { background: var(--card); }
.chat-item.active {
  background: var(--primary-light);
  border-left: 3px solid var(--primary);
  padding-left: 9px;
}

.chat-ava {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}
.chat-ava img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
/* 未读红点：贴在头像右上角外侧，不遮挡人脸 */
.chat-dot {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-style: normal;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--card);
}

.chat-item-main { flex: 1; min-width: 0; }
.chat-item-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.chat-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-item-time {
  font-size: 11px;
  color: var(--text-3);
  flex-shrink: 0;
}
.chat-item-preview {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-me-tag { color: var(--text-2); }

/* ---------------- 右侧对话 ---------------- */
.chat-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.chat-main-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.chat-main-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
}

.chat-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.chat-msg {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 72%;
}
/* 商家自己的回复靠右，顾客靠左 —— 与小程序端视角一致 */
.chat-msg.mine { align-self: flex-end; align-items: flex-end; }
.chat-msg.theirs { align-self: flex-start; align-items: flex-start; }

.chat-bubble {
  padding: 9px 13px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.chat-msg.theirs .chat-bubble {
  background: var(--card);
  color: var(--text-1);
  border: 1px solid var(--border);
  border-top-left-radius: 3px;
}
.chat-msg.mine .chat-bubble {
  background: var(--primary);
  color: #fff;
  border-top-right-radius: 3px;
}
.chat-bubble.img { padding: 4px; background: var(--card); border: 1px solid var(--border); }
.chat-bubble.img img {
  display: block;
  max-width: 220px;
  border-radius: 7px;
}
.chat-msg-time {
  font-size: 11px;
  color: var(--text-3);
  padding: 0 2px;
}

.chat-editor {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--card);
}
.chat-textarea {
  flex: 1;
  min-height: 60px;
  max-height: 140px;
  resize: vertical;
  line-height: 1.6;
  font-family: inherit;
}

.chat-blank {
  padding: 24px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--text-3);
}
.chat-blank-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   青叙玻璃 token（council/flower-ui-v2/01-标准卡 第二/三节）
   与 miniapp / 三端 uni.scss 同源，禁止改值
   ============================================================ */
:root {
  --fx-primary: #6fcba6;
  --fx-primary-dark: #4fb48c;
  --fx-sky: #7fd8be;
  --fx-mint: #a3e0c6;
  --fx-ink: #e8f5ef;
  --fx-ink2: #b0c8c0;
  --fx-bg-top: #0d1a16;
  --fx-bg-bottom: #08120f;
  --fx-glass: rgba(226, 255, 242, 0.085);
  --fx-glass-nav: rgba(8, 20, 17, 0.76);
  --fx-edge: rgba(196, 240, 222, 0.16);
  --fx-edge-top: rgba(230, 255, 246, 0.30);
  --fx-blur-card: blur(28px) saturate(150%);
  --fx-blur-nav: blur(28px) saturate(150%);
  --fx-radius-card: 18px;
  --fx-radius-card-sm: 14px;
  --fx-float: 12px;
  --fx-shadow: 0 18px 40px rgba(0, 0, 0, 0.30);
  --fx-fallback: rgba(8, 20, 17, 0.92);
  --fx-danger-dot: #d98983;
}

/* ---------------- 品牌主色：只读展示（不可编辑） ---------------- */
.brand-locked {
  display: inline-flex; align-items: center; gap: 10px;
  height: 38px; padding: 0 14px;
  border: 1px dashed rgba(160, 235, 208, 0.30);
  border-radius: 9px;
  background: rgba(111, 203, 166, 0.08);
}
.bl-dot {
  width: 18px; height: 18px; border-radius: 6px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 1px 4px rgba(0, 0, 0, 0.30);
}
.bl-name { font-size: 13px; font-weight: 600; color: var(--text-1); }
.bl-code { font-size: 12px; color: var(--text-3); font-family: 'SF Mono', Menlo, Consolas, monospace; letter-spacing: .04em; }
.bl-tag {
  font-size: 11px; padding: 2px 8px; border-radius: 5px;
  color: var(--primary); background: rgba(111, 203, 166, 0.14);
  border: 1px solid rgba(111, 203, 166, 0.26);
}

/* ==================================================================
   白天模式（data-mode="light"）· 2026-11-14 新增
   --------------------------------------------------------------
   背景：后台原来是「墨池深墨绿」单套，用户白天看觉得刺眼（深底 + 亮字），
   要求默认白天。这里不改任何结构，只覆盖同一批 CSS 变量 + body 环境光，
   夜间（data-mode="dark" 或未匹配）仍然是原来那套，视觉不变。

   为什么用属性选择器而不是 :root：
   html[data-mode="light"] 特异性 0-1-1，高于 :root 的 0-1-0，
   所以无论变量块在文件哪个位置，这套都能稳赢，不需要 !important。
   ================================================================== */
html[data-mode="light"] {
  /* ---------- 主色：白天用实色青绿，深绿做强调 ---------- */
  --primary: #2E7D63;
  --primary-dark: #1B5340;
  --primary-light: rgba(46, 125, 99, 0.10);
  --primary-rgb: 46, 125, 99;
  --primary-grad: linear-gradient(135deg, #357F66 0%, #123A2E 100%);

  --brand-mint: #7FBFA8;
  --brand-mint-light: #CFE9DE;
  --brand-deep: #123A2E;

  --danger: #C0392B;
  --danger-bg: rgba(192, 57, 43, 0.10);
  --success: #2E7D63;
  --success-bg: rgba(46, 125, 99, 0.10);
  --warning: #B45309;
  --warning-bg: rgba(180, 83, 9, 0.10);

  /* ---------- 表面：白卡 + 浅绿灰底 ---------- */
  --bg: #EFF3EE;
  --card: #FFFFFF;
  --card-2: #F7FAF8;
  --border: rgba(16, 35, 28, 0.10);
  --border-strong: rgba(16, 35, 28, 0.18);
  --text-1: #10231C;
  --text-2: #455C54;
  --text-3: #6E857C;

  --overlay: rgba(16, 35, 28, 0.38);
  --shadow: 0 1px 3px rgba(18, 50, 38, 0.06), 0 4px 14px rgba(18, 50, 38, 0.08);
  --shadow-lg: 0 18px 40px rgba(18, 50, 38, 0.12);

  /* ---------- 玻璃层（侧栏 / 顶栏 / 卡片） ---------- */
  --fx-ink: #10231C;
  --fx-ink2: #5A7168;
  --fx-bg-top: #F7FAF8;
  --fx-bg-bottom: #EEF3EF;
  --fx-glass: rgba(255, 255, 255, 0.86);
  --fx-glass-nav: rgba(255, 255, 255, 0.88);
  --fx-edge: rgba(16, 35, 28, 0.10);
  --fx-edge-top: rgba(255, 255, 255, 0.92);
  --fx-shadow: 0 18px 40px rgba(18, 50, 38, 0.10);
  --fx-fallback: rgba(255, 255, 255, 0.94);

  --sidebar: rgba(255, 255, 255, 0.88);
  --sidebar-text: #10231C;
  --sidebar-muted: #6E857C;
  --sidebar-hover: rgba(46, 125, 99, 0.08);
  --sidebar-border: rgba(16, 35, 28, 0.08);
}

/* body 环境光：深色那套是「墨汁打底 + 青绿光斑」，白天改成「宣纸打底 + 极淡薄荷光斑」 */
html[data-mode="light"] body {
  background-color: #EEF3EF;
  background-image:
    radial-gradient(92% 58% at 2% -12%, rgba(94, 178, 146, 0.20) 0%, rgba(94, 178, 146, 0) 100%),
    radial-gradient(84% 52% at 102% -4%, rgba(140, 205, 180, 0.18) 0%, rgba(140, 205, 180, 0) 100%),
    radial-gradient(96% 62% at 98% 106%, rgba(72, 150, 122, 0.14) 0%, rgba(72, 150, 122, 0) 100%),
    linear-gradient(168deg, #F8FBF9 0%, #EFF3EE 52%, #E9F0EB 100%);
  color: var(--text-1);
}

/* 表格 / 输入框在白天需要实底，否则透出背景光斑发花 */
html[data-mode="light"] .table th {
  background: #F3F7F4;
  color: var(--text-2);
}
html[data-mode="light"] .table tr:hover td { background: #F7FAF8; }
html[data-mode="light"] .input,
html[data-mode="light"] select.input,
html[data-mode="light"] textarea.input {
  background: #FFFFFF;
  border-color: rgba(16, 35, 28, 0.14);
  color: var(--text-1);
}
html[data-mode="light"] .input::placeholder { color: #9AAFA6; }
html[data-mode="light"] .modal-card,
html[data-mode="light"] .drawer { background: #FFFFFF; }
