/* 页面基础变量，保持后台风格克制、可扫描。 */
:root {
  --bg: #f5f7fa;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --panel-border: #dde3ea;
  --text: #202936;
  --muted: #697586;
  --muted-light: #98a2b3;
  --primary: #1d6fa3;
  --primary-dark: #16577f;
  --primary-soft: #e8f2f8;
  --danger: #b42318;
  --danger-dark: #8f1d14;
  --danger-soft: #fef3f2;
  --warning: #b54708;
  --warning-soft: #fff7ed;
  --success: #067647;
  --success-soft: #ecfdf3;
  --info: #1d6fa3;
  --info-soft: #e8f2f8;
  --muted-soft: #f1f5f9;
  --sidebar: #17212b;
  --sidebar-muted: #9fb0c0;
  --sidebar-hover: #223141;
  --sidebar-active: #e8f2f8;
  --radius: 8px;
  --shadow: 0 10px 24px rgba(31, 41, 51, 0.07);
}

/* 全局盒模型，避免表格和表单撑破布局。 */
* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

/* 主体背景和文字基准。 */
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
}

/* /store 是独立门店移动端视图；路由进入后页面背景和 PC 后台外壳必须互斥，避免露出侧栏、首页或顶部员工区。 */
body.store-mobile-route {
  background: #eef3f6;
}

/* 登录后的全局轻量水印：仅作为截图追溯层，不参与布局、不拦截点击，弹窗上也保持可见。 */
.global-watermark {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  background-repeat: repeat;
  background-size: 260px 160px;
}

.global-watermark[hidden] {
  display: none;
}

/* 登录页只承载员工账号密码入口和备案号；背景与毛玻璃卡片只影响未登录视图，不触碰后台工作台样式。 */
.login-view {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 6vw 68px;
  overflow-x: hidden;
  background-color: #eef5ff;
  background-image: linear-gradient(90deg, rgba(238, 245, 255, 0.26), rgba(255, 255, 255, 0.08)), url("/assets/login_glass_bg_clear_1920x1080.webp");
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
}

.login-view[hidden] {
  display: none;
}

.login-shell {
  width: min(1180px, 100%);
  display: flex;
  justify-content: flex-end;
}

.login-card {
  width: min(420px, 100%);
  display: grid;
  gap: 18px;
  padding: 36px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 24px 80px rgba(36, 64, 120, 0.18);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

/* 品牌字标用文本和 CSS 实现，数字 8 独立成徽标，避免引入图片、字体或 UI 库。 */
.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  letter-spacing: 0;
  line-height: 1;
}

.brand-logo-text {
  font-weight: 700;
  letter-spacing: 0;
}

.brand-logo-eight {
  display: inline-grid;
  place-items: center;
  min-width: 1.35em;
  height: 1.35em;
  border-radius: 7px;
  background: linear-gradient(135deg, #1d6fa3 0%, #22a6b3 100%);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 5px 12px rgba(29, 111, 163, 0.28);
}

.login-logo {
  font-size: 25px;
}

.login-brand strong {
  display: block;
  color: #1f2a44;
  font-size: 28px;
  line-height: 1.15;
}

.login-brand span {
  display: block;
  margin-top: 6px;
  color: #516074;
  font-size: 13px;
}

.login-card label {
  gap: 8px;
  color: #39475e;
  font-weight: 600;
}

.login-card input {
  height: 46px;
  border-color: rgba(98, 116, 142, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  padding: 0 14px;
}

.login-card input:focus {
  border-color: #5d8dff;
  box-shadow: 0 0 0 4px rgba(93, 141, 255, 0.18);
}

.login-error {
  padding: 10px 12px;
  border: 1px solid #fecdca;
  border-radius: 14px;
  background: rgba(254, 243, 242, 0.9);
  color: var(--danger);
}

.login-card button[type="submit"] {
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #4d8dff 0%, #7b5cff 100%);
  box-shadow: 0 14px 30px rgba(75, 111, 255, 0.26);
  font-weight: 700;
  transition: transform 0.16s ease, filter 0.16s ease, box-shadow 0.16s ease;
}

.login-card button[type="submit"]:hover {
  background: linear-gradient(135deg, #5d98ff 0%, #886bff 100%);
  box-shadow: 0 18px 34px rgba(75, 111, 255, 0.3);
  filter: brightness(1.03);
  transform: translateY(-1px);
}

.login-card button[type="submit"]:disabled {
  transform: none;
}

.login-icp {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 18px;
  color: rgba(40, 53, 76, 0.68);
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}

/* 门店移动端入口是独立轻量页面：只展示门店员工需要的范围筛选、入口卡片和底部导航，不复用 PC 侧栏。 */
.store-mobile-view {
  min-height: 100vh;
  background: #eef3f6;
}

.store-mobile-view[hidden] {
  display: none;
}

.store-mobile-shell {
  width: min(430px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  background: #f8fafc;
  color: var(--text);
  box-shadow: 0 0 0 1px rgba(32, 41, 54, 0.05);
}

.store-mobile-page {
  min-height: 100vh;
  padding: 8px 10px calc(82px + env(safe-area-inset-bottom, 0));
}

.store-mobile-topbar,
.store-mobile-operator,
.store-filter,
.store-mobile-card {
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: var(--panel);
}

.store-mobile-topbar {
  position: sticky;
  top: 0;
  z-index: 18;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 0 10px;
  border: 0;
  border-radius: 0;
  background: #f8fafc;
}

.store-personal-trigger {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid #cfe0ea;
  border-radius: 50%;
  background: #fff;
  color: var(--primary-dark);
  font-weight: 800;
}

.store-personal-trigger span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary-soft);
}

.store-mobile-top-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.store-mobile-top-copy strong,
.store-mobile-top-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-mobile-top-copy strong {
  font-size: 16px;
  line-height: 1.25;
}

.store-mobile-top-copy span {
  color: var(--muted);
  font-size: 12px;
}

.store-mobile-brand {
  font-size: 22px;
}

.store-mobile-operator {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 12px;
}

.store-mobile-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 700;
}

.store-personal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 45;
  pointer-events: none;
  background: rgba(15, 23, 42, 0);
  transition: background 0.18s ease;
}

.store-personal-backdrop.open {
  pointer-events: auto;
  background: rgba(15, 23, 42, 0.32);
}

.store-personal-drawer {
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  gap: 14px;
  width: min(318px, 84vw);
  min-height: 100%;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0));
  transform: translateX(-100%);
  background: #fff;
  box-shadow: 18px 0 36px rgba(15, 23, 42, 0.18);
  transition: transform 0.18s ease;
}

.store-personal-backdrop.open .store-personal-drawer {
  transform: translateX(0);
}

.store-personal-drawer header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.store-personal-drawer header strong,
.store-personal-drawer header span {
  display: block;
  line-height: 1.45;
}

.store-personal-drawer header span,
.store-personal-meta dt,
.store-personal-drawer footer {
  color: var(--muted);
  font-size: 12px;
}

.store-personal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.store-personal-tags span {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
}

.store-personal-meta {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.store-personal-meta div {
  min-width: 0;
}

.store-personal-meta dd {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.store-personal-menu {
  display: grid;
  align-content: start;
  gap: 8px;
}

.store-personal-menu button {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--panel-border);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  text-align: left;
  font-weight: 700;
}

.store-personal-menu button.danger {
  border-color: #fecdca;
  background: var(--danger-soft);
  color: var(--danger);
}

.store-personal-drawer footer {
  align-self: end;
}

.store-mobile-operator strong,
.store-mobile-operator span {
  display: block;
  line-height: 1.45;
}

.store-mobile-operator span,
.store-mobile-card small,
.store-mobile-empty {
  color: var(--muted);
}

.store-filter {
  margin-top: 10px;
  overflow: hidden;
}

.store-mobile-topbar .store-filter {
  position: relative;
  margin-top: 0;
  overflow: visible;
  border: 0;
  background: transparent;
}

.store-filter summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 12px;
  cursor: pointer;
  list-style: none;
}

.store-mobile-topbar .store-filter summary {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--panel-border);
  border-radius: 7px;
  background: #fff;
}

.store-mobile-topbar .store-filter summary span {
  display: none;
}

.store-filter summary::-webkit-details-marker {
  display: none;
}

.store-filter summary strong {
  color: var(--primary);
  font-size: 13px;
}

.store-filter-panel {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
}

.store-mobile-topbar .store-filter-panel {
  position: absolute;
  top: 43px;
  right: 0;
  z-index: 35;
  width: min(320px, calc(100vw - 20px));
  padding: 10px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.store-filter-panel input[data-store-search] {
  width: 100%;
}

.store-filter-all {
  min-height: 38px;
  border: 1px solid var(--panel-border);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
}

.store-filter-all.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.store-filter-list {
  display: grid;
  gap: 8px;
  max-height: 230px;
  overflow: auto;
}

.store-filter-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--panel-border);
  border-radius: 7px;
  background: var(--panel-soft);
}

.store-mobile-main {
  display: grid;
  gap: 10px;
  margin-top: 2px;
}

.store-mobile-section-title {
  display: grid;
  gap: 3px;
  padding: 2px 2px 0;
}

.store-mobile-section-title strong {
  font-size: 18px;
}

.store-mobile-section-title span {
  color: var(--muted);
  font-size: 12px;
}

.store-appointment-filter {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: var(--panel);
}

.store-appointment-filter label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.store-appointment-filter input,
.store-appointment-filter select {
  width: 100%;
  min-width: 0;
}

.store-appointment-search,
.store-appointment-filter button {
  grid-column: 1 / -1;
}

.store-appointment-filter button {
  min-height: 40px;
  border: 0;
  border-radius: 7px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}

.store-customer-search-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.store-customer-search-divider::before,
.store-customer-search-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--panel-border);
}

.store-old-customer-search {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.store-old-customer-search header,
.store-old-customer-tools,
.store-old-customer-card > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.store-old-customer-search header strong,
.store-old-customer-card strong {
  display: block;
  font-size: 14px;
  color: var(--text);
}

.store-old-customer-search header span,
.store-old-customer-card span,
.store-old-customer-card small,
.store-old-customer-card dt {
  font-size: 12px;
  color: var(--muted);
}

.store-old-customer-tools input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 9px 10px;
}

.store-old-customer-list {
  display: grid;
  gap: 8px;
}

.store-old-customer-card {
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  gap: 8px;
  background: #f8fafc;
}

.store-old-customer-card dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
}

.store-old-customer-card dd {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--text);
  word-break: break-word;
}

.store-old-customer-card button {
  justify-self: end;
}

.store-appointment-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border-radius: var(--radius);
  background: #1e7bff;
  color: #fff;
}

.store-appointment-stats div {
  display: grid;
  gap: 5px;
  padding: 13px 8px;
  text-align: center;
  background: rgba(255, 255, 255, 0.08);
}

.store-appointment-stats span {
  font-size: 12px;
  opacity: 0.88;
}

.store-appointment-stats strong {
  font-size: 22px;
}

.store-order-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.store-order-stats strong {
  font-size: 18px;
}

.store-appointment-list {
  display: grid;
  gap: 10px;
}

.store-appointment-card,
.store-order-record-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: var(--panel);
}

.store-appointment-card {
  cursor: pointer;
}

.store-appointment-card header,
.store-order-record-card header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.store-order-record-card header {
  grid-template-columns: minmax(0, 1fr) auto;
}

.store-order-record-card header > div {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
}

.store-appointment-card header strong,
.store-order-record-card header strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-appointment-card header small,
.store-order-record-card header small {
  color: var(--primary);
  font-weight: 700;
}

.store-order-record-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-height: 34px;
}

.store-order-record-actions button {
  min-height: 34px;
  padding: 0 14px;
}

.store-order-edit-hint {
  color: var(--muted);
  font-size: 12px;
}

.store-customer-tag {
  padding: 3px 6px;
  border-radius: 6px;
  background: #f1f5f9;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.store-customer-tag.is-new {
  background: #e8f3ff;
  color: #1764d8;
}

.store-appointment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.store-appointment-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.store-appointment-fields div {
  min-width: 0;
}

.store-appointment-fields dt {
  color: var(--muted);
  font-size: 12px;
}

.store-appointment-fields dd {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.store-appointment-card footer {
  display: flex;
  justify-content: flex-end;
}

.store-appointment-card footer button {
  min-height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 7px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}

.store-appointment-card footer button.secondary {
  border: 1px solid var(--panel-border);
  background: #fff;
  color: var(--muted);
}

.store-mobile-card {
  display: grid;
  gap: 12px;
  padding: 16px 14px;
}

.store-mobile-card div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.store-mobile-card span {
  color: var(--muted);
}

.store-mobile-card strong {
  font-size: 22px;
}

.store-mobile-card.is-disabled {
  opacity: 0.66;
}

.store-performance-filter {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
}

.store-performance-filter button {
  align-self: end;
  min-width: 92px;
}

.store-performance-quick {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.store-performance-quick button {
  grid-column: auto;
  min-height: 32px;
  min-width: 0;
  padding: 0 8px;
  background: #eef2ff;
  color: var(--primary);
  font-size: 13px;
}

.store-performance-filter .store-performance-query {
  grid-column: 1 / -1;
  min-height: 36px;
}

.store-performance-range {
  padding: 10px 12px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
}

.store-performance-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.store-performance-groups {
  display: grid;
  gap: 10px;
}

.store-performance-group {
  display: grid;
  gap: 8px;
}

.store-performance-group h3 {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.store-performance-metrics div,
.store-performance-sections article {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: var(--panel);
}

.store-performance-metrics span,
.store-performance-sections span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.store-performance-metrics strong,
.store-performance-sections strong {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
  font-size: 20px;
}

.store-performance-sections {
  display: grid;
  gap: 8px;
}

.store-performance-donut-card {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: var(--panel);
}

.store-performance-donut {
  display: grid;
  place-items: center;
  width: 178px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(var(--donut));
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.05);
}

.store-performance-donut > div {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  width: 112px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff;
  text-align: center;
}

.store-performance-donut span {
  color: var(--muted);
  font-size: 12px;
}

.store-performance-donut strong {
  font-size: 22px;
  line-height: 1.1;
}

.store-performance-donut.is-empty {
  background: #e5e7eb;
}

.store-performance-legend {
  display: grid;
  width: 100%;
  gap: 8px;
}

.store-performance-legend span {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.store-performance-legend i {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.store-performance-legend b {
  min-width: 0;
  color: var(--text);
  font-weight: 700;
}

.store-performance-legend em {
  color: var(--muted);
  font-style: normal;
  white-space: nowrap;
}

.store-performance-legend .is-zero i {
  border: 1px solid #cbd5e1;
  background: transparent !important;
}

.store-checkout-edit-entry {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 2px;
}

.store-checkout-edit-entry button {
  min-height: 34px;
  padding: 0 14px;
}

/* 门店端开单页：基于今日到店草稿确认客户和项目，收银面板只提交首笔收款字段。 */
.store-checkout-page {
  display: grid;
  gap: 10px;
  padding-bottom: 76px;
}

.store-checkout-top,
.store-checkout-summary,
.store-checkout-section {
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: var(--panel);
}

.store-checkout-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 12px;
}

.store-checkout-top button {
  min-height: 36px;
}

.store-checkout-top h2,
.store-checkout-section h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.store-checkout-top span,
.store-checkout-summary span,
.store-checkout-section dt,
.store-checkout-note,
.store-card-balance-list small,
.store-card-balance-list span,
.store-checkout-bottom span {
  color: var(--muted);
}

.store-checkout-summary,
.store-checkout-section {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.store-checkout-summary > div:first-child {
  display: grid;
  gap: 4px;
}

.store-checkout-summary > div:first-child strong {
  font-size: 22px;
}

.store-checkout-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.store-checkout-info-grid div {
  min-width: 0;
}

.store-checkout-info-grid dt {
  font-size: 12px;
}

.store-checkout-info-grid dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.store-checkout-profile-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.store-checkout-profile-fields label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.store-checkout-profile-fields select {
  min-width: 0;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--text);
  background: #fff;
}

.store-checkout-section header,
.store-checkout-mini-list > div,
.store-checkout-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.store-checkout-bottom {
  flex-wrap: wrap;
}

.store-checkout-section header strong {
  color: var(--primary);
}

.store-checkout-header-actions,
.store-order-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.store-checkout-header-actions button,
.store-order-item-actions button {
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
}

.store-checkout-note {
  margin: 0;
  font-size: 13px;
}

.store-checkout-empty-hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.store-checkout-mini-list,
.store-card-balance-list {
  display: grid;
  gap: 8px;
}

.store-checkout-mini-list > div,
.store-card-balance-list article {
  padding: 10px;
  border: 1px solid var(--panel-border);
  border-radius: 7px;
  background: var(--panel-soft);
}

.store-checkout-mini-list .store-order-item-row {
  align-items: flex-start;
}

.store-order-item-row > div {
  min-width: 0;
}

.store-order-item-row strong,
.store-order-item-row small {
  display: block;
  overflow-wrap: anywhere;
}

.store-order-item-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.store-price-adjust-field {
  display: grid;
  max-width: 180px;
  gap: 4px;
  margin-top: 8px;
}

.store-price-adjust-field span {
  color: var(--muted);
  font-size: 12px;
}

.store-price-adjust-field input {
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid var(--input-border);
  border-radius: 7px;
  background: #fff;
}

.store-checkout-mini-list span,
.store-card-balance-list strong,
.store-card-balance-list span,
.store-card-balance-list small {
  display: block;
  line-height: 1.45;
}

.store-card-balance-list article {
  display: grid;
  gap: 6px;
}

.store-card-balance-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-height: 34px;
}

.store-card-balance-actions button {
  min-height: 32px;
}

.store-card-balance-status {
  color: var(--muted);
  font-size: 13px;
}

.store-checkout-bottom {
  position: fixed;
  left: 50%;
  bottom: calc(64px + env(safe-area-inset-bottom, 0));
  z-index: 21;
  width: min(430px, 100%);
  min-height: 64px;
  padding: 10px 14px;
  transform: translateX(-50%);
  border-top: 1px solid var(--panel-border);
  background: #fff;
  box-shadow: 0 -8px 20px rgba(15, 23, 42, 0.08);
}

.store-checkout-bottom > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.store-checkout-bottom button {
  min-height: 38px;
  padding: 0 13px;
  border: 0;
  border-radius: 7px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}

.store-checkout-bottom button.secondary {
  border: 1px solid var(--panel-border);
  background: #fff;
  color: var(--muted);
}

.store-cashier-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(15, 23, 42, 0.38);
}

.store-cashier-sheet {
  display: grid;
  gap: 12px;
  width: min(430px, 100%);
  max-height: min(82vh, 680px);
  padding: 14px;
  overflow: auto;
  border-radius: 12px 12px 0 0;
  background: #fff;
  box-shadow: 0 -18px 40px rgba(15, 23, 42, 0.2);
}

.store-cashier-sheet header,
.store-cashier-sheet footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.store-cashier-sheet header span,
.store-cashier-sheet label span,
.store-cashier-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.store-cashier-sheet header strong {
  display: block;
  margin-top: 2px;
  font-size: 18px;
}

.store-cashier-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.store-cashier-summary div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--panel-border);
  border-radius: 7px;
  background: var(--panel-soft);
}

.store-cashier-summary strong {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.store-cashier-sheet label {
  display: grid;
  gap: 5px;
}

.store-cashier-sheet input,
.store-cashier-sheet select,
.store-cashier-sheet textarea {
  width: 100%;
  min-width: 0;
}

.store-cashier-sheet input[readonly] {
  background: #f1f5f9;
  color: #475569;
}

.store-cashier-sheet textarea {
  resize: vertical;
}

.store-cashier-error {
  padding: 10px;
  border: 1px solid #fecdd3;
  border-radius: 7px;
  background: #fff1f2;
  color: #be123c;
  font-size: 13px;
}

.store-cashier-hint {
  margin: 0;
  padding: 9px 10px;
  border: 1px solid var(--panel-border);
  border-radius: 7px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.store-cashier-sheet footer button {
  min-height: 40px;
  flex: 1;
}

.store-order-edit-sheet {
  max-height: min(88vh, 760px);
}

.store-order-edit-summary,
.store-order-edit-block {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: var(--panel-soft);
}

.store-order-edit-summary span,
.store-order-edit-block h3,
.store-order-edit-items small {
  color: var(--muted);
}

.store-order-edit-block h3 {
  margin: 0;
  font-size: 14px;
}

.store-order-edit-items {
  display: grid;
  gap: 8px;
}

.store-order-edit-items article {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) 76px 90px auto;
  align-items: end;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--panel-border);
  border-radius: 7px;
  background: #fff;
}

.store-order-edit-items article > strong {
  align-self: center;
  overflow-wrap: anywhere;
}

.store-order-edit-items article > span {
  align-self: center;
  font-weight: 700;
}

.store-order-edit-items button {
  min-height: 34px;
}

.store-order-edit-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px 88px auto;
  gap: 8px;
  align-items: end;
}

@media (max-width: 430px) {
  .store-order-edit-items article,
  .store-order-edit-add {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

.store-bottom-nav {
  position: fixed;
  left: 50%;
  bottom: env(safe-area-inset-bottom, 0);
  z-index: 20;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  width: min(430px, 100%);
  min-height: 64px;
  padding-bottom: env(safe-area-inset-bottom, 0);
  transform: translateX(-50%);
  border-top: 1px solid var(--panel-border);
  background: #fff;
}

.store-bottom-nav button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.store-bottom-nav button.active {
  color: var(--primary);
}

.store-mobile-denied {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  min-height: 100vh;
  padding: 24px;
  text-align: center;
}

.store-mobile-denied h1 {
  margin: 0;
  font-size: 20px;
  line-height: 1.45;
}

/* 应用整体布局：固定侧栏 + 自适应内容。 */
.app-shell {
  display: grid;
  grid-template-columns: 204px minmax(0, 1fr);
  min-height: 100vh;
}

.app-shell[hidden],
body.store-mobile-route .app-shell {
  display: none;
}

/* 左侧导航使用深色背景，突出业务模块。 */
.sidebar {
  background: var(--sidebar);
  color: #fff;
  padding: 18px 14px;
}

.sidebar-open,
.sidebar-close {
  display: none;
}

.sidebar-backdrop {
  display: none;
}

/* 品牌区显示系统简称和版本。 */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 20px;
}

/* 品牌标记保持固定尺寸，避免导航抖动。 */
.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: linear-gradient(135deg, #1d6fa3 0%, #22a6b3 100%);
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

.compact-logo {
  color: #fff;
  font-size: 17px;
}

.compact-logo .brand-logo-eight {
  min-width: 1.25em;
  height: 1.25em;
  border-radius: 6px;
  background: #e8f2f8;
  color: var(--primary-dark);
  box-shadow: none;
}

/* 版本文字弱化显示。 */
.brand > div > span {
  display: block;
  color: var(--sidebar-muted);
  font-size: 12px;
  margin-top: 2px;
}

/* 分组导航由 JS 按权限渲染，保留分组、展开和当前页面高亮。 */
.nav {
  display: grid;
  gap: 8px;
}

.nav-section {
  display: grid;
  gap: 4px;
}

.nav-group-toggle,
.nav-leaf {
  width: 100%;
  height: 40px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #cbd5df;
  text-align: left;
  padding: 0 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.nav-group-toggle:hover,
.nav-leaf:hover {
  background: var(--sidebar-hover);
  color: #fff;
}

.nav-group-toggle:focus,
.nav-leaf:focus,
.nav-group-toggle:active,
.nav-leaf:active {
  outline: none;
  background: transparent;
}

.nav-group-toggle:focus-visible,
.nav-leaf:focus-visible {
  box-shadow: 0 0 0 2px rgba(232, 242, 248, 0.38);
}

.nav-group-toggle.active {
  color: #fff;
}

.nav-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 12px;
  flex: 0 0 auto;
}

.nav-caret {
  margin-left: auto;
  color: var(--sidebar-muted);
  transition: transform 0.16s ease;
}

.nav-section.expanded .nav-caret {
  transform: rotate(90deg);
}

.nav-section.collapsed .nav-children {
  display: none;
}

.nav-children {
  display: grid;
  gap: 3px;
  padding-left: 26px;
}

.nav-leaf {
  height: 34px;
  color: #b9c5d1;
}

.nav-leaf-root {
  height: 40px;
  padding-left: 10px;
}

.nav-level-1.nav-group-toggle {
  height: 34px;
  color: #d6dee7;
  font-size: 13px;
}

.nav-level-2.nav-leaf {
  height: 30px;
  padding-left: 12px;
  color: var(--sidebar-muted);
  font-size: 12px;
}

.nav-level-2.nav-leaf::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.58;
}

.nav-leaf.active {
  background: var(--sidebar-active);
  color: var(--primary-dark);
  font-weight: 600;
}

.nav-leaf.active .nav-icon {
  background: #fff;
  color: var(--primary);
}

/* 主内容区域。 */
.main {
  min-width: 0;
  padding: 18px;
}

/* 顶部栏展示模块标题和服务状态。 */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

/* 页面标题保持后台密度，不做大字号英雄。 */
.topbar h1 {
  margin: 0;
  font-size: 22px;
}

.top-system-name {
  margin-bottom: 3px;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 700;
}

/* 页面副标题用于说明当前视图。 */
.topbar p {
  margin: 4px 0 0;
  color: var(--muted);
}

/* 服务连接状态。 */
.server-state {
  padding: 7px 10px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
}

/* 顶部当前员工区承载本人操作入口；调试下拉仍收在隐藏面板里。 */
.operator-switcher {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto auto auto;
  gap: 8px;
  align-items: center;
  max-width: 980px;
}

.operator-summary {
  min-height: 36px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  white-space: nowrap;
}

/* 调试入口由 JS 按 DEBUG_UI 动态注入；display: contents 让按钮和面板继续参与顶部栏原有网格布局。 */
#devDebugMount {
  display: contents;
}

.debug-toggle {
  min-height: 36px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  padding: 0 10px;
  cursor: pointer;
}

.debug-toggle:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.dev-debug-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 420px);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px dashed var(--panel-border);
  border-radius: var(--radius);
  background: #fff;
}

.dev-debug-panel[hidden] {
  display: none;
}

.debug-copy {
  display: grid;
  gap: 4px;
}

.debug-copy strong {
  font-size: 13px;
}

.debug-copy span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

/* 视图默认隐藏，由 JS 切换。 */
.view {
  display: none;
}

/* 当前视图显示。 */
.view.active {
  display: grid;
  gap: 16px;
  min-width: 0;
}

/* 面板承载表单和表格。 */
.panel {
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}

/* 面板头部容纳标题和工具。 */
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

/* 面板标题保持紧凑。 */
.panel h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}

/* 首页和报表卡片网格。 */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
}

/* 指标卡片。 */
.metric-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}

/* 指标名弱化，便于数值突出。 */
.metric-card span {
  color: var(--muted);
  font-size: 12px;
}

/* 指标值。 */
.metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
}

/* 两列布局用于列表和报表。 */
.split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

/* 组织管理二级页签一次只展示一个子模块；这些分栏在组织页内固定铺满，避免城市列表卡片停留在半宽导致表格操作列被挤出。 */
#view-organization .organization-split-grid {
  grid-template-columns: minmax(0, 1fr);
}

/* 模块内二级切换用于组织、权限和基础配置，当前只展开一个子模块内容。 */
.module-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.module-tabs button {
  border: 1px solid var(--panel-border);
  background: #fff;
  color: var(--text);
}

.module-tabs button.active,
.module-tabs button:hover {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

/* PC 后台工作台标签栏：记录已打开页面，切换时恢复筛选、分页和滚动位置。 */
.workspace-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  max-width: 100%;
  min-width: 0;
  margin: 0 0 10px;
  padding: 6px 0 8px;
  overflow-x: auto;
  overflow-y: hidden;
  border-bottom: 1px solid var(--panel-border);
}

.workspace-tab {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 6px;
  height: 30px;
  padding: 0 8px 0 10px;
  border: 1px solid #d5e0ea;
  border-radius: 6px;
  background: #fff;
  color: #34495e;
  white-space: nowrap;
}

.workspace-tab.active {
  border-color: #7aa7c7;
  background: #edf6fb;
  color: #16384f;
  font-weight: 700;
}

.workspace-tab em {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  color: #6b7f91;
  font-style: normal;
  line-height: 1;
}

.workspace-tab em:hover {
  background: #dbe8f1;
  color: #1f3344;
}

body.boss-mobile-report-route .workspace-tabs,
body.boss-mobile-direct-route .workspace-tabs {
  display: none;
}

/* 广告模块分层入口说明：只放业务去向和当前状态，避免把多个维护入口混在一个大表格前。 */
.info-strip {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.info-strip strong {
  color: var(--text);
  font-size: 14px;
}

.info-strip span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

/* 本地推接入说明用于解释平台字段来源，避免普通使用者把来客字段和企微后台字段混淆。 */
.local-push-guide {
  margin-bottom: 12px;
}

/* 本地推模块按业务动作拆卡片：账号同步、创建、查询、列表各自独立，避免配置值和接口返回值混在一起。 */
.local-push-cards {
  display: grid;
  gap: 14px;
}

.local-push-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: #fff;
}

.local-push-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.local-push-card-head h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.local-push-card-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.field-guide-card {
  overflow-x: auto;
  margin: 10px 0 14px;
}

.field-guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #fff;
}

.field-guide-table th,
.field-guide-table td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.field-guide-table th {
  background: #f8fafc;
  color: var(--text);
}

.field-help {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

/* 表单网格默认四列。 */
.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  align-items: end;
}

.form-section {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  margin: 0;
}

.form-section legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 13px;
}

/* 紧凑表单用于筛选。 */
.form-grid.compact {
  grid-template-columns: repeat(3, minmax(160px, 220px));
}

/* 动态客服包成员统计筛选：只服务包内成员表，不影响底部分配日志筛选。 */
.dynamic-member-stats-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  margin: 10px 0 12px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.dynamic-member-stats-title {
  align-self: center;
  min-width: 160px;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.dynamic-member-stats-filter label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

.dynamic-member-stats-filter input[type="date"] {
  min-width: 140px;
}

/* 单列表单用于配置卡片。 */
.form-grid.single {
  grid-template-columns: 1fr;
}

/* 跨列字段。 */
.form-grid .wide {
  grid-column: span 2;
}

/* 本地推创建客服组选择器：替代原生多选框，避免长 userid 文案挤压并保留 members 提交字段。 */
.local-push-member-field {
  min-width: 420px;
}

.local-push-member-combobox {
  position: relative;
  display: grid;
  gap: 8px;
}

.local-push-member-summary {
  min-height: 36px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid #cbd5df;
  border-radius: 6px;
  background: #f8fafc;
  color: var(--text);
}

.local-push-member-placeholder {
  color: var(--muted);
  font-size: 13px;
}

.local-push-member-chip {
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e8f1ff;
  color: #174ea6;
  font-size: 12px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.local-push-member-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.local-push-member-input-row input {
  min-width: 0;
}

.local-push-member-options {
  position: absolute;
  z-index: 80;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  min-width: 420px;
  max-height: 280px;
  overflow: auto;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid #cbd5df;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16);
}

.local-push-member-options[hidden] {
  display: none;
}

.local-push-member-option {
  width: 100%;
  min-height: 76px;
  height: auto;
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.local-push-member-option:hover {
  border-color: var(--primary);
  background: #f8fbff;
}

.local-push-member-option strong {
  font-size: 14px;
}

.local-push-member-option span,
.local-push-member-option em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.local-push-member-option .is-ready {
  color: #047857;
}

.local-push-member-option .is-missing {
  color: #b45309;
}

.local-push-member-option.is-selected {
  border-color: #2563eb;
  background: #eef5ff;
}

.local-push-member-option.is-disabled {
  background: #fff7ed;
}

.local-push-member-empty {
  padding: 18px 10px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

/* 全局定金新增只保留历史兼容补录提示，避免被误认为新的主收款入口。 */
.form-note {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.form-section .form-note {
  grid-column: 1 / -1;
}

/* 表单标签使用纵向结构。 */
label {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

.form-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

.form-field-label {
  font-size: 14px;
}

/* 表单控件统一尺寸。 */
input,
select,
textarea,
button {
  font: inherit;
}

/* 输入控件样式。 */
input,
select,
textarea {
  width: 100%;
  border: 1px solid #cbd5df;
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 0 10px;
}

input,
select {
  height: 36px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
  outline: 0;
}

/* 表单按钮区。 */
.form-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* 报表统一日期筛选器：开始/结束日期配合快捷项，清空只影响查询范围，不改变业务数据写入时间。 */
.report-date-filter .report-date-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-width: 260px;
}

.report-date-filter .report-date-shortcuts button {
  height: 34px;
  padding: 0 10px;
  white-space: nowrap;
}

/* 综合看板多选筛选：用于平台、账户、城市搜索勾选，不让操作人手填 ID。 */
.combined-report-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
}

.combined-report-form label {
  min-width: 0;
  flex: 0 1 160px;
}

.combined-report-form label:has(input[type="date"]) {
  flex-basis: 132px;
}

.combined-report-form label:has(#combinedReportAccount) {
  flex-basis: 260px;
}

.combined-report-form .form-actions {
  flex-wrap: nowrap;
  align-self: end;
  flex: 0 0 auto;
}

.combined-report-form .form-actions button {
  white-space: nowrap;
}

.multi-select-filter {
  position: relative;
  min-width: 0;
}

.multi-select-summary {
  width: 100%;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: #f8fafc;
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
}

.multi-select-summary span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multi-select-caret {
  color: var(--muted);
  flex: 0 0 auto;
}

.multi-select-popover {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  min-width: 260px;
  padding: 8px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.14);
}

.multi-select-filter input[type="search"] {
  height: 32px;
  width: 100%;
}

.multi-select-toolbar {
  display: flex;
  justify-content: space-between;
  margin: 6px 0;
}

.multi-select-options {
  max-height: 260px;
  overflow: auto;
  display: grid;
  gap: 4px;
  padding: 2px 0;
}

.multi-select-options .checkline {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  min-width: 0;
  padding: 5px 4px;
}

.multi-select-options .checkline span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multi-select-options input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.city-cell {
  display: grid;
  gap: 4px;
}

.city-cell span {
  color: var(--muted);
  font-size: 12px;
}

/* 配置页表单和列表保持清晰间距。 */
.panel form + .table-wrap,
.panel form + .empty {
  margin-top: 12px;
}

/* 主按钮。 */
button {
  height: 36px;
  border: 0;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  padding: 0 12px;
  cursor: pointer;
}

/* 按钮悬停。 */
button:hover {
  background: var(--primary-dark);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

/* 侧边栏按钮不继承通用主按钮底色，由分组导航样式单独控制。 */
.sidebar .nav button {
  background: transparent;
  color: #cbd5df;
}

.sidebar .nav button:hover {
  background: var(--sidebar-hover);
  color: #fff;
}

.sidebar .nav button:focus,
.sidebar .nav button:active {
  background: transparent;
}

.sidebar .nav button:focus-visible {
  box-shadow: 0 0 0 2px rgba(232, 242, 248, 0.38);
}

.sidebar .nav .nav-group-toggle.active {
  color: #fff;
}

.sidebar .nav .nav-leaf.active {
  background: var(--sidebar-active);
  color: var(--primary-dark);
}

/* 小按钮用于表格操作。 */
.table-actions button {
  height: 30px;
  margin-right: 6px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 12px;
}

.appointment-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 132px;
}

.appointment-row-actions button {
  margin-right: 0;
}

.appointment-action-toggle {
  min-width: 48px;
}

/* 到店入口先从预约主操作区收敛到更多操作，等待后续统一调整到店口径。 */
.more-actions,
.appointment-action-menu {
  position: relative;
  display: inline-block;
  margin-left: 2px;
}

.more-actions summary,
.appointment-action-menu summary {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  list-style: none;
}

.more-actions summary::-webkit-details-marker,
.appointment-action-menu summary::-webkit-details-marker {
  display: none;
}

.more-actions[open] summary,
.appointment-action-menu[open] summary {
  border-color: var(--primary);
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.more-actions > div,
.appointment-action-menu > div {
  position: absolute;
  right: 0;
  top: 34px;
  z-index: 5;
  display: grid;
  gap: 6px;
  min-width: 88px;
  padding: 8px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: #fff;
  box-shadow: var(--shadow);
}

.appointment-action-menu > div {
  min-width: 154px;
}

.detail-item .appointment-action-menu > div {
  left: 0;
  right: auto;
}

.detail-record-card .appointment-action-menu > div {
  /* 客户详情预约卡片在抽屉窄视口内靠左展示，菜单向右展开，避免“补收定金”等操作被抽屉边缘裁掉。 */
  left: 0;
  right: auto;
}

.appointment-action-group {
  display: grid;
  gap: 6px;
  padding: 6px 0;
  border-top: 1px solid #edf1f5;
}

.appointment-action-group:first-child {
  padding-top: 0;
  border-top: 0;
}

.appointment-action-group > span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.more-actions > div button,
.appointment-action-menu > div button {
  width: 100%;
  margin: 0;
}

/* 预约列表的处理菜单挂到 body，脱离表格滚动容器和分页层级，最后一行可按按钮位置自动向上展开。 */
.appointment-action-floating-menu {
  position: fixed;
  z-index: 1300;
  display: grid;
  gap: 6px;
  min-width: 172px;
  max-width: min(240px, calc(100vw - 16px));
  padding: 8px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.18);
}

.appointment-action-floating-menu button {
  width: 100%;
  height: 30px;
  margin: 0;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 12px;
}

/* 危险操作按钮。 */
button.danger {
  background: var(--danger);
}

button.danger:hover {
  background: var(--danger-dark);
}

/* 次级按钮。 */
button.secondary {
  border: 1px solid var(--panel-border);
  background: #fff;
  color: var(--text);
}

button.secondary:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-dark);
}

/* 内联工具栏。 */
.inline-tools {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* 后台管理列表统一筛选栏。 */
.list-tools {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 120px auto;
  gap: 8px;
  align-items: end;
  margin: 0 0 10px;
}

.list-tools.single {
  grid-template-columns: minmax(180px, 1fr) auto;
}

/* 客户列表筛选区面向客服日常找人：关键词、类型、预约和加微放前排，日期、客服和来源作为收窄条件。 */
.customer-list-tools {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 8px;
  align-items: end;
  margin: 0 0 10px;
}

.customer-list-filter-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 6px 16px rgba(31, 41, 51, 0.04);
}

.customer-list-filter-row {
  display: grid;
  gap: 12px;
  align-items: end;
}

.customer-list-filter-row.first,
.customer-list-filter-row.second {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.customer-list-filter-row.third {
  grid-template-columns: minmax(170px, 1fr) minmax(150px, 1fr) minmax(150px, 1fr) auto;
}

.customer-list-filter-actions {
  justify-content: flex-end;
  align-self: end;
  min-width: 148px;
}

.admin-filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* 城市管理列表列数少但操作按钮集中；局部压缩表格最小宽度并固定操作列，防止编辑、启停、删除类按钮被裁切。 */
#cityTable .list-tools {
  grid-template-columns: minmax(260px, 1fr) 150px auto;
}

#cityTable table {
  min-width: 620px;
  table-layout: fixed;
}

#cityTable th:first-child,
#cityTable td:first-child {
  width: 42%;
}

#cityTable th:nth-child(2),
#cityTable td:nth-child(2),
#cityTable th:nth-child(3),
#cityTable td:nth-child(3) {
  width: 16%;
}

#cityTable th:last-child,
#cityTable td.table-actions {
  width: 210px;
}

#cityTable td.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  white-space: normal;
}

#cityTable .table-actions button {
  flex: 0 0 auto;
  margin-right: 0;
}

/* 预约列表筛选项带可见标签，避免多个“全部”下拉语义不清。 */
.appointment-tools {
  grid-template-columns: minmax(190px, 1.3fr) repeat(6, minmax(96px, 0.7fr));
  align-items: end;
  gap: 6px;
}

.appointment-tools .filter-field:has(.segmented-filter),
.appointment-tools .appointment-list-date-range {
  grid-column: span 2;
}

.appointment-tools .admin-filter-actions {
  min-width: 126px;
}

.appointment-filter-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: center;
  margin: 4px 0 10px;
  color: var(--muted);
  font-size: 12px;
}

.appointment-filter-summary strong {
  color: var(--text);
  font-weight: 600;
}

/* 订单列表筛选区给后台客服按实付金额和客户主档类型收窄订单，不影响收款、退款和删除按钮区域。 */
.order-list-tools {
  grid-template-columns: minmax(210px, 1.2fr) minmax(120px, 0.7fr) minmax(120px, 0.7fr) minmax(120px, 0.7fr) auto;
}

.order-service-cell {
  display: grid;
  gap: 2px;
  min-width: 140px;
  max-width: 180px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  white-space: normal;
}

.order-service-cell span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 预约看板用于后台客服按日期和门店查看床位容量；这里只做展示层压缩和搜索筛选，不改变床位占位业务逻辑。 */
.appointment-view-switch {
  display: inline-flex;
  gap: 4px;
  padding: 2px;
  margin-bottom: 4px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #f8fafc;
}

.appointment-view-switch button {
  min-height: 26px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
}

.appointment-view-switch button.active {
  background: #0f766e;
  color: #fff;
}

.appointment-board {
  display: grid;
  gap: 4px;
}

.appointment-board-filters {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 5px;
  padding: 4px 6px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.appointment-board-filters .filter-field {
  gap: 3px;
}

.appointment-board-filters input,
.appointment-board-filters select,
.appointment-board-filters button {
  min-height: 28px;
}

.appointment-board-filters input,
.appointment-board-filters select {
  padding: 5px 8px;
}

.appointment-board-filters .admin-filter-actions {
  align-self: end;
}

.appointment-board-layout {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 6px;
  align-items: start;
}

.appointment-board-sidebar {
  position: sticky;
  top: 8px;
  max-height: calc(100vh - 144px);
  overflow: auto;
}

.appointment-board-store-list {
  display: grid;
  gap: 6px;
}

.appointment-board-store {
  width: 100%;
  min-height: 0;
  text-align: left;
  border: 1px solid #dbe3ef;
  border-radius: 6px;
  padding: 5px 6px;
  background: #fff;
  color: #0f172a;
}

.appointment-board-store.active {
  border-color: #0f766e;
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.12);
}

.appointment-board-store-title,
.appointment-board-store-meta {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
}

.appointment-board-store strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.appointment-board-store-meta {
  margin-top: 3px;
  color: #64748b;
  font-size: 11px;
}

.appointment-board-store-meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appointment-board-store-meta small {
  flex: 0 0 auto;
  padding: 1px 5px;
  border-radius: 999px;
  background: #fff7ed;
  color: #b45309;
  font-size: 11px;
  line-height: 1.35;
}

.appointment-board-store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  flex: 0 0 auto;
}

.appointment-board-store-badges em {
  padding: 0 4px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  font-style: normal;
  line-height: 1.35;
}

.appointment-board-store-badges em.available {
  background: #ecfdf5;
  color: #047857;
}

.appointment-board-main {
  min-width: 0;
}

.appointment-board-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  min-height: 18px;
  margin-bottom: 2px;
  color: #475569;
  font-size: 12px;
}

.appointment-board-summary strong {
  color: #0f172a;
  font-size: 13px;
}

.appointment-board-summary em {
  font-style: normal;
  color: #b45309;
}

.appointment-board-grid-wrap {
  overflow: auto;
  max-height: calc(100vh - 132px);
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #fff;
}

.appointment-board-grid {
  width: max-content;
  min-width: 0;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.appointment-board-grid th,
.appointment-board-grid td {
  width: 124px;
  min-width: 124px;
  max-width: 124px;
  height: 20px;
  padding: 1px;
  border-right: 1px solid #edf2f7;
  border-bottom: 1px solid #edf2f7;
  vertical-align: middle;
}

.appointment-board-grid thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 22px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
}

.appointment-board-grid .time-col {
  position: sticky;
  left: 0;
  z-index: 3;
  min-width: 56px;
  width: 56px;
  max-width: 56px;
  background: #f8fafc;
  color: #475569;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
}

.appointment-board-grid thead .time-col {
  z-index: 4;
}

.appointment-board-cell {
  display: grid;
  align-content: center;
  gap: 1px;
  width: 100%;
  height: 100%;
  min-height: 18px;
  padding: 1px 4px;
  border: 1px solid transparent;
  border-radius: 5px;
  text-align: left;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.12;
}

button.appointment-board-cell.available,
.appointment-board-cell.available {
  align-content: center;
  justify-items: center;
  background: #fff !important;
  border-color: #edf2f7 !important;
  color: #94a3b8 !important;
  box-shadow: none !important;
}

.appointment-board-cell.available:not(.readonly) {
  cursor: pointer;
}

button.appointment-board-cell.available:not(.readonly):hover,
button.appointment-board-cell.available:not(.readonly):focus-visible {
  border-color: #cbd5e1 !important;
  background: #f8fafc !important;
  color: #64748b !important;
}

.appointment-board-cell.available span {
  opacity: 0;
  font-size: 10px;
  font-weight: 500;
}

.appointment-board-cell.available:not(.readonly):hover span,
.appointment-board-cell.available:not(.readonly):focus-visible span {
  opacity: 1;
}

button.appointment-board-cell.occupied,
.appointment-board-cell.occupied {
  align-content: start;
  background: #e0f2fe !important;
  border-color: #0ea5e9 !important;
  color: #075985 !important;
  box-shadow: none !important;
  cursor: pointer;
}

.appointment-board-cell.occupied.masked {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
}

.appointment-board-cell strong,
.appointment-board-cell span,
.appointment-board-cell small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appointment-board-cell span,
.appointment-board-cell small {
  color: inherit;
  opacity: 0.9;
  font-size: 10px;
}

.appointment-board-cell .appointment-board-customer-type {
  align-self: flex-start;
  max-width: 42px;
  padding: 1px 5px;
  border-radius: 999px;
  opacity: 1;
  font-weight: 700;
  line-height: 1.2;
}

.appointment-board-cell .appointment-board-customer-type.is-new {
  background: #fee2e2;
  color: #b91c1c;
}

.appointment-board-cell .appointment-board-customer-type.is-old {
  background: #dcfce7;
  color: #166534;
}

.appointment-board-occupied-slot {
  vertical-align: stretch;
}

.appointment-board-occupied-slot .appointment-board-cell {
  height: 100%;
  min-height: max(46px, calc((var(--board-span, 1) * 20px) - 3px));
}

.appointment-board-store-search {
  position: relative;
  flex: 1 1 280px;
  min-width: 240px;
  z-index: 20;
}

.appointment-board-store-search-box {
  position: relative;
  display: flex;
  gap: 4px;
  align-items: center;
}

.appointment-board-store-search-box input {
  min-width: 220px;
}

.appointment-board-store-search-box .secondary {
  flex: 0 0 auto;
}

.appointment-board-store-results {
  position: absolute;
  left: 0;
  top: calc(100% + 4px);
  z-index: 1600;
  width: min(360px, calc(100vw - 48px));
  max-height: 220px;
  overflow: auto;
  padding: 4px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
}

button.appointment-board-store-result,
.appointment-board-store-result {
  display: grid;
  gap: 2px;
  width: 100%;
  min-height: 30px;
  padding: 4px 7px;
  border: 0 !important;
  border-radius: 5px;
  background: #fff !important;
  color: #0f172a !important;
  box-shadow: none !important;
  text-align: left;
}

button.appointment-board-store-result:hover,
button.appointment-board-store-result:focus-visible,
.appointment-board-store-result:hover,
.appointment-board-store-result:focus-visible {
  background: #f8fafc !important;
  color: #0f172a !important;
}

.appointment-board-store-result strong,
.appointment-board-store-result span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appointment-board-store-result span {
  color: #64748b;
  font-size: 11px;
}

.appointment-board-store-result.empty {
  padding: 10px;
  color: #64748b;
  font-size: 12px;
}

.appointment-board-empty {
  padding: 32px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #64748b;
  text-align: center;
}

.appointment-board-empty.error {
  color: #b91c1c;
  background: #fef2f2;
  border-color: #fecaca;
}

.appointment-board-floating-menu {
  position: fixed;
  z-index: 1300;
  width: 198px;
  padding: 8px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18);
}

.appointment-board-floating-menu .appointment-action-group {
  display: grid;
  gap: 5px;
}

.appointment-board-floating-menu .appointment-action-group + .appointment-action-group {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #edf2f7;
}

.appointment-board-floating-menu .appointment-action-group > span {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.appointment-board-floating-menu button {
  justify-content: flex-start;
  min-height: 28px;
  font-size: 12px;
}

.appointment-board-floating-menu small {
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.operation-log-tools {
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  align-items: end;
}

.operation-log-filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.operation-log-summary {
  display: inline-block;
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

.list-section {
  display: grid;
  gap: 10px;
}

.filter-field {
  display: grid;
  gap: 6px;
}

.filter-field > span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

/* 通用日期范围选择器：显示层用一个紧凑按钮，隐藏字段继续承载 start_date/end_date 查询值。 */
.date-range-picker {
  position: relative;
}

.date-range-trigger {
  width: 100%;
  height: 28px;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid #d5d9d2;
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  line-height: 26px;
  text-align: left;
  white-space: nowrap;
}

.date-range-trigger:hover,
.date-range-trigger:focus {
  border-color: var(--primary);
  background: #fff;
  outline: none;
}

.date-range-popover {
  position: fixed;
  z-index: 1200;
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(25, 59, 49, 0.14);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(31, 41, 51, 0.18);
  color: var(--text);
}

.date-range-shortcuts {
  display: grid;
  gap: 4px;
  align-content: start;
  padding-right: 8px;
  border-right: 1px solid #edf0eb;
}

.date-range-shortcuts button {
  height: 26px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #40534c;
  font-size: 13px;
  text-align: left;
}

.date-range-shortcuts button:hover {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.date-range-calendar {
  min-width: 0;
}

.date-range-calendar-head {
  display: grid;
  grid-template-columns: 28px 1fr 28px;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.date-range-calendar-head strong {
  font-size: 15px;
  text-align: center;
}

.date-range-calendar-head button {
  width: 28px;
  height: 26px;
  padding: 0;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: #fff;
  color: #40534c;
}

.date-range-weekdays,
.date-range-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
}

.date-range-weekdays span {
  color: var(--muted);
  font-size: 12px;
  line-height: 22px;
  text-align: center;
}

.date-range-days button {
  width: 100%;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: #fff;
  color: #25362f;
  font-size: 13px;
}

.date-range-days button.is-outside {
  color: #a7b0aa;
}

.date-range-days button.is-in-range {
  background: #edf7f3;
}

.date-range-days button.is-selected {
  background: var(--primary);
  color: #fff;
}

.date-range-days button:hover {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.date-range-days button.is-selected:hover {
  background: var(--primary);
  color: #fff;
}

.date-range-draft {
  min-height: 18px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.segmented-filter {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid #cbd5df;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.segmented-filter button {
  min-width: 0;
  border-radius: 0;
  border-right: 1px solid #cbd5df;
  background: #fff;
  color: var(--muted);
}

.segmented-filter button:last-child {
  border-right: 0;
}

.segmented-filter button.active,
.segmented-filter button:hover {
  background: var(--primary);
  color: #fff;
}

/* 表格容器支持横向滚动。 */
.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
}

/* 分页栏用于客户、预约、订单、定金、广告和本地推高频列表；只承载翻页与每页条数，避免一次拉取过多数据。 */
.pagination-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.pagination-bar span {
  color: var(--text);
  line-height: 1.4;
}

.pagination-bar label {
  display: inline-flex;
  grid-template-columns: none;
  gap: 6px;
  align-items: center;
}

.pagination-bar select {
  width: auto;
  min-width: 76px;
}

/* 本地推客服组列表只展示压缩摘要；完整成员和原始响应通过详情/折叠区查看，避免列表无限拉长。 */
.truncate-text {
  display: inline-block;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

.local-push-member-brief {
  display: flex;
  gap: 6px;
  align-items: center;
  max-width: 320px;
  min-height: 24px;
}

.debug-raw-response {
  margin-top: 10px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: #fff;
}

.debug-raw-response summary {
  cursor: pointer;
  padding: 8px 10px;
  color: var(--primary-dark);
  font-weight: 700;
}

.debug-raw-response .debug-pre {
  margin: 0;
  border-top: 1px solid var(--panel-border);
}

/* 数据表格。 */
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

#customerTable .table-wrap table {
  min-width: 1120px;
}

#customerTable .table-wrap th:last-child,
#customerTable .table-wrap td:last-child {
  min-width: 112px;
}

/* 表头和单元格。 */
th,
td {
  border-bottom: 1px solid #edf1f5;
  padding: 11px 10px;
  text-align: left;
  white-space: nowrap;
}

/* 表头强调。 */
th {
  color: var(--muted);
  font-weight: 600;
  background: #f3f6f9;
  font-size: 12px;
}

tbody tr:hover {
  background: #f8fbff;
}

tbody tr:last-child td {
  border-bottom: 0;
}

/* 标签用于状态展示。 */
.tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  border-radius: 999px;
  padding: 0 8px;
  background: var(--info-soft);
  color: var(--info);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

/* 风险标签。 */
.tag.warning {
  background: var(--warning-soft);
  color: var(--warning);
}

/* 成功标签。 */
.tag.success {
  background: var(--success-soft);
  color: var(--success);
}

.tag.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.tag.info {
  background: var(--info-soft);
  color: var(--info);
}

.tag.muted {
  background: var(--muted-soft);
  color: var(--muted);
}

.table-main-text {
  display: block;
  color: var(--text);
  font-weight: 700;
}

/* 客户列表姓名区用于紧凑展示客户身份和广告重粉风险；标签贴近姓名，不新增列也不撑高行。 */
.customer-name-main {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 18px;
  vertical-align: top;
}

.customer-name-main .table-main-text {
  display: inline;
}

.customer-name-main .tag {
  height: 18px;
  padding: 0 5px;
  font-size: 10.5px;
  line-height: 18px;
}

/* 平台汇总报表横向指标较多，首列固定方便对照每个平台。 */
.platform-summary-panel {
  overflow: hidden;
}

.platform-summary-filter {
  grid-template-columns: repeat(7, minmax(128px, 1fr));
  align-items: end;
  padding: 12px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: #fff;
}

.platform-summary-date-range {
  grid-column: span 2;
}

.platform-summary-date-range span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 6px;
  align-items: center;
}

.platform-summary-date-range em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.platform-summary-table-wrap {
  border-radius: 4px;
}

.platform-summary-table {
  min-width: 1520px;
}

.platform-summary-table th,
.platform-summary-table td {
  height: 40px;
  padding: 8px 10px;
}

.platform-summary-table tbody tr:nth-child(even) td {
  background: #fafbfc;
}

.platform-summary-table th:first-child,
.platform-summary-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 132px;
  background: #fff;
  font-weight: 700;
}

.platform-summary-table tbody tr:nth-child(even) td:first-child {
  background: #fafbfc;
}

.platform-summary-table th:first-child {
  z-index: 2;
  background: #f3f6f9;
}

.platform-summary-table th:not(:first-child),
.platform-summary-table td:not(:first-child) {
  text-align: right;
}

.platform-summary-table .platform-summary-total td {
  background: #f3f6f9;
  font-weight: 750;
}

.platform-summary-table .platform-summary-total td:first-child {
  background: #f3f6f9;
}

/* 运营报表第一版服务 PC 后台运营复盘广告客户转化，维度和指标较多，因此使用紧凑筛选和宽表横向滚动。 */
.operation-report-panel {
  overflow: hidden;
  padding: 12px;
}

.operation-report-panel .panel-head {
  margin-bottom: 8px;
}

.operation-report-panel .panel-head p {
  margin: 2px 0 0;
  font-size: 12px;
  line-height: 1.35;
}

.operation-report-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 10px;
  padding: 8px 10px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: #fff;
}

.operation-report-filter label {
  flex: 0 0 176px;
  min-width: 0;
  gap: 4px;
  font-size: 12px;
  line-height: 1.2;
}

.operation-report-filter label:has(select[name="business_unit_id"]),
.operation-report-filter label:has(select[name="brand_id"]),
.operation-report-filter label:has(select[name="attribution_mode"]),
.operation-report-filter label:has(select[name="operator_id"]) {
  flex-basis: 180px;
}

.operation-report-filter label:has(input[name="ad_account_id"]),
.operation-report-filter label:has(input[name="project_id"]),
.operation-report-filter label:has(input[name="plan_id"]),
.operation-report-filter label:has(input[name="ad_id"]),
.operation-report-filter label:has(input[name="material_id"]) {
  flex-basis: 168px;
}

.operation-report-filter input,
.operation-report-filter select,
.operation-report-filter button {
  height: 34px;
  font-size: 13px;
}

.operation-report-filter input,
.operation-report-filter select {
  padding: 0 8px;
}

.operation-report-filter .operation-report-date-range {
  flex: 0 0 300px;
}

.operation-report-date-range span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 6px;
  align-items: center;
}

.operation-report-date-range em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.operation-report-filter .form-actions {
  flex: 0 0 auto;
  align-self: flex-end;
  margin-left: auto;
  gap: 6px;
}

.operation-report-filter .form-actions button {
  min-width: 58px;
  padding: 0 12px;
  white-space: nowrap;
}

#operationReportTable {
  margin-top: 8px;
}

.operation-report-table-wrap {
  border-radius: 6px;
}

.operation-report-table {
  min-width: 2040px;
}

.operation-report-table th,
.operation-report-table td {
  height: 40px;
  padding: 8px 10px;
}

.operation-report-table tbody tr:nth-child(even) td {
  background: #fafbfc;
}

.operation-report-table th:nth-child(n+9),
.operation-report-table td:nth-child(n+9) {
  text-align: right;
}

.operation-report-table th:first-child,
.operation-report-table td:first-child {
  text-align: center;
  width: 48px;
}

.operation-report-table th:nth-child(2),
.operation-report-table td:nth-child(2) {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 116px;
  background: #fff;
  font-weight: 700;
}

.operation-report-table tbody tr:nth-child(even) td:nth-child(2) {
  background: #fafbfc;
}

.operation-report-table th:nth-child(2) {
  z-index: 2;
  background: #f3f6f9;
}

/* 客服报表第一版是跨指标宽表，横向滚动并让数字列右对齐，方便管理层按客服横向核对。 */
.customer-service-report-panel {
  overflow: hidden;
}

.customer-service-report-filter {
  grid-template-columns: repeat(5, minmax(128px, 1fr));
  align-items: end;
  padding: 12px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: #fff;
}

.customer-service-report-table {
  min-width: 1960px;
}

.customer-service-report-table th,
.customer-service-report-table td {
  height: 40px;
  padding: 8px 10px;
}

.customer-service-report-table tbody tr:nth-child(even) td {
  background: #fafbfc;
}

.customer-service-report-table th:nth-child(n+3),
.customer-service-report-table td:nth-child(n+3) {
  text-align: right;
}

.customer-service-report-table th:first-child,
.customer-service-report-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 128px;
  background: #fff;
  font-weight: 700;
}

.customer-service-report-table th:nth-child(2),
.customer-service-report-table td:nth-child(2) {
  position: sticky;
  left: 128px;
  z-index: 1;
  min-width: 112px;
  background: #fff;
  font-weight: 700;
}

.customer-service-report-table tbody tr:nth-child(even) td:first-child,
.customer-service-report-table tbody tr:nth-child(even) td:nth-child(2) {
  background: #fafbfc;
}

.customer-service-report-table th:first-child,
.customer-service-report-table th:nth-child(2) {
  z-index: 2;
  background: #f3f6f9;
}

.customer-service-report-table .customer-service-report-total td {
  background: #f3f6f9;
  font-weight: 750;
}

.customer-service-report-table .customer-service-report-total td:first-child,
.customer-service-report-table .customer-service-report-total td:nth-child(2) {
  background: #f3f6f9;
}

/* 老师报表：宽表只读展示老师业绩，固定老师和门店两列，避免 13 个指标压缩到不可读。 */
.teacher-report-panel {
  overflow: hidden;
}

.teacher-report-filter {
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  align-items: end;
  padding: 12px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: #fff;
}

.teacher-report-table {
  min-width: 1420px;
}

.teacher-report-table th,
.teacher-report-table td {
  height: 40px;
  padding: 8px 10px;
}

.teacher-report-table tbody tr:nth-child(even) td {
  background: #fafbfc;
}

.teacher-report-table th:nth-child(n+3),
.teacher-report-table td:nth-child(n+3) {
  text-align: right;
}

.teacher-report-table th:first-child,
.teacher-report-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 116px;
  background: #fff;
  font-weight: 700;
}

.teacher-report-table th:nth-child(2),
.teacher-report-table td:nth-child(2) {
  position: sticky;
  left: 116px;
  z-index: 1;
  min-width: 128px;
  background: #fff;
  font-weight: 700;
}

.teacher-report-table tbody tr:nth-child(even) td:first-child,
.teacher-report-table tbody tr:nth-child(even) td:nth-child(2) {
  background: #fafbfc;
}

.teacher-report-table th:first-child,
.teacher-report-table th:nth-child(2) {
  z-index: 2;
  background: #f3f6f9;
}

.teacher-report-table .teacher-report-total td,
.teacher-report-table .teacher-report-total td:first-child,
.teacher-report-table .teacher-report-total td:nth-child(2) {
  background: #f3f6f9;
  font-weight: 750;
}

/* 门店报表：16 列指标需要横向滚动，固定门店列，避免新客含流失、退款和净业绩指标挤压变形。 */
.store-performance-report-panel {
  overflow: hidden;
}

.store-performance-report-filter {
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  align-items: end;
  padding: 12px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: #fff;
}

.store-performance-report-table {
  min-width: 1780px;
}

.store-performance-report-table th,
.store-performance-report-table td {
  height: 40px;
  padding: 8px 10px;
}

.store-performance-report-table tbody tr:nth-child(even) td {
  background: #fafbfc;
}

.store-performance-report-table th:nth-child(n+2),
.store-performance-report-table td:nth-child(n+2) {
  text-align: right;
}

.store-performance-report-table th:first-child,
.store-performance-report-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 148px;
  background: #fff;
  font-weight: 700;
  text-align: left;
}

.store-performance-report-table tbody tr:nth-child(even) td:first-child {
  background: #fafbfc;
}

.store-performance-report-table th:first-child {
  z-index: 2;
  background: #f3f6f9;
}

.store-performance-report-table .store-performance-report-total td,
.store-performance-report-table .store-performance-report-total td:first-child {
  background: #f3f6f9;
  font-weight: 750;
}

/* 手机端 BOSS 报表：深色移动优先面板，独立于桌面报表 metric-card，避免影响现有模块。 */
.boss-mobile-report-panel {
  background: #34343a;
  border-color: #34343a;
  padding: 0;
  overflow: hidden;
}

.boss-mobile-shell {
  position: relative;
  isolation: isolate;
  max-width: 430px;
  min-height: 100svh;
  margin: 0 auto;
  padding: max(12px, env(safe-area-inset-top)) 12px max(14px, env(safe-area-inset-bottom));
  background: #34343a;
  color: #f6f7fb;
}

.boss-mobile-watermark {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-repeat: repeat;
  background-size: 260px 160px;
}

.boss-mobile-watermark[hidden] {
  display: none;
}

.boss-mobile-header,
.boss-mobile-metrics {
  position: relative;
  z-index: 3;
}

.boss-mobile-header h2 {
  margin: 0 0 8px;
  font-size: 17px;
  letter-spacing: 0;
}

.boss-mobile-range-tabs {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 19px;
  background: #2c2c31;
}

.boss-mobile-range-tabs button {
  min-width: 0;
  height: 38px;
  padding: 0 2px;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0;
  background: transparent;
  color: #e8e8ec;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.boss-mobile-range-tabs button:last-child {
  border-right: 0;
}

.boss-mobile-range-tabs button.active {
  background: #050506;
  color: #ffffff;
}

.boss-mobile-date-line {
  display: flex;
  justify-content: center;
  margin: 8px 0 6px;
  color: #f7f7f8;
  font-size: 12px;
  font-weight: 700;
}

.boss-mobile-custom-range {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 56px;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.boss-mobile-custom-range input,
.boss-mobile-custom-range button {
  min-width: 0;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: #29292e;
  color: #ffffff;
  font-size: 12px;
}

.boss-mobile-custom-range button {
  border: 0;
  background: #23e6a8;
  color: #10231d;
  font-weight: 800;
}

.boss-mobile-metrics {
  display: grid;
  gap: 7px;
}

.boss-mobile-metric-row {
  position: relative;
  display: grid;
  gap: 7px;
  overflow: visible;
  min-height: 0;
  background: transparent;
}

.boss-mobile-metric-row.columns-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.boss-mobile-metric-row.columns-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.boss-mobile-funnel-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.boss-mobile-metric {
  position: relative;
  display: flex;
  min-width: 0;
  height: 68px;
  min-height: 0;
  padding: 6px 4px 5px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 7px;
  background: rgba(43, 43, 48, 0.88);
  text-align: center;
}

.boss-mobile-metric-row.columns-3 .boss-mobile-metric,
.boss-mobile-funnel-row .boss-mobile-metric {
  height: 72px;
}

.boss-mobile-metric span {
  max-width: 100%;
  color: #c7c7ce;
  font-size: 12px;
  line-height: 1.1;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.boss-mobile-metric strong {
  display: block;
  max-width: 100%;
  margin-top: 4px;
  color: #23e6a8;
  font-size: 22px;
  line-height: 1.05;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.boss-mobile-metric-row.columns-3 .boss-mobile-metric strong,
.boss-mobile-funnel-row .boss-mobile-metric strong {
  font-size: 25px;
}

.boss-mobile-conversion-arrow {
  position: absolute;
  top: 6px;
  z-index: 4;
  width: 82px;
  transform: translateX(-50%);
  color: #34f5bd;
  font-size: 10px;
  line-height: 1;
  font-weight: 850;
  pointer-events: none;
  text-align: center;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.7);
  white-space: nowrap;
}

.boss-mobile-conversion-arrow-1 {
  left: 33.333%;
}

.boss-mobile-conversion-arrow-2 {
  left: 66.666%;
}

.boss-mobile-loading,
.boss-mobile-error {
  display: grid;
  min-height: 260px;
  place-items: center;
  gap: 10px;
  color: #e7e7ec;
  text-align: center;
}

.boss-mobile-error span {
  color: #ffb4b4;
}

.boss-mobile-error button {
  width: auto;
  background: #23e6a8;
  color: #10231d;
}

body.boss-mobile-direct-route .app-shell {
  grid-template-columns: 1fr;
}

body.boss-mobile-direct-route {
  background: #34343a;
}

body.boss-mobile-direct-route .global-watermark,
body.boss-mobile-report-route .global-watermark {
  display: none;
}

body.boss-mobile-direct-route .sidebar,
body.boss-mobile-direct-route .topbar,
body.boss-mobile-direct-route #view-reports > .module-tabs {
  display: none;
}

body.boss-mobile-direct-route .main,
body.boss-mobile-direct-route #view-reports {
  display: block;
  gap: 0;
  padding: 0;
}

body.boss-mobile-direct-route #view-reports > :not(.boss-mobile-report-panel) {
  display: none !important;
}

body.boss-mobile-direct-route .boss-mobile-report-panel {
  border: 0;
  border-radius: 0;
}

/* 广告客服开关页是横向运营表：数字右对齐，开关和同步状态固定展示，避免状态变化导致列宽跳动。 */
.ad-customer-switch-panel {
  overflow: hidden;
}

.ad-customer-switch-fallback-panel {
  overflow: hidden;
}

.ad-switch-preview-dialog {
  width: min(1080px, calc(100vw - 28px));
}

.ad-switch-preview {
  display: grid;
  gap: 14px;
}

.ad-switch-preview h4 {
  margin: 2px 0 -6px;
  font-size: 14px;
}

.ad-switch-preview .table-wrap {
  max-height: 260px;
}

.danger-panel,
.warning-panel {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
  padding: 10px 12px;
  border-radius: 8px;
}

.warning-panel {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.danger-panel p,
.warning-panel p {
  margin: 4px 0 0;
}

.mini-table-wrap {
  margin-bottom: 10px;
}

.mini-table th,
.mini-table td {
  padding: 8px;
}

.mini-table input[type="text"],
.mini-table input:not([type]) {
  width: 100%;
}

.employee-wecom-editor .dialog-checks-title {
  font-weight: 600;
  margin-bottom: 8px;
}

.center {
  text-align: center;
}

.ad-customer-switch-filter {
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  align-items: end;
  padding: 12px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: #fff;
}

.ad-customer-switch-table {
  min-width: 1840px;
}

.ad-customer-switch-table th,
.ad-customer-switch-table td {
  height: 40px;
  padding: 8px 10px;
  vertical-align: middle;
}

.ad-customer-switch-table th:nth-child(n+3):nth-child(-n+9),
.ad-customer-switch-table td:nth-child(n+3):nth-child(-n+9) {
  text-align: right;
}

.danger-text {
  color: var(--danger);
}

.ad-platform-switch-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 360px;
}

.ad-platform-switch-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  color: var(--muted);
}

.ad-platform-switch-item em {
  color: var(--danger);
  font-size: 12px;
  font-style: normal;
}

.switch-pill {
  min-width: 46px;
  height: 28px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 750;
  line-height: 1;
}

.switch-pill.on {
  border-color: #abefc6;
  background: var(--success-soft);
  color: var(--success);
}

.switch-pill.off {
  border-color: #fecdca;
  background: var(--danger-soft);
  color: var(--danger);
}

.switch-pill:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.platform-wechat-actions {
  display: inline-flex;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
  min-width: 112px;
}

.link-button.platform-wechat-count {
  min-width: 44px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid #9ec3ff;
  border-radius: 4px;
  background: #eaf3ff;
  color: var(--primary);
  font-weight: 750;
}

.platform-wechat-summary-btn {
  height: 28px;
  padding: 0 12px;
  border-radius: 4px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}

/* 加微明细弹窗用于核对每一条加粉记录，表体独立滚动，避免宽表挤压弹窗头尾按钮。 */
.wechat-detail-dialog {
  width: min(1180px, calc(100vw - 36px));
  max-height: min(88vh, 780px);
}

.wechat-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.wechat-detail-head-actions {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.icon-button {
  min-width: 32px;
  width: 32px;
  height: 32px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}

.wechat-detail-body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
}

.wechat-summary-tabs {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 4px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: var(--panel-soft);
  width: max-content;
  max-width: 100%;
  overflow-x: auto;
}

.wechat-summary-tabs button {
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.wechat-summary-tabs button.active {
  background: #fff;
  color: var(--primary-dark);
  box-shadow: 0 1px 3px rgba(31, 41, 51, 0.08);
}

.wechat-summary-tab-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  gap: 10px;
}

.wechat-detail-table-wrap {
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--panel-border);
  border-radius: 4px;
}

.wechat-detail-table {
  min-width: 880px;
}

.wechat-summary-table {
  min-width: 980px;
}

.wechat-detail-table th,
.wechat-detail-table td {
  height: 40px;
  padding: 8px 12px;
}

.wechat-detail-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.wechat-detail-table tbody tr:nth-child(even) td {
  background: #fafbfc;
}

.wechat-summary-total td {
  background: #f3f6f9;
  font-weight: 750;
}

.wechat-detail-table th:first-child,
.wechat-detail-table td:first-child {
  text-align: center;
}

.wechat-duplicate-yes {
  color: #2f9e44;
  font-weight: 750;
}

.wechat-detail-pager {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.wechat-detail-page-actions {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

/* 广告同步检查页服务真实联调前的本地准备核对，只展示检查结果，不承载同步动作。 */
.sync-readiness-form {
  margin-bottom: 12px;
}

.sync-readiness-list {
  display: grid;
  gap: 14px;
}

.sync-readiness-meta {
  color: var(--muted);
  font-size: 12px;
}

.sync-readiness-item {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.sync-readiness-head,
.readiness-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sync-readiness-head h3,
.readiness-card h3 {
  margin: 0;
  font-size: 15px;
}

.sync-readiness-head span {
  color: var(--muted);
  font-size: 12px;
}

.readiness-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 12px;
}

.readiness-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.readiness-card-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}

.readiness-value {
  min-width: 0;
}

.readiness-value span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 3px;
}

.readiness-value strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 650;
}

.readiness-issues {
  margin: 0;
  padding-left: 18px;
  color: var(--warning);
  font-size: 12px;
  line-height: 1.6;
}

.readiness-issues.muted {
  padding-left: 0;
  color: var(--muted);
}

/* 同步失败诊断和重试队列是本地排障区，承接日志解析、队列生成和人工状态标记。 */
.sync-diagnostics {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.sync-diagnostics-block {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding-top: 14px;
  border-top: 1px solid var(--panel-border);
}

.inline-head {
  align-items: center;
}

.inline-head h3 {
  margin: 0;
  font-size: 16px;
}

.sync-filter-form {
  margin-bottom: 0;
}

.appointment-main-cell,
.appointment-link,
.appointment-status-block {
  display: grid;
  gap: 3px;
}

.appointment-main-cell strong,
.appointment-link strong {
  color: var(--text);
  font-weight: 600;
}

.appointment-main-cell span,
.appointment-link span {
  color: var(--muted);
  font-size: 12px;
}

/* 预约状态标签只承担扫读状态，不撑高紧凑表格行。 */
.appointment-status-block .tag {
  justify-self: start;
  height: 18px;
  padding: 0 6px;
  font-size: 11px;
  line-height: 18px;
}

/* 预约列表客户列承载姓名、手机号和新老客标签；标签放在客户列内，避免新增列后挤压右侧操作。 */
.appointment-customer-cell {
  min-width: 116px;
}

.appointment-customer-type {
  display: flex;
  align-items: center;
}

.appointment-customer-type .tag {
  height: 18px;
  padding: 0 6px;
  font-size: 11px;
  line-height: 18px;
}

/* 权限勾选区。 */
.permission-box {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 360px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: #f8fafc;
}

/* 权限资源按同一套组件分组展示，新增权限组和编辑弹窗保持完全一致。 */
.permission-group h4 {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--text);
}

.permission-group-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 8px;
}

.permission-checkline {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
}

.permission-checkline span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.permission-checkline strong,
.permission-checkline em {
  overflow-wrap: anywhere;
}

.permission-checkline strong {
  font-size: 13px;
}

.permission-checkline em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

/* 复选框固定尺寸。 */
.permission-box input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex: 0 0 auto;
}

/* 客户详情抽屉是客户列表的临时右侧浮层，关闭后不参与主布局，避免挤压列表或残留白条。 */
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(920px, calc(100vw - 260px));
  max-width: 78vw;
  height: 100vh;
  background: var(--bg);
  border-left: 1px solid var(--panel-border);
  box-shadow: -14px 0 30px rgba(31, 41, 51, 0.16);
  padding: 18px 20px;
  overflow-y: auto;
  transform: translateX(100%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.18s ease, visibility 0s linear 0.18s;
  z-index: 20;
}

/* 抽屉打开状态。 */
.drawer.open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
  transition: transform 0.18s ease;
}

/* 抽屉头部。 */
.drawer-head {
  position: sticky;
  top: -18px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -18px -20px 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.96);
}

/* 详情分组。 */
.detail-block {
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  background: var(--panel);
  box-shadow: 0 8px 18px rgba(31, 41, 51, 0.04);
}

/* 详情分组标题。 */
.detail-block h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.customer-attribution-list {
  display: grid;
  gap: 10px;
}

.detail-inline-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.customer-lazy-state {
  min-height: 120px;
  align-content: center;
}

/* 客户来源归因只服务有权限的运营/管理人员；投放字段默认折叠，避免详情首屏被 click_id/clue_id 等长字段撑开。 */
.attribution-detail-toggle {
  border-top: 1px solid #edf1f5;
  padding-top: 10px;
}

.attribution-detail-toggle summary {
  cursor: pointer;
  color: var(--primary-dark);
  font-weight: 700;
}

.attribution-detail-toggle .detail-field-grid {
  margin-top: 10px;
}

.customer-master-block {
  background: #fff;
}

/* 客户详情主档区：左侧放身份和主档字段，右侧集中高频动作，模拟 CRM 单客工作台。 */
.customer-master-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  align-items: start;
}

.customer-master-main {
  min-width: 0;
}

.customer-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid #edf1f5;
}

.customer-avatar {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary-soft), #ecfdf3);
  color: var(--primary-dark);
  font-size: 24px;
  font-weight: 700;
  flex: 0 0 auto;
}

.customer-identity-text {
  min-width: 0;
}

.customer-title-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.customer-title-line h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
}

.customer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.master-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 16px;
}

/* 客户 ID、微信名、备注名、手机号是详情主档的核心核对信息，单独成块保证打开详情后直接可见。 */
.master-grid-critical {
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #f8fafc;
}

.customer-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.customer-summary-card {
  min-width: 0;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #f8fafc;
}

.customer-summary-card h4 {
  margin: 0;
  color: var(--text);
  font-size: 13px;
}

.customer-summary-items {
  display: grid;
  gap: 8px;
}

.customer-summary-items div {
  min-width: 0;
}

.customer-summary-items span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 12px;
}

.customer-summary-items strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.master-section-title {
  margin: 12px 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.owner-master-grid {
  margin-bottom: 4px;
}

.master-item {
  min-width: 0;
  padding: 0 0 9px;
  border-bottom: 1px solid #edf1f5;
}

.master-item.wide {
  grid-column: span 2;
}

.master-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.master-item strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 650;
}

/* 高频操作只放在主档右侧，避免详情页各 tab 内散落同类入口。 */
.customer-action-panel {
  min-width: 0;
  padding-left: 18px;
  border-left: 1px solid #edf1f5;
}

.action-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.action-panel-head span {
  font-weight: 700;
}

.action-panel-head small {
  color: var(--muted);
}

.workbench-action-groups {
  display: grid;
  gap: 12px;
}

.workbench-action-group {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #edf1f5;
  border-radius: 8px;
  background: #fbfdff;
}

.workbench-action-group.is-sensitive {
  border-color: #fecdca;
  background: var(--danger-soft);
}

.workbench-action-group h4 {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.workbench-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.workbench-actions button {
  width: 100%;
  padding: 0 10px;
  white-space: nowrap;
}

.detail-metric-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.detail-metric-card {
  border: 1px solid #edf1f5;
  border-radius: 6px;
  background: #fbfdff;
  padding: 10px;
}

.detail-metric-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.detail-metric-card strong {
  display: block;
  font-size: 16px;
}

.detail-tabs-block {
  padding: 0;
  overflow: hidden;
}

.detail-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--panel-border);
  padding: 12px 14px;
  background: #f8fafc;
}

.detail-tabs button {
  height: 34px;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  padding: 0 12px;
  white-space: nowrap;
}

.detail-tabs button.active,
.detail-tabs button:hover {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--primary);
  color: #fff;
}

.detail-tab-panel {
  display: none;
  padding: 16px 18px 18px;
  background: #fff;
}

.detail-tab-panel.active {
  display: block;
}

.detail-tab-shell {
  display: grid;
  gap: 14px;
}

.detail-section {
  display: grid;
  gap: 10px;
}

.detail-section-head h4 {
  margin: 0;
  font-size: 14px;
}

.detail-section-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

/* 客户详情各 tab 顶部只保留业务统计和必要操作，避免把开发说明渲染给业务用户。 */
.detail-tab-summary {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #f8fafc;
}

.detail-tab-summary.compact {
  grid-template-columns: minmax(0, 1fr) auto;
}

.detail-summary-copy {
  color: var(--muted);
  line-height: 1.6;
}

.detail-summary-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-summary-stat {
  min-width: 92px;
  padding: 8px 10px;
  border: 1px solid #edf1f5;
  border-radius: 6px;
  background: #fff;
}

.detail-summary-stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 2px;
}

.detail-summary-stat strong {
  display: block;
  font-size: 14px;
}

.detail-summary-actions {
  display: flex;
  justify-content: flex-end;
}

.detail-summary-actions button {
  white-space: nowrap;
}

.bed-allocation-component {
  display: grid;
  gap: 10px;
}

.bed-allocation-summary .detail-summary-copy {
  display: grid;
  gap: 4px;
}

.bed-allocation-summary .detail-summary-copy strong {
  color: var(--text);
}

.customer-detail-bed-entry {
  display: grid;
  gap: 8px;
}

.customer-detail-bed-entry .detail-tab-summary {
  margin-bottom: 0;
}

.customer-bed-workbench-entry {
  align-items: center;
}

.customer-detail-bed-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.customer-detail-bed-summary-grid div {
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  padding: 7px 8px;
}

.customer-detail-bed-summary-grid span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11px;
}

.customer-detail-bed-summary-grid strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bed-allocation-workbench {
  display: grid;
  grid-template-columns: minmax(300px, 0.95fr) minmax(520px, 1.6fr);
  gap: 12px;
  align-items: start;
}

.bed-operation-card {
  display: grid;
  gap: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.bed-allocation-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  align-items: start;
}

.bed-allocation-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.bed-allocation-form label.wide {
  grid-column: 1 / -1;
}

.bed-allocation-form select,
.bed-allocation-form input,
.bed-allocation-form textarea {
  width: 100%;
}

.bed-allocation-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.customer-operation-log-panel {
  display: grid;
  gap: 14px;
}

.customer-operation-log-filters {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(160px, 1fr) repeat(2, minmax(130px, 0.8fr)) auto;
  gap: 10px;
  align-items: end;
}

.customer-operation-log-filters label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.customer-operation-log-filters input,
.customer-operation-log-filters select {
  width: 100%;
}

.customer-operation-log-filters .filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.customer-log-diff-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.customer-log-diff-grid details {
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fbfdff;
}

.customer-log-diff-grid summary,
.customer-log-relation-detail summary,
.customer-log-raw-json summary {
  cursor: pointer;
  color: var(--primary-dark);
  font-weight: 700;
}

.customer-log-translated-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.customer-log-translated-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  font-size: 12px;
}

.customer-log-translated-row span {
  color: var(--muted);
}

.customer-log-translated-row strong {
  color: var(--text);
  font-weight: 600;
  word-break: break-word;
}

.customer-log-empty {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.customer-log-relation-detail,
.customer-log-raw-json {
  margin-top: 8px;
}

.customer-log-json {
  margin: 8px 0 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text);
}

.bed-allocation-facts div,
.bed-schedule-board aside {
  border: 1px solid #edf1f5;
  border-radius: 6px;
  background: #fbfdff;
  padding: 8px;
}

.bed-allocation-facts span,
.bed-schedule-board aside span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.bed-allocation-facts strong,
.bed-schedule-board aside strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.bed-schedule-board {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.bed-schedule-board aside {
  display: grid;
  gap: 4px;
}

.bed-timeline-board {
  --bed-board-height: 520px;
  --bed-lanes: 1;
  display: grid;
  grid-template-columns: 100px minmax(calc(var(--bed-lanes) * 118px), 1fr);
  min-height: var(--bed-board-height);
  max-height: 520px;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.bed-time-axis,
.bed-card-layer {
  position: relative;
  min-height: var(--bed-board-height);
}

.bed-time-axis {
  border-right: 1px solid #e2e8f0;
  background: #f8fafc;
}

.bed-time-row {
  height: 46px;
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  gap: 5px;
  padding: 0 6px;
  border-bottom: 1px solid #e5e7eb;
  cursor: pointer;
}

.bed-time-row strong {
  font-size: 13px;
}

.bed-time-row.selected {
  background: #eff6ff;
  box-shadow: inset 3px 0 0 var(--primary);
}

.bed-time-row.full {
  background: var(--danger-soft);
}

.bed-usage-badge {
  min-width: 42px;
  border: 1px solid #b7d7ec;
  border-radius: 8px;
  padding: 3px 5px;
  background: var(--info-soft);
  color: var(--info);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.bed-time-row.full .bed-usage-badge {
  border-color: #fecaca;
  background: #fee2e2;
  color: #b91c1c;
}

.bed-card-layer {
  min-width: calc(var(--bed-lanes) * 118px);
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 45px,
      #eef2f7 45px,
      #eef2f7 46px
    );
}

.bed-selection-preview {
  position: absolute;
  left: 0;
  right: 0;
  border: 1px dashed var(--primary);
  background: rgba(29, 111, 163, 0.1);
  pointer-events: none;
}

.bed-allocation-card {
  position: absolute;
  width: 110px;
  display: grid;
  gap: 2px;
  align-content: start;
  border: 1px solid #93c5fd;
  border-left: 5px solid #2563eb;
  border-radius: 6px;
  padding: 6px;
  background: #f8fbff;
  color: #1f2937;
  text-align: left;
  overflow: hidden;
  cursor: pointer;
}

.bed-allocation-card.current {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(29, 111, 163, 0.18);
  background: #eff6ff;
}

.bed-allocation-card.is-old {
  border-color: #86efac;
  border-left-color: #22c55e;
  background: #f0fdf4;
}

.bed-allocation-card.is-new {
  border-color: #93c5fd;
  border-left-color: #2563eb;
  background: #eff6ff;
}

.bed-customer-type {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  vertical-align: middle;
}

.bed-customer-type.is-new {
  background: #fee2e2;
  color: #b91c1c;
}

.bed-customer-type.is-old {
  background: #dcfce7;
  color: #166534;
}

.bed-allocation-card strong {
  color: #1f2937;
  font-weight: 800;
  line-height: 1.25;
}

.bed-allocation-card span {
  color: #1f2937;
  font-weight: 700;
}

.bed-allocation-card span,
.bed-allocation-card small {
  font-size: 11px;
  line-height: 1.25;
}

.bed-allocation-card small {
  color: #4b5563;
}

.bed-allocation-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  padding-top: 2px;
}

.bed-active-allocation {
  margin-right: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  background: #eff6ff;
  color: #1f2937;
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 700;
}

.bed-active-allocation.locked {
  border-color: #fde68a;
  background: #fffbeb;
}

.bed-active-allocation button {
  flex: 0 0 auto;
}

.bed-lock-note {
  color: #92400e;
  font-size: 12px;
  font-weight: 700;
}

.bed-dialog-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.bed-empty-overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  max-width: 260px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.bed-detail-list {
  display: grid;
  gap: 8px;
}

.bed-detail-list article {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid #edf1f5;
  border-radius: 6px;
  background: #fff;
}

.bed-detail-list span,
.bed-detail-list small {
  color: var(--muted);
}

.customer-bed-records {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.customer-bed-records-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.customer-bed-records-head strong {
  color: var(--text);
}

.customer-bed-records-head span {
  color: var(--muted);
  font-size: 12px;
}

.customer-bed-record-table-wrap {
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}

.customer-bed-record-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
  background: #fff;
}

.customer-bed-record-table th,
.customer-bed-record-table td {
  padding: 7px 8px;
  border-bottom: 1px solid #edf1f5;
  text-align: left;
  vertical-align: top;
  font-size: 12px;
}

.customer-bed-record-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: var(--muted);
  font-weight: 700;
}

.customer-bed-record-table tr.is-locked td {
  background: #fffbeb;
}

.bed-record-status,
.bed-record-consumption {
  display: inline-flex;
  padding: 2px 6px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-weight: 700;
  white-space: nowrap;
}

.bed-record-consumption {
  background: #ecfdf5;
  color: #047857;
}

.bed-record-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.bed-record-actions small {
  color: #92400e;
  font-size: 11px;
  font-weight: 700;
}

.customer-bed-record-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.customer-bed-record-detail-grid div {
  border: 1px solid #edf1f5;
  border-radius: 6px;
  background: #fbfdff;
  padding: 8px;
}

.customer-bed-record-detail-grid span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.customer-bed-record-detail-grid strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 12px;
}

.modal-card.bed-workbench-dialog {
  width: min(1120px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow: hidden;
}

.bed-workbench-dialog .modal-head {
  padding: 12px 14px;
}

.bed-workbench-dialog .modal-body {
  max-height: calc(100vh - 108px);
  overflow: auto;
  padding: 12px;
}

.bed-workbench-dialog .bed-allocation-workbench {
  grid-template-columns: minmax(300px, 0.88fr) minmax(520px, 1.5fr);
}

.bed-workbench-dialog .bed-timeline-board {
  max-height: calc(100vh - 310px);
}

.form-error-inline {
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 10px;
  background: #fff1f2;
  color: #b91c1c;
  font-size: 13px;
}

.detail-section {
  display: grid;
  gap: 10px;
}

.detail-section + .detail-section {
  padding-top: 2px;
}

.detail-section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
}

.detail-section-head h4 {
  margin: 0;
  font-size: 14px;
}

.detail-section-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.detail-subtitle {
  margin-top: 14px !important;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}

.detail-grid p {
  margin: 0;
}

.detail-list {
  display: grid;
  gap: 10px;
}

.detail-record-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #edf1f5;
  border-radius: 6px;
  background: #fff;
  line-height: 1.55;
}

.detail-record-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.detail-record-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.detail-record-title strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.detail-record-title span {
  color: var(--muted);
  font-size: 12px;
}

.detail-item {
  padding: 10px 12px;
  border: 1px solid #edf1f5;
  border-radius: 6px;
  background: #fbfdff;
  line-height: 1.6;
}

.detail-empty {
  margin: 0;
}

.detail-field-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.record-field-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.compact-field-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.owner-summary-grid {
  grid-template-columns: 150px 170px minmax(0, 1fr);
}

.detail-field-grid div {
  min-width: 0;
}

.detail-field-grid span,
.follow-content span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.detail-field-grid strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.detail-card-body {
  display: grid;
  gap: 10px;
}

.detail-card-note {
  display: grid;
  gap: 5px;
  padding-top: 8px;
  border-top: 1px dashed #dbe3eb;
}

.detail-card-note > span,
.detail-split-notes > div > span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.detail-card-note p {
  margin: 0;
  overflow-wrap: anywhere;
}

.detail-split-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.detail-split-notes > div {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid #edf1f5;
  border-radius: 6px;
  background: #fbfdff;
}

.detail-inline-empty {
  padding: 10px;
  border: 1px dashed var(--panel-border);
  border-radius: 6px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 12px;
}

.detail-flow-list {
  display: grid;
  gap: 6px;
}

.detail-flow-row {
  display: grid;
  grid-template-columns: 58px repeat(6, minmax(82px, 1fr));
  gap: 8px;
  align-items: stretch;
  padding: 8px;
  border: 1px solid #edf1f5;
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
}

.detail-flow-row > div {
  min-width: 0;
}

.detail-flow-row > div span {
  display: block;
  margin-bottom: 2px;
}

.detail-flow-row strong,
.detail-flow-row > div strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--text);
}

.detail-flow-remark {
  grid-column: 1 / -1;
}

.detail-flow-remark span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 2px;
}

.detail-flow-remark strong {
  color: var(--text);
  font-size: 12px;
}

.detail-flow-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success);
  font-size: 12px;
}

.detail-flow-type.refund {
  background: var(--warning-soft);
  color: var(--warning);
}

.order-project-list {
  display: grid;
  gap: 8px;
}

.order-project-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #edf1f5;
  border-radius: 6px;
  background: #fff;
}

.order-project-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.order-project-head strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.follow-detail-item,
.owner-log-item {
  display: grid;
  gap: 10px;
}

.follow-detail-head,
.owner-log-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.follow-detail-head span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.follow-content {
  padding-top: 8px;
  border-top: 1px dashed #dbe3eb;
}

.follow-content p,
.owner-log-summary {
  margin: 4px 0 0;
}

.owner-log-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.owner-log-compare > div {
  min-width: 0;
  padding: 10px;
  border: 1px solid #edf1f5;
  border-radius: 6px;
  background: #fff;
}

.owner-log-compare > div > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.owner-log-compare p {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 4px 0;
}

.owner-log-compare em {
  flex: 0 0 auto;
  color: var(--muted);
  font-style: normal;
}

.owner-log-compare strong {
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: right;
}

.appointment-detail-item {
  display: grid;
  gap: 10px;
}

.appointment-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.appointment-detail-grid,
.appointment-dialog-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.appointment-detail-grid div,
.appointment-dialog-summary div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.appointment-detail-grid span,
.appointment-dialog-summary span,
.appointment-detail-flow > span {
  color: var(--muted);
  font-size: 12px;
}

.appointment-detail-grid strong,
.appointment-dialog-summary strong {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 13px;
}

.appointment-detail-flow {
  display: grid;
  gap: 4px;
  padding-top: 8px;
  border-top: 1px dashed #dbe3eb;
}

.inline-actions {
  margin-top: 8px;
}

/* 选择化编辑弹层，用于替代手填关联 ID；业务动作弹窗保持轻量，不脱离当前页面上下文。 */
.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(23, 33, 43, 0.32);
  z-index: 40;
}

.modal-card {
  display: flex;
  flex-direction: column;
  width: min(640px, calc(100vw - 36px));
  max-height: min(78vh, 680px);
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.city-ad-dialog {
  width: min(920px, calc(100vw - 36px));
  max-height: min(86vh, 760px);
}

.auth-link-dialog {
  width: min(760px, calc(100vw - 36px));
}

.oauth-callback-dialog {
  width: min(1040px, calc(100vw - 36px));
  max-height: min(86vh, 760px);
}

.operation-log-dialog {
  width: min(960px, calc(100vw - 36px));
  max-height: min(86vh, 760px);
}

.token-status-dialog {
  width: min(1180px, calc(100vw - 36px));
  max-height: min(88vh, 780px);
}

.employee-acquisition-dialog {
  width: min(1180px, calc(100vw - 36px));
  max-height: min(88vh, 780px);
}

.api-confirm-dialog {
  width: min(560px, calc(100vw - 36px));
}

.modal-head {
  flex: 0 0 auto;
  padding: 13px 14px 10px;
  border-bottom: 1px solid var(--panel-border);
}

.modal-card h3 {
  margin: 0;
  font-size: 16px;
}

.modal-card > form {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.modal-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 14px;
  overflow-y: auto;
}

/* 弹窗表单使用双列紧凑网格；摘要、勾选和长字段单独占整行，避免信息一列堆到底。 */
.dialog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  align-items: end;
}

.dialog-field {
  min-width: 0;
}

.dialog-field.wide {
  grid-column: 1 / -1;
}

.dialog-field input,
.dialog-field select {
  height: 34px;
}

.dialog-field textarea {
  min-height: 88px;
  padding: 8px 10px;
  resize: vertical;
}

.modal-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
  padding: 10px 14px 12px;
  border-top: 1px solid var(--panel-border);
  background: var(--panel-soft);
}

.dialog-checks {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

/* 员工门店绑定使用弹窗内搜索多选；只隐藏选项不重绘弹窗，避免中文输入法组词闪烁。 */
.searchable-checks input[type="search"] {
  width: 100%;
  height: 32px;
}

.dialog-check-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.dialog-check-toolbar button {
  height: 28px;
  padding: 0 9px;
}

.dialog-check-count {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}

.dialog-check-options {
  max-height: 170px;
  overflow: auto;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: #fff;
}

.dialog-note {
  padding: 10px 12px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: var(--panel-soft);
  color: var(--text);
  line-height: 1.6;
  white-space: pre-line;
}

.dialog-error {
  margin-bottom: 10px;
  padding: 9px 11px;
  border: 1px solid #fecdca;
  border-radius: 6px;
  background: var(--danger-soft);
  color: var(--danger);
}

.employee-acquisition-subtitle {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.employee-acquisition-body {
  display: grid;
  gap: 12px;
}

/* 员工获客绑定弹窗只读展示员工摘要、映射状态和客服包列表；不承载编辑或开关操作。 */
.employee-acquisition-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.employee-acquisition-summary div {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: var(--panel-soft);
}

.employee-acquisition-summary span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.employee-acquisition-summary strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 13px;
}

.employee-acquisition-status {
  display: flex;
  align-items: center;
  min-height: 28px;
}

.employee-acquisition-section,
.employee-acquisition-history {
  display: grid;
  gap: 8px;
}

.employee-acquisition-section h4,
.employee-acquisition-history summary {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.employee-acquisition-history summary {
  cursor: pointer;
}

/* 获客客户回流列表用于排查 state=visit_token 的归因闭环，筛选区保持紧凑避免挤占获客链接主表。 */
.acquisition-customer-filter {
  margin-top: 12px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.api-confirm-body {
  display: grid;
  gap: 12px;
}

.api-confirm-body p {
  margin: 0;
  color: var(--text);
  line-height: 1.6;
}

.api-confirm-list {
  display: grid;
  gap: 8px;
}

.api-confirm-row {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: var(--panel-soft);
}

.api-confirm-row span {
  color: var(--muted);
}

.api-confirm-row strong {
  min-width: 0;
  color: var(--text);
  font-weight: 600;
  word-break: break-word;
}

.auth-link-body {
  display: grid;
  gap: 10px;
}

.auth-link-field {
  display: grid;
  gap: 6px;
  font-weight: 600;
}

.auth-link-field textarea {
  min-height: 120px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
  word-break: break-all;
}

.auth-link-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 12px;
}

.token-summary {
  display: grid;
  gap: 3px;
  min-width: 180px;
}

.oauth-callback-body .table-wrap {
  margin: 0;
}

.token-status-body .table-wrap {
  margin: 0;
}

.operation-log-detail-body {
  display: grid;
  gap: 12px;
}

.operation-log-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.operation-log-detail-field,
.operation-log-detail-section {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: var(--panel-soft);
}

.operation-log-detail-field span,
.operation-log-detail-section span {
  color: var(--muted);
  font-size: 12px;
}

.operation-log-detail-field strong,
.operation-log-detail-section p {
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-weight: 600;
  word-break: break-word;
}

.operation-log-detail-section pre {
  max-height: 260px;
  margin: 0;
  overflow: auto;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* 本地推动态回调和分配详情的原始报文默认折叠；展开后限制高度，避免长 JSON 撑满后台页面。 */
.operation-log-raw-summary {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 34px;
  height: auto;
  scroll-margin-bottom: 64px;
  padding: 8px 10px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  user-select: none;
}

.operation-log-raw-summary::before {
  content: "▸";
  margin-right: 6px;
  color: var(--muted);
}

.operation-log-raw-summary[aria-expanded="true"]::before {
  content: "▾";
}

.operation-log-raw-pre {
  max-height: 220px;
  margin: 0;
  overflow: auto;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.operation-log-compact-value {
  display: block;
  min-width: 0;
}

.operation-log-compact-value .truncate-text {
  max-width: 100%;
}

/* 转粉弹窗给有独立权限的管理员批量接管离职客服客户；预览区展示可转数量、阻断原因和客户摘要。 */
.transfer-fans-dialog {
  width: min(980px, calc(100vw - 32px));
}

.transfer-fans-body {
  display: grid;
  gap: 14px;
}

.transfer-fans-actions {
  display: flex;
  justify-content: flex-start;
}

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

.transfer-fans-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.token-status-body table {
  min-width: 1080px;
}

.city-ad-dialog-body {
  display: grid;
  gap: 14px;
}

.city-ad-section {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--panel-border);
}

.city-ad-section-head h4 {
  margin: 0;
  font-size: 15px;
}

.dialog-help {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.dialog-checks .checkline {
  display: flex;
  grid-template-columns: none;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.dialog-checks input {
  width: 16px;
  height: 16px;
}

/* 客户详情动作弹窗顶部摘要，只展示不可编辑上下文，客户 ID 仍以隐藏字段提交给既有接口。 */
.customer-dialog-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.owner-dialog-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.customer-dialog-summary div,
.owner-dialog-summary div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.customer-dialog-summary span,
.owner-dialog-summary span {
  color: var(--muted);
  font-size: 12px;
}

.customer-dialog-summary strong,
.owner-dialog-summary strong {
  overflow-wrap: anywhere;
  font-size: 13px;
}

.line-meta,
.muted {
  color: var(--muted);
}

.line-meta {
  margin-top: 2px;
  font-size: 12px;
}

/* 提示条。 */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: none;
  max-width: 520px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #17212b;
  color: #fff;
  box-shadow: var(--shadow);
  z-index: 30;
}

/* 提示条显示状态。 */
.toast.show {
  display: block;
}

/* 空状态文本。 */
.empty {
  display: grid;
  gap: 4px;
  justify-items: center;
  color: var(--muted);
  padding: 28px 12px;
  border: 1px dashed var(--panel-border);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.empty strong {
  color: var(--text);
  font-size: 14px;
}

.empty span {
  font-size: 12px;
}

.loading {
  color: var(--muted);
  padding: 16px 0;
}

/* PC 后台样式收敛一期：只作用于登录后的桌面后台，不影响登录页、门店移动端和 BOSS 手机报表直达页。 */
@media (min-width: 901px) {
  /* PC 后台变量集中在外壳上，后续页面级例外只能引用这些 token，避免继续追加分散覆盖。 */
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell {
    --pc-sidebar-width: 204px;
    --bg: #f6f7f5;
    --panel: #ffffff;
    --panel-soft: #f7f8f6;
    --panel-border: #e1e5df;
    --text: #1e2c2a;
    --muted: #68746f;
    --muted-light: #9aa49e;
    --primary: #0f766e;
    --primary-dark: #0b4f4a;
    --primary-soft: #e7f3f0;
    --accent: #b9954b;
    --sidebar: #071b1c;
    --sidebar-muted: #96a6a1;
    --sidebar-hover: rgba(255, 255, 255, 0.055);
    --sidebar-active: rgba(197, 236, 226, 0.12);
    --radius: 8px;
    --shadow: 0 8px 20px rgba(20, 45, 42, 0.04);
    grid-template-columns: var(--pc-sidebar-width) minmax(0, 1fr);
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-size: 12.5px;
    line-height: 1.4;
  }

  /* PC 后台水印保持中等强度；透明度由 JS 统一生成，这里只集中控制桌面密度。 */
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .global-watermark {
    background-size: 340px 220px;
  }

  /* PC 后台布局：左侧固定导航，右侧为紧凑工作区。 */
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .main {
    min-width: 0;
    min-height: 100vh;
    padding: 10px 14px 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(246, 247, 245, 0.98) 220px), var(--bg);
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .view.active {
    display: grid;
    gap: 12px;
  }

  /* 侧边栏：204px 是本轮 PC 后台固定宽度；菜单继续来自 navTree，不在 CSS 增删入口。 */
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 8px 7px;
    background: linear-gradient(160deg, #071819 0%, #0b2426 52%, #111827 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .brand {
    min-height: 50px;
    margin-bottom: 6px;
    padding: 7px 8px;
    gap: 7px;
    border: 1px solid rgba(226, 240, 236, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    box-shadow: none;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .brand-mark {
    display: none;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .compact-logo {
    color: #f8fbf9;
    font-size: 13px;
    line-height: 1.15;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .brand > div > span {
    margin-top: 2px;
    color: #b6c5bf;
    font-size: 10.5px;
    line-height: 1.25;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .nav {
    flex: 1 1 auto;
    display: block;
    overflow-y: auto;
    padding: 2px 1px 40px;
    scrollbar-width: thin;
    scrollbar-color: rgba(185, 149, 75, 0.35) transparent;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .nav-section-title {
    margin: 10px 7px 4px;
    color: rgba(218, 232, 226, 0.42);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .nav-section {
    width: 100%;
    display: grid;
    gap: 2px;
    margin-bottom: 2px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .nav-group-toggle,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .nav-leaf {
    position: relative;
    width: 100%;
    min-width: 0;
    height: 32px;
    min-height: 32px;
    padding: 0 8px;
    gap: 6px;
    border-radius: 7px;
    background: transparent;
    color: #d5dfdb;
    font-size: 12.5px;
    line-height: 1.25;
    font-weight: 500;
    justify-content: flex-start;
    white-space: nowrap;
    transition: background 0.14s ease, color 0.14s ease;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .nav-group-toggle:hover,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .nav-leaf:hover {
    background: var(--sidebar-hover);
    color: #f4faf7;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .sidebar .nav button > span:not(.nav-icon):not(.nav-caret) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .nav-icon {
    width: 18px;
    height: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.075);
    color: #f1dfab;
    font-size: 10px;
    font-weight: 700;
    flex: 0 0 18px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .nav-caret {
    margin-left: auto;
    color: rgba(213, 223, 219, 0.62);
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .nav-children {
    width: 100%;
    display: grid;
    gap: 1px;
    margin: 2px 0 4px 10px;
    padding-left: 10px;
    border-left: 1px solid rgba(215, 229, 224, 0.09);
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .nav-section.collapsed .nav-children {
    display: none;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .nav-level-1.nav-group-toggle,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .nav-level-1.nav-leaf {
    height: 28px;
    min-height: 28px;
    padding: 0 7px;
    color: #bac9c3;
    font-size: 12.5px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .nav-level-2.nav-leaf {
    height: 28px;
    min-height: 28px;
    padding-left: 7px;
    color: #99aaa4;
    font-size: 12px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .nav-level-2.nav-leaf::before {
    display: none;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .nav-group-toggle.active {
    background: rgba(255, 255, 255, 0.025);
    color: #e5efeb;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .nav-leaf.active {
    color: #e9fffa;
    background: var(--sidebar-active);
    font-weight: 600;
    box-shadow: inset 2px 0 0 #5fc7b8;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .nav-leaf.active .nav-icon {
    color: #f1dfab;
    background: rgba(255, 255, 255, 0.075);
  }

  /* 顶部工具行：标题元数据仍由 JS 维护，但 PC 后台只展示右侧两个操作按钮。 */
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .topbar {
    min-height: 30px;
    margin-bottom: 6px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .topbar-title-block,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #currentOperatorSummary,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #serverState,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #devDebugMount {
    display: none !important;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .operator-switcher {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    max-width: none;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .operator-switcher > button {
    height: 28px;
    min-height: 28px;
    padding: 0 10px;
    white-space: nowrap;
  }

  /* 工作台标签紧跟顶部工具行，用于恢复多页面筛选和滚动状态。 */
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .workspace-tabs {
    gap: 5px;
    margin: 0 0 8px;
    padding: 0 0 5px;
    border-bottom: 1px solid rgba(225, 229, 223, 0.9);
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .workspace-tab {
    height: 27px;
    border-color: #dfe4de;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: #66736e;
    font-size: 11.5px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .workspace-tab.active {
    border-color: rgba(15, 118, 110, 0.34);
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-weight: 700;
  }

  /* 面板和卡片：统一白底、轻边框和低阴影，避免页面区块继续卡片套卡片。 */
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .panel,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .metric-card,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .local-push-card,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .readiness-card,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .detail-block {
    border-color: var(--panel-border);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .panel,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .local-push-card,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .detail-block {
    padding: 11px 12px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .panel-head {
    gap: 8px;
    margin-bottom: 9px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .panel h2,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .inline-head h3,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .local-push-card-head h3,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .sync-readiness-head h3,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .readiness-card h3 {
    color: #172f2d;
    font-size: 14px;
    font-weight: 750;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .metric-grid {
    grid-template-columns: repeat(4, minmax(140px, 1fr));
    gap: 10px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .metric-card {
    min-height: 86px;
    padding: 13px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .metric-card strong {
    margin-top: 6px;
    color: #102b29;
    font-size: 20px;
    line-height: 1.08;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .module-tabs,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .info-strip {
    gap: 6px;
    padding: 8px;
    border-color: var(--panel-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: none;
  }

  /* 筛选区：统一为可换行工具栏，按钮组在宽屏自动靠右，窄屏自然换行。 */
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .list-tools,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .appointment-tools,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .order-list-tools,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .operation-log-tools,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .appointment-board-filters,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .customer-list-filter-card,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #reportForm,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #combinedReportForm,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #platformSummaryReportForm,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #operationReportForm,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #customerServiceReportForm,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #teacherReportForm,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #adCustomerSwitchForm,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #wecomAcquisitionFilterForm,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #localPushWebhookFilterForm,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #localPushBehaviorFilterForm,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #localPushLeadFilterForm,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #localPushDynamicPackageFilterForm,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #localPushDynamicAssignmentFilterForm,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #localPushSelectCallbackFilterForm,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #localPushPackageReportForm,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #adPlatformAccountFilterForm,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #adSyncReadinessForm,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #adSyncFailureForm,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #adSyncRetryForm,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #conversionLogFilterForm,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #adCallbackExportForm {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 8px;
    padding: 8px 9px;
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: none;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .customer-list-filter-row,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .customer-list-filter-row.first,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .customer-list-filter-row.second,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .customer-list-filter-row.third {
    display: contents;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .filter-field,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .list-tools > label,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .appointment-tools > label,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .order-list-tools > label,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .operation-log-tools > label,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell form.form-grid.compact > label {
    flex: 0 1 160px;
    min-width: 0;
    gap: 4px;
    color: #65736c;
    font-size: 12.5px;
    font-weight: 650;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .list-tools .filter-field:first-child,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .appointment-tools .filter-field:first-child,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .order-list-tools .filter-field:first-child,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .customer-list-filter-card .filter-field:first-of-type,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .operation-log-tools .filter-field:has(input[data-operation-log-field="keyword"]),
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell form.form-grid.compact > label:has(input[name="keyword"]),
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell form.form-grid.compact > label:has(input[type="search"]) {
    flex-basis: 240px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .operation-report-date-range,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell form.form-grid.compact > label:has(input[type="date"]) {
    flex-basis: 156px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .filter-field > span,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .form-field-label,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .form-section legend {
    color: #68756f;
    font-size: 11.5px;
    line-height: 1.15;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .form-actions,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .admin-filter-actions,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .operation-log-filter-actions,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .customer-list-filter-actions {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .list-tools > .admin-filter-actions,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .appointment-tools > .admin-filter-actions,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .order-list-tools > .admin-filter-actions,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .operation-log-tools > .operation-log-filter-actions,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .customer-list-filter-actions,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell form.form-grid.compact > .form-actions {
    margin-left: auto;
  }

  /* 快捷筛选按钮用于日期和状态短词选择，单个按钮必须横向完整显示。 */
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .segmented-filter {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    width: auto;
    max-width: 100%;
    min-width: 0;
    border: 0;
    border-radius: 0;
    overflow: visible;
    background: transparent;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .segmented-filter button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    height: 28px;
    padding: 0 10px;
    border: 1px solid var(--panel-border);
    border-radius: 7px;
    background: #fff;
    color: var(--muted);
    white-space: nowrap;
    word-break: keep-all;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .segmented-filter button.active,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .segmented-filter button:hover {
    border-color: rgba(15, 118, 110, 0.26);
    background: var(--primary-soft);
    color: var(--primary-dark);
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .appointment-tools .filter-field:has(.segmented-filter),
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .appointment-board-filters .filter-field:has(.segmented-filter),
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .list-tools .filter-field:has(.segmented-filter) {
    flex: 0 1 auto;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .appointment-board-filters .appointment-board-store-search {
    flex: 1 1 280px;
  }

  /* 表单控件和按钮基准。 */
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell input,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell select,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell textarea {
    border-color: #d5d9d2;
    border-radius: 7px;
    background: #fff;
    color: var(--text);
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell input,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell select,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell button {
    height: 30px;
    font-size: 12.5px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell button {
    border-radius: 7px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell button.secondary,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .debug-toggle {
    border: 1px solid #d5d9d2;
    background: #fff;
    color: #56635d;
    font-weight: 650;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell button.secondary:hover,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .debug-toggle:hover {
    border-color: rgba(15, 118, 110, 0.35);
    background: var(--primary-soft);
    color: var(--primary-dark);
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .sidebar .nav button {
    background: transparent;
    color: inherit;
    font-weight: inherit;
  }

  /* 预约看板使用 button 承载可点击格子；这里覆盖 PC 全局按钮主色，避免空闲格被渲染成大面积绿色。 */
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell button.appointment-board-cell {
    height: 100%;
    min-height: 18px;
    border-radius: 5px;
    font-weight: 600;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell button.appointment-board-cell.available {
    background: #fff !important;
    border-color: #edf2f7 !important;
    color: #94a3b8 !important;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell button.appointment-board-cell.available:not(.readonly):hover,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell button.appointment-board-cell.available:not(.readonly):focus-visible {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #64748b !important;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell button.appointment-board-cell.occupied {
    background: #e0f2fe !important;
    border-color: #0ea5e9 !important;
    color: #075985 !important;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell button.appointment-board-cell.occupied.masked {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #334155 !important;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell button.appointment-board-store {
    height: auto;
    min-height: 0;
    background: #fff !important;
    color: #0f172a !important;
    font-weight: 600;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell button.appointment-board-store.active {
    background: #fff !important;
    border-color: #0f766e;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .appointment-board-occupied-slot .appointment-board-cell {
    min-height: max(46px, calc((var(--board-span, 1) * 20px) - 3px));
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell button.appointment-board-store-result {
    height: auto;
    min-height: 30px;
    background: #fff !important;
    color: #0f172a !important;
    font-weight: 600;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell button.appointment-board-store-result:hover,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell button.appointment-board-store-result:focus-visible {
    background: #f8fafc !important;
    color: #0f172a !important;
  }

  /* 表格：普通表格不设统一 min-width，宽表用页面容器或专用 table class 明确控制。 */
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .table-wrap,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .wechat-detail-table-wrap,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .mini-table-wrap {
    overflow-x: auto;
    overflow-y: hidden;
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    background: #fff;
    scrollbar-gutter: stable;
    box-shadow: none;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .table-wrap::-webkit-scrollbar,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .wechat-detail-table-wrap::-webkit-scrollbar {
    height: 8px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .table-wrap::-webkit-scrollbar-thumb,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .wechat-detail-table-wrap::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.22);
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell th,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell td {
    height: 36px;
    padding: 4px 7px;
    border-bottom-color: #ecefe9;
    font-size: 12px;
    line-height: 1.22;
    vertical-align: middle;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell th {
    background: #f7f8f6;
    color: #6f7a74;
    font-weight: 700;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell tbody tr:hover {
    background: #f5faf8;
  }

  /* 预约看板不是普通数据表，必须独立控制行高；否则 PC 全局表格 36px 行高会让全天排班无法一屏查看。 */
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .appointment-board-grid {
    width: max-content;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .appointment-board-grid th,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .appointment-board-grid td {
    width: 124px;
    min-width: 124px;
    max-width: 124px;
    height: 20px !important;
    padding: 1px !important;
    border-right: 1px solid #edf2f7;
    border-bottom: 1px solid #edf2f7;
    font-size: 11px;
    line-height: 1.12;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .appointment-board-grid thead th {
    height: 22px !important;
    background: #f1f5f9;
    color: #334155;
    font-size: 12px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .appointment-board-grid .time-col {
    width: 56px;
    min-width: 56px;
    max-width: 56px;
    background: #f8fafc;
    color: #475569;
    font-size: 12px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .table-wrap th,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .table-wrap td,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .tag,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .table-actions,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .table-actions button,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .appointment-action-menu summary {
    white-space: nowrap;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #customerTable .table-wrap table {
    min-width: 1360px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #appointmentTable .table-wrap table {
    min-width: 1280px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #appointmentTable .table-actions {
    min-width: 126px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #orderTable .table-wrap table {
    min-width: 1240px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #depositTable .table-wrap table {
    min-width: 1080px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #recentCustomers .table-wrap table,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #recentAppointments .table-wrap table {
    min-width: 720px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #localPushDynamicPackageTable .table-wrap table,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #localPushDynamicAssignmentTable .table-wrap table,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #localPushSelectCallbackTable .table-wrap table,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #localPushWebhookEventTable .table-wrap table,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #localPushBehaviorTable .table-wrap table,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #localPushImportLogEntry .table-wrap table,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #localPushLeadTable .table-wrap table,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #localPushPackageReportTable .table-wrap table,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #conversionLogTable .table-wrap table,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #adSpendTable .table-wrap table,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #adSyncReadinessPanel .table-wrap table,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #operationLogTable .table-wrap table {
    min-width: 1400px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .platform-summary-table,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .operation-report-table,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .customer-service-report-table,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .teacher-report-table,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .store-performance-report-table,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .ad-customer-switch-table {
    min-width: 1480px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .operation-report-table {
    min-width: 2040px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .customer-service-report-table {
    min-width: 1960px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .store-performance-report-table {
    min-width: 1780px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .table-wrap td:has(.line-meta),
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .table-wrap .line-meta {
    white-space: normal;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .table-wrap .line-meta {
    margin-top: 1px;
    font-size: 11px;
    line-height: 1.15;
  }

  /* 客户来源列当前由通用表格生成，暂用列号限制长来源文本；后续如改 JS，可替换为稳定 table class。 */
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #customerTable .table-wrap th:nth-child(9),
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #customerTable .table-wrap td:nth-child(9) {
    max-width: 240px;
    white-space: normal;
  }

  /* 客户列表操作列是进入单客工作台的主入口，固定在右侧避免宽表滚动或外层宽度计算时被裁成“查看详”。 */
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #customerTable .table-wrap th:last-child,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #customerTable .table-wrap td:last-child {
    position: sticky;
    right: 0;
    z-index: 2;
    width: 116px;
    min-width: 116px;
    max-width: 116px;
    background: #fff;
    box-shadow: -8px 0 12px rgba(20, 45, 42, 0.06);
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #customerTable .table-wrap th:last-child {
    z-index: 3;
    background: #f7f8f6;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #customerTable .table-wrap tbody tr:hover td:last-child {
    background: #f5faf8;
  }

  /* 预约列表一屏扫读优先：表格内部可滚动，表头和操作列保持可见，分页不会被长列表持续顶到页面底部。 */
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #appointmentTable .table-wrap {
    max-height: min(56vh, 520px);
    overflow: auto;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #appointmentTable .table-wrap thead th {
    position: sticky;
    top: 0;
    z-index: 3;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #appointmentTable .table-wrap th,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #appointmentTable .table-wrap td {
    height: 30px;
    padding: 3px 6px;
    font-size: 11.5px;
    line-height: 1.12;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #appointmentTable .appointment-main-cell,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #appointmentTable .appointment-link,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #appointmentTable .appointment-status-block {
    gap: 1px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #appointmentTable .appointment-main-cell span,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #appointmentTable .appointment-link span,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #appointmentTable .line-meta {
    font-size: 11px;
    line-height: 1.1;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #appointmentTable .tag {
    height: 18px;
    padding: 0 6px;
    font-size: 11px;
    line-height: 18px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #appointmentTable .appointment-row-actions {
    gap: 4px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #appointmentTable .appointment-row-actions button {
    height: 23px;
    min-height: 23px;
    padding: 0 6px;
    font-size: 11.5px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #appointmentTable .table-wrap th:last-child,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #appointmentTable .table-wrap td:last-child {
    position: sticky;
    right: 0;
    z-index: 2;
    width: 126px;
    min-width: 126px;
    max-width: 126px;
    background: #fff;
    box-shadow: -8px 0 12px rgba(20, 45, 42, 0.06);
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #appointmentTable .table-wrap th:last-child {
    z-index: 4;
    background: #f7f8f6;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #appointmentTable .table-wrap tbody tr:hover td:last-child {
    background: #f5faf8;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #customerTable .table-primary-action {
    min-width: 76px;
    padding: 0 9px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .table-actions {
    min-width: 92px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .table-actions button {
    height: 26px;
    min-height: 26px;
    margin-right: 4px;
    padding: 0 7px;
    border: 1px solid rgba(15, 118, 110, 0.12);
    border-radius: 7px;
    background: #f7fbfa;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .table-actions button:hover {
    border-color: rgba(15, 118, 110, 0.18);
    background: var(--primary-soft);
    color: var(--primary-dark);
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .tag {
    height: 21px;
    padding: 0 7px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell .pagination-bar {
    gap: 6px 10px;
    margin-top: 8px;
    color: #76817b;
    font-size: 12px;
  }

  /* 详情页、弹窗和抽屉：统一三层结构，原始 JSON 只在内部滚动。 */
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .drawer {
    width: min(920px, calc(100vw - 260px));
    max-width: 78vw;
    padding: 12px 14px;
    background: #f6f7f5;
    box-shadow: -16px 0 42px rgba(20, 45, 42, 0.14);
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .drawer-head {
    top: -12px;
    margin: -12px -14px 8px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--panel-border);
    background: rgba(255, 255, 255, 0.96);
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .drawer .detail-block {
    padding: 10px;
    margin-bottom: 8px;
  }

  /* 客户详情抽屉使用宽而矮的紧凑布局：四个摘要卡一行展示，避免基础信息需要纵向滚动。 */
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .drawer .customer-master-layout {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .drawer .customer-identity {
    gap: 10px;
    padding-bottom: 8px;
    margin-bottom: 8px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .drawer .customer-avatar {
    width: 56px;
    height: 56px;
    font-size: 20px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .drawer .customer-title-line h3 {
    font-size: 17px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .drawer .line-meta {
    font-size: 11.5px;
    line-height: 1.35;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .drawer .customer-action-panel {
    padding-left: 0;
    padding-top: 8px;
    border-left: 0;
    border-top: 1px solid var(--panel-border);
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .drawer .customer-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 8px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .drawer .master-grid,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .drawer .detail-field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .drawer .customer-summary-card,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .drawer .workbench-action-group,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .drawer .detail-metric-card {
    padding: 6px 8px;
    gap: 4px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .drawer .customer-summary-items {
    gap: 2px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .drawer .customer-summary-items div {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 6px;
    align-items: center;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .drawer .customer-summary-card h4,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .drawer .workbench-action-group h4 {
    font-size: 11.5px;
    line-height: 1.25;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .drawer .customer-summary-items span {
    margin-bottom: 0;
    font-size: 11px;
    line-height: 1.25;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .drawer .customer-summary-items strong {
    font-size: 12px;
    line-height: 1.25;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .drawer .master-section-title {
    margin: 6px 0 5px;
    font-size: 11.5px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .drawer .owner-master-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px 8px;
    margin-bottom: 0;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .drawer .master-item {
    padding-bottom: 5px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .drawer .master-item span {
    margin-bottom: 2px;
    font-size: 11px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .drawer .master-item strong {
    font-size: 12px;
    line-height: 1.25;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .drawer .tag {
    height: 18px;
    padding: 0 6px;
    font-size: 10.5px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .drawer .detail-tab-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .drawer .detail-metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .drawer .workbench-action-groups {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    align-items: start;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .drawer .workbench-actions {
    gap: 6px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .drawer .workbench-actions button,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .drawer-head button {
    height: 28px;
    padding: 0 9px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 28px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .drawer .detail-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .drawer .line-meta,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .drawer .customer-summary-items strong,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .drawer .master-item strong {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .modal-card {
    max-width: min(920px, calc(100vw - 40px));
    border: 1px solid var(--panel-border);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(20, 45, 42, 0.14);
    font-size: 12.5px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .modal-head,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .modal-actions {
    padding: 11px 13px;
    border-color: var(--panel-border);
    background: #fff;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .modal-body {
    padding: 11px 13px;
    background: #f6f7f5;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .drawer .detail-block,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .detail-section,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .detail-record-card,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .detail-tab-shell,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .operation-log-detail-section,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .operation-log-detail-field {
    border: 1px solid var(--panel-border);
    border-radius: 9px;
    background: #fff;
    box-shadow: none;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .detail-section,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .detail-record-card,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .operation-log-detail-section,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .operation-log-detail-field {
    padding: 11px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .detail-section-head h4,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .detail-tab-panel h3,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .modal-card h3 {
    color: #172f2d;
    font-size: 14px;
    font-weight: 750;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .detail-field-grid {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
    gap: 9px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .detail-field-grid div,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .appointment-detail-grid div,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .appointment-dialog-summary div,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .operation-log-detail-field {
    min-width: 0;
    background: #fafbf9;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .detail-field-grid span,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .appointment-detail-grid span,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .appointment-dialog-summary span,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .operation-log-detail-field span,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .operation-log-detail-section span {
    color: #758078;
    font-size: 11.5px;
    font-weight: 700;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .detail-field-grid strong,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .appointment-detail-grid strong,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .appointment-dialog-summary strong,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .operation-log-detail-field strong,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .operation-log-detail-section p {
    color: #172f2d;
    font-size: 12.5px;
    line-height: 1.45;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .operation-log-detail-section pre,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .operation-log-raw-pre,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .debug-pre,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) pre {
    max-height: 260px;
    overflow: auto;
    border-radius: 8px;
    background: #f7f8f6;
    white-space: pre-wrap;
    word-break: break-word;
  }
}

/* 小屏布局：侧栏变顶部，表单变单列。 */
@media (max-width: 900px) {
  .login-view {
    padding: 28px 4vw 70px;
  }

  .login-shell {
    justify-content: center;
  }

  .login-card {
    width: 92vw;
    max-width: 420px;
    padding: 28px;
  }

  .login-brand strong {
    font-size: 24px;
  }

  .app-shell {
    grid-template-columns: 1fr;
    width: 100%;
    min-width: 0;
  }

  .main {
    width: 100%;
    min-width: 0;
    padding: 12px;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 80;
    display: flex;
    flex-direction: column;
    width: min(320px, 86vw);
    max-width: calc(100vw - 44px);
    height: 100dvh;
    max-height: 100dvh;
    padding: 10px;
    overflow: hidden;
    transform: translateX(-104%);
    transition: transform 0.18s ease;
    box-shadow: 18px 0 38px rgba(15, 23, 42, 0.24);
  }

  body.sidebar-drawer-open .sidebar {
    transform: translateX(0);
  }

  body.sidebar-drawer-open {
    overflow: hidden;
  }

  .sidebar .brand {
    flex: 0 0 auto;
    padding: 8px;
  }

  .sidebar .nav {
    flex: 1 1 auto;
    overflow-y: auto;
    padding-bottom: 132px;
  }

  .sidebar-close {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    margin-left: auto;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 20px;
    line-height: 1;
  }

  .sidebar-open {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--panel-border);
    border-radius: 7px;
    background: #fff;
    color: var(--primary-dark);
    font-weight: 700;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: block;
    background: rgba(15, 23, 42, 0.38);
  }

  .sidebar-backdrop[hidden] {
    display: none;
  }

  .topbar {
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
  }

  .topbar-title-block {
    min-width: 0;
  }

  .topbar h1,
  .topbar p,
  .top-system-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.boss-mobile-report-route .sidebar {
    max-height: 112px;
    overflow: auto;
  }

  body.boss-mobile-report-route .topbar {
    display: none;
  }

  body.boss-mobile-report-route .main {
    padding: 0;
  }

  body.boss-mobile-report-route #view-reports {
    padding: 0;
  }

  body.boss-mobile-report-route #view-reports > .module-tabs {
    margin: 0;
    padding: 8px 8px 6px;
    overflow-x: auto;
    flex-wrap: nowrap;
    background: #34343a;
  }

  body.boss-mobile-report-route #view-reports > .module-tabs button {
    flex: 0 0 auto;
  }

  body.boss-mobile-report-route .boss-mobile-report-panel {
    border-radius: 0;
  }

  .nav {
    grid-template-columns: 1fr;
  }

  .nav-children {
    padding-left: 0;
    grid-template-columns: 1fr;
  }

  .metric-grid,
  .split-grid,
  .form-grid,
  .form-section,
  .form-grid.compact,
  .dialog-grid,
  .permission-box,
  .operator-switcher,
  .dev-debug-panel {
    grid-template-columns: 1fr;
  }

  .api-confirm-row {
    grid-template-columns: 1fr;
  }

  .operator-summary {
    white-space: normal;
  }

  .topbar .operator-switcher {
    position: fixed;
    left: 0;
    bottom: 0;
    z-index: 82;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: min(320px, 86vw);
    max-width: calc(100vw - 44px);
    padding: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: #071b1c;
    transform: translateX(-104%);
    transition: transform 0.18s ease;
  }

  body.sidebar-drawer-open .topbar .operator-switcher {
    transform: translateX(0);
  }

  .topbar .operator-switcher #currentOperatorSummary,
  .topbar .operator-switcher #serverState {
    display: flex;
    grid-column: 1 / -1;
    min-height: 30px;
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #d5dfdb;
  }

  .topbar .operator-switcher > button {
    height: 32px;
    min-width: 0;
    padding: 0 9px;
    white-space: nowrap;
  }

  .form-grid .wide {
    grid-column: auto;
  }

  .local-push-member-field,
  .local-push-member-options {
    min-width: 0;
  }

  .permission-group-grid {
    grid-template-columns: 1fr;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .appointment-detail-grid,
  .appointment-dialog-summary,
  .customer-dialog-summary,
  .owner-dialog-summary,
  .employee-acquisition-summary,
    .bed-allocation-form,
    .bed-allocation-workbench,
    .bed-allocation-facts,
    .bed-schedule-board,
    .customer-list-tools,
    .customer-list-filter-row.first,
    .customer-list-filter-row.second,
    .customer-list-filter-row.third,
    .customer-operation-log-filters,
    .customer-log-diff-grid,
  .detail-field-grid,
  .record-field-grid,
  .compact-field-grid,
  .owner-summary-grid,
  .owner-log-compare,
    .detail-split-notes,
    .detail-tab-summary,
  .detail-flow-row,
  .readiness-grid,
  .readiness-card-body {
    grid-template-columns: 1fr;
  }

  .master-grid {
    grid-template-columns: 1fr;
  }

  .customer-summary-grid {
    grid-template-columns: 1fr;
  }

  .master-item.wide {
    grid-column: auto;
  }

  .customer-master-layout {
    grid-template-columns: 1fr;
  }

  .customer-action-panel {
    padding-left: 0;
    padding-top: 14px;
    border-left: 0;
    border-top: 1px solid #edf1f5;
  }

  .workbench-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .customer-list-filter-actions {
    justify-content: flex-start;
  }

.list-tools {
  grid-template-columns: 1fr;
}
}

.public-url-summary {
  display: grid;
  gap: 4px;
  margin: 10px 0;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
}

.public-url-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.public-url-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}

.public-url-item > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.public-url-item code,
.callback-url-cell {
  overflow-wrap: anywhere;
}

.public-url-item span,
.warning-text {
  color: #92400e;
}

/* 客户详情方案 1：紧凑卡片式。抽屉不再继承通用 .drawer，避免被其他详情页或弹窗样式叠加污染。 */
.customer-detail-drawer {
  position: fixed;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  width: 760px;
  max-width: min(780px, calc(100vw - 240px));
  height: 100vh;
  padding: 0;
  overflow: hidden;
  background: #f8fafc;
  border-left: 1px solid #d8e0e8;
  box-shadow: -10px 0 28px rgba(15, 23, 42, 0.14);
  font-size: 12.5px;
  transform: translateX(100%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.18s ease, visibility 0s linear 0.18s;
  z-index: 20;
}

.customer-detail-drawer.open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .customer-detail-drawer {
  width: 760px;
  max-width: min(780px, calc(100vw - 240px));
  padding: 0;
  overflow: hidden;
  background: #f8fafc;
}

.customer-detail-compact-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: 0 0 auto;
  min-height: 52px;
  margin: 0;
  padding: 8px 10px;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
}

body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .customer-detail-drawer .customer-detail-compact-head {
  top: auto;
  margin: 0;
  padding: 8px 10px;
}

.customer-detail-head-title {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.customer-detail-head-title h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: #172f2d;
  font-size: 16.5px;
  line-height: 1.2;
}

.customer-detail-head-title p {
  max-width: 720px;
  margin: 0;
  overflow: hidden;
  color: #667085;
  font-size: 12px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-detail-head-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}

.customer-detail-compact-head button {
  height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  background: #fff;
  color: #344054;
  border-color: #cfd8e3;
  font-size: 12px;
  line-height: 26px;
}

.customer-detail-drawer #customerDetail {
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.customer-detail-compact {
  display: flex;
  flex-direction: column;
  gap: 7px;
  height: 100%;
  min-height: 0;
  padding: 8px;
  color: #1f2933;
  font-size: 12.2px;
}

.customer-detail-summary-strip,
.customer-detail-metrics-section,
.customer-detail-info-card,
.customer-detail-tabs-block {
  border: 1px solid #dfe6ee;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.035);
}

.customer-detail-summary-strip {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  min-height: 56px;
  overflow: hidden;
}

.customer-detail-summary-item {
  min-width: 0;
  padding: 7px 9px;
  border-right: 1px solid #edf1f5;
  border-bottom: 1px solid #edf1f5;
}

.customer-detail-summary-item:nth-child(4n) {
  border-right: 0;
}

.customer-detail-summary-item:nth-last-child(-n + 4) {
  border-bottom: 0;
}

.customer-detail-summary-item span,
.customer-detail-info-items span,
.customer-detail-master-item span,
.customer-detail-metric-card span {
  display: block;
  margin: 0 0 2px;
  color: #667085;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2;
}

.customer-detail-summary-item strong,
.customer-detail-info-items strong,
.customer-detail-master-item strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #1f2933;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.28;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-detail-summary-item strong .tag,
.customer-detail-info-items strong .tag {
  vertical-align: middle;
}

.customer-detail-action-section {
  flex: 0 0 auto;
  min-height: min-content;
  overflow: visible;
}

.customer-detail-action-groups {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  align-items: start;
}

.customer-detail-action-group {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 6px;
  border: 1px solid #dfe6ee;
  border-radius: 8px;
  background: #fff;
  align-content: start;
}

.customer-detail-action-group.is-sensitive {
  border-color: #fecdca;
  background: #fffafa;
}

.customer-detail-action-group h4,
.customer-detail-info-card h4,
.customer-detail-metrics-section h3 {
  margin: 0;
  color: #344054;
  font-size: 12.5px;
  font-weight: 750;
  line-height: 1.25;
}

.customer-detail-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.customer-detail-action-buttons button {
  height: 27px;
  min-width: 0;
  padding: 0 7px;
  border-radius: 6px;
  background: #0f766e;
  color: #fff;
  border-color: #0f766e;
  font-size: 12px;
  line-height: 25px;
  white-space: nowrap;
}

.customer-detail-action-buttons button.secondary {
  background: #fff;
  color: #344054;
  border-color: #cfd8e3;
}

.customer-detail-action-buttons button.danger,
.customer-detail-action-group.is-sensitive button {
  background: #fff;
  color: #b42318;
  border-color: #fecdca;
}

.customer-detail-metrics-section {
  display: grid;
  flex: 0 0 auto;
  gap: 4px;
  min-height: 42px;
  padding: 5px 7px;
  overflow: hidden;
}

.customer-detail-metric-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid #edf1f5;
  border-radius: 7px;
}

.customer-detail-metric-card {
  min-width: 0;
  padding: 4px 5px;
  border-right: 1px solid #edf1f5;
  background: #fff;
}

.customer-detail-metric-card:last-child {
  border-right: 0;
}

.customer-detail-metric-card strong {
  display: block;
  overflow: hidden;
  color: #0f172a;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-detail-info-grid {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  max-height: 176px;
  overflow: auto;
  padding-right: 2px;
}

.customer-detail-info-card {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 8px;
  align-content: start;
}

.customer-detail-info-items,
.customer-detail-master-grid {
  display: grid;
  gap: 4px;
}

.customer-detail-info-items div,
.customer-detail-master-item {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 6px;
  min-width: 0;
  align-items: center;
}

.customer-detail-attribution-card {
  grid-column: span 2;
}

.customer-detail-attribution-card .customer-lazy-state {
  min-height: 50px;
  padding: 8px;
}

.customer-detail-attribution-card .detail-record-card {
  padding: 7px;
}

.customer-detail-tabs-block {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 180px;
  overflow: hidden;
}

.customer-detail-tabs {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
  min-height: 30px;
  padding: 0 8px;
  overflow-x: auto;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
}

.customer-detail-tabs button {
  height: 30px;
  padding: 0 2px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #475467;
  font-size: 12px;
  line-height: 28px;
  white-space: nowrap;
}

.customer-detail-tabs button.active,
.customer-detail-tabs button:hover {
  border-bottom-color: #0f766e;
  background: transparent;
  color: #0f766e;
}

.customer-detail-compact .detail-tab-panel {
  display: none;
  flex: 1 1 auto;
  min-height: 0;
  padding: 7px 8px 8px;
  overflow: auto;
  background: #fff;
}

.customer-detail-compact .detail-tab-panel.active {
  display: block;
}

.customer-detail-compact .detail-tab-panel h3 {
  margin: 0 0 6px;
  color: #344054;
  font-size: 13px;
  line-height: 1.25;
}

.customer-detail-compact .detail-tab-shell,
.customer-detail-compact .detail-section,
.customer-detail-compact .detail-list {
  gap: 7px;
}

.customer-detail-compact .detail-section,
.customer-detail-compact .detail-record-card,
.customer-detail-compact .detail-tab-summary {
  padding: 8px;
  border: 1px solid #e5eaf0;
  border-radius: 7px;
  box-shadow: none;
}

.customer-detail-compact .detail-field-grid {
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 6px;
}

.customer-detail-compact .detail-field-grid div,
.customer-detail-compact .record-field-grid div {
  min-width: 0;
}

.customer-detail-compact .table-wrap {
  max-height: 340px;
  overflow: auto;
}

.customer-detail-compact table {
  font-size: 12px;
}

.customer-detail-compact th,
.customer-detail-compact td {
  height: 36px;
  padding: 6px 8px;
  line-height: 1.35;
}

.customer-detail-compact .table-actions button,
.customer-detail-compact .detail-summary-actions button,
.customer-detail-compact .filter-actions button {
  height: 28px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 26px;
}

.customer-detail-compact .line-meta,
.customer-detail-info-items strong,
.customer-detail-master-item strong {
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .customer-detail-drawer {
    top: 8px;
    right: 8px;
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    height: calc(100vh - 16px);
    border: 1px solid #d8e0e8;
    border-radius: 10px;
  }

  .customer-detail-summary-strip,
  .customer-detail-action-groups,
  .customer-detail-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-detail-summary-item:nth-child(2n) {
    border-right: 0;
  }

  .customer-detail-metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .customer-detail-info-grid {
    max-height: 210px;
  }

  .customer-detail-attribution-card {
    grid-column: span 2;
  }
}

.landing-editor-panel {
  padding: 0;
  overflow: hidden;
}

.landing-editor {
  height: min(760px, calc(100vh - 142px));
  min-height: 560px;
  display: flex;
  flex-direction: column;
  background: #f6f8fb;
}

.landing-editor-toolbar {
  flex: 0 0 auto;
  height: 48px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #dfe5ef;
  background: #fff;
}

.landing-editor-toolbar strong {
  display: block;
  font-size: 14px;
  color: #172033;
}

.landing-editor-toolbar span {
  font-size: 12px;
  color: #667085;
}

.landing-editor-toolbar-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.landing-editor-body {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 220px minmax(420px, 1fr) 340px;
}

.landing-editor-library,
.landing-editor-config {
  min-height: 0;
  overflow: auto;
  padding: 10px;
  background: #fff;
}

.landing-editor-library {
  border-right: 1px solid #dfe5ef;
  background: #f8fafc;
}

.landing-editor-config {
  border-left: 1px solid #dfe5ef;
}

.landing-editor-library h3,
.landing-editor-config h3,
.landing-editor-config h4 {
  margin: 0 0 8px;
  font-size: 13px;
  color: #172033;
}

.landing-editor-library-group {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.landing-editor-library-group h4 {
  margin: 0;
  color: #667085;
  font-size: 11px;
  font-weight: 700;
}

.landing-editor-component-card {
  width: 100%;
  min-height: 50px;
  padding: 7px 8px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  text-align: left;
  background: #fff;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  color: #172033;
  cursor: grab;
}

.landing-editor-component-card:hover {
  border-color: #b7cff8;
  background: #f8fbff;
}

.landing-editor-component-card:active {
  cursor: grabbing;
}

.landing-editor-component-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid #dbeafe;
  border-radius: 7px;
  background: #eff6ff;
  color: #1769e0;
  font-size: 11px;
  font-weight: 700;
}

.landing-editor-component-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.landing-editor-component-copy strong {
  overflow: hidden;
  color: #172033;
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.landing-editor-component-copy em {
  overflow: hidden;
  color: #667085;
  font-size: 11px;
  font-style: normal;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.landing-editor-stage {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 14px;
  display: flex;
  justify-content: center;
}

.landing-editor-phone-shell {
  width: 100%;
  min-width: 390px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.landing-editor-phone {
  position: relative;
  width: 375px;
  min-height: 640px;
  border: 1px solid #cbd5e1;
  border-radius: 22px;
  overflow: auto;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.14);
}

.landing-editor-empty {
  margin: 24px;
  padding: 18px;
  text-align: center;
  color: #8a94a6;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
}

.landing-editor-preview-block {
  position: relative;
  min-height: 24px;
  border: 1px solid transparent;
  cursor: pointer;
  outline: 0;
}

.landing-editor-preview-block.selected {
  border-color: #1769e0;
  background: rgba(23, 105, 224, 0.06);
  box-shadow: inset 0 0 0 1px #1769e0;
}

.landing-editor-block-content {
  cursor: pointer;
}

.landing-editor-block-content button,
.landing-editor-phone-sticky button {
  pointer-events: none;
}

.landing-editor-block-label {
  position: absolute;
  left: 6px;
  top: 4px;
  z-index: 3;
  display: none;
  max-width: calc(100% - 12px);
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(23, 105, 224, 0.92);
  color: #fff;
  font-size: 11px;
  line-height: 1.4;
  pointer-events: none;
}

.landing-editor-preview-block.selected .landing-editor-block-label,
.landing-editor-phone-sticky.selected .landing-editor-block-label {
  display: block;
}

.landing-editor-block-actions {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 4;
  display: none;
  gap: 3px;
  background: rgba(255, 255, 255, 0.94);
  padding: 2px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

.landing-editor-preview-block:hover .landing-editor-block-actions,
.landing-editor-preview-block.selected .landing-editor-block-actions {
  display: flex;
}

.landing-editor-block-actions button {
  height: 22px;
  padding: 0 5px;
  font-size: 11px;
}

.landing-editor-lp-block {
  overflow: hidden;
}

.landing-editor-lp-block img,
.landing-editor-lp-block > img {
  width: 100%;
  display: block;
}

.landing-editor-image-placeholder,
.landing-editor-hidden-block,
.landing-editor-sticky-placeholder {
  min-height: 80px;
  display: grid;
  place-items: center;
  color: #8a94a6;
  background: #eef2f7;
  border: 1px dashed #cbd5e1;
}

.landing-editor-lp-text {
  white-space: pre-wrap;
  word-break: break-word;
}

.landing-editor-lp-rich {
  padding: 12px;
  display: flex;
  gap: 10px;
  border: 1px solid #e5e7eb;
}

.landing-editor-lp-rich.top,
.landing-editor-lp-rich.bottom {
  flex-direction: column;
}

.landing-editor-lp-rich.left,
.landing-editor-lp-rich.right {
  flex-direction: row;
}

.landing-editor-lp-rich img {
  max-width: 46%;
  object-fit: cover;
  border-radius: 8px;
}

.landing-editor-lp-rich.top img,
.landing-editor-lp-rich.bottom img {
  max-width: 100%;
}

.landing-editor-lp-rich p {
  margin: 5px 0 0;
  line-height: 1.55;
}

.landing-editor-lp-offer {
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #e5e7eb;
}

.landing-editor-lp-offer span {
  display: inline-block;
  margin-bottom: 5px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #fff4de;
  color: #8a4b00;
  font-size: 11px;
}

.landing-editor-lp-offer strong,
.landing-editor-lp-offer em {
  display: block;
  font-style: normal;
}

.landing-editor-lp-offer p {
  margin: 5px 0 0;
}

.landing-editor-lp-form {
  padding: 12px;
  display: grid;
  gap: 8px;
  border: 1px solid #e5e7eb;
}

.landing-editor-lp-form input {
  height: 32px;
  border: 1px solid #d9dee8;
  border-radius: 6px;
  padding: 0 9px;
}

.landing-editor-lp-form button,
.landing-editor-lp-button,
.landing-editor-phone-sticky button {
  border: 0;
  font: inherit;
}

.landing-editor-lp-form button {
  height: 34px;
  border-radius: 8px;
  color: #25324b;
  background: #eef2f7;
}

.landing-editor-lp-form p {
  margin: 0;
  color: #8a94a6;
  font-size: 12px;
}

.landing-editor-lp-button {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.landing-editor-lp-button span {
  font-size: 12px;
  opacity: .82;
}

.landing-editor-lp-button img {
  width: 20px;
  height: 20px;
  object-fit: cover;
  border-radius: 4px;
}

.landing-editor-upload-hint {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.landing-editor-auto-trigger {
  margin: 8px 0 10px;
  padding: 9px;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  background: #f8fafc;
}

.landing-editor-phone-sticky {
  position: sticky;
  z-index: 5;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 58px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 -8px 22px rgba(15, 23, 42, 0.08);
  cursor: pointer;
}

.landing-editor-phone-sticky.selected {
  outline: 2px solid #1769e0;
  outline-offset: -2px;
}

.landing-editor-phone-sticky span {
  flex: 1;
  font-weight: 600;
}

.landing-editor-phone-sticky button {
  min-width: 120px;
  min-height: 36px;
  padding: 5px 10px;
  display: grid;
  place-items: center;
  border-radius: 8px;
}

.landing-editor-phone-sticky button strong {
  font-size: 13px;
}

.landing-editor-phone-sticky button small {
  font-size: 11px;
  opacity: .82;
}

.landing-editor-config-section {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #edf0f5;
}

.landing-editor-field-group {
  margin: 8px 0 10px;
  padding: 9px;
  border: 1px solid #edf0f5;
  border-radius: 8px;
  background: #fbfdff;
}

.landing-editor-config label {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
  font-size: 12px;
  color: #4b5565;
}

.landing-editor-config input,
.landing-editor-config select,
.landing-editor-config textarea {
  width: 100%;
  min-height: 30px;
  border: 1px solid #d9dee8;
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 12px;
}

.landing-editor-config textarea {
  min-height: 64px;
  resize: vertical;
}

.landing-editor-config .checkline {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 6px;
}

.landing-editor-config .checkline input {
  width: auto;
  min-height: auto;
}

.landing-editor-selected-name {
  margin-bottom: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  background: #eef5ff;
  color: #1769e0;
  font-size: 12px;
  font-weight: 600;
}

.landing-editor-version-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 6px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #edf0f5;
}

.landing-editor-version-row span {
  font-size: 12px;
  color: #172033;
}

.landing-editor-version-row small {
  font-size: 11px;
  color: #8a94a6;
}

.landing-editor-version-row button {
  grid-column: 1 / -1;
  justify-self: start;
  height: 24px;
  font-size: 11px;
}

.landing-editor-preview-modal .modal-card {
  max-width: 520px;
}

.landing-editor-preview-modal .landing-editor {
  height: auto;
  min-height: 0;
  background: transparent;
}

@media (max-width: 1180px) {
  .landing-editor-body {
    grid-template-columns: 200px minmax(390px, 1fr) 320px;
  }
}

/* 2026-05-10 客户列表布局：筛选两行固定、表格内部滚动、分页固定在列表底部。 */
@media (min-width: 901px) {
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #view-customers.active {
    min-height: 0;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #view-customers > .panel:has(#customerTable) {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 154px);
    min-height: 0;
    overflow: hidden;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #view-customers > .panel:has(#customerTable) .panel-head {
    flex: 0 0 auto;
    margin-bottom: 7px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #customerTable,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #customerTable .list-section {
    flex: 1 1 auto;
    min-height: 0;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #customerTable {
    display: flex;
    flex-direction: column;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #customerTable .list-section {
    display: flex;
    flex-direction: column;
    gap: 7px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #customerTable .customer-list-filter-card {
    flex: 0 0 auto;
    display: grid !important;
    grid-template-rows: 28px 28px;
    gap: 6px;
    max-height: 88px;
    padding: 8px 10px;
    overflow: hidden;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #customerTable .customer-list-filter-row {
    display: grid !important;
    gap: 6px;
    min-width: 0;
    align-items: center;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #customerTable .customer-list-filter-row.first {
    grid-template-columns: minmax(220px, 1.45fr) minmax(126px, 0.7fr) minmax(150px, 0.9fr) auto;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #customerTable .customer-list-filter-row.second {
    grid-template-columns: minmax(104px, 0.72fr) minmax(104px, 0.72fr) minmax(160px, 1.05fr) minmax(150px, 1fr) minmax(210px, 1.32fr) minmax(126px, 0.86fr);
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #customerTable .filter-field {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 4px;
    align-items: center;
    min-width: 0;
    height: 28px;
    flex: none;
    font-size: 12px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #customerTable .filter-field > span {
    color: #68756f;
    font-size: 11px;
    font-weight: 650;
    line-height: 28px;
    white-space: nowrap;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #customerTable .filter-field input,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #customerTable .filter-field select,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #customerTable .date-range-trigger,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #customerTable .customer-list-filter-actions button {
    width: 100%;
    height: 28px;
    min-height: 28px;
    padding: 0 8px;
    font-size: 12px;
    line-height: 26px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #customerTable .customer-list-filter-actions {
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 6px;
    width: 126px;
    min-width: 126px;
    margin-left: 0;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #customerTable .customer-list-filter-actions button {
    width: 60px;
    padding: 0 6px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #customerTable .table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #customerTable .table-wrap table {
    min-width: 1360px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #customerTable .table-wrap thead th {
    position: sticky;
    top: 0;
    z-index: 4;
    height: 32px;
    padding: 5px 8px;
    font-size: 12px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #customerTable .table-wrap td {
    height: 46px;
    padding: 5px 8px;
    font-size: 13px;
    line-height: 1.25;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #customerTable .line-meta {
    font-size: 12px;
    line-height: 1.2;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #customerTable .tag {
    height: 20px;
    padding: 0 6px;
    font-size: 11px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #customerTable .table-actions button,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #customerTable .table-primary-action {
    height: 27px;
    min-height: 27px;
    padding: 0 8px;
    font-size: 12px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #customerTable .pagination-bar {
    flex: 0 0 38px;
    height: 38px;
    margin-top: 0;
    padding: 5px 0 0;
    font-size: 12px;
  }

  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #customerTable .pagination-bar button,
  body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .app-shell #customerTable .pagination-bar select {
    height: 26px;
    min-height: 26px;
    font-size: 12px;
  }
}

/* 2026-05-10 客户详情：从窄抽屉改为视口内全屏单客工作台，右侧业务 tab 内部滚动。 */
.customer-detail-drawer {
  top: 16px;
  right: 16px;
  left: 16px;
  width: calc(100vw - 32px);
  max-width: none;
  height: calc(100vh - 32px);
  border: 1px solid #d8e0e8;
  border-radius: 12px;
  box-shadow: 0 20px 52px rgba(15, 23, 42, 0.22);
}

body:not(.store-mobile-route):not(.boss-mobile-direct-route):not(.boss-mobile-report-route) .customer-detail-drawer {
  width: calc(100vw - 32px);
  max-width: none;
  height: calc(100vh - 32px);
}

.customer-detail-compact-head {
  box-sizing: border-box;
  height: 52px;
  min-height: 52px;
  padding: 6px 12px;
}

.customer-detail-head-title h2 {
  font-size: 18px;
}

.customer-detail-head-title p {
  max-width: calc(100vw - 170px);
}

.customer-detail-workbench {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  gap: 0;
  height: 100%;
  padding: 0;
}

.customer-detail-sidebar {
  min-height: 0;
  overflow: auto;
  padding: 10px 10px 12px;
  border-right: 1px solid #e2e8f0;
  background: #f8fafc;
}

.customer-detail-side-card {
  display: grid;
  gap: 6px;
  margin-bottom: 8px;
  padding: 10px;
  border: 1px solid #dfe6ee;
  border-radius: 8px;
  background: #fff;
}

.customer-detail-side-card h3 {
  margin: 0;
  color: #344054;
  font-size: 13px;
  line-height: 1.2;
}

.customer-detail-side-fields {
  display: grid;
  gap: 5px;
}

.customer-detail-side-fields div {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  min-width: 0;
}

.customer-detail-side-fields span {
  color: #667085;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2;
}

.customer-detail-side-fields strong {
  min-width: 0;
  overflow: hidden;
  color: #1f2933;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-detail-business {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  gap: 8px;
  padding: 10px 12px 12px;
  background: #fff;
}

.customer-detail-workbench .customer-detail-action-section {
  min-height: 0;
  overflow: visible;
}

.customer-detail-workbench .customer-detail-action-groups {
  grid-template-columns: 1fr;
  gap: 7px;
}

.customer-detail-workbench .customer-detail-action-group {
  padding: 8px;
}

.customer-detail-workbench .customer-detail-action-buttons {
  gap: 5px;
}

.customer-detail-workbench .customer-detail-action-buttons button {
  height: 28px;
  min-height: 28px;
  padding: 0 8px;
  font-size: 12px;
  line-height: 26px;
}

.customer-detail-workbench .customer-detail-metrics-section {
  flex: 0 0 58px;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  height: 58px;
  min-height: 58px;
  padding: 6px 8px;
}

.customer-detail-workbench .customer-detail-metrics-section h3 {
  font-size: 13px;
}

.customer-detail-workbench .customer-detail-metric-grid {
  height: 46px;
  grid-template-columns: repeat(8, minmax(0, 1fr));
}

.customer-detail-workbench .customer-detail-metric-card {
  padding: 5px 6px;
}

.customer-detail-workbench .customer-detail-metric-card span {
  font-size: 11px;
}

.customer-detail-workbench .customer-detail-metric-card strong {
  font-size: 14px;
}

.customer-detail-workbench .customer-detail-tabs-block {
  flex: 1 1 auto;
  min-height: 0;
  border-radius: 8px;
}

.customer-detail-workbench .customer-detail-tabs {
  flex: 0 0 38px;
  min-height: 38px;
  padding: 0 10px;
  gap: 12px;
}

.customer-detail-workbench .customer-detail-tabs button {
  height: 38px;
  font-size: 12.5px;
  line-height: 36px;
}

.customer-detail-workbench .detail-tab-panel {
  flex: 1 1 auto;
  min-height: 0;
  padding: 8px 10px 10px;
  overflow: auto;
}

.customer-detail-workbench .detail-record-card,
.customer-detail-workbench .detail-section,
.customer-detail-workbench .detail-tab-summary {
  padding: 8px 10px;
  border-radius: 8px;
}

.customer-detail-workbench .detail-field-grid,
.customer-detail-workbench .record-field-grid {
  grid-template-columns: repeat(4, minmax(128px, 1fr));
  gap: 7px;
}

.customer-detail-workbench .detail-field-grid span,
.customer-detail-workbench .record-field-grid span {
  font-size: 11px;
}

.customer-detail-workbench .detail-field-grid strong,
.customer-detail-workbench .record-field-grid strong,
.customer-detail-workbench .detail-record-card {
  font-size: 12.5px;
}

.customer-detail-workbench .table-wrap {
  max-height: none;
  overflow: auto;
}

.unassigned-pool-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
}

.unassigned-pool-toolbar span {
  color: #475569;
  font-size: 13px;
}

.unassigned-assign-result {
  margin: 10px 0;
}

.compact-metric-grid {
  margin-bottom: 10px;
}

@media (max-width: 900px) {
  .customer-detail-drawer {
    top: 8px;
    right: 8px;
    left: 8px;
    width: calc(100vw - 16px);
    max-width: none;
    height: calc(100vh - 16px);
  }

  .customer-detail-workbench {
    grid-template-columns: 1fr;
  }

  .customer-detail-sidebar {
    max-height: 34vh;
    border-right: 0;
    border-bottom: 1px solid #e2e8f0;
  }

  .customer-detail-business {
    min-height: 0;
  }

  .customer-detail-workbench .customer-detail-metrics-section {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
  }

  .customer-detail-workbench .customer-detail-metric-grid,
  .customer-detail-workbench .detail-field-grid,
  .customer-detail-workbench .record-field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
