/* ============================================================
   吉客π.AI自动化 — 后台工作台
   独立样式表：后台是应用型界面，不复用站点的卡片/角标组件，
   避免 .card / .chip 等站点类名互相污染。
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --accent: #6d5cf6;
  --accent-soft: #f3f1ff;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --shadow-sm: 0 1px 2px rgba(15, 19, 25, .05);

  --dash-side: #eef1f8;
  --dash-canvas: #f6f7f9;
  --dash-card: #ffffff;
  --dash-line: #e5e7eb;
  --dash-line-soft: #f1f3f4;
  --dash-ink: #202124;
  --dash-ink-2: #5f6368;
  --dash-ink-3: #9aa0a6;
  --dash-teal: #00b8a9;
  --dash-green: #0e9f6e;
  --dash-green-bg: #e6f4ea;
  --dash-amber: #b06000;
  --dash-amber-bg: #fef7e0;
  --dash-red: #d93025;
  --dash-red-bg: #fce8e6;
  --dash-radius: 10px;
  --side-w: 256px;
}

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

body.dash-body {
  margin: 0;
  height: 100%;
  background: var(--dash-canvas);
  color: var(--dash-ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
               "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
               sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

img, svg { display: block; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }
button { font: inherit; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }

/* ============================ 布局 ============================ */

.dash {
  position: relative;
  display: flex;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* ============================ 侧边栏 ============================ */

.dash-side {
  flex: 0 0 var(--side-w);
  width: var(--side-w);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 14px 16px;
  background: var(--dash-side);
  border-right: 1px solid rgba(15, 19, 25, .04);
  overflow: hidden;
  z-index: 30;
  transition: flex-basis .22s var(--ease), width .22s var(--ease);
}

/* 三段式侧栏：品牌固定顶部 + 导航区滚动 + 底部账户条目固定（不随滚动消失） */
.side-brand {
  flex-shrink: 0;
  margin-bottom: 16px;
}

.side-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}
.side-main:hover { scrollbar-color: #d9dce3 transparent; }

.side-foot {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 4px;
}

.side-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 6px;
  color: var(--dash-ink);
  cursor: default;
  user-select: none;
}

.side-brand-mark {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 10px -4px rgba(109, 92, 246, .6);
}

.side-brand-mark svg { width: 20px; height: 20px; }

.side-brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.side-brand-text strong { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.side-brand-text em {
  font-style: normal;
  font-size: 11px;
  color: var(--dash-ink-3);
  letter-spacing: .04em;
}

.side-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }

.side-item {
  display: flex;
  align-items: center;
  gap: 11px;
  height: 40px;
  padding: 0 14px;
  border-radius: 22px;
  color: var(--dash-ink);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: background .18s var(--ease), color .18s var(--ease);
}

.side-item svg { width: 19px; height: 19px; flex: 0 0 19px; color: var(--dash-ink-2); transition: color .18s var(--ease); }

.side-item:hover { background: rgba(109, 92, 246, .08); }
.side-item:hover svg { color: var(--accent); }

.side-item.is-active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 16px -8px rgba(109, 92, 246, .95);
}

.side-item.is-active svg { color: #fff; }

/* 侧栏底部账户条目：圆头像 + 用户名 + 右箭头（参考信息源条目样式） */
.side-profile {
  height: 48px;
  padding: 0 12px;
  border-radius: 12px;
}

.side-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  overflow: hidden;
  background: #f1f3f4;
}
.side-avatar svg,
.side-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }

.side-profile-name {
  flex: 1;
  min-width: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--dash-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-profile-chev {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  color: #c2c6cf;
  transition: transform .18s var(--ease), color .18s var(--ease);
}

.side-profile:hover { background: #f2f0ff; }
.side-profile:hover .side-profile-chev { color: var(--accent); transform: translateX(2px); }

/* 选中态：浅紫底、文字保持深色（不用蓝底白字） */
.side-profile.is-active { background: #f2f0ff; color: var(--dash-ink); box-shadow: none; }
.side-profile.is-active .side-profile-name { color: var(--dash-ink); }
.side-profile.is-active .side-profile-chev { color: var(--accent); }

/* 折叠模式：只留头像 */
body.side-collapsed .side-profile { justify-content: center; padding: 0; }
body.side-collapsed .side-item > .side-avatar { display: block; }
body.side-collapsed .side-profile-name,
body.side-collapsed .side-profile-chev { display: none; }

/* ============================ 侧栏折叠 ============================ */

/* 折叠按钮：侧栏底部（参考有道翻译），方形描边样式 */
.side-toggle {
  flex-shrink: 0;
  align-self: flex-end;
  margin: 0;
  width: 36px;
  height: 30px;
  border: 1px solid var(--dash-line);
  border-radius: 8px;
  background: #fff;
  color: var(--dash-ink-2);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  transition: color .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
}
.side-toggle svg { width: 15px; height: 15px; transition: transform .22s var(--ease); }
.side-toggle:hover { color: var(--accent); border-color: #d8d3ff; }

/* 收起态：68px 窄栏，只留图标 */
body.side-collapsed { --side-w: 68px; }
body.side-collapsed .side-brand { justify-content: center; padding: 0; }
body.side-collapsed .side-brand-text { display: none; }
body.side-collapsed .side-item { position: relative; justify-content: center; padding: 0; gap: 0; }
body.side-collapsed .side-item > span { display: none; }
body.side-collapsed .side-badge {
  position: absolute;
  top: 3px;
  right: 9px;
  margin: 0;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  font-size: 9px;
}
body.side-collapsed .pro-dot {
  position: absolute;
  top: 5px;
  right: 12px;
  margin: 0;
  width: 7px;
  height: 7px;
  padding: 0;
  font-size: 0;
  overflow: hidden;
}
body.side-collapsed .side-toggle svg { transform: rotate(180deg); }
/* 收起后按钮居中留在底部 */
body.side-collapsed .side-toggle { align-self: center; margin: 0; }

/* ============================ 主区域 ============================ */

.dash-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--dash-canvas);
}

.dash-top {
  flex: 0 0 64px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 22px;
  background: #fff;
  border-bottom: 1px solid var(--dash-line);
  z-index: 20;
}

.top-burger {
  display: none;
  width: 36px;
  height: 36px;
  border: 1px solid var(--dash-line);
  border-radius: 9px;
  background: #fff;
  color: var(--dash-ink-2);
  cursor: pointer;
}
.top-burger svg { width: 18px; height: 18px; margin: 0 auto; }

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 320px;
  max-width: 42vw;
  height: 40px;
  padding: 0 14px;
  border-radius: 20px;
  background: #f1f3f4;
  color: var(--dash-ink-3);
  transition: box-shadow .2s var(--ease), background .2s var(--ease);
}

.top-search svg { width: 17px; height: 17px; flex: 0 0 17px; }
.top-search:focus-within { background: #fff; box-shadow: 0 0 0 1.5px rgba(109, 92, 246, .45); }

.top-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 13px;
  color: var(--dash-ink);
  outline: none;
}

.top-search input::placeholder { color: var(--dash-ink-3); }
.top-search input::-webkit-search-cancel-button { -webkit-appearance: none; }

.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.top-notify { position: relative; }

.top-icon {
  position: relative;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--dash-ink-2);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .18s var(--ease);
}
.top-icon svg { width: 20px; height: 20px; }
.top-icon:hover { background: #f1f3f4; }

.top-icon .dot {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ea4335;
  box-shadow: 0 0 0 2px #fff;
}

.notify-panel {
  position: absolute;
  top: 46px;
  right: 0;
  width: 296px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--dash-line);
  border-radius: 12px;
  box-shadow: 0 18px 40px -16px rgba(15, 19, 25, .28);
  z-index: 40;
}

.notify-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px 8px;
  font-size: 13px;
  color: var(--dash-ink);
}
.notify-head span { font-size: 11.5px; color: var(--dash-ink-3); }

.notify-item {
  display: block;
  padding: 9px 8px;
  border-radius: 8px;
  transition: background .16s var(--ease);
}
.notify-item:hover { background: #f7f7fb; }
.notify-item b { display: block; font-size: 12.5px; font-weight: 600; color: var(--dash-ink); }
.notify-item span { display: block; font-size: 12px; color: var(--dash-ink-2); margin-top: 1px; }
.notify-item em { display: block; font-style: normal; font-size: 11px; color: var(--dash-ink-3); margin-top: 3px; }

.top-avatar { width: 34px; height: 34px; border-radius: 50%; overflow: hidden; flex: 0 0 34px; }
.top-avatar svg,
.top-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }

/* 顶栏退出按钮：右上角胶囊形态，悬停转红 */
.top-logout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--dash-line);
  border-radius: 18px;
  background: #fff;
  color: var(--dash-ink-2);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  flex: 0 0 auto;
  transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}

.top-logout svg { width: 16px; height: 16px; flex: 0 0 16px; }
.top-logout:hover { background: var(--dash-red-bg); color: var(--dash-red); border-color: #f6cfcb; }
.top-logout:active { transform: translateY(.5px); }

/* 窄屏只保留退出图标，避免挤压语言与头像 */
@media (max-width: 1100px) {
  .top-logout { width: 36px; padding: 0; justify-content: center; border-radius: 9px; }
  .top-logout span { display: none; }
}

/* ============================ 内容容器 ============================ */

.dash-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 24px 26px 40px;
  outline: none;
  /* 默认透明，悬停才显色（Firefox） */
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}
.dash-content:hover { scrollbar-color: #d9dce3 transparent; }

/* 侧栏 / 内容区滚动条：默认完全透明（看不见），鼠标移上去才显示 */
.side-main::-webkit-scrollbar,
.dash-content::-webkit-scrollbar { width: 10px; }
.side-main::-webkit-scrollbar-track,
.dash-content::-webkit-scrollbar-track { background: transparent; }
.side-main::-webkit-scrollbar-thumb,
.dash-content::-webkit-scrollbar-thumb {
  background-color: transparent;
  border-radius: 6px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.side-main:hover::-webkit-scrollbar-thumb,
.dash-content:hover::-webkit-scrollbar-thumb {
  background-color: #d9dce3;
}
.side-main:hover::-webkit-scrollbar-thumb:hover,
.dash-content:hover::-webkit-scrollbar-thumb:hover { background-color: #c3c8d2; }

.view-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.view-head h1 {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -.015em;
  color: var(--dash-ink);
}

.view-head p { margin-top: 5px; font-size: 13px; color: var(--dash-ink-2); }

.view-head .head-actions { display: flex; align-items: center; gap: 10px; }

/* ---------- 总览页天气（城市名可点击切换） ---------- */
.wx-city {
  display: inline-flex; align-items: center; gap: 1px;
  padding: 0; border: 0; background: none; font: inherit;
  color: var(--accent); font-weight: 600; cursor: pointer; border-radius: 4px;
}
.wx-city:hover { text-decoration: underline; text-underline-offset: 2px; }
.wx-city svg { width: 14px; height: 14px; opacity: .65; }
.wx-desc { margin-left: 2px; }
.wx-temp { margin-left: 4px; font-weight: 600; }
.wx-pending { color: var(--dash-ink-3); }
.wx-edit { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; vertical-align: middle; }
.wx-input {
  height: 26px; width: 158px; padding: 0 8px;
  border: 1px solid var(--dash-line); border-radius: 6px;
  font: inherit; font-size: 12.5px; color: var(--dash-ink); background: #fff; outline: none;
}
.wx-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.wx-btn {
  height: 26px; padding: 0 10px; border: 1px solid var(--dash-line); border-radius: 6px;
  background: #fff; color: var(--dash-ink-2); font: inherit; font-size: 12.5px; cursor: pointer;
}
.wx-btn:hover { border-color: var(--accent); color: var(--accent); }
.wx-btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.wx-btn--primary:hover { color: #fff; opacity: .9; }

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .15s var(--ease), background .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease);
}

.btn svg { width: 16px; height: 16px; }
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 8px 18px -10px rgba(109, 92, 246, .95); }
.btn--primary:hover { background: #5b49ef; }

.btn--ghost { background: #fff; border-color: var(--dash-line); color: var(--dash-ink-2); }
.btn--ghost:hover { border-color: #d7d2ff; color: var(--accent); }

.btn--sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; }

.btn:disabled,
.btn:disabled:hover {
  opacity: .42;
  cursor: not-allowed;
  box-shadow: none;
  border-color: var(--dash-line);
  color: var(--dash-ink-3);
  background: #fff;
}
.btn:disabled:active { transform: none; }

.btn--link {
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  font-size: 13px;
}
.btn--link:hover { text-decoration: underline; }

/* ---------- 卡片 ---------- */

.card {
  background: var(--dash-card);
  border: 1px solid var(--dash-line);
  border-radius: var(--dash-radius);
  box-shadow: 0 1px 2px rgba(24, 25, 28, .04);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 0;
}

.card-head h2 { font-size: 14.5px; font-weight: 700; color: var(--dash-ink); }
.card-head .card-sub { font-size: 12px; color: var(--dash-ink-3); }

/* ---------- KPI ---------- */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.kpi {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi-top span { font-size: 12.5px; color: var(--dash-ink-2); }

.kpi-glyph {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #f3f1ff;
  color: var(--accent);
  display: grid;
  place-items: center;
}
.kpi-glyph svg { width: 15px; height: 15px; }

.kpi-num {
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--dash-ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.kpi-foot { display: flex; align-items: center; gap: 8px; }

.delta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 11px;
  font-size: 11.5px;
  font-weight: 600;
}
.delta svg { width: 11px; height: 11px; }
.delta--up { background: var(--dash-green-bg); color: var(--dash-green); }
.delta--down { background: var(--dash-red-bg); color: var(--dash-red); }
.kpi-foot em { font-style: normal; font-size: 11.5px; color: var(--dash-ink-3); }

/* ---------- 图表 + 快捷操作 ---------- */

.dash-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 306px;
  gap: 14px;
  margin-top: 14px;
  align-items: stretch;
}

.chart-card { display: flex; flex-direction: column; }

.legend { display: flex; align-items: center; gap: 14px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--dash-ink-2); }
.legend i { width: 8px; height: 8px; border-radius: 50%; display: block; }
.legend i.is-visit { background: var(--accent); }
.legend i.is-call { background: var(--dash-teal); }

.chart-wrap { padding: 10px 12px 6px; flex: 1; display: flex; }
.chart-wrap svg { width: 100%; height: 224px; }

.quick-card { display: flex; flex-direction: column; padding-bottom: 10px; }

.quick-list { padding: 8px 10px 0; display: flex; flex-direction: column; }

.quick-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px;
  border-radius: 9px;
  transition: background .16s var(--ease);
}
.quick-item:hover { background: #f7f7fb; }

.quick-item .qi-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 8px;
  background: #f3f1ff;
  color: var(--accent);
  display: grid;
  place-items: center;
}
.quick-item .qi-icon svg { width: 16px; height: 16px; }

.quick-item .qi-text { flex: 1; min-width: 0; }
.quick-item .qi-text strong { display: block; font-size: 13px; font-weight: 600; color: var(--dash-ink); }
.quick-item .qi-text span { display: block; font-size: 11.5px; color: var(--dash-ink-3); }

.quick-item .qi-arrow { width: 14px; height: 14px; color: var(--dash-ink-3); flex: 0 0 14px; }

/* ---------- 表格 ---------- */

.table-card { margin-top: 14px; overflow: hidden; }

.table-scroll { overflow-x: auto; }

table.dtable {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 660px;
}

table.dtable thead th {
  padding: 11px 18px;
  background: #fafbfc;
  border-bottom: 1px solid var(--dash-line);
  color: var(--dash-ink-2);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .02em;
  text-align: left;
  white-space: nowrap;
}

table.dtable tbody td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--dash-line-soft);
  color: var(--dash-ink);
  vertical-align: middle;
}

table.dtable tbody tr:last-child td { border-bottom: 0; }
table.dtable tbody tr:hover td { background: #fcfcfe; }

table.dtable .mono {
  font-family: ui-monospace, SFMono-Regular, "Roboto Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--dash-ink-2);
  letter-spacing: -.01em;
}

.cell-title { display: flex; flex-direction: column; gap: 2px; }
.cell-title strong { font-size: 13px; font-weight: 600; }
.cell-title span { font-size: 11.5px; color: var(--dash-ink-3); }

/* 工作流列表：搭建平台标识 */
.pbadge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--dash-ink);
  white-space: nowrap;
}
.pbadge i {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  letter-spacing: -.2px;
  flex: 0 0 18px;
}
.pbadge i.is-cjk { font-size: 11px; font-weight: 600; letter-spacing: 0; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 12px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.pill--ok { background: var(--dash-green-bg); color: var(--dash-green); }
.pill--wait { background: var(--dash-amber-bg); color: var(--dash-amber); }
.pill--mute { background: #f1f3f4; color: var(--dash-ink-2); }
.pill--bad { background: var(--dash-red-bg); color: var(--dash-red); }
.pill--brand { background: #f3f1ff; color: var(--accent); }

.row-actions { display: flex; align-items: center; gap: 12px; }

.row-actions button,
.row-actions a {
  border: 0;
  background: none;
  padding: 0;
  font-size: 12.5px;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
}
.row-actions button:hover, .row-actions a:hover { text-decoration: underline; }
.row-actions .danger { color: var(--dash-red); }

/* ---------- AI 资讯订阅 ---------- */

.digest-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.digest-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
}

.digest-cover {
  flex: 0 0 148px;
  height: 92px;
  border-radius: 10px;
  color: #fff;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.digest-cover b {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: .85;
}

.digest-cover strong { font-size: 15px; font-weight: 700; line-height: 1.2; }

.digest-cover em {
  align-self: flex-start;
  padding: 1px 7px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 999px;
  font-size: 9.5px;
  font-style: normal;
  opacity: .9;
}

.digest-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }

.digest-title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--dash-ink);
  line-height: 1.45;
}

.digest-desc {
  margin: 0;
  font-size: 12.5px;
  color: var(--dash-ink-2);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.digest-meta { margin-top: auto; font-size: 11.5px; color: var(--dash-ink-3); }

.digest-card .btn { flex: 0 0 auto; }

.digest-toolbar { margin-bottom: 12px; }

/* 侧栏推广位 */
.side-item--pro { color: var(--accent); font-weight: 600; }

/* 账户设置固定在导航最底部 */
.side-item--bottom { margin-top: auto; }
.side-item--pro:hover { background: #f2f0ff; }
.side-item--pro .pro-dot {
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 9.5px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: .06em;
}


.empty {
  padding: 44px 18px;
  text-align: center;
  color: var(--dash-ink-3);
  font-size: 13px;
}

/* 空购物车里的商店入口 */
.empty-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.empty-links a {
  padding: 5px 12px;
  border: 1px solid var(--dash-line);
  border-radius: 14px;
  background: #fff;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
  transition: border-color .18s var(--ease), background .18s var(--ease);
}

.empty-links a:hover { border-color: #d7d2ff; background: #f7f5ff; }

/* ---------- 工具条 / 筛选 ---------- */

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.chip {
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--dash-line);
  border-radius: 16px;
  background: #fff;
  color: var(--dash-ink-2);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all .16s var(--ease);
}

.chip:hover { border-color: #d7d2ff; color: var(--accent); }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }

.toolbar .spacer { flex: 1; }

/* ---------- 智能体 / 收藏 卡片网格 ---------- */

.agrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: 14px;
}

.acard { padding: 16px; display: flex; flex-direction: column; gap: 10px; }

.acard-top { display: flex; align-items: center; gap: 11px; }

.acard-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 11px;
  background: #f3f1ff;
  color: var(--accent);
  display: grid;
  place-items: center;
  overflow: hidden;
  font-weight: 700;
  font-size: 15px;
}
.acard-icon img { width: 100%; height: 100%; object-fit: cover; }

.acard-id { min-width: 0; }
.acard-id strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--dash-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.acard-id span { font-size: 11.5px; color: var(--dash-ink-3); }

/* 免费智能体：与标题同行、贴卡片右缘（与「打开」按钮右对齐） */
.free-tag {
  margin-left: auto;
  align-self: flex-start;
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 6px;
  background: rgba(0, 184, 169, .1);
  color: #00907f;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
}

.acard p {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--dash-ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 40px;
}

.acard-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--dash-line-soft);
}

.acard-foot .meta { font-size: 11.5px; color: var(--dash-ink-3); }

/* 收藏页里的商品条目：价格沿用商店的红价口径 */
.fav-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  height: 22px;
  font-size: 16px;
  font-weight: 700;
  color: #e23b2e;
  letter-spacing: -0.01em;
}
.fav-price em {
  font-size: 11px;
  font-weight: 500;
  font-style: normal;
  color: var(--dash-ink-3);
  text-decoration: line-through;
}

.fav-star { color: #f59e0b; }

/* ---------- 设置表单 ---------- */

.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.set-card { padding: 18px; }
.set-card > h2 { font-size: 14.5px; font-weight: 700; margin-bottom: 4px; }
.set-card > .hint { font-size: 12px; color: var(--dash-ink-3); margin-bottom: 16px; }

/* 头像编辑 */
.avatar-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--dash-line-soft);
}

.avatar-big {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  border-radius: 50%;
  overflow: hidden;
  background: #f1f3f4;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .05);
}

.avatar-big svg,
.avatar-big img { width: 100%; height: 100%; display: block; object-fit: cover; }

.avatar-side { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.avatar-btns { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.avatar-side .avatar-tip { font-size: 12px; color: var(--dash-ink-3); line-height: 1.55; }

@media (max-width: 720px) {
  .avatar-row { gap: 12px; }
  .avatar-big { width: 60px; height: 60px; flex-basis: 60px; }
}

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label { font-size: 12.5px; font-weight: 600; color: var(--dash-ink-2); }

.field input,
.field select,
.field textarea {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #dadce0;
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: 13px;
  color: var(--dash-ink);
  outline: none;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}

.field textarea { height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.6; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(109, 92, 246, .12);
}

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--dash-line-soft);
}
.toggle-row:last-child { border-bottom: 0; }
.toggle-row strong { display: block; font-size: 13px; font-weight: 600; }
.toggle-row span { display: block; font-size: 11.5px; color: var(--dash-ink-3); margin-top: 2px; }

.switch {
  position: relative;
  width: 38px;
  height: 22px;
  flex: 0 0 38px;
  border-radius: 12px;
  background: #dadce0;
  border: 0;
  cursor: pointer;
  transition: background .2s var(--ease);
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
  transition: transform .2s var(--ease);
}
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"]::after { transform: translateX(16px); }

/* ---------- 账户设置 ---------- */

.settings-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.settings-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

@media (max-width: 960px) {
  .settings-cols { grid-template-columns: 1fr; }
}

/* 资料卡头部：圆头像 + 名字 + 右箭头（整行点击更换头像） */
.profile-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 2px 0 18px;
  margin-bottom: 18px;
  border: 0;
  border-bottom: 1px solid var(--dash-line-soft);
  border-radius: 0;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.profile-hero .avatar-big { width: 64px; height: 64px; flex-basis: 64px; }

.profile-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--dash-ink);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-btn {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 12.5px;
  color: var(--accent);
  cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }
.link-btn:disabled { color: var(--dash-ink-3); cursor: not-allowed; text-decoration: none; }

.set-foot { display: flex; justify-content: flex-end; align-items: center; gap: 14px; margin-top: 4px; }
.set-foot--spread { justify-content: space-between; }

.field input[readonly] { background: #f8f9fa; color: var(--dash-ink-2); cursor: not-allowed; }

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 14px);
  padding: 10px 18px;
  border-radius: 10px;
  background: #202124;
  color: #fff;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s var(--ease), transform .22s var(--ease);
  z-index: 90;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 遮罩 ---------- */

.side-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 19, 25, .38);
  backdrop-filter: blur(2px);
  z-index: 25;
}

/* ============================================================
   工作流商店：把工作流当商品陈列（参考电商商品卡 + 详情页）
   ============================================================ */

.wpromo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  margin-bottom: 12px;
  border-radius: 10px;
  border: 1px solid #ffe0d6;
  background: linear-gradient(96deg, #fff1ec 0%, #fff8f2 48%, #ffffff 100%);
  font-size: 12.5px;
  color: #8d3f24;
}

.wpromo-tag {
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 6px;
  background: linear-gradient(135deg, #ff5f3d, #e8402a);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
}

.wpromo-txt { flex: 1; min-width: 0; }
.wpromo-time { flex: 0 0 auto; color: #d13a22; font-weight: 600; font-variant-numeric: tabular-nums; }
.wpromo-time b {
  font-family: ui-monospace, SFMono-Regular, "Roboto Mono", Menlo, Consolas, monospace;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  background: #ffe3da;
}

/* 排序分段 */

.wsort {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 9px;
  background: #f1f3f4;
}

.wsort button {
  height: 26px;
  padding: 0 11px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--dash-ink-2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .16s var(--ease), color .16s var(--ease);
}

.wsort button:hover { color: var(--accent); }
.wsort button.is-active { background: #fff; color: var(--accent); box-shadow: 0 1px 2px rgba(15, 19, 25, .1); }

/* 商品网格 */

.wgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  gap: 14px;
}

.wcard {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--dash-line);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}

.wcard:hover {
  transform: translateY(-2px);
  border-color: #dcd8f8;
  box-shadow: 0 16px 30px -20px rgba(24, 25, 28, .45);
}

.wcover { position: relative; aspect-ratio: 16 / 10.5; overflow: hidden; background: #14162a; }
.wcover svg { width: 100%; height: 100%; transition: transform .5s var(--ease); }
.wcard:hover .wcover svg { transform: scale(1.035); }

.wflag {
  position: absolute;
  top: 10px;
  left: 10px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .01em;
  color: #fff;
}

.wflag--hot { background: linear-gradient(135deg, #ff5f3d, #e8402a); }
.wflag--new { background: rgba(255, 255, 255, .93); color: #202124; }
.wflag--off { background: rgba(17, 19, 24, .78); color: #fff; }

.wcart {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(17, 20, 38, .34);
  color: #fff;
  cursor: pointer;
  transition: background .16s var(--ease), color .16s var(--ease);
}

.wcart svg { width: 15px; height: 15px; }
.wcart:hover { background: rgba(17, 20, 38, .58); transform: translateY(-1px); }
.wcart.is-on { background: #fff; color: var(--accent); }
.wcart.is-on:hover { background: #fff; }
.wcart.is-on svg path { stroke-width: 2; }

.wbody {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 11px 13px 12px;
}

.wtags { display: flex; align-items: center; gap: 8px; }
.wtags .pbadge { font-size: 11.5px; color: var(--dash-ink-2); gap: 5px; }
.wtags .pbadge i { width: 16px; height: 16px; flex-basis: 16px; border-radius: 4px; font-size: 9px; }
.wtags .pbadge i.is-cjk { font-size: 9.5px; }
.wt-meta { font-size: 11.5px; color: var(--dash-ink-3); }

.wtitle {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--dash-ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 39px;
}

.wdesc {
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--dash-ink-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 36px;
}

.wprice { display: flex; align-items: baseline; gap: 6px; margin-top: 2px; }
.wprice-cur { font-size: 12px; font-weight: 700; color: #e8402a; }
.wprice-now {
  font-size: 21px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.02em;
  color: #e8402a;
  font-variant-numeric: tabular-nums;
}
.wprice-old { font-size: 11.5px; color: var(--dash-ink-3); }
.wsold { margin-left: auto; font-size: 11px; color: var(--dash-ink-3); }

.wfoot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--dash-line-soft);
}

.wrate {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11.5px;
  font-weight: 600;
  color: #a86400;
}
.wrate svg { width: 11px; height: 11px; color: #f5a623; }
.wrate em { font-style: normal; font-weight: 400; color: var(--dash-ink-3); margin-left: 3px; }

.wmore { display: inline-flex; align-items: center; gap: 2px; font-size: 11.5px; font-weight: 600; color: var(--accent); cursor: pointer; border-radius: 4px; }
.wmore:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wmore svg { width: 11px; height: 11px; }

.wcard.is-off .wcover svg { filter: grayscale(.9) brightness(.72); }
.wcard.is-off .wprice-now,
.wcard.is-off .wprice-cur { color: var(--dash-ink-2); }
.wcard.is-off .wtitle { color: var(--dash-ink-2); }

/* ---------- 商品详情（整页） ---------- */

.wpage { display: flex; flex-direction: column; gap: 16px; }

.wp-crumb { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.wp-back {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 30px;
  padding: 0 11px 0 7px;
  border: 1px solid var(--dash-line);
  border-radius: 8px;
  background: #fff;
  color: var(--dash-ink-2);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .16s var(--ease);
}
.wp-back svg { width: 14px; height: 14px; transform: rotate(180deg); }
.wp-back:hover { color: var(--accent); border-color: #d3ccff; background: #faf9ff; }

.wp-path {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 12px;
  color: var(--dash-ink-3);
}
.wp-path i { font-style: normal; color: #c9ccd2; }
.wp-path b {
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: var(--dash-ink);
}

.wp-main {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(330px, 396px);
  grid-template-areas:
    "gallery side"
    "content side";
  gap: 16px;
  align-items: start;
}

.wp-gallery { grid-area: gallery; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.wp-content { grid-area: content; display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.wp-cover {
  position: relative;
  aspect-ratio: 16 / 10.4;
  border-radius: 12px;
  overflow: hidden;
  background: #14162a;
  box-shadow: 0 18px 40px -30px rgba(15, 19, 25, .9);
}
.wp-cover svg { display: block; width: 100%; height: 100%; }
.wp-cover .wflag { top: 12px; left: 12px; }

.wp-thumbs { display: flex; gap: 8px; }
.wp-thumb {
  width: 86px;
  height: 57px;
  padding: 0;
  border: 1px solid var(--dash-line);
  border-radius: 8px;
  overflow: hidden;
  background: #14162a;
  cursor: pointer;
  opacity: .72;
  transition: opacity .16s var(--ease), border-color .16s var(--ease);
}
.wp-thumb svg { display: block; width: 100%; height: 100%; }
.wp-thumb:hover { opacity: 1; }
.wp-thumb.is-active { opacity: 1; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(109, 92, 246, .16); }

.wp-block { padding: 16px 18px; }
.wp-block h3 { margin-bottom: 10px; font-size: 13.5px; font-weight: 700; color: var(--dash-ink); }
.wp-block h3 em { font-style: normal; font-weight: 500; font-size: 11.5px; color: var(--dash-ink-3); }

.wp-side { grid-area: side; position: sticky; top: 8px; display: flex; flex-direction: column; gap: 12px; }

.wp-buy { padding: 16px 18px 18px; }

.wp-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 11.5px; color: var(--dash-ink-3); }
.wp-tags .pbadge { font-size: 11.5px; }
.wp-tags .pbadge i { width: 16px; height: 16px; flex-basis: 16px; font-size: 9px; border-radius: 4px; }

.wp-title { margin-top: 10px; font-size: 20px; font-weight: 700; line-height: 1.38; color: var(--dash-ink); }
.wp-sub { margin-top: 8px; font-size: 12.5px; line-height: 1.7; color: var(--dash-ink-2); }

.wp-price {
  margin-top: 14px;
  padding: 12px 14px 13px;
  border-radius: 10px;
  background: linear-gradient(135deg, #e8402a, #c9331f);
  color: #fff;
}
.wp-price-row { display: flex; align-items: baseline; gap: 8px; }
.wp-cur { font-size: 15px; font-weight: 700; }
.wp-price-row strong {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.wp-price-row s { font-size: 12.5px; opacity: .8; }
.wp-sold { margin-left: auto; font-size: 11.5px; opacity: .92; }
.wp-promo { display: flex; align-items: center; gap: 6px; margin-top: 9px; font-size: 11.5px; opacity: .95; }
.wp-promo b {
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .22);
  font-variant-numeric: tabular-nums;
}

.wp-coupons {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  padding: 8px 10px;
  border: 1px dashed #ffc9b8;
  border-radius: 8px;
  background: #fff8f5;
}
.wp-coupons .cp { padding: 2px 7px; border-radius: 4px; background: #ffe6de; color: #d13a22; font-size: 11.5px; font-weight: 600; }
.wp-coupons button { margin-left: auto; border: 0; background: none; color: #d13a22; font-size: 12px; font-weight: 700; cursor: pointer; }
.wp-coupons button:hover { text-decoration: underline; }

.wp-serve { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.wp-serve li { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--dash-ink-2); }
.wp-serve li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #19b36b; }

.wp-qty { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-size: 12.5px; color: var(--dash-ink-2); }

.qty-box {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--dash-line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.qty-box button {
  width: 30px;
  height: 30px;
  border: 0;
  background: #fff;
  color: var(--dash-ink-2);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: background .14s var(--ease), color .14s var(--ease);
}
.qty-box button:hover:not(:disabled) { background: #f4f3ff; color: var(--accent); }
.qty-box button:disabled { color: #c9ccd2; cursor: not-allowed; }
.qty-box b {
  min-width: 34px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--dash-ink);
  font-variant-numeric: tabular-nums;
}
.qty-box--sm button { width: 26px; height: 26px; font-size: 13px; }
.qty-box--sm b { min-width: 28px; font-size: 12.5px; }

.wp-actions { display: flex; gap: 10px; margin-top: 16px; }
.wp-actions .wd-btn { flex: 1; height: 42px; border-radius: 10px; font-size: 13.5px; }
.wp-tip { margin-top: 10px; font-size: 11px; line-height: 1.6; color: var(--dash-ink-3); }

.wp-seller { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.wp-seller-ava { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 9px; background: #f3f1ff; }
.wp-seller-ava img { width: 20px; height: 20px; }
.wp-seller-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.wp-seller-text strong { font-size: 12.5px; font-weight: 600; color: var(--dash-ink); }
.wp-seller-text span { font-size: 11px; color: var(--dash-ink-3); }
.wp-seller .btn { margin-left: auto; }

/* ---------- 详情内内容块（包含内容 / 评价） ---------- */

.wd-inc li {
  position: relative;
  padding-left: 19px;
  margin-bottom: 7px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--dash-ink-2);
}
.wd-inc li:last-child { margin-bottom: 0; }
.wd-inc li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 7px;
  width: 10px;
  height: 6px;
  border-left: 1.7px solid var(--dash-teal);
  border-bottom: 1.7px solid var(--dash-teal);
  transform: rotate(-45deg);
}

.wrev { padding: 9px 0; border-bottom: 1px dashed var(--dash-line-soft); }
.wrev:last-of-type { border-bottom: 0; }
.wrev-top { display: flex; align-items: center; gap: 7px; }
.wrev-ava {
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eef0ff;
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 700;
}
.wrev-top strong { font-size: 12px; font-weight: 600; color: var(--dash-ink); }
.wrev-stars { font-size: 10px; color: #f5a623; letter-spacing: 1px; }
.wrev-top em { margin-left: auto; font-style: normal; font-size: 11px; color: var(--dash-ink-3); }
.wrev p { margin-top: 4px; padding-left: 28px; font-size: 12px; line-height: 1.65; color: var(--dash-ink-2); }
.wrev-none { font-size: 12px; color: var(--dash-ink-3); }

.wd-more {
  margin-top: 10px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.wd-more:hover { text-decoration: underline; }

.wd-btn {
  height: 38px;
  padding: 0 16px;
  border-radius: 9px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all .16s var(--ease);
}
.wd-btn--ghost { border-color: #ffd2c6; background: #fff; color: #d13a22; }
.wd-btn--ghost:hover, .wd-btn--ghost.is-on { background: #fff3ef; }
.wd-btn--ghost.is-on { border-color: #ffb8a4; }
.wd-btn--buy { background: linear-gradient(135deg, #ff5f3d, #e8402a); color: #fff; box-shadow: 0 8px 18px -10px rgba(232, 64, 42, .9); }
.wd-btn--buy:hover { filter: brightness(1.04); }
.wd-btn:disabled { background: #e8eaed; color: var(--dash-ink-3); border-color: transparent; box-shadow: none; cursor: not-allowed; }

/* ---------- 购物车 ---------- */

.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 316px; gap: 14px; align-items: start; }
.cart-list { display: flex; flex-direction: column; gap: 10px; }

.citem {
  display: grid;
  grid-template-columns: 20px 96px minmax(0, 1fr) 78px auto 88px 26px;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--dash-line);
  border-radius: 10px;
  background: #fff;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease), opacity .16s var(--ease);
}
.citem:hover { border-color: #d8d3ff; box-shadow: 0 10px 24px -22px rgba(80, 62, 220, .7); }
.citem.is-sel {
  border-color: #b5a8ff;
  box-shadow: 0 0 0 1px #b5a8ff inset, 0 10px 24px -22px rgba(80, 62, 220, .7);
}

/* 勾选框（单选 / 全选共用） */
.citem-check {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.citem-check input {
  position: absolute;
  opacity: 0;
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
}
.citem-check i {
  width: 18px;
  height: 18px;
  border: 1.5px solid #c9cdd8;
  border-radius: 6px;
  background: #fff;
  transition: background .15s, border-color .15s;
}
.citem-check input:checked + i {
  border-color: var(--accent);
  background: var(--accent);
}
.citem-check input:checked + i::after {
  content: "";
  position: absolute;
  left: 5.5px;
  top: 2.5px;
  width: 4.5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.citem-check input:focus-visible + i { box-shadow: 0 0 0 3px rgba(108, 92, 231, .18); }
.citem-check--lg i { width: 20px; height: 20px; border-radius: 7px; }
.citem-check--lg input { width: 20px; height: 20px; }
.citem-check--lg input:checked + i::after { left: 6.5px; top: 3.5px; }

/* 全选栏 */
.cart-selbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 14px 2px;
}
.cart-selbar-txt { font-size: 13px; font-weight: 600; color: var(--dash-ink); cursor: pointer; }
.cart-selbar-count { margin-left: auto; font-size: 12px; color: var(--dash-ink-3); }
.cart-selbar-count b { color: var(--accent); font-weight: 700; }

/* ============ 收藏勾选（单选 / 多选 / 全选 → 批量取消收藏） ============ */
.fav-selbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  margin-bottom: 14px;
  border: 1px solid var(--dash-line);
  border-radius: 10px;
  background: #fff;
}
.fav-batch { margin-left: 14px; }

.acard { position: relative; }
.acard.has-check .acard-top { padding-right: 30px; }
.acard-check {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
}
.acard.is-favsel {
  border-color: #b5a8ff;
  box-shadow: 0 0 0 1px #b5a8ff inset, 0 10px 24px -22px rgba(80, 62, 220, .7);
}

.citem-cover { width: 96px; height: 62px; border-radius: 8px; overflow: hidden; background: #14162a; }
.citem-cover svg { display: block; width: 100%; height: 100%; }

.citem-main { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.citem-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  color: var(--dash-ink);
}
.citem-name:hover { color: var(--accent); }
.citem-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 11.5px; color: var(--dash-ink-3); }
.citem-meta .pbadge { font-size: 11.5px; gap: 5px; }
.citem-meta .pbadge i { width: 15px; height: 15px; flex-basis: 15px; font-size: 8.5px; border-radius: 4px; }

.citem-price, .citem-sum { display: flex; flex-direction: column; gap: 2px; text-align: right; }
.citem-price span, .citem-sum span { font-size: 10.5px; color: var(--dash-ink-3); }
.citem-price b { font-size: 13px; font-weight: 600; color: var(--dash-ink-2); font-variant-numeric: tabular-nums; }
.citem-sum b { font-size: 15px; font-weight: 700; color: #e23b2e; font-variant-numeric: tabular-nums; }

.citem-del {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--dash-ink-3);
  cursor: pointer;
}
.citem-del svg { width: 13px; height: 13px; }
.citem-del:hover { background: #fdecea; color: #e2432e; }

.cart-sum { position: sticky; top: 8px; padding: 16px; }
.cart-sum h3 { margin-bottom: 10px; font-size: 13.5px; font-weight: 700; color: var(--dash-ink); }
.sum-row { display: flex; align-items: center; justify-content: space-between; padding: 7px 0; font-size: 12.5px; color: var(--dash-ink-2); }
.sum-row b { font-weight: 600; color: var(--dash-ink); font-variant-numeric: tabular-nums; }
.sum-row b.is-off { color: #e23b2e; }
.sum-row--total { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--dash-line-soft); font-size: 13px; font-weight: 600; color: var(--dash-ink); }
.sum-row--total b { font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: #e23b2e; }
.sum-row--total i { margin-right: 1px; font-style: normal; font-size: 13px; }
.cart-checkout { width: 100%; height: 40px; margin-top: 12px; border-radius: 9px; }
.cart-serve { display: flex; flex-direction: column; gap: 7px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--dash-line-soft); }
.cart-serve li { position: relative; padding-left: 14px; font-size: 11.5px; line-height: 1.6; color: var(--dash-ink-3); }
.cart-serve li::before { content: ""; position: absolute; left: 0; top: 7px; width: 5px; height: 5px; border-radius: 50%; background: var(--dash-teal); }

/* 侧栏购物车角标 */
.side-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-grid;
  place-items: center;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0;
}
.side-item.is-active .side-badge { background: #fff; color: var(--accent); }
.side-badge[hidden] { display: none; }

/* 购物车同步状态 */
.cart-sync {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 9px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--dash-ink-3);
}
.cart-sync-dot {
  flex: none;
  width: 6px;
  height: 6px;
  margin-top: 6px;
  border-radius: 50%;
  background: #c4c8ce;
}
.cart-sync-dot.is-on { background: var(--dash-green); box-shadow: 0 0 0 3px rgba(14, 159, 110, .12); }

/* ---------- 收银台 ---------- */

.pay-steps {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding: 12px 16px;
  border: 1px solid var(--dash-line);
  border-radius: 10px;
  background: #fff;
  list-style: none;
}
.pay-steps li {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--dash-ink-3);
}
.pay-steps li + li::before {
  content: "";
  width: 26px;
  height: 1px;
  margin-right: 4px;
  background: var(--dash-line);
}
.pay-steps li i {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #eef0f3;
  color: var(--dash-ink-3);
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
}
.pay-steps li.is-done { color: var(--dash-ink-2); }
.pay-steps li.is-done i { background: var(--dash-green-bg); color: var(--dash-green); }
.pay-steps li.is-active { color: var(--dash-ink); font-weight: 600; }
.pay-steps li.is-active i { background: var(--accent); color: #fff; }

.pay-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 352px;
  gap: 14px;
  align-items: start;
}

.pay-order { padding: 16px 18px; }
.pay-order-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--dash-line-soft);
}
.pay-order-head h3 { font-size: 13.5px; font-weight: 700; color: var(--dash-ink); }
.pay-order .sum-row b.mono { font-family: 'Roboto Mono', ui-monospace, monospace; font-size: 12px; }

.pay-lines { margin: 12px 0 6px; padding: 10px 0 0; border-top: 1px dashed var(--dash-line-soft); }
.pay-lines li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}
.pay-line-cover {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  background: #14162a;
}
.pay-line-cover i {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  color: #fff;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
}
.pay-line-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pay-line-main strong {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--dash-ink);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}
.pay-line-main span { font-size: 11.5px; color: var(--dash-ink-3); font-variant-numeric: tabular-nums; }
.pay-lines li > b {
  margin-left: auto;
  font-size: 13px;
  font-weight: 700;
  color: var(--dash-ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pay-side { position: sticky; top: 8px; padding: 16px; }
.pay-side h3 { margin-bottom: 10px; font-size: 13.5px; font-weight: 700; color: var(--dash-ink); }

.pay-ways { display: flex; flex-direction: column; gap: 8px; }
.pay-way {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--dash-line);
  border-radius: 9px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s var(--ease), background .16s var(--ease);
}
.pay-way:hover { border-color: #c9c2f8; background: #fbfaff; }
.pay-way.is-on { border-color: var(--accent); background: var(--accent-soft); }
.pay-way:disabled { cursor: default; opacity: .72; }
.pay-way-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: #fff;
  font-style: normal;
  font-size: 12.5px;
  font-weight: 700;
}
.pay-way-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pay-way-main strong { font-size: 13px; font-weight: 600; color: var(--dash-ink); }
.pay-way-main span { font-size: 11px; color: var(--dash-ink-3); }
.pay-radio {
  flex: none;
  margin-left: auto;
  width: 16px;
  height: 16px;
  border: 1.6px solid #d3d7dd;
  border-radius: 50%;
  background: #fff;
}
.pay-way.is-on .pay-radio {
  border-color: var(--accent);
  background: radial-gradient(circle, var(--accent) 0 4px, #fff 4.5px 100%);
}

.pay-tip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 12px 0 10px;
  font-size: 12px;
  color: var(--dash-ink-2);
}
.pay-tip b {
  font-family: 'Roboto Mono', ui-monospace, monospace;
  font-size: 13px;
  color: #e23b2e;
  font-variant-numeric: tabular-nums;
}

.pay-submit { width: 100%; height: 42px; border-radius: 9px; font-size: 14px; }
.pay-submit.is-loading { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.pay-submit.is-loading::before {
  content: "";
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255, 255, 255, .5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: pay-spin .7s linear infinite;
}
@keyframes pay-spin { to { transform: rotate(360deg); } }

.pay-note {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--dash-amber-bg);
  color: var(--dash-amber);
  font-size: 11px;
  line-height: 1.55;
}

.pay-link { margin-left: 4px; color: var(--accent); font-weight: 600; }

/* 支付成功 */
.pay-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 560px;
  margin: 0 auto;
  padding: 42px 24px 38px;
  border: 1px solid var(--dash-line);
  border-radius: 12px;
  background: #fff;
  text-align: center;
}
.pay-check {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--dash-green-bg);
  color: var(--dash-green);
}
.pay-check svg { width: 28px; height: 28px; }
.pay-done h2 { font-size: 19px; font-weight: 700; color: var(--dash-ink); }
.pay-done-amount {
  margin-top: 8px;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--dash-ink);
  font-variant-numeric: tabular-nums;
}
.pay-done-amount i { font-style: normal; font-size: 17px; margin-right: 2px; }
.pay-done-meta { margin-top: 6px; font-size: 12.5px; color: var(--dash-ink-2); font-family: 'Roboto Mono', ui-monospace, monospace; }
.pay-done-tip { max-width: 430px; margin-top: 12px; font-size: 12px; line-height: 1.7; color: var(--dash-ink-3); }
.pay-done-actions { display: flex; gap: 10px; margin-top: 20px; }
.pay-done-actions .btn { min-width: 118px; height: 38px; }

@media (max-width: 1240px) {
  .pay-grid { grid-template-columns: minmax(0, 1fr); }
  .pay-side { position: static; }
}

@media (max-width: 720px) {
  .pay-steps { gap: 6px; padding: 10px 12px; }
  .pay-steps li + li::before { width: 12px; margin-right: 0; }
  .pay-order { padding: 14px; }
  .pay-line-cover { width: 38px; height: 38px; border-radius: 8px; }
  .pay-done { padding: 32px 16px 28px; }
  .pay-done-actions { width: 100%; flex-direction: column; }
  .pay-done-actions .btn { width: 100%; }
}

@media (max-width: 1240px) {
  .wp-main {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "gallery"
      "side"
      "content";
  }
  .wp-side { position: static; }
  .cart-layout { grid-template-columns: minmax(0, 1fr); }
  .cart-sum { position: static; }
}

@media (max-width: 900px) {
  .citem { grid-template-columns: 20px 84px minmax(0, 1fr) auto auto; row-gap: 10px; }
  .citem-cover { grid-column: 2; grid-row: 1 / span 2; width: 84px; height: 54px; }
  .citem-main { grid-column: 3 / span 2; grid-row: 1; }
  .citem-price { display: none; }
  .citem-check { grid-column: 1; grid-row: 1; align-self: start; }
  .citem .qty-box { grid-column: 3; grid-row: 2; justify-self: start; }
  .citem-sum { grid-column: 4; grid-row: 2; text-align: right; }
  .citem-del { grid-column: 5; grid-row: 1; justify-self: end; align-self: start; }
  .wp-thumb { width: 72px; height: 48px; }
}

@media (max-width: 720px) {
  .wp-crumb { gap: 8px; }
  .wp-path { display: none; }
  .wp-title { font-size: 17px; }
  .wp-price-row strong { font-size: 27px; }
  .citem { grid-template-columns: 20px 56px minmax(0, 1fr) auto; padding: 10px; row-gap: 8px; }
  .citem-cover { width: 56px; height: 38px; grid-row: 1 / span 2; }
  .citem-main { grid-column: 3; grid-row: 1; }
  .citem-meta span:nth-child(n+2) { display: none; }
  .citem-check { grid-column: 1; grid-row: 1; align-self: start; }
  .citem .qty-box { grid-column: 3; grid-row: 2; justify-self: start; }
  .citem-sum { grid-column: 4; grid-row: 2; text-align: right; }
  .citem-del { grid-column: 4; grid-row: 1; justify-self: end; align-self: start; }
  .digest-card { flex-wrap: wrap; }
  .digest-cover { flex-basis: 128px; height: 82px; }
  .digest-card .btn { margin-left: auto; }
}

/* ============================ 响应式 ============================ */

@media (max-width: 1240px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-row { grid-template-columns: minmax(0, 1fr); }
  .settings-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 1024px) {
  .dash-side {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    transition: transform .26s var(--ease);
    box-shadow: 24px 0 48px -24px rgba(15, 19, 25, .3);
  }
  .dash.is-open .dash-side { transform: none; }
  .top-burger { display: grid; place-items: center; }
  .top-search { width: auto; flex: 1; max-width: none; }
  /* 抽屉模式下隐藏折叠按钮并还原宽度 */
  .side-toggle { display: none; }
  body.side-collapsed { --side-w: 256px; }
}

@media (max-width: 720px) {
  .dash-content { padding: 18px 16px 32px; }
  .dash-top { padding: 0 14px; gap: 10px; }
  .view-head h1 { font-size: 18px; }
  .kpi-grid { grid-template-columns: minmax(0, 1fr); }
  .dash-row { margin-top: 12px; }
  .table-card { margin-top: 12px; }
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .notify-panel { right: -8px; width: 272px; }
  .chart-wrap svg { height: 190px; }
  .card-head { flex-wrap: wrap; gap: 6px; }
  .legend { gap: 10px; }
  .legend span { font-size: 11px; }
  .view-head .head-actions { width: 100%; }

  .wgrid { grid-template-columns: repeat(auto-fill, minmax(152px, 1fr)); gap: 10px; }
  .wbody { padding: 9px 10px 10px; }
  .wtitle { font-size: 12.5px; min-height: 36px; }
  .wdesc { display: none; }
  .wprice-now { font-size: 18px; }
  .wpromo { flex-wrap: wrap; gap: 6px 10px; }
  .wpromo-txt { order: 3; flex-basis: 100%; font-size: 11.5px; }
  .wsort { order: 3; }
  .wd-btn { padding: 0 13px; }
}

/* ============ 订阅弹窗（AI 资讯订阅） ============ */
.sub-mask {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(17, 20, 27, .45);
  backdrop-filter: blur(2px);
}
.sub-modal {
  position: relative;
  width: 460px;
  max-width: 100%;
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  padding: 22px 22px 18px;
  box-shadow: 0 24px 60px rgba(17, 20, 27, .22);
  animation: subIn .18s ease;
}
@keyframes subIn {
  from { transform: translateY(10px) scale(.98); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.sub-x {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 9px;
  background: #f2f3f7;
  color: #5a6072;
  cursor: pointer;
}
.sub-x:hover { background: #e8eaf1; color: #14181f; }
.sub-x svg { width: 14px; height: 14px; }
.sub-head h3 { margin: 0 0 6px; font-size: 17px; color: #14181f; }
.sub-head p { margin: 0 0 16px; font-size: 13px; color: #7a8092; }
.sub-ways { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sub-way {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px;
  border: 1.5px solid #e6e8ee;
  border-radius: 12px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.sub-way:hover { border-color: #c9cdd8; }
.sub-way.is-active {
  border-color: #6c5ce7;
  background: #f6f5ff;
  box-shadow: 0 0 0 1px #6c5ce7 inset;
}
.sub-way-ico {
  flex: none;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #eef0f6;
  color: #41465a;
}
.sub-way.is-active .sub-way-ico { background: #6c5ce7; color: #fff; }
.sub-way-ico svg { width: 17px; height: 17px; }
.sub-way-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sub-way-txt strong { font-size: 13.5px; color: #14181f; }
.sub-way-txt span { font-size: 11.5px; line-height: 1.5; color: #8a90a2; }
.sub-fields { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.sub-field { display: flex; flex-direction: column; gap: 6px; }
.sub-field > span { font-size: 12.5px; font-weight: 600; color: #41465a; }
.sub-field input {
  height: 40px;
  padding: 0 12px;
  border: 1.5px solid #e2e4ec;
  border-radius: 10px;
  font-size: 13.5px;
  color: #14181f;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.sub-field input:focus { border-color: #6c5ce7; box-shadow: 0 0 0 3px rgba(108, 92, 231, .12); }
.sub-field em { font-style: normal; font-size: 11.5px; color: #9aa0b2; }
.sub-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}
.sub-foot .spacer { flex: 1; }
.sub-foot .btn--link { margin-right: auto; color: #e05a5a; }
.sub-unsub { font-size: 12.5px; }
.btn--ghost.is-on {
  background: #f6f5ff;
  border-color: #d8d4f7;
  color: #6c5ce7;
}

@media (max-width: 560px) {
  .sub-ways { grid-template-columns: 1fr; }
  .sub-modal { padding: 18px 16px 14px; }
}

/* ============ iframe 内嵌视图（AI 客服 / 需求&反馈） ============ */
.view-frame {  display: block;
  width: 100%;
  height: calc(100vh - 128px); /* 顶栏64 + content上24 + 下40 */
  border: 1px solid #e6e8ee;
  border-radius: 14px;
  background: #fff;
}
/* 带问候语头部（需求定制 / 意见反馈）时再让出头部高度 */
.view-frame--headed { height: calc(100vh - 208px); }
@media (max-width: 900px) {
  .view-frame { height: calc(100vh - 114px); border-radius: 10px; }
  .view-frame--headed { height: calc(100vh - 194px); }
}
