:root {
  --blue: #4a90c8;
  --blue-dark: #3a7ab0;
  --blue-soft: #d6e8f5;
  --orange: #f0a020;
  --orange-deep: #e88a00;
  --orange-soft: #ffe6b8;
  --amber: #f5c542;
  --text: #2c3e50;
  --text-muted: #7a8a9a;
  --bg: #eef2f6;
  --card: #ffffff;
  --border: #e2e8f0;
  --shadow: 0 8px 24px rgba(44, 62, 80, 0.08);
  --radius: 14px;
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
}

body.screen-body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 10% -10%, #dbeaf7 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #ffe9c4 0%, transparent 50%),
    var(--bg);
}

.screen-wrap {
  max-width: 1920px;
  margin: 0 auto;
  padding: 18px 22px 28px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Header */
.screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 4px 4px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
}

.brand-logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}

.brand-logo {
  /* 万音共鸣透明字图 */
  height: 36px;
  width: auto;
  max-width: min(200px, 36vw);
  object-fit: contain;
  object-position: left center;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(180, 120, 20, 0.18));
}
.brand-logo-sm {
  height: 32px;
  max-width: 110px;
}

/* 页脚备案级小字 */
.site-footer {
  margin-top: auto;
  padding: 18px 8px 10px;
  text-align: center;
  font-size: 12px;
  line-height: 1.4;
  color: #9aa6b2;
  letter-spacing: 0.08em;
  user-select: none;
  pointer-events: none;
}
.site-footer-login {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 10px;
  z-index: 5;
  padding: 0;
  color: rgba(154, 166, 178, 0.85);
  font-size: 11px;
  letter-spacing: 0.12em;
}
.site-footer-mobile {
  padding: 8px 8px calc(10px + env(safe-area-inset-bottom, 0px));
  font-size: 11px;
  color: #a0aab4;
}

.brand h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 1px;
  background: linear-gradient(90deg, var(--orange-deep), var(--orange), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand .sub {
  font-size: 13px;
  color: var(--text-muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.main-grid-two.main-grid-single {
  grid-template-columns: 1fr;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.meta-chip {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  color: var(--text-muted);
  box-shadow: var(--shadow);
}

.meta-chip strong { color: var(--blue-dark); }

.date-picker-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 12px;
}
.date-picker-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}
.date-input-inline {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: #f8fafc;
  max-width: 148px;
}
.btn-date-today {
  border: none;
  background: linear-gradient(135deg, #5ba3d9, #3a7ab0);
  color: #fff;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  opacity: 0.55;
}
.btn-date-today.is-active {
  opacity: 1;
  box-shadow: 0 2px 8px rgba(58, 122, 176, 0.35);
}

.clock {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--text);
  font-size: 15px;
}

.btn {
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-orange { background: var(--orange); color: #fff; }
.btn-ghost {
  background: #fff;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* KPI row：三块铺满整行，数字大而醒目，文字靠右上角 */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  width: 100%;
}

.kpi-card {
  border-radius: var(--radius);
  padding: 22px 26px 20px;
  color: #fff;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  min-height: 128px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.kpi-card::after {
  content: "";
  position: absolute;
  right: -20px;
  top: -20px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
}

.kpi-card .label {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 14px;
  opacity: .95;
  font-weight: 700;
  letter-spacing: 0.5px;
  z-index: 1;
}

.kpi-card .value {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  position: relative;
  z-index: 1;
}

.kpi-card .hint {
  margin-top: 10px;
  font-size: 12px;
  opacity: .85;
}

.kpi-blue { background: linear-gradient(135deg, #5ba3d9, #3a7ab0); }
.kpi-amber { background: linear-gradient(135deg, #f5c542, #e8a317); }
.kpi-orange { background: linear-gradient(135deg, #f0a020, #e07800); }
.kpi-navy { background: linear-gradient(135deg, #6b8cae, #4a6785); }

/* 充值三大色块（注册色块下方）——主数字字号与注册板块一致 */
.kpi-row-recharge {
  margin-top: 0;
}
.kpi-recharge .value {
  font-size: 56px; /* 与 .kpi-card .value 一致 */
}
.kpi-recharge .hint {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  font-size: 13px;
  opacity: .92;
  font-weight: 600;
}
/* 注册/充值 KPI 标签字号统一 */
.kpi-row .kpi-card .label,
.kpi-row-recharge .kpi-card .label {
  font-size: 14px;
}
.kpi-recharge-today { background: linear-gradient(135deg, #26a69a, #00897b); }
.kpi-recharge-week { background: linear-gradient(135deg, #7e57c2, #5e35b1); }
.kpi-recharge-month { background: linear-gradient(135deg, #ef7043, #d84315); }

/* Main grid：左排行稍窄，保证右侧图表不挤 */
.main-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) 1.45fr 1.05fr;
  gap: 14px;
  flex: 1;
  min-height: 0;
}

.rank-card {
  min-height: 0;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.card-title h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.card-title .tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-weight: 600;
}

.card-title .tag.orange {
  background: var(--orange-soft);
  color: var(--orange-deep);
}

.rank-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.rank-tab {
  border: 1px solid var(--border);
  background: #f7fafc;
  color: var(--text-muted);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: .15s ease;
}
.rank-tab:hover {
  border-color: #c5d8ea;
  color: var(--blue-dark);
}
.rank-tab.active {
  background: linear-gradient(135deg, #5ba3d9, #3a7ab0);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px rgba(74, 144, 200, .28);
}

/* Staff list：注册排行 / 充值排行共用同一套行高与字号 */
.staff-list {
  overflow: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
  min-height: 0;
}

.staff-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) minmax(88px, auto);
  gap: 10px;
  align-items: center;
  min-height: 56px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f7fafc;
  border: 1px solid transparent;
  transition: border-color .15s, background .15s;
  box-sizing: border-box;
}

.staff-item:hover {
  border-color: #cfe0f0;
  background: #f0f7fc;
}

.staff-item .rank {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  background: var(--blue);
  flex-shrink: 0;
}

.staff-item:nth-child(1) .rank { background: var(--orange-deep); }
.staff-item:nth-child(2) .rank { background: var(--orange); }
.staff-item:nth-child(3) .rank { background: var(--amber); color: #5a4200; }

.staff-item .staff-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.staff-item .name {
  font-weight: 800;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.staff-item .metrics {
  display: flex;
  gap: 6px;
  margin-top: 0;
  flex-wrap: nowrap;
  overflow: hidden;
}

.pill {
  font-size: 11px;
  line-height: 1.3;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eef3f8;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pill b { color: var(--blue-dark); font-weight: 700; }
.pill.hot b { color: var(--orange-deep); }

.staff-item .month-num {
  font-size: 18px;
  font-weight: 800;
  color: var(--orange-deep);
  font-variant-numeric: tabular-nums;
  text-align: right;
  line-height: 1.15;
  flex-shrink: 0;
  min-width: 88px;
  white-space: nowrap;
}
.staff-item .month-num small {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 3px;
  line-height: 1.2;
  white-space: nowrap;
}

/* 双排行卡片等高、内部列表对齐 */
.main-grid-two .rank-card {
  min-height: 520px;
}
.main-grid-two .rank-card .card-title {
  min-height: 36px;
  flex-shrink: 0;
}
.main-grid-two .rank-card .staff-list {
  gap: 8px;
}

/* Center column */
.center-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}

.chart-box {
  flex: 1;
  min-height: 220px;
}

.chart-box .chart {
  width: 100%;
  height: 100%;
  min-height: 220px;
}

/* Right column */
.right-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}

.donut-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  flex: 1;
}

.donut-card .chart {
  height: 100%;
  min-height: 200px;
  flex: 1;
}
.donut-card {
  min-height: 0;
}
.right-col .chart-box {
  min-height: 180px;
}

.source-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.source-legend span i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
}

/* Bottom bars */
.bottom-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 14px;
}

.bottom-row .chart {
  height: 220px;
}

.empty {
  padding: 40px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.loading-mask {
  position: fixed;
  inset: 0;
  background: rgba(238, 242, 246, .72);
  display: grid;
  place-items: center;
  z-index: 50;
  backdrop-filter: blur(4px);
}

.loading-box {
  background: #fff;
  padding: 28px 36px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  text-align: center;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--blue-soft);
  border-top-color: var(--blue);
  border-radius: 50%;
  margin: 0 auto 12px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ========== Login (Rssme-inspired dual pane, 万音蓝橙) ========== */
.login-page {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(16px, 3vw, 28px);
  overflow: hidden;
  background: #f3f6fa;
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}
.login-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(58, 122, 176, 0.035) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgba(58, 122, 176, 0.035) 1px, transparent 1px) 0 0 / 48px 48px;
  mask-image: linear-gradient(#000, transparent 78%);
}
.login-ambient {
  position: fixed;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}
.login-ambient.one {
  width: 420px;
  height: 420px;
  top: -120px;
  left: -80px;
  background: rgba(74, 144, 200, 0.35);
}
.login-ambient.two {
  width: 380px;
  height: 380px;
  right: -60px;
  bottom: -100px;
  background: rgba(240, 160, 32, 0.28);
}

.login-wrap {
  position: relative;
  z-index: 1;
  width: min(1080px, 100%);
}

.login-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(340px, 0.88fr);
  width: 100%;
  min-height: min(720px, calc(100vh - 48px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 26px;
  background: #fff;
  box-shadow:
    0 34px 80px rgba(30, 60, 90, 0.14),
    0 8px 24px rgba(0, 0, 0, 0.05);
}

/* Left story panel */
.login-story {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(28px, 4vw, 52px);
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(620px 400px at 78% 18%, rgba(240, 160, 32, 0.55), transparent 60%),
    radial-gradient(480px 380px at 12% 88%, rgba(91, 163, 217, 0.35), transparent 65%),
    linear-gradient(150deg, #0c2740 0%, #163a5c 42%, #2a5f8f 100%);
}
.login-story::before {
  content: "";
  position: absolute;
  inset: -30%;
  opacity: 0.4;
  background:
    linear-gradient(115deg, transparent 35%, rgba(255,255,255,0.07) 35.3%, transparent 35.6%),
    linear-gradient(115deg, transparent 55%, rgba(255,255,255,0.05) 55.3%, transparent 55.6%);
  transform: rotate(-6deg);
  pointer-events: none;
}
.login-story::after {
  content: "";
  position: absolute;
  right: -110px;
  bottom: -150px;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  box-shadow:
    0 0 0 52px rgba(255, 255, 255, 0.03),
    0 0 0 104px rgba(255, 255, 255, 0.02);
  pointer-events: none;
}
.login-story > * { position: relative; z-index: 1; }

.login-brand {
  position: absolute;
  top: 18px;
  left: 22px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.02em;
  margin: 0;
  padding: 0;
  line-height: 0;
}
.login-brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #f0a020, #e07800);
  box-shadow: 0 8px 20px rgba(240, 160, 32, 0.35);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.login-brand-logo {
  /* 登录页左上角：万音共鸣透明字图（已裁透明边） */
  height: 36px;
  width: auto;
  max-width: min(200px, 48vw);
  object-fit: contain;
  object-position: left top;
  display: block;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.35)) drop-shadow(0 0 12px rgba(240, 180, 60, 0.18));
}

/* 科技感登录左侧（无业务数据） */
.login-story-tech {
  background:
    radial-gradient(900px 520px at 12% 0%, rgba(56, 189, 248, 0.22), transparent 55%),
    radial-gradient(700px 480px at 100% 20%, rgba(240, 160, 32, 0.18), transparent 50%),
    radial-gradient(600px 400px at 40% 100%, rgba(99, 102, 241, 0.18), transparent 55%),
    linear-gradient(155deg, #07111f 0%, #0d1b33 42%, #132a4a 100%);
  overflow: hidden;
}
.login-story-admin {
  background:
    radial-gradient(900px 520px at 10% 0%, rgba(59, 130, 246, 0.22), transparent 55%),
    radial-gradient(700px 480px at 100% 18%, rgba(14, 165, 233, 0.16), transparent 50%),
    radial-gradient(600px 400px at 45% 100%, rgba(99, 102, 241, 0.2), transparent 55%),
    linear-gradient(155deg, #050b16 0%, #0a1628 45%, #10233f 100%);
}
.tech-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.tech-grid {
  position: absolute;
  inset: -20%;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
  background-size: 42px 42px;
  transform: perspective(600px) rotateX(58deg) scale(1.35);
  transform-origin: center 30%;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 72%);
  animation: tech-grid-drift 18s linear infinite;
}
@keyframes tech-grid-drift {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 0 42px, 42px 0; }
}
.tech-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(8px);
  opacity: 0.75;
}
.tech-orb-a {
  width: 220px;
  height: 220px;
  left: -40px;
  top: 18%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.55), transparent 70%);
  animation: tech-float 9s ease-in-out infinite;
}
.tech-orb-b {
  width: 280px;
  height: 280px;
  right: -60px;
  bottom: 8%;
  background: radial-gradient(circle, rgba(240, 160, 32, 0.4), transparent 70%);
  animation: tech-float 11s ease-in-out infinite reverse;
}
.tech-orb-c {
  width: 160px;
  height: 160px;
  left: 42%;
  top: 42%;
  background: radial-gradient(circle, rgba(129, 140, 248, 0.45), transparent 70%);
  animation: tech-float 7s ease-in-out infinite;
}
@keyframes tech-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-18px); }
}
.tech-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(148, 203, 255, 0.22);
  box-shadow: inset 0 0 24px rgba(56, 189, 248, 0.08);
}
.tech-ring-1 {
  width: 280px;
  height: 280px;
  right: 8%;
  top: 22%;
  animation: tech-spin 28s linear infinite;
}
.tech-ring-2 {
  width: 180px;
  height: 180px;
  right: 14%;
  top: 30%;
  border-color: rgba(240, 160, 32, 0.28);
  animation: tech-spin 18s linear infinite reverse;
}
@keyframes tech-spin {
  to { transform: rotate(360deg); }
}
.tech-scan {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  top: 0;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.55), transparent);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.45);
  animation: tech-scan 5.5s ease-in-out infinite;
  opacity: 0.7;
}
@keyframes tech-scan {
  0% { top: 8%; opacity: 0; }
  15% { opacity: 0.75; }
  85% { opacity: 0.55; }
  100% { top: 88%; opacity: 0; }
}
.tech-nodes span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7dd3fc;
  box-shadow: 0 0 0 4px rgba(125, 211, 252, 0.15), 0 0 16px rgba(56, 189, 248, 0.65);
  animation: tech-node-pulse 2.8s ease-in-out infinite;
}
.tech-nodes span:nth-child(2n) {
  background: #fbbf24;
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.15), 0 0 16px rgba(251, 191, 36, 0.55);
  animation-delay: 0.6s;
}
.tech-nodes span:nth-child(3n) { animation-delay: 1.2s; }
@keyframes tech-node-pulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.35); opacity: 1; }
}
.tech-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 28px;
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
}
.tech-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  color: rgba(234, 243, 252, 0.9);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.tech-badge i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.18);
}
.tech-badge:nth-child(2) i { background: #fbbf24; box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.18); }
.tech-badge:nth-child(3) i { background: #a78bfa; box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.18); }

@media (max-width: 920px) {
  .tech-badges { display: none; }
  .login-story-tech .login-demo { display: none; }
}

.login-story .login-copy {
  margin-top: 44px;
}
.login-copy {
  width: min(520px, 100%);
  margin-top: clamp(48px, 9vh, 96px);
}
.login-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: rgba(234, 243, 252, 0.78);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.login-eyebrow .pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f5c542;
  box-shadow: 0 0 0 0 rgba(245, 197, 66, 0.55);
  animation: login-pulse 1.8s ease-out infinite;
}
@keyframes login-pulse {
  0% { box-shadow: 0 0 0 0 rgba(245, 197, 66, 0.5); }
  70% { box-shadow: 0 0 0 10px rgba(245, 197, 66, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 197, 66, 0); }
}
.login-copy h1 {
  margin: 0;
  max-width: 560px;
  font-size: clamp(34px, 4.6vw, 56px);
  font-weight: 750;
  letter-spacing: -0.04em;
  line-height: 1.05;
}
.login-copy .lead {
  max-width: 480px;
  margin: 18px 0 0;
  color: rgba(234, 243, 252, 0.78);
  font-size: 15px;
  line-height: 1.7;
}

.login-demo {
  position: relative;
  width: min(520px, 100%);
  margin-top: auto;
  padding: 36px 8px 8px 0;
}
.login-demo-glow {
  position: absolute;
  inset: 20% 10% auto;
  height: 60%;
  background: radial-gradient(circle, rgba(240, 160, 32, 0.28), transparent 70%);
  filter: blur(24px);
  pointer-events: none;
}
.demo-window {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}
.demo-window-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.18);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
}
.demo-window-bar i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  display: inline-block;
}
.demo-window-bar i:nth-child(1) { background: #ff5f57; }
.demo-window-bar i:nth-child(2) { background: #febc2e; }
.demo-window-bar i:nth-child(3) { background: #28c840; }
.demo-window-bar span { margin-left: 8px; }
.demo-window-body {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 10px;
  padding: 14px;
}
.demo-kpi {
  display: grid;
  gap: 8px;
}
.demo-kpi b {
  display: block;
  padding: 12px 12px 10px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(91, 163, 217, 0.9), rgba(58, 122, 176, 0.95));
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.demo-kpi b:nth-child(2) {
  background: linear-gradient(135deg, rgba(245, 197, 66, 0.95), rgba(232, 163, 23, 0.95));
  color: #3d2e00;
}
.demo-kpi b:nth-child(3) {
  background: linear-gradient(135deg, rgba(240, 160, 32, 0.95), rgba(224, 120, 0, 0.95));
}
.demo-kpi b small {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  font-weight: 700;
  opacity: 0.85;
}
.demo-rank {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 4px 0;
}
.demo-rank-row {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 12px;
}
.demo-rank-row i {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: rgba(74, 144, 200, 0.85);
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
}
.demo-rank-row:nth-child(1) i { background: #e07800; }
.demo-rank-row:nth-child(2) i { background: #f0a020; }
.demo-rank-row em {
  font-style: normal;
  font-weight: 800;
  color: #ffe0a8;
}
.demo-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  width: fit-content;
}
.demo-status > span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3ddc97;
  box-shadow: 0 0 0 4px rgba(61, 220, 151, 0.18);
}
.demo-status b { display: block; font-size: 12px; }
.demo-status small { color: rgba(255, 255, 255, 0.55); font-size: 11px; }

.login-footnote {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.45);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Right form pane */
.login-form-pane {
  display: grid;
  place-items: center;
  padding: clamp(28px, 5vw, 64px);
  background:
    radial-gradient(520px 360px at 100% 0%, rgba(74, 144, 200, 0.08), transparent 60%),
    radial-gradient(420px 280px at 0% 100%, rgba(240, 160, 32, 0.06), transparent 55%),
    #fff;
}

.login-card {
  width: min(380px, 100%);
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
}
.login-card .form-eyebrow {
  margin: 0 0 10px;
  color: #7a8a9a;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.login-card h1,
.login-card h2 {
  margin: 0;
  color: #1a3348;
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
}
.login-card .muted {
  margin: 10px 0 0;
  color: #7a8a9a;
  font-size: 14px;
  line-height: 1.5;
}

.form-group { margin: 22px 0 0; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #2c3e50;
}
.form-group input {
  width: 100%;
  min-height: 48px;
  border: 1px solid #d9e2ec;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  outline: none;
  background: #f8fafc;
  color: #1a3348;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.form-group input:focus {
  border-color: #4a90c8;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(74, 144, 200, 0.15);
}

.form-error {
  color: #c2415d;
  font-size: 13px;
  min-height: 18px;
  margin: 10px 0 0;
}

.trust-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 0;
  font-size: 13px;
  color: #7a8a9a;
  cursor: pointer;
  user-select: none;
}
.trust-row input {
  width: 16px;
  height: 16px;
  accent-color: #4a90c8;
}

.login-card .btn,
.login-submit {
  width: 100%;
  min-height: 48px;
  margin-top: 16px;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s;
}
.login-submit.btn-orange,
.login-card .btn-orange {
  background: linear-gradient(135deg, #f0a020, #e07800);
  color: #fff;
  box-shadow: 0 10px 24px rgba(224, 120, 0, 0.28);
}
.login-submit.btn-blue,
.login-card .btn-blue {
  background: linear-gradient(135deg, #5ba3d9, #3a7ab0);
  color: #fff;
  box-shadow: 0 10px 24px rgba(58, 122, 176, 0.28);
}
.login-submit:hover,
.login-card .btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}
.login-submit:active { transform: translateY(0); }
.login-submit .arrow { font-size: 18px; opacity: 0.9; }

.login-security {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 22px;
  color: #8291a1;
  font-size: 11px;
}
.login-links {
  display: none; /* 按需求不展示管理入口等链接 */
}

@media (max-width: 920px) {
  .login-shell {
    grid-template-columns: 1fr;
    min-height: auto;
    border-radius: 20px;
  }
  .login-story {
    min-height: 270px;
    padding: 22px 20px 16px;
  }
  .login-copy { margin-top: 28px; }
  .login-copy h1 { font-size: 30px; }
  .login-copy .lead { font-size: 13px; margin-top: 8px; }
  .tech-badges { display: none; }
  .login-footnote { margin-top: 16px; font-size: 10px; }
  .login-demo { display: none; }
  .login-form-pane {
    min-height: 0;
    padding: 24px 20px 26px;
  }
}

@media (max-width: 480px) {
  .login-page {
    padding: 6px;
    align-items: stretch;
    place-items: stretch;
    min-height: 100dvh;
    height: 100dvh;
    overflow: hidden;
  }
  .login-wrap {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  .login-shell {
    border-radius: 16px;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  /* 左侧品牌区压缩，保证下方登录按钮始终在首屏可见 */
  .login-story {
    flex: 0 0 auto;
    min-height: 0;
    max-height: min(32dvh, 200px);
    padding: 12px 14px 10px;
  }
  .login-brand { top: 10px; left: 12px; }
  .login-brand-logo { height: 22px; max-width: min(140px, 48vw); }
  .login-copy { margin-top: 18px; }
  .login-copy h1 { font-size: 20px; line-height: 1.25; }
  .login-copy .lead { font-size: 11px; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .login-eyebrow { font-size: 10px; margin-bottom: 4px; }
  .login-footnote { margin-top: 8px; font-size: 9px; }
  .tech-badges,
  .login-demo,
  .login-security { display: none !important; }
  .login-form-pane {
    flex: 1 1 auto;
    min-height: 0;
    padding: 12px 14px 14px;
    align-content: start;
    place-items: start stretch;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
  .login-card { width: 100%; }
  .login-card h2 { font-size: 22px; }
  .login-card .form-eyebrow { margin-bottom: 6px; font-size: 11px; }
  .login-card .form-group { margin-bottom: 10px; }
  .login-card .form-group label { font-size: 12px; margin-bottom: 4px; }
  .login-card .form-group input { min-height: 44px; padding: 10px 12px; font-size: 15px; }
  .login-card .trust-row { margin: 6px 0 10px; font-size: 12px; }
  .login-submit { min-height: 46px; margin-top: 4px; font-size: 15px; }
  .site-footer-login {
    position: static;
    padding: 4px 0 2px;
    font-size: 10px;
  }
}

/* 矮屏手机（含横屏、全面屏浏览器栏占用）进一步压缩品牌区 */
@media (max-width: 480px) and (max-height: 740px) {
  .login-story { max-height: min(26dvh, 150px); padding: 10px 12px 8px; }
  .login-copy { margin-top: 14px; }
  .login-copy h1 { font-size: 18px; }
  .login-copy .lead { display: none; }
  .login-footnote { display: none; }
  .login-form-pane { padding: 10px 12px 12px; }
  .login-card h2 { font-size: 20px; }
  .login-card .form-group { margin-bottom: 8px; }
  .login-card .form-group input { min-height: 42px; }
  .login-submit { min-height: 44px; }
}

@media (max-width: 480px) and (max-height: 620px) {
  .login-story { max-height: 110px; }
  .login-copy h1 { font-size: 16px; }
  .login-eyebrow { display: none; }
}

/* Admin */
.admin-body { background: var(--bg); min-height: 100vh; }

.admin-nav {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.admin-nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.admin-nav h1 {
  font-size: 18px;
  font-weight: 800;
  color: var(--orange-deep);
  white-space: nowrap;
}

.admin-nav .nav-actions { display: flex; gap: 8px; flex-wrap: wrap; }

body.admin-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
body.admin-body .admin-main {
  flex: 1 1 auto;
}
body.admin-body > .site-footer {
  flex-shrink: 0;
}

/* 前台显示控制 */
.display-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 12px 0 18px;
}
.display-block {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 14px 10px;
}
.display-block-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 800;
  color: #1a3348;
}
.display-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 13px;
  color: #2c3e50;
  cursor: pointer;
  user-select: none;
}
.display-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
}
.display-roster-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.display-roster {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
.display-roster-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}
.display-roster-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: #1a3348;
}
.display-roster-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.display-roster-list {
  max-height: 280px;
  overflow: auto;
  padding: 8px 10px 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 6px 10px;
}
.display-roster-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #2c3e50;
  padding: 4px 2px;
  cursor: pointer;
}
.display-roster-item input {
  width: 15px;
  height: 15px;
  accent-color: var(--blue);
}
.display-roster-empty {
  grid-column: 1 / -1;
  color: var(--text-muted);
  font-size: 13px;
  padding: 16px 8px;
}
.display-save-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.display-save-hint {
  font-size: 13px;
  color: var(--text-muted);
}
@media (max-width: 1100px) {
  .display-grid { grid-template-columns: 1fr 1fr; }
  .display-roster-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .display-grid { grid-template-columns: 1fr; }
}

.admin-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.stat-card .s-label { font-size: 12px; color: var(--text-muted); }
.stat-card .s-value {
  font-size: 28px;
  font-weight: 800;
  margin-top: 6px;
  color: var(--blue-dark);
  font-variant-numeric: tabular-nums;
}

.panel {
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 16px 18px;
}

.panel h2 {
  font-size: 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  align-items: center;
}

.toolbar select,
.toolbar input {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  outline: none;
  background: #fff;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

table.data th,
table.data td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

table.data th {
  color: var(--text-muted);
  font-weight: 600;
  background: #f8fafc;
  position: sticky;
  top: 0;
}

table.data tr:hover td { background: #f7fbff; }

.switch {
  position: relative;
  width: 42px;
  height: 24px;
  display: inline-block;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 999px;
  cursor: pointer;
  transition: .2s;
}
.switch .slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: .2s;
}
.switch input:checked + .slider { background: var(--blue); }
.switch input:checked + .slider::before { transform: translateX(18px); }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.badge-on { background: #dcfce7; color: #166534; }
.badge-off { background: #fee2e2; color: #991b1b; }
.badge-run { background: #dbeafe; color: #1e40af; }
.badge-ok { background: #dcfce7; color: #166534; }
.badge-fail { background: #fee2e2; color: #991b1b; }

.pager {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: #1f2937;
  color: #fff;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  z-index: 100;
  opacity: 0;
  transform: translateY(8px);
  transition: .25s;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* admin extras */
.filters-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.inline-input {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 13px;
  width: 110px;
  outline: none;
}
.inline-input:focus { border-color: var(--blue); }
.btn-mini {
  padding: 4px 8px !important;
  font-size: 12px !important;
  margin-left: 4px;
}
th.sortable, th.sortable-mem { user-select: none; white-space: nowrap; }
th.sortable:hover, th.sortable-mem:hover { color: var(--blue-dark); }
th.sorted { color: var(--orange-deep); }
.muted { font-size: 11px; color: var(--text-muted); font-weight: 500; }
.perf-bar-wrap {
  height: 12px;
  background: #eef2f6;
  border-radius: 999px;
  overflow: hidden;
}
.perf-bar {
  height: 100%;
  background: linear-gradient(90deg, #4a90c8, #f0a020);
  border-radius: 999px;
  transition: width .3s ease;
}
.perf-team-meta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-muted);
}
.mini-bar {
  display: inline-block;
  width: 64px;
  height: 8px;
  background: #eef2f6;
  border-radius: 999px;
  overflow: hidden;
  vertical-align: middle;
  margin-right: 6px;
}
.mini-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #4a90c8, #f0a020);
}
.perf-done td { background: #f0fdf4; }
.perf-warn td { background: #fff7ed; }
.target-edit { white-space: nowrap; }
.target-edit input {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 12px;
}

@media (max-width: 1200px) {
  .kpi-row { grid-template-columns: 1fr; }
  .main-grid { grid-template-columns: 1fr; }
  .bottom-row { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .staff-item .name { font-size: 17px; }
  .staff-item .month-num { font-size: 17px; }
}

@media (max-width: 640px) {
  .kpi-row { grid-template-columns: 1fr; }
  .kpi-card .value { font-size: 42px; }
  .brand h1 { font-size: 20px; }
  .stat-grid { grid-template-columns: 1fr; }
}

/* 双排行布局（注册 + 充值） */
.main-grid-two {
  grid-template-columns: 1fr 1fr !important;
  gap: 16px;
}
.main-grid-two .rank-card {
  min-height: 520px;
}
.recharge-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 12px;
}
.recharge-stat-grid-5 {
  grid-template-columns: repeat(5, 1fr);
}
.recharge-stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.recharge-stat-card .s-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.recharge-stat-card .s-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--orange-deep);
}
.recharge-stat-card .s-sub {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}
.consume-rate-card {
  background: linear-gradient(160deg, #f7fbff 0%, #fff8ef 100%);
  border-color: #d6e8f5;
}
.consume-rate-card .s-value {
  color: var(--blue-dark);
}
.emp-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin: -4px 0 12px;
  line-height: 1.6;
}
.row-left {
  background: #fafbfc;
}
.row-left td {
  color: #6b7a8a;
}
.consume-rate-bar {
  height: 8px;
  background: #eef2f6;
  border-radius: 999px;
  overflow: hidden;
  min-width: 80px;
}
.consume-rate-bar > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #4a90c8, #f0a020);
  border-radius: 999px;
}
/* 经营盈亏 */
.pnl-block-title {
  margin: 14px 0 8px;
  font-size: 13px;
  font-weight: 800;
  color: #334155;
  letter-spacing: 0.5px;
}
.pnl-block-title:first-of-type {
  margin-top: 6px;
}
.pnl-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 0;
}
.pnl-stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.pnl-stat-card .s-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.pnl-stat-card .s-value {
  font-size: 24px;
  font-weight: 800;
  color: #1f2937;
}
.pnl-stat-card .s-sub {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}
.pnl-card-cost .s-value { color: #b45309; }
.pnl-card-income {
  background: linear-gradient(160deg, #f0fdf9 0%, #ffffff 70%);
  border-color: #c7efe3;
}
.pnl-card-income .s-value { color: #0f766e; }
.pnl-card-profit.is-profit {
  background: linear-gradient(160deg, #ecfdf5 0%, #ffffff 70%);
  border-color: #a7f3d0;
}
.pnl-card-profit.is-loss {
  background: linear-gradient(160deg, #fef2f2 0%, #ffffff 70%);
  border-color: #fecaca;
}
.pnl-profit { color: #059669; }
.pnl-loss { color: #dc2626; }
.check-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #334155;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}
.check-inline input {
  width: 15px;
  height: 15px;
  accent-color: var(--blue);
  cursor: pointer;
}
.report-config .check-field .check-inline {
  width: 100%;
  box-sizing: border-box;
}
.date-input {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
  background: #fff;
}
.report-date-row {
  display: flex;
  gap: 8px;
}
.report-date-row input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
}
.link-modal {
  width: min(560px, 100%);
}
.link-modal-body {
  padding: 16px 18px 20px;
}
.link-form .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--text-muted);
}
.link-form .field > span {
  font-weight: 600;
  color: #334155;
}
.link-form select {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  background: #fff;
}
.link-list {
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  max-height: 240px;
  overflow: auto;
}
.link-list-title {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 8px;
}
.link-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 6px;
  font-size: 13px;
  background: #f8fafc;
}
.col-link {
  white-space: nowrap;
  min-width: 88px;
}
.pnl-card-profit .s-value.pnl-profit,
.pnl-card-profit .s-value.pnl-loss {
  /* 利润大数字沿用红绿 */
}
.emp-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.emp-selected-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: 4px;
}
#empTable tfoot tr {
  background: #f8fafc;
  font-weight: 700;
}
#empTable tfoot td {
  border-top: 2px solid #dbe3ec;
  white-space: nowrap;
}
.salary-input, .hire-input {
  width: 88px;
  padding: 4px 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
}
.hire-input { width: 118px; }
.salary-save, .hire-save {
  margin-left: 4px;
}
#consumeTable thead th.sortable-consume {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
#consumeTable thead th.sortable-consume:hover {
  color: var(--blue-dark);
}

/* 导出图片弹窗 */
.modal-mask {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.55);
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: auto;
}
.modal-mask.open {
  display: flex;
}
.modal-panel {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
  width: min(1120px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.modal-head h3 {
  margin: 0;
  font-size: 16px;
}
.report-modal-body {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 0;
  min-height: 480px;
}
.report-config {
  padding: 16px 18px;
  border-right: 1px solid var(--border);
  background: #f8fafc;
}
.report-config .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--text-muted);
}
.report-config .field > span {
  font-weight: 600;
  color: #334155;
}
.report-config select,
.report-config input[type="text"] {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  background: #fff;
}
.report-col-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 280px;
  overflow: auto;
  padding: 4px;
}
.report-col-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: grab;
  user-select: none;
}
.report-col-item.dragging {
  opacity: 0.55;
  border-color: var(--blue);
}
.report-col-item .drag-handle {
  color: #94a3b8;
  font-size: 12px;
  letter-spacing: -2px;
}
.report-col-item label {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  cursor: pointer;
  color: #1e293b;
  font-size: 13px;
}
.report-col-item .col-order {
  font-size: 11px;
  color: #94a3b8;
}
.report-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.report-preview-wrap {
  padding: 20px 16px 28px;
  background: #F5F9FF;
  overflow: auto;
}
.report-preview-label {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 10px;
  font-weight: 600;
}
.report-preview {
  display: flex;
  justify-content: center;
}
.report-empty {
  padding: 40px;
  color: #94a3b8;
  text-align: center;
}

/* ========== 导出图片卡片 · 对齐 444.png（html2canvas 友好） ==========
 * 注意：html2canvas 对 box-shadow / 复杂渐变渲染差，会出灰泥底。
 * 立体感用「实体投影层 .rpt-shade」实现，背景用近白纯色。
 */
.report-card,
.report-card-v2 {
  width: 980px;
  max-width: 100%;
  /* 纯净近白，略带一点蓝——避免灰泥径向渐变 */
  background: #F5F9FF;
  color: #1e293b;
  border-radius: 24px;
  padding: 32px 32px 26px;
  /* 不用外阴影（导出时易变灰边），预览时用淡蓝边框即可 */
  border: 1px solid #E3EEFB;
  box-shadow: none;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  box-sizing: border-box;
  position: relative;
  overflow: visible;
}
.report-card-inner {
  position: relative;
  z-index: 1;
}

/* —— 实体投影（html2canvas 可正确栅格化；多层浅蓝块模拟柔和阴影） —— */
.rpt-lift {
  position: relative;
  isolation: isolate;
  /* 给下方投影留出空间，避免裁切 */
  margin-bottom: 6px;
  padding-bottom: 2px;
}
.rpt-shade {
  position: absolute;
  left: 3px;
  right: 3px;
  top: 8px;
  bottom: -4px;
  border-radius: 18px;
  background: #DCE8F8;
  z-index: 0;
  pointer-events: none;
}
/* 第二层更淡、更大，增强空气感 */
.rpt-shade::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  top: 4px;
  bottom: -4px;
  border-radius: 20px;
  background: #E8F0FB;
  z-index: -1;
}
.rpt-shade-table {
  left: 5px;
  right: 5px;
  top: 10px;
  bottom: -6px;
  border-radius: 20px;
  background: #D0E0F5;
}
.rpt-shade-table::after {
  left: -3px;
  right: -3px;
  top: 6px;
  bottom: -5px;
  border-radius: 22px;
  background: #E4EEF9;
}
.rpt-lift > .report-kpi,
.rpt-lift > .report-table-wrap {
  position: relative;
  z-index: 1;
}

.report-header {
  text-align: center;
  margin-bottom: 22px;
  position: relative;
}
.report-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.report-title-deco {
  display: inline-flex;
  align-items: center;
  gap: 0;
  width: 64px;
  flex-shrink: 0;
  position: relative;
  height: 12px;
}
.report-title-deco .deco-line {
  display: block;
  height: 3px;
  flex: 1;
  border-radius: 999px;
  background: #5B9CF5;
}
.report-title-deco .deco-glow {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #93C5FD;
  flex-shrink: 0;
  /* 用多层实心圆模拟光晕，避免 filter/blur 导出失败 */
  box-shadow: none;
  position: relative;
}
.report-title-deco .deco-glow::before,
.report-title-deco .deco-glow::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: #BFDBFE;
  opacity: 0.55;
  z-index: -1;
}
.report-title-deco .deco-glow::after {
  inset: -8px;
  background: #DBEAFE;
  opacity: 0.4;
}
.report-title-deco-r {
  flex-direction: row;
}
.report-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #1D4ED8;
  line-height: 1.3;
  white-space: nowrap;
}
.report-brand { display: none; }
.report-sub { display: none; }

.report-kpis {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
.report-kpi-lift { min-width: 0; }
.report-kpi {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #FFFFFF;
  border: 1px solid #EAF1FB;
  border-radius: 16px;
  padding: 14px 12px;
  /* 不用 box-shadow */
  box-shadow: none;
  text-align: left;
  white-space: nowrap;
  min-width: 0;
  min-height: 72px;
}
.report-kpi-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
}
.report-kpi-icon svg { display: block; width: 40px; height: 40px; }
.report-kpi-body { min-width: 0; }
.report-kpi-label {
  font-size: 12px;
  color: #94A3B8;
  font-weight: 600;
  line-height: 1.2;
}
.report-kpi-value {
  margin-top: 5px;
  font-size: 22px;
  font-weight: 800;
  color: #0F172A;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.report-kpi-reg .report-kpi-value { color: #1E3A8A; }
.report-kpi-users .report-kpi-value { color: #166534; }
.report-kpi-amount .report-kpi-value { color: #B45309; }
.report-kpi-avg .report-kpi-value { color: #6B21A8; }
.report-kpi-rate .report-kpi-value { color: #BE185D; }

.report-table-lift { margin-top: 2px; }
.report-table-wrap {
  background: #FFFFFF;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #E4EEFB;
  box-shadow: none;
}
.report-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
}
.report-table thead th {
  /* 纯色表头，避免渐变导出发灰 */
  background: #3B82F6;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  padding: 14px 10px;
  text-align: center;
  border-bottom: none;
  white-space: nowrap;
  letter-spacing: 0.3px;
}
.report-table thead th:first-child { border-radius: 0; }
.report-table tbody td {
  padding: 13px 10px;
  font-size: 14px;
  border-bottom: 1px solid #F1F5F9;
  color: #334155;
  text-align: center;
  vertical-align: middle;
  background: #FFFFFF;
}
.report-table tbody tr.even td { background: #FFFFFF; }
.report-table tbody tr.odd td { background: #F8FBFF; }
.report-table tbody tr:last-child td { border-bottom: none; }
.report-table td.c-display_name,
.report-table td.c-rank {
  font-weight: 700;
  color: #0F172A;
}
.report-table td.c-display_name {
  text-align: left;
  padding-left: 16px;
  font-size: 15px;
}
.report-table th.th-display_name { text-align: center; }
.report-table td.c-recharge_amount {
  color: #2563EB;
  font-weight: 700;
}
.report-table td.c-avg_recharge {
  color: #475569;
  font-weight: 600;
}
.report-table td.c-reg,
.report-table td.c-recharge_users {
  color: #334155;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.report-table td.c-consume_rate {
  color: #F59E0B;
  font-weight: 700;
  min-width: 110px;
}
.rpt-empty-cell {
  text-align: center !important;
  padding: 28px !important;
  color: #94a3b8 !important;
}

/* 排名徽章 */
.rpt-medal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  vertical-align: middle;
}
.rpt-medal svg { display: block; }
.rpt-rank-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #EEF3F9;
  color: #64748B;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  border: 1px solid #E2E8F0;
}

/* 消费率 + 进度条 */
.rpt-rate-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 92px;
}
.rpt-rate-num {
  color: #F59E0B;
  font-weight: 800;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.rpt-rate-bar {
  display: block;
  width: 78px;
  height: 7px;
  border-radius: 999px;
  background: #E8EDF5;
  overflow: hidden;
}
.rpt-rate-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  /* 纯色进度，避免渐变发灰 */
  background: #F59E0B;
  max-width: 100%;
}

.report-footer {
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 12px;
  color: #94A3B8;
  letter-spacing: 1px;
}
.report-footer-text { font-weight: 600; }
.report-footer-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #93C5FD;
}

/* 预览区：Canvas 导出图直接展示 */
.report-preview-wrap {
  background: #EEF4FC !important;
}
.report-preview {
  background: transparent;
  width: 100%;
}
.report-canvas-preview {
  width: 100%;
}
.report-canvas-preview img {
  background: transparent;
}
.m-report-preview-wrap {
  background: #EEF4FC !important;
}

@media (max-width: 1100px) {
  .main-grid-two { grid-template-columns: 1fr !important; }
  .recharge-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .recharge-stat-grid-5 { grid-template-columns: repeat(2, 1fr); }
  .pnl-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .report-modal-body { grid-template-columns: 1fr; }
  .report-config { border-right: none; border-bottom: 1px solid var(--border); }
  .report-kpis { grid-template-columns: repeat(2, 1fr); }
  .report-card-v2 .report-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .recharge-stat-grid-5 { grid-template-columns: 1fr; }
  .pnl-stat-grid { grid-template-columns: 1fr; }
  .kpi-recharge .value { font-size: 42px; } /* 与 .kpi-card .value 媒体查询一致 */
  .report-card { width: 100%; padding: 18px 12px 14px; }
  .report-title { font-size: 18px; white-space: normal; }
  .report-kpis { grid-template-columns: 1fr 1fr; }
  .report-title-deco { width: 28px; }
}

/* ========== 管理后台 · Control Center ========== */
.admin-body {
  --admin-bg: #f7f8fa;
  --admin-sidebar: #f3f4f6;
  --admin-surface: #ffffff;
  --admin-border: #e4e7ec;
  --admin-text: #171a2d;
  --admin-muted: #74798a;
  --admin-accent: #2563eb;
  --admin-accent-soft: #edf3ff;
  --admin-sidebar-w: 256px;
  height: 100vh;
  min-height: 100vh;
  background: var(--admin-bg);
  color: var(--admin-text);
  overflow: hidden;
}

.admin-app {
  height: 100vh;
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--admin-sidebar-w) minmax(0, 1fr);
  overflow: hidden;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  max-height: 100vh;
  z-index: 20;
  display: flex;
  flex-direction: column;
  padding: 22px 16px 18px;
  background: var(--admin-sidebar);
  border-right: 1px solid var(--admin-border);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 42px;
  padding: 0 8px;
}

.admin-brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(17, 24, 39, 0.12);
}

.admin-brand div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-brand strong {
  color: var(--admin-text);
  font-size: 15px;
  line-height: 1.2;
}

.admin-brand span {
  color: var(--admin-muted);
  font-size: 11px;
  line-height: 1.2;
}

.admin-nav-label {
  margin: 34px 10px 9px;
  color: #8c91a0;
  font-size: 11px;
  font-weight: 600;
}

.admin-side-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-nav-item,
.admin-sidebar-footer a {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #555b6f;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.admin-nav-item svg,
.admin-sidebar-footer svg,
.admin-body .btn svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-nav-item:hover,
.admin-sidebar-footer a:hover {
  color: var(--admin-text);
  background: rgba(255, 255, 255, 0.6);
}

.admin-nav-item.active {
  color: var(--admin-text);
  background: #ffffff;
  border-color: #e6e8ed;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.06);
}

.admin-nav-item.active svg { color: var(--admin-accent); }

.admin-sidebar-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #dfe2e7;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.admin-sidebar-footer a { min-height: 36px; font-size: 12px; }

.admin-workspace {
  min-width: 0;
  min-height: 0;
  height: 100vh;
  background: var(--admin-bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.admin-body .admin-nav {
  min-height: 64px;
  padding: 12px 30px;
  position: sticky;
  top: 0;
  z-index: 15;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--admin-border);
  backdrop-filter: blur(10px);
}

.admin-content-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.admin-breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: var(--admin-muted);
  font-size: 12px;
  white-space: nowrap;
}

.admin-breadcrumb i { color: #b0b4be; font-style: normal; }
.admin-breadcrumb strong { color: #303548; font-weight: 600; }

.admin-body .admin-nav .nav-actions {
  flex-wrap: nowrap;
  align-items: center;
}

.admin-body .btn {
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  box-shadow: none;
  transform: none;
}

.admin-body .btn:hover { transform: none; }
.admin-body .btn-blue { background: var(--admin-accent); }
.admin-body .btn-orange { background: #d97706; }
.admin-body .btn-ghost { background: #fff; color: #5f6577; border-color: var(--admin-border); }
.admin-body .btn-ghost:hover { background: #f8f9fb; color: var(--admin-text); }

.admin-content-head {
  padding: 27px 32px 17px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex: 0 0 auto;
}

.admin-eyebrow {
  display: block;
  margin-bottom: 6px;
  color: #8b90a0;
  font-size: 10px;
  font-weight: 700;
}

.admin-content-head h1 {
  font-size: 24px;
  line-height: 1.25;
  font-weight: 700;
  color: var(--admin-text);
}

.admin-content-head p {
  margin-top: 6px;
  color: var(--admin-muted);
  font-size: 13px;
}

.admin-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding-bottom: 3px;
  color: #5e6575;
  font-size: 12px;
  white-space: nowrap;
}

.admin-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22a06b;
  box-shadow: 0 0 0 3px #dcf5e9;
}

.admin-body .admin-main {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 32px 40px;
  gap: 18px;
}

.admin-body [data-admin-view][hidden] { display: none !important; }

.admin-body .stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.admin-body .stat-card,
.admin-body .recharge-stat-card,
.admin-body .pnl-stat-card {
  border-radius: 8px;
  border-color: var(--admin-border);
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
}

.admin-body .stat-card {
  min-height: 112px;
  padding: 17px 18px;
}

.admin-body .stat-card .s-label,
.admin-body .recharge-stat-card .s-label,
.admin-body .pnl-stat-card .s-label {
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 500;
}

.admin-body .stat-card .s-value {
  margin-top: 13px;
  color: var(--admin-text);
  font-size: 31px;
  line-height: 1;
}

.admin-body .recharge-stat-grid {
  margin-top: 0;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.admin-body .recharge-stat-card {
  min-width: 0;
  min-height: 126px;
  padding: 17px 18px;
  background: #fff;
}

.admin-body .recharge-stat-card .s-value {
  margin-top: 12px;
  color: #2563eb;
  font-size: 24px;
  line-height: 1.1;
}

.admin-body .recharge-stat-card:nth-child(2) .s-value { color: #7c3aed; }
.admin-body .recharge-stat-card:nth-child(3) .s-value { color: #059669; }
.admin-body .recharge-stat-card:nth-child(4) .s-value { color: #c2410c; }
.admin-body .recharge-stat-card:nth-child(5) .s-value { color: #be185d; }

.admin-body .recharge-stat-card .s-sub,
.admin-body .pnl-stat-card .s-sub {
  color: #858a99;
  line-height: 1.45;
}

.admin-body .consume-rate-card,
.admin-body .pnl-card-income,
.admin-body .pnl-card-profit.is-profit,
.admin-body .pnl-card-profit.is-loss {
  background: #fff;
}

.admin-body .panel {
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.admin-body .panel > h2 {
  min-height: 40px;
  margin: 0 0 14px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--admin-border);
  color: var(--admin-text);
  font-size: 18px;
  font-weight: 650;
}

.admin-body .panel > h2 > span {
  color: var(--admin-muted) !important;
  font-size: 11px !important;
}

.admin-body .emp-hint {
  margin: -3px 0 14px;
  color: var(--admin-muted);
}

.admin-body .toolbar {
  margin-bottom: 14px;
  padding: 10px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: #fff;
}

.admin-body .toolbar select,
.admin-body .toolbar input,
.admin-body .date-input,
.admin-body .inline-input,
.admin-body .salary-input,
.admin-body .hire-input {
  min-height: 34px;
  border-color: #dfe2e7;
  border-radius: 6px;
  background: #fbfcfd;
  color: #33394c;
}

.admin-body .toolbar select:focus,
.admin-body .toolbar input:focus,
.admin-body .inline-input:focus {
  border-color: #8ab0ff;
  box-shadow: 0 0 0 3px #edf3ff;
}

.admin-body .check-inline { border-radius: 6px; border-color: #dfe2e7; }

.admin-body .emp-table-wrap,
.admin-body .panel > div[style*="overflow:auto"] {
  overflow: auto !important;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: #fff;
}

.admin-body table.data { font-size: 12px; }

.admin-body table.data th,
.admin-body table.data td {
  height: 42px;
  padding: 9px 10px;
  border-bottom-color: #eceef2;
  white-space: nowrap;
}

.admin-body table.data th {
  background: #f8f9fb;
  color: #6f7585;
  font-size: 11px;
  font-weight: 650;
}

.admin-body table.data tr:hover td { background: #f7f9fc; }

.admin-body .pnl-block-title {
  margin: 18px 0 9px;
  color: #62687a;
  font-size: 12px;
}

.admin-body .pnl-stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.admin-body .pnl-stat-card {
  min-height: 112px;
  padding: 16px 17px;
}

.admin-body .pnl-stat-card .s-value {
  margin-top: 11px;
  font-size: 24px;
}

.admin-body .perf-team {
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.admin-body .pager { margin-top: 14px; }
.admin-body .badge { border-radius: 5px; }
.admin-body .toast { border-radius: 7px; }
.admin-body .modal-panel { border-radius: 8px; }

@media (max-width: 1180px) {
  .admin-body { --admin-sidebar-w: 78px; }
  .admin-app { grid-template-columns: var(--admin-sidebar-w) minmax(0, 1fr); }
  .admin-sidebar { padding: 18px 11px; }
  .admin-brand { justify-content: center; padding: 0; }
  .admin-brand div,
  .admin-nav-label,
  .admin-nav-item span,
  .admin-sidebar-footer span { display: none; }
  .admin-side-nav { margin-top: 26px; }
  .admin-nav-item,
  .admin-sidebar-footer a { justify-content: center; padding: 9px; }
  .admin-body .recharge-stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .admin-body {
    height: auto;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
  }
  .admin-app {
    display: block;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }
  .admin-sidebar {
    position: sticky;
    top: 0;
    height: auto;
    max-height: none;
    padding: 9px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--admin-border);
    overflow: visible;
  }
  .admin-workspace {
    height: auto;
    overflow: visible;
  }
  .admin-content-scroll {
    overflow: visible;
  }
  .admin-brand,
  .admin-sidebar-footer,
  .admin-nav-label { display: none; }
  .admin-side-nav {
    margin-top: 0;
    flex-direction: row;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .admin-side-nav::-webkit-scrollbar { display: none; }
  .admin-nav-item {
    width: auto;
    min-width: max-content;
    min-height: 36px;
    padding: 7px 10px;
  }
  .admin-nav-item span { display: inline; }
  .admin-nav-item svg { width: 16px; height: 16px; flex-basis: 16px; }
  .admin-body .admin-nav { position: static; min-height: 56px; padding: 10px 16px; }
  .admin-content-head { padding: 21px 16px 14px; }
  .admin-content-head h1 { font-size: 21px; }
  .admin-body .admin-main { padding: 0 16px 28px; }
  .admin-body .stat-grid,
  .admin-body .pnl-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-body .recharge-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .admin-breadcrumb span,
  .admin-breadcrumb i,
  .admin-status { display: none; }
  .admin-body .admin-nav .nav-actions { gap: 5px; }
  .admin-body .admin-nav .btn { padding: 7px 9px; }
  .admin-body .admin-nav .btn span { display: none; }
  .admin-content-head { align-items: flex-start; }
  .admin-body .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-body .recharge-stat-grid,
  .admin-body .pnl-stat-grid { grid-template-columns: 1fr; }
  .admin-body .stat-card { min-height: 100px; padding: 15px; }
  .admin-body .stat-card .s-value { font-size: 27px; }
  .admin-body .panel > h2 { align-items: flex-start; flex-direction: column; }
  .admin-body .toolbar { align-items: stretch; }
}

/* 侧边栏布局下页脚 */
.admin-workspace .site-footer,
.admin-app + .site-footer,
body.admin-body > .site-footer {
  text-align: center;
  font-size: 12px;
  color: #9aa6b2;
  letter-spacing: 0.08em;
  padding: 12px 8px 16px;
  background: transparent;
}
.admin-brand .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}

/* login-brand mobile pin */
@media (max-width: 900px) {
  .login-brand {
    top: 14px;
    left: 16px;
  }
  .login-brand-logo {
    height: 30px;
    max-width: min(168px, 56vw);
  }
  .login-story .login-copy {
    margin-top: 36px;
  }
}


.admin-brand-logo {
  height: 28px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  object-position: left center;
  display: block;
}
.admin-brand img.admin-brand-logo { width: auto; height: 28px; border-radius: 0; }


/* admin-view visibility hard fix */
.admin-body [data-admin-view] { display: none !important; }
.admin-body [data-admin-view].is-view-active { display: block !important; }
.admin-body div.recharge-overview[data-admin-view].is-view-active {
  display: flex !important;
  flex-direction: column;
  gap: 12px;
}

.admin-body section.stat-grid[data-admin-view].is-view-active,
.admin-body section.recharge-stat-grid[data-admin-view].is-view-active {
  display: grid !important;
}
.admin-body section.panel[data-admin-view].is-view-active {
  display: block !important;
}

.member-query-panel .member-table-wrap { overflow: auto; max-height: 560px; -webkit-overflow-scrolling: touch; }
.member-query-panel .data { min-width: 820px; }
.member-query-panel .query-summary { text-align: left; }
.employee-archive-dialog { max-width: min(980px, calc(100vw - 28px)); }


/* 会员注册时间柱状图 */
.hourly-card { margin-top: 4px; }
.hourly-card .card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.hourly-meta {
  font-size: 12px;
  color: var(--text-muted, #7a8a9a);
  font-weight: 500;
}
.hourly-chart-wrap { width: 100%; min-height: 280px; position: relative; }
.hourly-chart {
  width: 100%;
  height: 300px;
  min-height: 280px;
  /* 防止 flex/grid 子项高度塌陷导致 echarts 画布为 0 */
  flex: 0 0 auto;
}
.hourly-staff-box {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px dashed var(--border, #e5e7eb);
}
.hourly-staff-title {
  font-size: 13px;
  font-weight: 650;
  color: var(--text, #1f2937);
  margin-bottom: 8px;
}
.hourly-staff-list { display: flex; flex-wrap: wrap; gap: 8px; }
.hourly-staff-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f3f6fb;
  border: 1px solid #e5ebf3;
  font-size: 12px;
  color: #334155;
}
.hourly-staff-chip b { color: #0f4c81; font-variant-numeric: tabular-nums; }
.hourly-staff-empty { font-size: 12px; color: #94a3b8; }
.analysis-total-row td {
  font-weight: 700;
  background: #f8fafc;
  border-top: 2px solid #e2e8f0;
}
@media (max-width: 900px) { .hourly-chart { height: 240px; min-height: 220px; } }


/* 后台：会员注册时间 */
.hourly-admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.8fr);
  gap: 14px;
  align-items: start;
}
.hourly-staff-side {
  border: 1px solid var(--admin-border, #e5e7eb);
  border-radius: 10px;
  padding: 12px;
  background: #fafbfc;
  min-height: 160px;
}
#hourlyHourBody tr.is-active {
  background: #eef6ff;
}
#hourlyHourBody tr {
  cursor: pointer;
}
@media (max-width: 960px) {
  .hourly-admin-grid { grid-template-columns: 1fr; }
}

/* ========== 员工管理二级菜单 / 薪酬 / 结算 ========== */
.emp-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  padding: 4px;
  background: #f1f3f6;
  border: 1px solid var(--admin-border, #e4e7ec);
  border-radius: 10px;
  width: fit-content;
  max-width: 100%;
}
.emp-subnav-item {
  min-height: 34px;
  padding: 7px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #5f6577;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.emp-subnav-item:hover {
  color: #171a2d;
  background: rgba(255,255,255,.7);
}
.emp-subnav-item.active {
  color: #171a2d;
  background: #fff;
  border-color: #e6e8ed;
  box-shadow: 0 1px 2px rgba(17,24,39,.06);
}
.emp-tab-panel { min-width: 0; }
.emp-subheading {
  margin: 22px 0 10px;
  font-size: 15px;
  font-weight: 700;
  color: #303548;
}
.salary-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 0 0 12px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  font-size: 13px;
  color: #475569;
}
.salary-summary strong { color: #0f172a; font-weight: 700; }
.salary-toolbar .date-input { min-height: 32px; }
.admin-body .emp-table .col-sys {
  min-width: 96px;
  max-width: 160px;
  color: #64748b;
  font-size: 12px;
}
.admin-body .emp-name-cell .emp-name-main {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ========== 充值明细页 ========== */
.panel-submeta {
  font-size: 12px;
  color: #7a8a9a;
  font-weight: 500;
  margin-left: 8px;
}
.rd-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 12px;
}
.rd-kpi-card {
  border-radius: 12px;
  border: 1px solid #e4e7ec;
  padding: 14px 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
  min-width: 0;
}
.rd-kpi-label {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 6px;
}
.rd-kpi-value {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.2;
  word-break: break-all;
}
.rd-kpi-sub {
  margin-top: 6px;
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.35;
}
.rd-kpi-total {
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
  border-color: #bfdbfe;
}
.rd-kpi-total .rd-kpi-value { color: #1d4ed8; }
.rd-kpi-new {
  background: linear-gradient(135deg, #ecfdf5 0%, #f8fafc 100%);
  border-color: #a7f3d0;
}
.rd-kpi-new .rd-kpi-value { color: #047857; }
.rd-kpi-old {
  background: linear-gradient(135deg, #fff7ed 0%, #f8fafc 100%);
  border-color: #fed7aa;
}
.rd-kpi-old .rd-kpi-value { color: #c2410c; }

.rd-period-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 14px;
}
.rd-period-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  font-size: 12px;
  color: #64748b;
}
.rd-period-label {
  font-weight: 800;
  color: #334155;
  margin-right: 4px;
}
.rd-period-item b {
  font-weight: 800;
  color: #0f172a;
}

.rd-toolbar { margin-bottom: 10px; }

.rd-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fafafa;
}
.rd-filter-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  min-width: 0;
}
.rd-filter-label {
  font-size: 13px;
  font-weight: 700;
  color: #475569;
}
.rd-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #475569;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 3px 10px;
}
.rd-filter-chip em {
  font-style: normal;
  font-weight: 800;
  color: #1d4ed8;
}
.rd-filter-chip strong {
  font-weight: 800;
  color: #0f172a;
}
.rd-filter-delta strong { color: #0f766e; }
.rd-filter-note {
  font-size: 11px;
  color: #94a3b8;
}

.rd-meta-bar {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  font-size: 12px;
  color: #64748b;
  line-height: 1.45;
}
.rd-meta-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}
.rd-meta-row > span:last-child {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}
.rd-meta-tag {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  background: #e2e8f0;
  border-radius: 4px;
  padding: 1px 7px;
  line-height: 1.6;
}
.rd-meta-ok .rd-meta-tag { color: #065f46; background: #d1fae5; }
.rd-meta-bad .rd-meta-tag { color: #9a3412; background: #ffedd5; }
.rd-meta-ok > span:last-child { color: #047857; }
.rd-meta-bad > span:last-child { color: #c2410c; }

.rd-table-wrap {
  overflow: auto;
  max-height: 520px;
  border: 1px solid #eef2f7;
  border-radius: 10px;
}
#rdTable { margin: 0; }
#rdTable th.col-money,
#rdTable td.col-money {
  text-align: right;
  white-space: nowrap;
}
#rdTable .rd-amt-new { color: #047857; font-weight: 700; }
#rdTable .rd-amt-old { color: #c2410c; font-weight: 700; }
#rdTable .rd-delta { color: #0d9488; font-weight: 700; }
#rdTable tfoot td {
  background: #f8fafc;
  font-weight: 700;
  border-top: 2px solid #e2e8f0;
  padding-top: 10px;
  padding-bottom: 10px;
}
#rdTable tfoot .rd-foot-note {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 500;
  text-align: left;
}

@media (max-width: 960px) {
  .rd-kpi-row { grid-template-columns: 1fr; }
  .rd-period-bar { grid-template-columns: 1fr; }
  .rd-filter-bar { flex-direction: column; align-items: flex-start; }
}


/* 概览充值：两行布局 + 新号/老会员分两行 */
.recharge-overview {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 0 16px;
}
.recharge-overview .recharge-stat-grid {
  margin: 0;
}
.recharge-stat-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.recharge-stat-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.recharge-stat-card .s-split {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
}
.recharge-stat-card .s-split-stack {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}
.recharge-stat-card .s-split-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(248, 250, 252, 0.9);
}
.recharge-stat-card .s-split-item b {
  font-weight: 800;
  font-size: 13px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.recharge-stat-card .s-split-new {
  background: #ecfdf5;
}
.recharge-stat-card .s-split-new b { color: #047857; }
.recharge-stat-card .s-split-old {
  background: #fff7ed;
}
.recharge-stat-card .s-split-old b { color: #c2410c; }
@media (max-width: 960px) {
  .recharge-stat-grid-3,
  .recharge-stat-grid-2 {
    grid-template-columns: 1fr;
  }
}

.admin-body .recharge-stat-grid-3 {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px;
}
.admin-body .recharge-stat-grid-2 {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px;
}
@media (max-width: 960px) {
  .admin-body .recharge-stat-grid-3,
  .admin-body .recharge-stat-grid-2 {
    grid-template-columns: 1fr !important;
  }
}


.rd-toolbar .rd-date-label {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  white-space: nowrap;
}
.rd-toolbar .rd-date-sep {
  color: #94a3b8;
  font-size: 12px;
}
.rd-toolbar .date-input {
  min-width: 132px;
}

/* 营收情况 */
.rev-config-panel {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px 12px;
  margin-bottom: 16px;
}
.rev-config-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 14px;
  align-items: end;
}
.rev-config-grid .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}
.rev-config-grid .field > span {
  font-size: 12px;
  color: #5b6b7c;
  font-weight: 600;
}
.rev-config-grid input,
.rev-config-grid select {
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 10px;
  font-size: 13px;
  background: #fff;
}
.rev-config-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.rev-tiers-panel {
  margin-bottom: 16px;
}
.rev-tier-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px 12px;
  align-items: end;
}
.rev-tier-form .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}
.rev-tier-form .field > span {
  font-size: 12px;
  color: #5b6b7c;
  font-weight: 600;
}
.rev-tier-form input {
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 10px;
  font-size: 13px;
  background: #fff;
}
.rev-summary-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.rev-card-all {
  border-color: rgba(15, 118, 110, 0.35);
}
.rev-split-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}
.rev-split-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
}
.rev-split-card .s-label {
  font-size: 12px;
  color: #7a8a9a;
  font-weight: 600;
}
.rev-split-card .s-value {
  margin-top: 6px;
  font-size: 22px;
  font-weight: 800;
  color: #0f766e;
}
.rev-split-card .s-sub {
  margin-top: 4px;
  font-size: 12px;
  color: #7a8a9a;
}
.rev-split-total {
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdfa 100%);
  border-color: rgba(15, 118, 110, 0.28);
}
@media (max-width: 1100px) {
  .rev-config-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rev-tier-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rev-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rev-split-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .rev-config-grid { grid-template-columns: 1fr; }
  .rev-tier-form { grid-template-columns: 1fr; }
  .rev-summary-grid { grid-template-columns: 1fr; }
}


/* CPA 注册时长分档 */
.rev-cpa-panel {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px 12px;
  margin-bottom: 16px;
}
.rev-cpa-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 14px;
  align-items: end;
}
.rev-cpa-grid .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}
.rev-cpa-grid .field > span {
  font-size: 12px;
  color: #5b6b7c;
  font-weight: 600;
}
.rev-cpa-grid input {
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 10px;
  font-size: 13px;
  background: #fff;
}

/* 支出逻辑设置 */
.exp-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}
.exp-ym-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  min-width: 160px;
}
.exp-ym-field > span {
  font-size: 12px;
  color: #5b6b7c;
  font-weight: 600;
}
.exp-ym-field input {
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 10px;
  font-size: 13px;
  background: #fff;
}
.exp-summary-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 8px;
}
.exp-card-total {
  border-color: rgba(185, 28, 28, 0.28);
  background: linear-gradient(135deg, #fef2f2 0%, #fff7ed 100%);
}
.exp-block {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px 14px;
  margin: 14px 0;
}
.exp-table-wrap {
  overflow-x: auto;
  margin-top: 8px;
}
.exp-table {
  width: 100%;
  font-size: 13px;
}
.exp-table th,
.exp-table td {
  padding: 8px 10px;
  vertical-align: middle;
}
.exp-table .empty-row {
  text-align: center;
  color: #94a3b8;
  padding: 16px;
}
.exp-cell-input {
  width: 100%;
  min-width: 80px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 8px;
  font-size: 13px;
  background: #fff;
}
.exp-cell-input.exp-money {
  max-width: 120px;
  text-align: right;
}
.exp-inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}
.exp-inline-form input[type="text"],
.exp-inline-form input[type="number"] {
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 10px;
  font-size: 13px;
  background: #fff;
  min-width: 120px;
}
.exp-record-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px 12px;
  align-items: end;
  margin-top: 8px;
}
.exp-record-form .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}
.exp-record-form .field > span {
  font-size: 12px;
  color: #5b6b7c;
  font-weight: 600;
}
.exp-record-form input {
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 10px;
  font-size: 13px;
  background: #fff;
}
.exp-record-form .exp-note-field {
  grid-column: span 2;
}
.exp-form-actions {
  display: flex;
  align-items: end;
  gap: 8px;
}
.exp-salary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 1100px) {
  .exp-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .exp-record-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .exp-record-form .exp-note-field { grid-column: span 2; }
  .exp-salary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .exp-summary-grid { grid-template-columns: 1fr; }
  .exp-record-form { grid-template-columns: 1fr; }
  .exp-record-form .exp-note-field { grid-column: span 1; }
  .exp-salary-grid { grid-template-columns: 1fr; }
}
.rev-bucket-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}
@media (max-width: 900px) {
  .rev-cpa-grid { grid-template-columns: 1fr; }
  .rev-bucket-grid { grid-template-columns: 1fr; }
}

/* 账户与权限 */
.admin-user-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #dbe3ea;
  border-radius: 6px;
  color: #334155;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
}
.account-section-head,
.account-pane-head,
.settings-dialog-head,
.settings-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.account-section-head { align-items: flex-start; margin-bottom: 12px; }
.account-section-head h2,
.account-pane-head h3,
.settings-dialog-head h2 { margin: 0; }
.account-head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.account-summary {
  margin-bottom: 12px;
  color: #64748b;
  font-size: 12px;
}
.account-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 14px;
  align-items: start;
}
.account-pane {
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}
.account-pane-head {
  min-height: 52px;
  padding: 9px 12px;
  border-bottom: 1px solid #e8edf2;
}
.account-pane-head h3 { font-size: 15px; }
.account-pane-head input { width: min(230px, 45%); }
.account-table-wrap { overflow: auto; max-height: 560px; }
.account-table { min-width: 760px; }
.account-name { display: flex; align-items: center; gap: 7px; font-weight: 700; color: #172033; }
.account-badge {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.account-badge.on { color: #16734a; background: #e9f7ef; }
.account-badge.off { color: #a53b3b; background: #fff0f0; }
.account-badge.first { color: #8a5b00; background: #fff5d8; }
.account-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.account-actions .btn { min-height: 28px; padding: 3px 8px; }
.template-list { display: grid; gap: 0; max-height: 560px; overflow: auto; }
.template-item {
  padding: 12px;
  border-bottom: 1px solid #e8edf2;
}
.template-item:last-child { border-bottom: 0; }
.template-item-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.template-item strong { color: #172033; font-size: 14px; }
.template-item p { margin: 5px 0 8px; color: #64748b; font-size: 12px; line-height: 1.55; }
.template-item-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #7b8794; font-size: 11px; }
.template-item-actions { display: flex; gap: 5px; }

.settings-dialog {
  position: fixed;
  inset: 0;
  width: min(920px, calc(100vw - 32px));
  max-height: min(820px, calc(100vh - 32px));
  padding: 0;
  margin: auto;
  border: 1px solid #dbe3ea;
  border-radius: 8px;
  color: #172033;
  background: #fff;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.28);
}
.settings-dialog::backdrop { background: rgba(15, 23, 42, 0.52); }
.settings-dialog-form { display: flex; flex-direction: column; max-height: min(820px, calc(100vh - 32px)); }
.settings-dialog-head { flex: 0 0 auto; padding: 18px 20px 14px; border-bottom: 1px solid #e6ebf0; }
.settings-dialog-head h2 { margin-top: 3px; font-size: 20px; }
.dialog-close {
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}
.settings-fields { display: grid; gap: 12px; padding: 16px 20px 4px; }
.settings-fields.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.settings-fields label { display: grid; gap: 6px; color: #475569; font-size: 12px; font-weight: 700; }
.settings-fields input,
.settings-fields select {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid #cfd8e3;
  border-radius: 6px;
  background: #fff;
  color: #172033;
}
.settings-dialog-form > .emp-hint { padding: 0 20px; }
.permission-editor { flex: 1 1 auto; overflow: auto; padding: 14px 20px 18px; }
.permission-group { margin-bottom: 12px; border: 1px solid #e2e8f0; border-radius: 6px; overflow: hidden; }
.permission-group:last-child { margin-bottom: 0; }
.permission-group h3 { margin: 0; padding: 8px 11px; background: #f7f9fb; color: #334155; font-size: 13px; }
.permission-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
.permission-option {
  display: flex;
  align-items: center;
  min-height: 42px;
  gap: 8px;
  padding: 8px 11px;
  border-top: 1px solid #edf1f4;
  color: #475569;
  font-size: 12px;
}
.permission-option:nth-child(odd) { border-right: 1px solid #edf1f4; }
.permission-option input { width: 16px; height: 16px; }
.permission-option select { width: 116px; height: 30px; margin-left: auto; border: 1px solid #cfd8e3; border-radius: 5px; background: #fff; }
.permission-kind { margin-left: auto; color: #94a3b8; font-size: 11px; }
.account-permission-editor .permission-kind { display: none; }
.settings-dialog-actions { flex: 0 0 auto; padding: 12px 20px; border-top: 1px solid #e6ebf0; background: #fafbfc; }
.login-step-note { margin: 0 0 14px; color: #64748b; font-size: 13px; line-height: 1.6; }

@media (max-width: 1100px) {
  .account-layout { grid-template-columns: 1fr; }
  .template-list { max-height: 360px; }
}
@media (max-width: 720px) {
  .admin-user-chip { display: none; }
  .account-section-head { display: grid; }
  .account-head-actions { width: 100%; }
  .account-head-actions .btn { flex: 1; }
  .settings-fields.two-col,
  .permission-options { grid-template-columns: 1fr; }
  .permission-option:nth-child(odd) { border-right: 0; }
}

/* ========== 移动端内嵌后台 ?embed=1 ========== */
html.admin-embed-html,
html.admin-embed-html body.admin-body {
  height: 100%;
  min-height: 100%;
  max-height: 100%;
  overflow: hidden;
}
body.admin-body.admin-embed {
  --admin-sidebar-w: 0px;
  height: 100%;
  min-height: 100%;
  max-height: 100%;
  overflow: hidden;
}
body.admin-body.admin-embed .admin-app {
  height: 100%;
  min-height: 100%;
  max-height: 100%;
  grid-template-columns: minmax(0, 1fr);
}
body.admin-body.admin-embed .admin-sidebar {
  display: none !important;
}
body.admin-body.admin-embed .admin-workspace {
  min-width: 0;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}
/* 手机内嵌：去掉顶栏标题/面包屑（宿主页已有底栏+更多菜单；刷新/抓取/退出用宿主顶栏） */
body.admin-body.admin-embed .admin-nav,
body.admin-body.admin-embed .admin-content-head,
body.admin-body.admin-embed .admin-status,
body.admin-body.admin-embed .admin-eyebrow {
  display: none !important;
}
/* 所有说明性文字隐藏（PC 端不受影响） */
body.admin-body.admin-embed .emp-hint,
body.admin-body.admin-embed p.emp-hint,
body.admin-body.admin-embed .panel > p,
body.admin-body.admin-embed .m-hint,
body.admin-body.admin-embed .display-save-hint,
body.admin-body.admin-embed #accountFormHint,
body.admin-body.admin-embed #revFormulaHint {
  display: none !important;
}
/* 面板标题下的灰色说明 span */
body.admin-body.admin-embed .panel > h2 > span,
body.admin-body.admin-embed .pnl-block-title > span {
  display: none !important;
}
body.admin-body.admin-embed .admin-content-scroll {
  height: 100%;
  max-height: none;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 10px 20px;
}
body.admin-body.admin-embed .admin-workspace {
  display: flex;
  flex-direction: column;
}
body.admin-body.admin-embed .admin-main {
  padding: 0;
}
/* 内嵌时去掉面板大标题（宿主「更多」已标明当前板块，避免再叠一层标题） */
body.admin-body.admin-embed .panel > h2 {
  display: none !important;
}
body.admin-body.admin-embed .panel,
body.admin-body.admin-embed .stat-grid,
body.admin-body.admin-embed .recharge-stat-grid {
  margin-left: 0;
  margin-right: 0;
}
body.admin-body.admin-embed table.data {
  font-size: 12px;
}
body.admin-body.admin-embed .emp-subnav,
body.admin-body.admin-embed .m-toolbar,
body.admin-body.admin-embed .toolbar {
  flex-wrap: wrap;
}
body.admin-body.admin-embed .site-footer {
  display: none !important;
}

/* ========== 移动端内嵌：各管理板块专项适配 ========== */
/* 卡片与间距：手机一屏更紧凑、可触控 */
body.admin-body.admin-embed .panel {
  padding: 12px 12px 16px;
  border-radius: 12px;
  margin-bottom: 10px;
  box-shadow: 0 2px 10px rgba(44, 62, 80, 0.05);
}
body.admin-body.admin-embed .pnl-block-title {
  margin: 14px 0 8px;
  font-size: 13px;
  font-weight: 800;
  color: #334155;
  letter-spacing: 0.02em;
}
body.admin-body.admin-embed .pnl-block-title:first-child {
  margin-top: 4px;
}

/* 详细概览：注册 2×2，充值竖排卡片 */
body.admin-body.admin-embed .stat-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px;
}
body.admin-body.admin-embed .stat-card {
  padding: 12px 12px 10px;
  border-radius: 12px;
}
body.admin-body.admin-embed .stat-card .s-label {
  font-size: 11px;
  line-height: 1.35;
}
body.admin-body.admin-embed .stat-card .s-value {
  font-size: 22px;
  margin-top: 4px;
}
body.admin-body.admin-embed .stat-card .s-sub {
  font-size: 11px;
  margin-top: 4px;
  line-height: 1.4;
}
body.admin-body.admin-embed .recharge-overview {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
body.admin-body.admin-embed .recharge-stat-grid,
body.admin-body.admin-embed .recharge-stat-grid-3,
body.admin-body.admin-embed .recharge-stat-grid-2 {
  grid-template-columns: 1fr !important;
  gap: 8px;
}
body.admin-body.admin-embed .recharge-stat-card {
  padding: 12px 14px;
  border-radius: 12px;
}
body.admin-body.admin-embed .recharge-stat-card .s-value {
  font-size: 22px;
}
body.admin-body.admin-embed .recharge-stat-card .s-sub {
  font-size: 11px;
  line-height: 1.45;
}
body.admin-body.admin-embed .s-split,
body.admin-body.admin-embed .s-split-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 8px;
}
body.admin-body.admin-embed .s-split-item {
  font-size: 11px;
  padding: 6px 8px;
  border-radius: 8px;
  background: #f8fafc;
  line-height: 1.35;
}
body.admin-body.admin-embed #regMetricHint {
  font-size: 11px !important;
  line-height: 1.45 !important;
  margin: 4px 0 8px !important;
  padding: 8px 10px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e8eef4;
}

/* 经营盈亏：2 列指标卡，拇指可扫读 */
body.admin-body.admin-embed .pnl-stat-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px;
}
body.admin-body.admin-embed .pnl-stat-card {
  padding: 12px;
  border-radius: 12px;
  min-width: 0;
}
body.admin-body.admin-embed .pnl-stat-card .s-label {
  font-size: 11px;
  margin-bottom: 4px;
}
body.admin-body.admin-embed .pnl-stat-card .s-value {
  font-size: 18px;
  word-break: break-all;
}
body.admin-body.admin-embed .pnl-stat-card .s-sub {
  font-size: 10px;
  margin-top: 4px;
  line-height: 1.4;
}

/* 营收逻辑设置：表单竖排 + 按钮全宽 */
body.admin-body.admin-embed .rev-config-panel {
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 12px;
}
body.admin-body.admin-embed .rev-config-grid {
  grid-template-columns: 1fr !important;
  gap: 10px;
}
body.admin-body.admin-embed .rev-config-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
}
body.admin-body.admin-embed .rev-config-actions .btn {
  width: 100%;
  min-height: 40px;
  justify-content: center;
}
body.admin-body.admin-embed .rev-cpa-grid {
  display: grid;
  grid-template-columns: 1fr !important;
  gap: 10px;
}
body.admin-body.admin-embed .rev-summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
body.admin-body.admin-embed .rev-split-grid,
body.admin-body.admin-embed .rev-bucket-grid {
  grid-template-columns: 1fr !important;
  gap: 8px;
}
body.admin-body.admin-embed .rev-split-card {
  padding: 12px 14px;
}
body.admin-body.admin-embed .rev-split-card .s-value {
  font-size: 20px;
}

/* 支出逻辑设置：概览 2 列，表单竖排，表格横向滚动 */
body.admin-body.admin-embed .exp-summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px;
}
body.admin-body.admin-embed .exp-card-total {
  grid-column: 1 / -1;
}
body.admin-body.admin-embed .exp-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
}
body.admin-body.admin-embed .exp-ym-field {
  flex: 1 1 140px;
  min-width: 0;
}
body.admin-body.admin-embed .exp-toolbar .btn {
  min-height: 40px;
}
body.admin-body.admin-embed .exp-block {
  margin-top: 12px;
  padding-top: 4px;
}
body.admin-body.admin-embed .exp-inline-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: stretch;
}
body.admin-body.admin-embed .exp-inline-form input[type="text"] {
  grid-column: 1 / -1;
  min-width: 0;
  width: 100%;
  height: 40px;
}
body.admin-body.admin-embed .exp-inline-form input[type="number"] {
  min-width: 0;
  width: 100%;
  height: 40px;
}
body.admin-body.admin-embed .exp-inline-form .btn {
  min-height: 40px;
  width: 100%;
  justify-content: center;
}
body.admin-body.admin-embed .exp-record-form {
  grid-template-columns: 1fr !important;
  gap: 10px;
}
body.admin-body.admin-embed .exp-record-form .exp-note-field {
  grid-column: 1 / -1 !important;
}
body.admin-body.admin-embed .exp-form-actions {
  width: 100%;
}
body.admin-body.admin-embed .exp-form-actions .btn {
  width: 100%;
  min-height: 42px;
  justify-content: center;
}
body.admin-body.admin-embed .exp-table-wrap,
body.admin-body.admin-embed .emp-table-wrap,
body.admin-body.admin-embed [style*="overflow:auto"] {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -4px;
  padding: 0 4px;
  max-width: 100%;
}
body.admin-body.admin-embed table.data {
  min-width: 520px;
  font-size: 12px;
}
body.admin-body.admin-embed table.data th,
body.admin-body.admin-embed table.data td {
  padding: 8px 6px;
  white-space: nowrap;
}
body.admin-body.admin-embed .exp-cell-input,
body.admin-body.admin-embed .exp-cell-input.exp-money {
  max-width: 88px;
  height: 34px;
  font-size: 13px;
}

/* 人员 / 薪酬 / 结算：二级 Tab 铺满，工具栏竖排 */
body.admin-body.admin-embed .emp-subnav {
  width: 100%;
  max-width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  margin-bottom: 12px;
  box-sizing: border-box;
}
body.admin-body.admin-embed .emp-subnav-item {
  min-height: 40px;
  padding: 8px 4px;
  font-size: 12px;
  text-align: center;
  justify-content: center;
}
body.admin-body.admin-embed .emp-toolbar,
body.admin-body.admin-embed .salary-toolbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
body.admin-body.admin-embed .emp-toolbar > select,
body.admin-body.admin-embed .emp-toolbar > input,
body.admin-body.admin-embed .salary-toolbar > label,
body.admin-body.admin-embed .salary-toolbar > select,
body.admin-body.admin-embed .salary-toolbar > input {
  width: 100%;
  min-height: 40px;
}
body.admin-body.admin-embed .emp-toolbar-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
}
body.admin-body.admin-embed .emp-toolbar-actions .btn {
  width: 100%;
  min-height: 40px;
  justify-content: center;
  font-size: 12px;
  padding: 8px 6px;
}
body.admin-body.admin-embed .emp-toolbar-actions .emp-selected-meta,
body.admin-body.admin-embed #empSelectedMeta,
body.admin-body.admin-embed #salaryPayrollStatus {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 12px;
  padding: 4px 0;
}
body.admin-body.admin-embed .salary-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px;
  font-size: 12px;
}
body.admin-body.admin-embed .salary-summary strong {
  display: block;
  margin-top: 2px;
  font-size: 15px;
}
body.admin-body.admin-embed .emp-tab-panel > h2,
body.admin-body.admin-embed .emp-subheading {
  font-size: 14px;
  margin: 12px 0 8px;
}
body.admin-body.admin-embed .emp-tab-panel > h2 > span {
  display: block !important;
  margin-top: 4px;
  font-size: 11px !important;
  font-weight: 500;
  color: #7a8a9a;
}
/* 结算工具栏：表单字段全宽堆叠 */
body.admin-body.admin-embed .emp-tab-panel[data-emp-panel="settle"] .emp-toolbar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
body.admin-body.admin-embed .emp-tab-panel[data-emp-panel="settle"] .emp-toolbar > * {
  width: 100%;
  min-width: 0;
}
body.admin-body.admin-embed .emp-tab-panel[data-emp-panel="settle"] .emp-toolbar .btn {
  min-height: 42px;
  justify-content: center;
}
body.admin-body.admin-embed .inline-input {
  width: 100% !important;
  min-width: 0 !important;
  height: 40px;
  box-sizing: border-box;
}

/* 业绩考核：日期筛选竖排 + 宽表横滑 */
body.admin-body.admin-embed [data-admin-view="analysis"] .toolbar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: center;
}
body.admin-body.admin-embed [data-admin-view="analysis"] .toolbar > .check-inline:first-child {
  grid-column: 1 / -1;
  font-weight: 700;
  font-size: 12px;
  color: #64748b;
}
body.admin-body.admin-embed [data-admin-view="analysis"] .toolbar > input[type="date"] {
  width: 100%;
  min-height: 40px;
  box-sizing: border-box;
}
body.admin-body.admin-embed [data-admin-view="analysis"] .toolbar > span {
  display: none;
}
body.admin-body.admin-embed [data-admin-view="analysis"] .toolbar > #btnAnalysisToday {
  grid-column: 1 / 2;
  min-height: 40px;
  width: 100%;
  justify-content: center;
}
body.admin-body.admin-embed [data-admin-view="analysis"] .toolbar > .check-inline:not(:first-child) {
  grid-column: 2 / 3;
  min-height: 40px;
  align-items: center;
  font-size: 12px;
}
body.admin-body.admin-embed [data-admin-view="analysis"] .toolbar > #btnAnalysisReload {
  grid-column: 1 / -1;
  min-height: 42px;
  width: 100%;
  justify-content: center;
}
body.admin-body.admin-embed [data-admin-view="analysis"] > div[style*="overflow"] {
  max-height: none !important;
  margin-top: 10px !important;
  border: 1px solid #e8eef4;
  border-radius: 10px;
  background: #fff;
}
body.admin-body.admin-embed #analysisTable {
  min-width: 720px;
}
/* 业绩考核摘要在 h2 内：恢复 h2 容器，仅展示摘要条 */
body.admin-body.admin-embed [data-admin-view="analysis"] > h2 {
  display: block !important;
  margin: 0 0 8px;
  padding: 0;
  font-size: 0;
  line-height: 0;
  border: 0;
  background: transparent;
}
body.admin-body.admin-embed [data-admin-view="analysis"] > h2 > span#analysisSummary,
body.admin-body.admin-embed #analysisSummary {
  display: block !important;
  margin: 0;
  padding: 8px 10px;
  font-size: 12px !important;
  font-weight: 600;
  line-height: 1.45;
  color: #475569;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e8eef4;
}

/* 通用：触控友好按钮与表单 */
body.admin-body.admin-embed .btn {
  min-height: 36px;
  border-radius: 10px;
}
body.admin-body.admin-embed .btn-mini {
  min-height: 38px;
  padding: 8px 10px;
}
body.admin-body.admin-embed input[type="date"],
body.admin-body.admin-embed input[type="month"],
body.admin-body.admin-embed input[type="number"],
body.admin-body.admin-embed input[type="text"],
body.admin-body.admin-embed input[type="search"],
body.admin-body.admin-embed select {
  min-height: 40px;
  font-size: 14px !important;
  border-radius: 10px;
}
body.admin-body.admin-embed .field > span {
  font-size: 12px;
  margin-bottom: 2px;
}
body.admin-body.admin-embed .check-inline {
  min-height: 36px;
  align-items: center;
  gap: 6px;
}
body.admin-body.admin-embed .check-inline input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 0;
}

/* 窄屏再收紧 */
@media (max-width: 420px) {
  body.admin-body.admin-embed .admin-content-scroll {
    padding: 6px 8px 24px;
  }
  body.admin-body.admin-embed .stat-card .s-value,
  body.admin-body.admin-embed .recharge-stat-card .s-value {
    font-size: 20px;
  }
  body.admin-body.admin-embed .pnl-stat-card .s-value {
    font-size: 16px;
  }
  body.admin-body.admin-embed .emp-subnav-item {
    font-size: 11px;
    padding: 8px 2px;
  }
  body.admin-body.admin-embed .emp-toolbar-actions {
    grid-template-columns: 1fr;
  }
  body.admin-body.admin-embed .s-split,
  body.admin-body.admin-embed .s-split-stack {
    grid-template-columns: 1fr;
  }
}

/* 横屏手机：指标可 3~4 列 */
@media (min-width: 560px) and (max-width: 900px) {
  body.admin-body.admin-embed .stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
  body.admin-body.admin-embed .recharge-stat-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
  body.admin-body.admin-embed .recharge-stat-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  body.admin-body.admin-embed .pnl-stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
  body.admin-body.admin-embed .rev-summary-grid,
  body.admin-body.admin-embed .exp-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}
